Changeset b3b8b5733533d23a052c2bb6e23893033e1c25d0
- Timestamp:
- 05/01/07 13:36:50
(2 years ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1178019410 +0200
- git-parent:
[3534e92e1df0f391dccaac05456d36ce5e5c340b]
- git-author:
- Christopher Jung <bktheg@web.de> 1178019410 +0200
- Message:
Warnmeldung, falls ein Offizier auf einem nicht mehr vorhandenen Schiff ist
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r87a1eec |
rb3b8b57 |
|
| 26 | 26 | import net.driftingsouls.ds2.server.framework.Context; |
|---|
| 27 | 27 | import net.driftingsouls.ds2.server.framework.ContextMap; |
|---|
| | 28 | import net.driftingsouls.ds2.server.framework.Loggable; |
|---|
| 28 | 29 | import net.driftingsouls.ds2.server.framework.User; |
|---|
| 29 | 30 | import net.driftingsouls.ds2.server.framework.db.Database; |
|---|
| 30 | 31 | import net.driftingsouls.ds2.server.framework.db.SQLQuery; |
|---|
| | 32 | import net.driftingsouls.ds2.server.framework.db.SQLResultRow; |
|---|
| 31 | 33 | import net.driftingsouls.ds2.server.modules.StatsController; |
|---|
| 32 | 34 | |
|---|
| … | … | |
| 36 | 38 | * |
|---|
| 37 | 39 | */ |
|---|
| 38 | | public class StatOwnOffiziere implements Statistic { |
|---|
| | 40 | public class StatOwnOffiziere implements Statistic, Loggable { |
|---|
| 39 | 41 | |
|---|
| 40 | 42 | public void show(StatsController contr, int size) { |
|---|
| … | … | |
| 73 | 75 | if( dest[0].equals("s") ) { |
|---|
| 74 | 76 | if( !ships.containsKey(destid) ) { |
|---|
| 75 | | ships.put(destid, db.first("SELECT name FROM ships WHERE id>0 AND id=",destid).getString("name")); |
|---|
| | 77 | SQLResultRow ship = db.first("SELECT name FROM ships WHERE id>0 AND id=",destid); |
|---|
| | 78 | if( ship.isEmpty() ) { |
|---|
| | 79 | LOG.warn("Offizier '"+offizier.getID()+"' befindet sich auf einem ungueltigen Schiff: "+destid); |
|---|
| | 80 | ships.put(destid, ""); |
|---|
| | 81 | } |
|---|
| | 82 | else { |
|---|
| | 83 | ships.put(destid, ship.getString("name")); |
|---|
| | 84 | } |
|---|
| 76 | 85 | } |
|---|
| 77 | 86 | String shipname = ships.get(destid); |
|---|