Changeset 6422552e6576d46ff8b90ecf3db4ff6bee2db0ec
- Timestamp:
- 06/03/07 16:26:29 (1 year ago)
- git-parent:
- Files:
-
- src/net/driftingsouls/ds2/server/entities/OrderOffizier.java (added)
- src/net/driftingsouls/ds2/server/entities/OrderShip.java (added)
- src/net/driftingsouls/ds2/server/modules/AllyController.java (modified) (5 diffs)
- src/net/driftingsouls/ds2/server/modules/AngriffController.java (modified) (3 diffs)
- src/net/driftingsouls/ds2/server/modules/ErsteigernController.java (modified) (3 diffs)
- src/net/driftingsouls/ds2/server/modules/ForschinfoController.java (modified) (2 diffs)
- src/net/driftingsouls/ds2/server/modules/ItemInfoController.java (modified) (4 diffs)
- src/net/driftingsouls/ds2/server/modules/NPCOrderController.java (modified) (2 diffs)
- src/net/driftingsouls/ds2/server/modules/ScanController.java (modified) (3 diffs)
- src/net/driftingsouls/ds2/server/modules/SchiffController.java (modified) (1 diff)
- src/net/driftingsouls/ds2/server/modules/UeberController.java (modified) (2 diffs)
- src/net/driftingsouls/ds2/server/ships/Ship.java (modified) (4 diffs)
- src/net/driftingsouls/ds2/server/ships/ShipFleet.java (added)
- src/net/driftingsouls/ds2/server/ships/ShipLoot.java (added)
- src/net/driftingsouls/ds2/server/ships/ShipModules.java (added)
- src/net/driftingsouls/ds2/server/ships/ShipType.java (added)
- src/net/driftingsouls/ds2/server/ships/ShipTypeData.java (added)
- src/net/driftingsouls/ds2/server/ships/ShipTypeDataPictureWrapper.java (added)
- src/net/driftingsouls/ds2/server/tick/regular/RestTick.java (modified) (2 diffs)
- src/net/driftingsouls/ds2/server/werften/WerftObject.java (modified) (3 diffs)
- web/WEB-INF/cfg/hibernatemappings.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/net/driftingsouls/ds2/server/modules/AllyController.java
r9c1e106 r6422552 41 41 import net.driftingsouls.ds2.server.framework.pipeline.generators.DSGenerator; 42 42 import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; 43 import net.driftingsouls.ds2.server.ships.Ship; 44 import net.driftingsouls.ds2.server.ships.ShipTypeData; 43 45 import net.driftingsouls.ds2.server.ships.ShipTypes; 44 46 import net.driftingsouls.ds2.server.tasks.Task; … … 1293 1295 SQLQuery s = db.query("SELECT name,type,time,owner FROM ships_lost WHERE destally=",this.ally.getId()," ORDER BY time DESC LIMIT ",destpos,",10"); 1294 1296 while( s.next() ) { 1295 S QLResultRow shiptype = ShipTypes.getShipType( s.getInt("type"), false );1297 ShipTypeData shiptype = Ship.getShipType( s.getInt("type"), false ); 1296 1298 1297 1299 counter++; … … 1307 1309 1308 1310 t.set_var( "show.destships.name", s.getString("name"), 1309 "show.destships.type.name", shiptype.get String("nickname"),1311 "show.destships.type.name", shiptype.getNickname(), 1310 1312 "show.destships.type", s.getInt("type"), 1311 "show.destships.type.picture", shiptype.get String("picture"),1313 "show.destships.type.picture", shiptype.getPicture(), 1312 1314 "show.destships.owner", Common._title(ownername), 1313 1315 "show.destships.time", Common.date("d.m.Y H:i:s",s.getLong("time")), … … 1346 1348 s = db.query("SELECT name,type,time,owner,destowner FROM ships_lost WHERE ally=",this.ally.getId()," ORDER BY time DESC LIMIT ",lostpos,",10"); 1347 1349 while( s.next() ) { 1348 S QLResultRow shiptype = ShipTypes.getShipType( s.getInt("type"), false );1350 ShipTypeData shiptype = Ship.getShipType( s.getInt("type"), false ); 1349 1351 1350 1352 counter++; … … 1370 1372 1371 1373 t.set_var( "show.lostships.name", s.getString("name"), 1372 "show.lostships.type.name", shiptype.get String("nickname"),1374 "show.lostships.type.name", shiptype.getNickname(), 1373 1375 "show.lostships.type", s.getInt("type"), 1374 "show.lostships.type.picture", shiptype.get String("picture"),1376 "show.lostships.type.picture", shiptype.getPicture(), 1375 1377 "show.lostships.owner", Common._title(destownername), 1376 1378 "show.lostships.destroyer", Common._title(ownername), src/net/driftingsouls/ds2/server/modules/AngriffController.java
r3924571 r6422552 77 77 import net.driftingsouls.ds2.server.modules.ks.KSTakeCommandAction; 78 78 import net.driftingsouls.ds2.server.modules.ks.KSUndockAllAction; 79 import net.driftingsouls.ds2.server.ships.Ship; 80 import net.driftingsouls.ds2.server.ships.ShipTypeData; 79 81 import net.driftingsouls.ds2.server.ships.ShipTypes; 80 82 … … 994 996 final String key = stid+":"+i; 995 997 996 S QLResultRow shiptype = ShipTypes.getShipType(stid, false);998 ShipTypeData shiptype = Ship.getShipType(stid, false); 997 999 GroupEntry data = groupdata.get(key); 998 1000 999 1001 t.set_var( "shiptypelist.count", count, 1000 "shiptypelist.name", shiptype.get String("nickname"),1002 "shiptypelist.name", shiptype.getNickname(), 1001 1003 "shiptypelist.groupid", key, 1002 1004 "shiptypelist.id", stid, 1003 "shiptypelist.image", shiptype.get String("picture"),1005 "shiptypelist.image", shiptype.getPicture(), 1004 1006 "shiptypelist.side", "own", 1005 1007 "shiptypelist.otherside", "enemy", … … 1212 1214 1213 1215 final String key = stid+":"+i; 1214 S QLResultRow shiptype = ShipTypes.getShipType(stid, false);1216 ShipTypeData shiptype = Ship.getShipType(stid, false); 1215 1217 1216 1218 GroupEntry data = groupdata.get(key); 1217 1219 1218 1220 t.set_var( "shiptypelist.count", count, 1219 "shiptypelist.name", shiptype.get String("nickname"),1221 "shiptypelist.name", shiptype.getNickname(), 1220 1222 "shiptypelist.id", stid, 1221 1223 "shiptypelist.groupid", stid+":"+i, 1222 "shiptypelist.image", Ship Types.getShipType(stid, false).getString("picture"),1224 "shiptypelist.image", Ship.getShipType(stid, false).getPicture(), 1223 1225 "shiptypelist.side", "enemy", 1224 1226 "shiptypelist.otherside", "own", src/net/driftingsouls/ds2/server/modules/ErsteigernController.java
r3924571 r6422552 49 49 import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; 50 50 import net.driftingsouls.ds2.server.ships.JumpNodeRouter; 51 import net.driftingsouls.ds2.server.ships.Ship; 52 import net.driftingsouls.ds2.server.ships.ShipTypeData; 51 53 import net.driftingsouls.ds2.server.ships.ShipTypes; 52 54 import net.driftingsouls.ds2.server.tasks.Taskmanager; … … 529 531 530 532 if( entry.getInt("mtype") == 1 ) { //Schiff 531 S QLResultRow shiptype = ShipTypes.getShipType(entry.getInt("type"), false);532 entryname = shiptype.get String("nickname");533 entryimage = shiptype.get String("picture");533 ShipTypeData shiptype = Ship.getShipType(entry.getInt("type"), false); 534 entryname = shiptype.getNickname(); 535 entryimage = shiptype.getPicture(); 534 536 entrylink = Common.buildUrl(getContext(), "default", "module", "schiffinfo", "ship", entry.getInt("type") ); 535 537 } … … 607 609 608 610 if( entry.getInt("mtype") == 1 ) { 609 S QLResultRow shiptype = ShipTypes.getShipType(entry.getInt("type"), false);610 entryname = shiptype.get String("nickname");611 ShipTypeData shiptype = Ship.getShipType(entry.getInt("type"), false); 612 entryname = shiptype.getNickname(); 611 613 } 612 614 else if( entry.getInt("mtype") == 2 ) { src/net/driftingsouls/ds2/server/modules/ForschinfoController.java
r3924571 r6422552 41 41 import net.driftingsouls.ds2.server.framework.pipeline.generators.DSGenerator; 42 42 import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; 43 import net.driftingsouls.ds2.server.ships.Ship; 44 import net.driftingsouls.ds2.server.ships.ShipTypeData; 43 45 import net.driftingsouls.ds2.server.ships.ShipTypes; 44 46 … … 348 350 t.start_record(); 349 351 350 S QLResultRow shiptype = ShipTypes.getShipType(ship.getInt("type"), false);352 ShipTypeData shiptype = Ship.getShipType(ship.getInt("type"), false); 351 353 352 354 t.set_var( "tech.ship.id", ship.getInt("type"), 353 355 "tech.ship.name", Common._plaintitle(ship.getString("nickname")), 354 "tech.ship.picture", shiptype.get String("picture"),356 "tech.ship.picture", shiptype.getPicture(), 355 357 "tech.ship.hr", !firstentry, 356 358 "tech.ship.dauer", ship.getInt("dauer"), src/net/driftingsouls/ds2/server/modules/ItemInfoController.java
r3924571 r6422552 56 56 import net.driftingsouls.ds2.server.framework.pipeline.generators.DSGenerator; 57 57 import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; 58 import net.driftingsouls.ds2.server.ships.Ship; 59 import net.driftingsouls.ds2.server.ships.ShipTypeData; 58 60 import net.driftingsouls.ds2.server.ships.ShipTypes; 59 61 … … 280 282 IEDraftShip effect = (IEDraftShip)Items.get().item(itemid).getEffect(); 281 283 282 S QLResultRow shiptype = ShipTypes.getShipType( effect.getShipType(), false );284 ShipTypeData shiptype = Ship.getShipType( effect.getShipType(), false ); 283 285 284 286 StringBuilder data = new StringBuilder(100); 285 if( shiptype.getBoolean("hide") ) { 287 if( shiptype == null ) { 288 data.append("<span style=\"color:red\">Unbekannter Schiffstyp</span>"); 289 } 290 else if( shiptype.isHide() ) { 286 291 if( user.getAccessLevel() > 20 ) { 287 data.append("<a class=\"forschinfo\" href=\""+Common.buildUrl(getContext(), "default", "module", "schiffinfo", "ship", effect.getShipType())+"\">"+shiptype.get String("nickname")+"</a><br /><span style=\"font-style:italic;color:red\" class=\"verysmallfont\">[unsichtbar]</span>\n");292 data.append("<a class=\"forschinfo\" href=\""+Common.buildUrl(getContext(), "default", "module", "schiffinfo", "ship", effect.getShipType())+"\">"+shiptype.getNickname()+"</a><br /><span style=\"font-style:italic;color:red\" class=\"verysmallfont\">[unsichtbar]</span>\n"); 288 293 } 289 294 else { … … 291 296 } 292 297 } 293 else if( !shiptype.isEmpty() ) {294 data.append("<a class=\"forschinfo\" href=\""+Common.buildUrl(getContext(), "default", "module", "schiffinfo", "ship", effect.getShipType())+"\">"+shiptype.getString("nickname")+"</a>\n");295 }296 298 else { 297 data.append("< span style=\"color:red\">Unbekannter Schiffstyp</span>");299 data.append("<a class=\"forschinfo\" href=\""+Common.buildUrl(getContext(), "default", "module", "schiffinfo", "ship", effect.getShipType())+"\">"+shiptype.getNickname()+"</a>\n"); 298 300 } 299 301 … … 404 406 t.set_var( "entry.name", "Schiffstyp" ); 405 407 406 S QLResultRow shiptype = ShipTypes.getShipType( effect.getShipType(), false );407 if( !shiptype.isEmpty()) {408 t.set_var("entry.data", "<a class=\"forschinfo\" href=\""+Common.buildUrl(getContext(),"default", "module", "schiffinfo", "ship", effect.getShipType())+"\">"+shiptype.get String("nickname")+"</a>" );408 ShipTypeData shiptype = Ship.getShipType( effect.getShipType(), false ); 409 if( shiptype != null ) { 410 t.set_var("entry.data", "<a class=\"forschinfo\" href=\""+Common.buildUrl(getContext(),"default", "module", "schiffinfo", "ship", effect.getShipType())+"\">"+shiptype.getNickname()+"</a>" ); 409 411 } 410 412 else { src/net/driftingsouls/ds2/server/modules/NPCOrderController.java
r3e595f1 r6422552 20 20 import net.driftingsouls.ds2.server.framework.pipeline.generators.DSGenerator; 21 21 import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; 22 import net.driftingsouls.ds2.server.ships.Ship; 23 import net.driftingsouls.ds2.server.ships.ShipTypeData; 22 24 import net.driftingsouls.ds2.server.ships.ShipTypes; 23 25 import net.driftingsouls.ds2.server.ships.ShipClasses; … … 86 88 SQLQuery aship = db.query("SELECT * FROM ships WHERE owner="+user.getID()+" AND LOCATE('#!/tm gany_transport',destcom)"); 87 89 while( aship.next() ) { 88 S QLResultRow ashiptype = ShipTypes.getShipType(aship.getRow());90 ShipTypeData ashiptype = Ship.getShipType(aship.getRow()); 89 91 90 92 t.set_var( "transport.ship", Common._plaintitle(aship.getString("name")), 91 93 "transport.ship.id", aship.getInt("id"), 92 "transport.ship.picture", ashiptype.get String("picture"),94 "transport.ship.picture", ashiptype.getPicture(), 93 95 "transport.status", "langeweile", 94 96 "transport.assignment", "-" ); src/net/driftingsouls/ds2/server/modules/ScanController.java
r3924571 r6422552 35 35 import net.driftingsouls.ds2.server.framework.pipeline.generators.DSGenerator; 36 36 import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; 37 import net.driftingsouls.ds2.server.ships.Ship; 38 import net.driftingsouls.ds2.server.ships.ShipTypeData; 37 39 import net.driftingsouls.ds2.server.ships.ShipTypes; 38 40 … … 84 86 } 85 87 86 S QLResultRow shiptype = ShipTypes.getShipType( ship );87 int range = shiptype.get Int("sensorrange");88 ShipTypeData shiptype = Ship.getShipType( ship ); 89 int range = shiptype.getSensorRange(); 88 90 89 91 // Sollte das Schiff in einem Nebel stehen -> halbe Scannerreichweite … … 114 116 } 115 117 116 if( ship.getInt("crew") < shiptype.get Int("crew")/3 ) {117 addError("Es werden mindestens "+shiptype.get Int("crew")/3+" Crewmitglieder benötigt", Common.buildUrl(getContext(), "default", "module", "schiff", "ship", shipID));118 if( ship.getInt("crew") < shiptype.getCrew()/3 ) { 119 addError("Es werden mindestens "+shiptype.getCrew()/3+" Crewmitglieder benötigt", Common.buildUrl(getContext(), "default", "module", "schiff", "ship", shipID)); 118 120 119 121 return false; src/net/driftingsouls/ds2/server/modules/SchiffController.java
rda39d57 r6422552 1159 1159 t.set_block("_SCHIFF", "offiziere.listitem", "offiziere.list"); 1160 1160 1161 SQLQuery offi = db.query("SELECT * FROM offiziere WHERE dest='s ",ship.getInt("id"),"'"); 1162 1163 while( offi.next() ) { 1164 Offizier offiObj = new Offizier( offi.getRow() ); 1165 1166 t.set_var( "offizier.id", offiObj.getID(), 1167 "offizier.name", Common._plaintitle(offiObj.getName()), 1168 "offizier.picture", offiObj.getPicture(), 1169 "offizier.rang", offiObj.getRang() ); 1161 List<Offizier> offiziere = getContext().query("from Offizier where dest='s "+ship.getInt("id")+"'", Offizier.class); 1162 for( Offizier offi : offiziere ) { 1163 t.set_var( "offizier.id", offi.getID(), 1164 "offizier.name", Common._plaintitle(offi.getName()), 1165 "offizier.picture", offi.getPicture(), 1166 "offizier.rang", offi.getRang() ); 1170 1167 1171 1168 t.parse("offiziere.list", "offiziere.listitem", true); 1172 1169 } 1173 offi.free();1174 1170 } 1175 1171 src/net/driftingsouls/ds2/server/modules/UeberController.java
r3924571 r6422552 47 47 import net.driftingsouls.ds2.server.scripting.ScriptParser; 48 48 import net.driftingsouls.ds2.server.scripting.ScriptParserContext; 49 import net.driftingsouls.ds2.server.ships.ShipTypes; 49 import net.driftingsouls.ds2.server.ships.Ship; 50 import net.driftingsouls.ds2.server.ships.ShipTypeData; 50 51 import net.driftingsouls.ds2.server.ships.Ships; 51 52 … … 547 548 SQLQuery bookmark = db.query("SELECT id,name,x,y,system,destx,desty,destsystem,destcom,status,type FROM ships WHERE id>0 AND bookmark=1 AND owner=",user.getID()," ORDER BY id DESC"); 548 549 while( bookmark.next() ) { 549 S QLResultRow shiptype = ShipTypes.getShipType( bookmark.getRow() );550 ShipTypeData shiptype = Ship.getShipType( bookmark.getRow() ); 550 551 t.set_var( "bookmark.shipid", bookmark.getInt("id"), 551 552 "bookmark.shipname", bookmark.getString("name"), 552 553 "bookmark.location", Ships.getLocationText(bookmark.getRow(), false), 553 "bookmark.shiptype", shiptype.get String("nickname"),554 "bookmark.shiptype", shiptype.getNickname(), 554 555 "bookmark.description", bookmark.getInt("destsystem")+":"+bookmark.getInt("destx")+"/"+bookmark.getInt("desty")+"<br />"+bookmark.getString("destcom").replace("\r\n","<br />") ); 555 556 t.parse("bookmarks.list","bookmarks.listitem",true); src/net/driftingsouls/ds2/server/ships/Ship.java
re3938f6 r6422552 29 29 30 30 import net.driftingsouls.ds2.server.cargo.Cargo; 31 import net.driftingsouls.ds2.server.framework.ContextMap; 32 import net.driftingsouls.ds2.server.framework.Loggable; 31 33 import net.driftingsouls.ds2.server.framework.User; 34 import net.driftingsouls.ds2.server.framework.db.Database; 35 import net.driftingsouls.ds2.server.framework.db.SQLResultRow; 32 36 33 37 import org.hibernate.annotations.Generated; … … 42 46 @Entity 43 47 @Table(name="ships") 44 public class Ship {48 public class Ship implements Loggable { 45 49 @Id 46 50 @Generated(GenerationTime.INSERT) … … 152 156 153 157 /** 158 * Gibt das zugrunde liegende Schiffstypen-Objekt zurueck 159 * @return Das Schiffstypen-Objekt 160 */ 161 public ShipType getBaseType() { 162 return ShipType.getShipType(getType()); 163 } 164 165 /** 154 166 * Gibt den Cargo des Schiffes zurueck 155 167 * @return Der Cargo … … 711 723 } 712 724 713 725 /** 726 * Gibt die Typen-Daten des angegebenen Schiffs zurueck 727 * @param shipdata Eine SQL-Ergebniszeile mit den daten des Schiffes 728 * @return die Typen-Daten 729 */ 730 public static ShipTypeData getShipType( SQLResultRow shipdata ) { 731 return getShipType(shipdata, false); 732 } 733 734 /** 735 * Gibt die Typen-Daten des angegebenen Schiffs bzw Schifftyps zurueck 736 * @param shiptype Die ID des Schiffs bzw des Schifftyps 737 * @param isShip Handelt es sich um ein Schiff (<code>true</code>)? 738 * @return die Typen-Daten 739 */ 740 public static ShipTypeData getShipType( int shiptype, boolean isShip ) { 741 return getShipType(shiptype, isShip, false); 742 } 743 744 /** 745 * Gibt die Typen-Daten des angegebenen Schiffs zurueck 746 * @param shipdata Eine SQL-Ergebniszeile mit den daten des Schiffes 747 * @param plaindata Sollen die Bildpfade angepasst werden (<code>false</code>) oder so zurueckgegeben werden, 748 * wie sie in der DB stehen (<code>true</code>)? 749 * @return die Typen-Daten 750 */ 751 public static ShipTypeData getShipType( SQLResultRow shipdata, boolean plaindata ) { 752 if( !shipdata.containsKey("type") || !shipdata.containsKey("status") ) { 753 Database db = ContextMap.getContext().getDatabase(); 754 shipdata = db.first("SELECT * FROM ships WHERE id="+shipdata.getInt("id")); 755 LOG.warn("getShipType: type oder status fehlen in den Schiffsdaten", new Throwable()); 756 } 757 758 int shiptype = shipdata.getInt("type"); 759 ShipModules modules = null; 760 761 if( shipdata.getString("status").indexOf("tblmodules") != -1 ) { 762 org.hibernate.Session db = ContextMap.getContext().getDB(); 763 modules = (ShipModules)db.get(ShipModules.class, shipdata.getInt("id")); 764 } 765 766 return getShipType(shiptype, modules, plaindata); 767 } 768 769 /** 770 * Gibt die Typen-Daten des angegebenen Schiffs bzw Schifftyps zurueck 771 * @param shiptype Die ID des Schiffs bzw des Schifftyps 772 * @param isShip Handelt es sich um ein Schiff (<code>true</code>)? 773 * @param plaindata Sollen die Bildpfade angepasst werden (<code>false</code>) oder so zurueckgegeben werden, 774 * wie sie in der DB stehen (<code>true</code>)? 775 * @return die Typen-Daten 776 */ 777 protected static ShipTypeData getShipType( int shiptype, boolean isShip, boolean plaindata ) { 778 if( isShip ) { 779 int shipid = shiptype; 780 781 Database database = ContextMap.getContext().getDatabase(); 782 SQLResultRow shipdata = database.prepare("SELECT type,status FROM ships WHERE id>0 AND id= ?") 783 .first(shiptype); 784 785 shiptype = shipdata.getInt("type"); 786 ShipModules modules = null; 787 788 if( shipdata.getString("status").indexOf("tblmodules") != -1 ) { 789 org.hibernate.Session db = ContextMap.getContext().getDB(); 790 modules = (ShipModules)db.get(ShipModules.class, shipid); 791 } 792 793 return getShipType(shiptype, modules, plaindata); 794 } 795 return getShipType(shiptype, null, plaindata); 796 } 797 798 private static ShipTypeData getShipType( int shiptype, ShipModules shipdata, boolean plaindata ) { 799 if( !plaindata ) { 800 ShipType type = ShipType.getShipType(shiptype); 801 802 String picture = ""; 803 if( shipdata == null ) { 804 picture = type.getPicture(); 805 } 806 else { 807 picture = shipdata.getPicture(); 808 } 809 810 return new ShipTypeDataPictureWrapper(shipdata != null ? shipdata : type, 811 !type.getPicture().equals(picture) ? true : false); 812 } 813 814 return shipdata; 815 } 714 816 } src/net/driftingsouls/ds2/server/tick/regular/RestTick.java
r3924571 r6422552 37 37 import net.driftingsouls.ds2.server.scripting.ScriptParser; 38 38 import net.driftingsouls.ds2.server.scripting.ScriptParserContext; 39 import net.driftingsouls.ds2.server.ships.ShipTypes; 39 import net.driftingsouls.ds2.server.ships.Ship; 40 import net.driftingsouls.ds2.server.ships.ShipTypeData; 40 41 import net.driftingsouls.ds2.server.tasks.Task; 41 42 import net.driftingsouls.ds2.server.tasks.Taskmanager; … … 238 239 } 239 240 240 S QLResultRow shiptype = ShipTypes.getShipType(aloadout.getInt("shiptype"), false);241 ShipTypeData shiptype = Ship.getShipType(aloadout.getInt("shiptype"), false); 241 242 242 243 // Schiffseintrag einfuegen 243 244 db.update("INSERT INTO ships (id,name,type,owner,x,y,system,hull,crew,cargo) ", 244 "VALUES (",shouldId,",'Felsbrocken',",aloadout.getInt("shiptype"),",-1,",x,",",y,",",system.getInt("system"),",",shiptype.get Int("hull"),",",shiptype.getInt("crew"),",'",cargo.save(),"')");245 "VALUES (",shouldId,",'Felsbrocken',",aloadout.getInt("shiptype"),",-1,",x,",",y,",",system.getInt("system"),",",shiptype.getHull(),",",shiptype.getCrew(),",'",cargo.save(),"')"); 245 246 this.log(""); 246 247 src/net/driftingsouls/ds2/server/werften/WerftObject.java
r3924571 r6422552 54 54 import net.driftingsouls.ds2.server.framework.db.SQLQuery; 55 55 import net.driftingsouls.ds2.server.framework.db.SQLResultRow; 56 import net.driftingsouls.ds2.server.ships.Ship; 57 import net.driftingsouls.ds2.server.ships.ShipTypeData; 56 58 import net.driftingsouls.ds2.server.ships.ShipTypes; 57 59 import net.driftingsouls.ds2.server.ships.Ships; … … 1417 1419 ShipWerft werft = (ShipWerft)this; 1418 1420 1419 S QLResultRow newtype = ShipTypes.getShipType( this.getOneWayFlag(), false );1421 ShipTypeData newtype = Ship.getShipType( this.getOneWayFlag(), false ); 1420 1422 int crew = db.first("SELECT crew FROM ships WHERE id>0 AND id=", werft.getShipID()).getInt("crew"); 1421 1423 … … 1426 1428 1427 1429 db.update("INSERT INTO ships (id,name,type,hull,e,crew,x,y,system,owner,history) VALUES ", 1428 "(",werft.getShipID(),",\"Baustelle\",",this.getOneWayFlag(),",",newtype.get Int("hull"),",",newtype.getInt("eps"),",",crew,",",1430 "(",werft.getShipID(),",\"Baustelle\",",this.getOneWayFlag(),",",newtype.getHull(),",",newtype.getEps(),",",crew,",", 1429 1431 this.getX(),",",this.getY(),",",this.getSystem(),",",user.getID(),",'",db.prepareString(history),"')"); 1430 1432 web/WEB-INF/cfg/hibernatemappings.xml
re7d4c7f r6422552 38 38 <mapping class="net.driftingsouls.ds2.server.Offizier" /> 39 39 <mapping class="net.driftingsouls.ds2.server.entities.Order" /> 40 < !-- orders_offiziere -->41 < !-- orders_ships -->40 <mapping class="net.driftingsouls.ds2.server.entities.OrderOffizier" /> 41 <mapping class="net.driftingsouls.ds2.server.entities.OrderShip" /> 42 42 <!-- ordner [net.driftingsouls.ds2.server.comm.Ordner migrieren] --> 43 43 <!-- portal_articles --> … … 54 54 <!-- scripts --> 55 55 <!-- sectors --> 56 < !-- ship_fleets -->57 < !-- ship_loot -->58 < !-- ship_types -->56 <mapping class="net.driftingsouls.ds2.server.ships.ShipFleet" /> 57 <mapping class="net.driftingsouls.ds2.server.ships.ShipLoot" /> 58 <mapping class="net.driftingsouls.ds2.server.ships.ShipType" /> 59 59 <mapping class="net.driftingsouls.ds2.server.ships.Ship" /> 60 60 <!-- ships_baubar --> 61 61 <!-- ships_lost --> 62 < !-- ships_modules -->62 <mapping class="net.driftingsouls.ds2.server.ships.ShipModules" /> 63 63 <!-- skn --> 64 64 <!-- skn_channels -->
