Changeset 0026c28cafbc2e741fcc0a51f27b37a048a10309

Show
Ignore:
Timestamp:
05/01/07 13:36:11 (2 years ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1178019371 +0200
git-parent:

[c031b9576cfdf5e46a6b90be41e37f36474f6577]

git-author:
Christopher Jung <bktheg@web.de> 1178019371 +0200
Message:

Warnmeldung, falls ein Schiffstyp mit Schiffsdaten ohne status und type abgefragt wird, sowie die Benutzung von Bildern bei Grafikpaks verbessert

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/net/driftingsouls/ds2/server/ships/ShipTypes.java

    r1dacfac r0026c28  
    384384         */ 
    385385        public static SQLResultRow getShipType( SQLResultRow shipdata, boolean plaindata ) { 
     386                if( !shipdata.containsKey("type") || !shipdata.containsKey("status") ) { 
     387                        Database db = ContextMap.getContext().getDatabase(); 
     388                        shipdata = db.first("SELECT * FROM ships WHERE id="+shipdata.getInt("id")); 
     389                        LOG.warn("getShipType: type oder status fehlen in den Schiffsdaten", new Throwable()); 
     390                } 
     391                 
    386392                int shiptype = shipdata.getInt("type"); 
    387393                 
     
    463469                                picture = shiptypes.get(shiptype).getString("picture"); 
    464470                        } 
     471                        else { 
     472                                picture = shipdata.getString("picture"); 
     473                        } 
    465474         
    466475                        type.put("picture", buildShipPicturePath(type, (!shiptypes.get(shiptype).getString("picture").equals(picture) ? true : false) ));