Changeset 29cd7e556b5d55b0badc5d042c8e0d338d699645
- Timestamp:
- 07/07/07 17:38:16
(1 year ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1183822696 +0200
- git-parent:
[c5d039ae408ffbfb7eb82de712e25e6724fb0bb7]
- git-author:
- Christopher Jung <bktheg@web.de> 1183822696 +0200
- Message:
Entity fuer weaponfactory eingebaut
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r8e3cf9b |
r29cd7e5 |
|
| 317 | 317 | DROP `remaining`; |
|---|
| 318 | 318 | ]]></update> |
|---|
| | 319 | <update type="structure" datum="2007-07-01"><![CDATA[ |
|---|
| | 320 | ALTER TABLE `weaponfactory` DROP `id`; |
|---|
| | 321 | ALTER TABLE `weaponfactory` ADD PRIMARY KEY ( `col` ); |
|---|
| | 322 | ALTER TABLE `weaponfactory` DROP INDEX `col`; |
|---|
| | 323 | ]]></update> |
|---|
| 319 | 324 | </updates> |
|---|
| rc5d039a |
r29cd7e5 |
|
| 42 | 42 | import net.driftingsouls.ds2.server.entities.Ammo; |
|---|
| 43 | 43 | import net.driftingsouls.ds2.server.entities.User; |
|---|
| | 44 | import net.driftingsouls.ds2.server.entities.WeaponFactory; |
|---|
| 44 | 45 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 45 | 46 | import net.driftingsouls.ds2.server.framework.Configuration; |
|---|
| 46 | 47 | import net.driftingsouls.ds2.server.framework.Context; |
|---|
| 47 | 48 | import net.driftingsouls.ds2.server.framework.ContextMap; |
|---|
| 48 | | import net.driftingsouls.ds2.server.framework.db.Database; |
|---|
| 49 | 49 | import net.driftingsouls.ds2.server.framework.db.SQLResultRow; |
|---|
| 50 | 50 | import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; |
|---|
| 51 | 51 | |
|---|
| | 52 | import org.apache.commons.lang.ArrayUtils; |
|---|
| 52 | 53 | import org.apache.commons.lang.StringEscapeUtils; |
|---|
| 53 | | import org.apache.commons.lang.StringUtils; |
|---|
| 54 | 54 | |
|---|
| 55 | 55 | class Waffenfabrik extends DefaultBuilding { |
|---|
| … | … | |
| 74 | 74 | private String loaddata( Base base ) { |
|---|
| 75 | 75 | Context context = ContextMap.getContext(); |
|---|
| 76 | | Database database = context.getDatabase(); |
|---|
| 77 | 76 | org.hibernate.Session db = context.getDB(); |
|---|
| 78 | 77 | |
|---|
| … | … | |
| 148 | 147 | } |
|---|
| 149 | 148 | |
|---|
| 150 | | SQLResultRow wf = database.first( "SELECT produces FROM weaponfactory WHERE col=",base.getID()); |
|---|
| 151 | | if( wf.isEmpty() ) { |
|---|
| | 149 | WeaponFactory wf = (WeaponFactory)db.get(WeaponFactory.class, base.getID()); |
|---|
| | 150 | if( wf == null ) { |
|---|
| 152 | 151 | LOG.warn("Basis "+base.getID()+" verfuegt ueber keinen Waffenfabrik-Eintrag, obwohl es eine Waffenfabrik hat"); |
|---|
| 153 | | } |
|---|
| 154 | | String[] plist = StringUtils.split(wf.getString("produces"), ';'); |
|---|
| | 152 | return "Basis "+base.getID()+" verfuegt ueber keinen Waffenfabrik-Eintrag, obwohl es eine Waffenfabrik hat"; |
|---|
| | 153 | } |
|---|
| | 154 | WeaponFactory.Task[] plist = wf.getProduces(); |
|---|
| 155 | 155 | for( int i=0; i < plist.length; i++ ) { |
|---|
| 156 | | String[] tmp = StringUtils.split(plist[i],'='); |
|---|
| 157 | | Ammo ammo = (Ammo)db.get(Ammo.class, Integer.parseInt(tmp[0])); |
|---|
| 158 | | int count = Integer.parseInt(tmp[1]); |
|---|
| | 156 | Ammo ammo = plist[i].getAmmo(); |
|---|
| | 157 | int count = plist[i].getCount(); |
|---|
| 159 | 158 | |
|---|
| 160 | 159 | if( ammo == null ) { |
|---|
| 161 | | plist[i] = ""; |
|---|
| | 160 | plist = (WeaponFactory.Task[])ArrayUtils.remove(plist, i); |
|---|
| | 161 | i--; |
|---|
| 162 | 162 | continue; |
|---|
| 163 | 163 | } |
|---|
| … | … | |
| 170 | 170 | } |
|---|
| 171 | 171 | else if( (count > 0) && !thisammolist.contains(ammo) ) { |
|---|
| 172 | | plist[i] = ""; |
|---|
| | 172 | plist = (WeaponFactory.Task[])ArrayUtils.remove(plist, i); |
|---|
| | 173 | i--; |
|---|
| 173 | 174 | } |
|---|
| 174 | 175 | } |
|---|
| … | … | |
| 176 | 177 | if( ok ) { |
|---|
| 177 | 178 | for( int i=0; i < plist.length; i++ ) { |
|---|
| 178 | | if( plist[i].length() == 0 ) { |
|---|
| 179 | | continue; |
|---|
| 180 | | } |
|---|
| 181 | | String[] tmp = StringUtils.split(plist[i],'='); |
|---|
| 182 | | Ammo ammo = (Ammo)db.get(Ammo.class,Integer.parseInt(tmp[0])); |
|---|
| 183 | | int count = Integer.parseInt(tmp[1]); |
|---|
| | 179 | Ammo ammo = plist[i].getAmmo(); |
|---|
| | 180 | int count = plist[i].getCount(); |
|---|
| 184 | 181 | |
|---|
| 185 | 182 | if( !vars.usedcapacity.containsKey(base.getID()) ) { |
|---|
| … | … | |
| 214 | 211 | super.build(base); |
|---|
| 215 | 212 | |
|---|
| 216 | | Database db = ContextMap.getContext().getDatabase(); |
|---|
| 217 | | |
|---|
| 218 | | SQLResultRow wfentry = db.first("SELECT id FROM weaponfactory WHERE col="+base.getID()); |
|---|
| 219 | | if( !wfentry.isEmpty() ) { |
|---|
| 220 | | db.update("UPDATE weaponfactory SET count=count+1 WHERE id=",wfentry.getInt("id")); |
|---|
| | 213 | org.hibernate.Session db = ContextMap.getContext().getDB(); |
|---|
| | 214 | WeaponFactory wf = (WeaponFactory)db.get(WeaponFactory.class, base.getID()); |
|---|
| | 215 | |
|---|
| | 216 | if( wf != null ) { |
|---|
| | 217 | wf.setCount(wf.getCount()+1); |
|---|
| 221 | 218 | } |
|---|
| 222 | 219 | else { |
|---|
| 223 | | db.update("INSERT INTO weaponfactory (count,col) VALUES (1,"+base.getID()+")"); |
|---|
| | 220 | wf = new WeaponFactory(base); |
|---|
| | 221 | db.persist(wf); |
|---|
| 224 | 222 | } |
|---|
| 225 | 223 | } |
|---|
| … | … | |
| 237 | 235 | @Override |
|---|
| 238 | 236 | public void cleanup(Context context, Base base) { |
|---|
| 239 | | Database database = context.getDatabase(); |
|---|
| 240 | 237 | org.hibernate.Session db = context.getDB(); |
|---|
| 241 | 238 | |
|---|
| 242 | | SQLResultRow wf = database.first("SELECT count,produces FROM weaponfactory WHERE col="+base.getID()); |
|---|
| 243 | | if( wf.getInt("count") > 1 ) { |
|---|
| | 239 | WeaponFactory wf = (WeaponFactory)db.get(WeaponFactory.class, base.getID()); |
|---|
| | 240 | if( wf.getCount() > 1 ) { |
|---|
| 244 | 241 | BigDecimal usedcapacity = new BigDecimal(0, MathContext.DECIMAL32); |
|---|
| 245 | 242 | |
|---|
| 246 | | String[] plist = StringUtils.split(wf.getString("produces"), ';'); |
|---|
| | 243 | WeaponFactory.Task[] plist = wf.getProduces(); |
|---|
| 247 | 244 | for( int i=0; i < plist.length; i++ ) { |
|---|
| 248 | | String[] tmp = StringUtils.split(plist[i], '='); |
|---|
| 249 | | Ammo ammo = (Ammo)db.get(Ammo.class, Integer.parseInt(tmp[0])); |
|---|
| 250 | | int ammoCount = Integer.parseInt(tmp[1]); |
|---|
| | 245 | Ammo ammo = plist[i].getAmmo(); |
|---|
| | 246 | int ammoCount = plist[i].getCount(); |
|---|
| 251 | 247 | |
|---|
| 252 | 248 | usedcapacity = usedcapacity.add(ammo.getDauer().multiply(new BigDecimal(ammoCount))); |
|---|
| 253 | 249 | } |
|---|
| 254 | 250 | |
|---|
| 255 | | if( usedcapacity.compareTo(new BigDecimal(wf.getInt("count")-1)) > 0 ) { |
|---|
| 256 | | BigDecimal targetCapacity = new BigDecimal(wf.getInt("count")-1); |
|---|
| | 251 | if( usedcapacity.compareTo(new BigDecimal(wf.getCount()-1)) > 0 ) { |
|---|
| | 252 | BigDecimal targetCapacity = new BigDecimal(wf.getCount()-1); |
|---|
| 257 | 253 | |
|---|
| 258 | 254 | for( int i=0; i < plist.length; i++ ) { |
|---|
| 259 | | String[] tmp = StringUtils.split(plist[i], '='); |
|---|
| 260 | | Ammo ammo = (Ammo)db.get(Ammo.class, Integer.parseInt(tmp[0])); |
|---|
| 261 | | int ammoCount = Integer.parseInt(tmp[1]); |
|---|
| | 255 | Ammo ammo = plist[i].getAmmo(); |
|---|
| | 256 | int ammoCount = plist[i].getCount(); |
|---|
| 262 | 257 | |
|---|
| 263 | 258 | BigDecimal capUsedByAmmo = new BigDecimal(ammoCount).multiply(ammo.getDauer()); |
|---|
| … | … | |
| 265 | 260 | if( usedcapacity.subtract(capUsedByAmmo).compareTo(targetCapacity) < 0 ) { |
|---|
| 266 | 261 | BigDecimal capLeftForAmmo = capUsedByAmmo.subtract(usedcapacity.subtract(targetCapacity)); |
|---|
| 267 | | plist[i] = ammo.getId()+"=" + capLeftForAmmo.divide(ammo.getDauer(), BigDecimal.ROUND_DOWN).intValue(); |
|---|
| | 262 | plist[i] = new WeaponFactory.Task(ammo, capLeftForAmmo.divide(ammo.getDauer(), BigDecimal.ROUND_DOWN).intValue()); |
|---|
| 268 | 263 | break; |
|---|
| 269 | 264 | } |
|---|
| 270 | | plist[i] = ammo.getId()+"=0"; |
|---|
| | 265 | plist = (WeaponFactory.Task[])ArrayUtils.remove(plist, i); |
|---|
| | 266 | i--; |
|---|
| | 267 | |
|---|
| 271 | 268 | usedcapacity = usedcapacity.subtract(capUsedByAmmo); |
|---|
| 272 | 269 | |
|---|
| 273 | 270 | if( usedcapacity.compareTo(targetCapacity) <= 0 ) break; |
|---|
| 274 | 271 | } |
|---|
| 275 | | wf.put("produces", Common.implode(";",plist)); |
|---|
| 276 | | } |
|---|
| 277 | | |
|---|
| 278 | | database.update("UPDATE weaponfactory SET count=count-1,produces='"+wf.getString("produces")+"' WHERE col="+base.getID()); |
|---|
| | 272 | wf.setProduces(plist); |
|---|
| | 273 | } |
|---|
| | 274 | |
|---|
| | 275 | wf.setCount(wf.getCount()-1); |
|---|
| 279 | 276 | } |
|---|
| 280 | 277 | else { |
|---|
| 281 | | database.update("DELETE FROM weaponfactory WHERE col="+base.getID()); |
|---|
| | 278 | db.delete(wf); |
|---|
| 282 | 279 | } |
|---|
| 283 | 280 | } |
|---|
| … | … | |
| 285 | 282 | @Override |
|---|
| 286 | 283 | public String echoShortcut(Context context, Base base, int field, int building) { |
|---|
| 287 | | Database database = context.getDatabase(); |
|---|
| 288 | 284 | org.hibernate.Session db = context.getDB(); |
|---|
| 289 | 285 | |
|---|
| … | … | |
| 296 | 292 | |
|---|
| 297 | 293 | if( vars.usedcapacity.get(base.getID()).doubleValue() > 0 ) { |
|---|
| 298 | | SQLResultRow wf = database.first("SELECT produces FROM weaponfactory WHERE col=",base.getID()); |
|---|
| 299 | | String[] prodlist = StringUtils.split(wf.getString("produces"), ';'); |
|---|
| | 294 | WeaponFactory wf = (WeaponFactory)db.get(WeaponFactory.class, base.getID()); |
|---|
| | 295 | WeaponFactory.Task[] prodlist = wf.getProduces(); |
|---|
| 300 | 296 | |
|---|
| 301 | 297 | StringBuilder popup = new StringBuilder(200); |
|---|
| … | … | |
| 303 | 299 | |
|---|
| 304 | 300 | for( int i=0; i < prodlist.length; i++ ) { |
|---|
| 305 | | String[] prod = StringUtils.split(prodlist[i], '='); |
|---|
| 306 | | Ammo ammo = (Ammo)db.get(Ammo.class, Integer.parseInt(prod[0])); |
|---|
| 307 | | int count = Integer.parseInt(prod[1]); |
|---|
| | 301 | Ammo ammo = prodlist[i].getAmmo(); |
|---|
| | 302 | int count = prodlist[i].getCount(); |
|---|
| 308 | 303 | if( (count > 0) && vars.ownerammobase.contains(ammo) ) { |
|---|
| 309 | 304 | popup.append(count+"x <img style='vertical-align:middle' src='"+Items.get().item(ammo.getItemId()).getPicture()+"' alt='' />"+ammo.getName()+"<br />"); |
|---|
| … | … | |
| 359 | 354 | @Override |
|---|
| 360 | 355 | public String output(Context context, TemplateEngine t, Base base, int field, int building) { |
|---|
| 361 | | Database database = context.getDatabase(); |
|---|
| 362 | 356 | org.hibernate.Session db = context.getDB(); |
|---|
| 363 | 357 | User user = (User)context.getActiveUser(); |
|---|
| … | … | |
| 370 | 364 | StringBuilder echo = new StringBuilder(2000); |
|---|
| 371 | 365 | |
|---|
| 372 | | SQLResultRow wf = database.first("SELECT * FROM weaponfactory WHERE col="+base.getID()); |
|---|
| 373 | | |
|---|
| 374 | | if( wf.isEmpty() ) { |
|---|
| | 366 | WeaponFactory wf = (WeaponFactory)db.get(WeaponFactory.class, base.getID()); |
|---|
| | 367 | |
|---|
| | 368 | if( wf == null ) { |
|---|
| 375 | 369 | echo.append("<div style=\"color:red\">FEHLER: Diese Waffenfabrik besitzt keinen Eintrag<br /></div>\n"); |
|---|
| 376 | 370 | return echo.toString(); |
|---|
| … | … | |
| 447 | 441 | echo.append("<div class=\"smallfont\">"); |
|---|
| 448 | 442 | if( (produce != 0) && (count != 0) ) { |
|---|
| 449 | | Ammo ammo = (Ammo)db.get(Ammo.class, produce); |
|---|
| | 443 | final Ammo ammo = (Ammo)db.get(Ammo.class, produce); |
|---|
| 450 | 444 | |
|---|
| 451 | 445 | if( ammo == null ) { |
|---|
| … | … | |
| 461 | 455 | BigDecimal usedcapacity = new BigDecimal(0, MathContext.DECIMAL32); |
|---|
| 462 | 456 | |
|---|
| 463 | | String[] plist = StringUtils.split(wf.getString("produces"), ';'); |
|---|
| | 457 | WeaponFactory.Task[] plist = wf.getProduces(); |
|---|
| 464 | 458 | for( int i=0; i < plist.length; i++ ) { |
|---|
| 465 | | String[] tmp = StringUtils.split(plist[i], '='); |
|---|
| 466 | | Ammo aAmmo = (Ammo)db.get(Ammo.class, Integer.parseInt(tmp[0])); |
|---|
| 467 | | int ammoCount = Integer.parseInt(tmp[1]); |
|---|
| | 459 | final Ammo aAmmo = plist[i].getAmmo(); |
|---|
| | 460 | final int ammoCount = plist[i].getCount(); |
|---|
| 468 | 461 | |
|---|
| 469 | 462 | usedcapacity = usedcapacity.add(aAmmo.getDauer().multiply(new BigDecimal(ammoCount))); |
|---|
| 470 | 463 | } |
|---|
| 471 | | if( usedcapacity.add(new BigDecimal(count).multiply(ammo.getDauer())).doubleValue() > wf.getInt("count") ) { |
|---|
| 472 | | BigDecimal availableCap = usedcapacity.multiply(new BigDecimal(-1)).add(new BigDecimal(wf.getInt("count"))); |
|---|
| | 464 | if( usedcapacity.add(new BigDecimal(count).multiply(ammo.getDauer())).doubleValue() > wf.getCount() ) { |
|---|
| | 465 | BigDecimal availableCap = usedcapacity.multiply(new BigDecimal(-1)).add(new BigDecimal(wf.getCount())); |
|---|
| 473 | 466 | count = availableCap.divide(ammo.getDauer(), BigDecimal.ROUND_DOWN).intValue(); |
|---|
| 474 | 467 | } |
|---|
| … | … | |
| 476 | 469 | if( count != 0 ) { |
|---|
| 477 | 470 | boolean entry = false; |
|---|
| 478 | | List<String> producelist = new ArrayList<String>( |
|---|
| 479 | | Arrays.asList(StringUtils.split(wf.getString("produces"), ';')) |
|---|
| | 471 | List<WeaponFactory.Task> producelist = new ArrayList<WeaponFactory.Task>( |
|---|
| | 472 | Arrays.asList(wf.getProduces()) |
|---|
| 480 | 473 | ); |
|---|
| 481 | 474 | |
|---|
| 482 | 475 | for( int i=0; i < producelist.size(); i++ ) { |
|---|
| 483 | | String[] tmp = StringUtils.split(producelist.get(i), '='); |
|---|
| 484 | | int aid = Integer.parseInt(tmp[0]); |
|---|
| 485 | | int ammoCount = Integer.parseInt(tmp[1]); |
|---|
| | 476 | Ammo aAmmo = producelist.get(i).getAmmo(); |
|---|
| | 477 | int ammoCount = producelist.get(i).getCount(); |
|---|
| 486 | 478 | |
|---|
| 487 | 479 | // Veraltete Ammo automatisch entfernen |
|---|
| 488 | | if( removelist.contains(aid) ) { |
|---|
| | 480 | if( removelist.contains(aAmmo) ) { |
|---|
| 489 | 481 | producelist.remove(i); |
|---|
| 490 | 482 | i--; |
|---|
| … | … | |
| 492 | 484 | } |
|---|
| 493 | 485 | |
|---|
| 494 | | if( (aid == 0) || (ammoCount <= 0) ) { |
|---|
| | 486 | if( (aAmmo == null) || (ammoCount <= 0) ) { |
|---|
| 495 | 487 | producelist.remove(i); |
|---|
| 496 | 488 | i--; |
|---|
| … | … | |
| 498 | 490 | } |
|---|
| 499 | 491 | |
|---|
| 500 | | if( aid == ammo.getId() ) { |
|---|
| | 492 | if( aAmmo == ammo ) { |
|---|
| 501 | 493 | if( (count < 0) && (ammoCount+count < 0) ) { |
|---|
| 502 | 494 | count = -ammoCount; |
|---|
| … | … | |
| 506 | 498 | } |
|---|
| 507 | 499 | if( ammoCount > 0 ) { |
|---|
| 508 | | producelist.set(i, aid+"="+ammoCount); |
|---|
| | 500 | producelist.set(i, new WeaponFactory.Task(aAmmo, ammoCount)); |
|---|
| 509 | 501 | } |
|---|
| 510 | 502 | else { |
|---|
| … | … | |
| 514 | 506 | } |
|---|
| 515 | 507 | if( !entry && (count > 0) ) { |
|---|
| 516 | | producelist.add(ammo.getId()+"="+count); |
|---|
| 517 | | } |
|---|
| 518 | | |
|---|
| 519 | | wf.put("produces", Common.implode(";",producelist)); |
|---|
| 520 | | |
|---|
| 521 | | database.update("UPDATE weaponfactory SET produces='"+wf.getString("produces")+"' WHERE id="+wf.getInt("id")); |
|---|
| | 508 | producelist.add(new WeaponFactory.Task(ammo, count)); |
|---|
| | 509 | } |
|---|
| | 510 | |
|---|
| | 511 | wf.setProduces(producelist.toArray(new WeaponFactory.Task[producelist.size()])); |
|---|
| 522 | 512 | |
|---|
| 523 | 513 | echo.append(Math.abs(count)+" "+Items.get().item(ammo.getItemId()).getName()+" wurden "+(count>=0 ? "hinzugefügt":"abgezogen")+"<br /><br />"); |
|---|
| … | … | |
| 537 | 527 | Cargo consumes = new Cargo(); |
|---|
| 538 | 528 | |
|---|
| 539 | | if( wf.getString("produces").length() != 0 ) { |
|---|
| 540 | | String[] plist = StringUtils.split(wf.getString("produces"), ';'); |
|---|
| | 529 | if( wf.getProduces().length > 0 ) { |
|---|
| | 530 | WeaponFactory.Task[] plist = wf.getProduces(); |
|---|
| 541 | 531 | for( int i=0; i < plist.length; i++ ) { |
|---|
| 542 | | String[] tmp = StringUtils.split(plist[i], '='); |
|---|
| 543 | | final Ammo ammo = (Ammo)db.get(Ammo.class, Integer.parseInt(tmp[0])); |
|---|
| 544 | | int ammoCount = Integer.parseInt(tmp[1]); |
|---|
| | 532 | final Ammo ammo = plist[i].getAmmo(); |
|---|
| | 533 | final int ammoCount = plist[i].getCount(); |
|---|
| 545 | 534 | |
|---|
| 546 | 535 | if( !ammolist.contains(ammo) ) { |
|---|
| … | … | |
| 573 | 562 | echo.append(Common.tableBegin(760, "left")); |
|---|
| 574 | 563 | |
|---|
| 575 | | echo.append("<img style=\"vertical-align:middle\" src=\""+Configuration.getSetting("URL")+"data/interface/time.gif\" alt=\"Zeiteinheiten\" />"+usedcapacity+"/"+wf.getInt("count")+" ausgelastet<br />\n"); |
|---|
| | 564 | echo.append("<img style=\"vertical-align:middle\" src=\""+Configuration.getSetting("URL")+"data/interface/time.gif\" alt=\"Zeiteinheiten\" />"+usedcapacity+"/"+wf.getCount()+" ausgelastet<br />\n"); |
|---|
| 576 | 565 | echo.append("Verbrauch: "); |
|---|
| 577 | 566 | ResourceList reslist = consumes.getResourceList(); |
|---|
| r5ba971b |
r29cd7e5 |
|
| 198 | 198 | db.update("UPDATE academy SET train=0,remain=0,`upgrade`='' WHERE col IN ("+Common.implode(",",baselist)+")"); |
|---|
| 199 | 199 | db.update("UPDATE werften SET remaining=0,building=0 WHERE col IN ("+Common.implode(",",baselist)+")"); |
|---|
| 200 | | db.update("UPDATE weaponfactory SET produces='' WHERE col IN ("+Common.implode(",",baselist)+")"); |
|---|
| | 200 | dbsess.createQuery("update WeaponFactory set produces='' where col in ("+Common.implode(",",baselist)+")").executeUpdate(); |
|---|
| 201 | 201 | } |
|---|
| 202 | 202 | } |
|---|
| … | … | |
| 215 | 215 | db.update("DELETE FROM academy WHERE col IN ("+Common.implode(",",baselist)+")"); |
|---|
| 216 | 216 | db.update("DELETE FROM werften WHERE col IN ("+Common.implode(",",baselist)+")"); |
|---|
| 217 | | db.update("DELETE FROM weaponfactory WHERE col IN ("+Common.implode(",",baselist)+")"); |
|---|
| | 217 | dbsess.createQuery("delete from WeaponFactory where col in ("+Common.implode(",",baselist)+")").executeUpdate(); |
|---|
| 218 | 218 | } |
|---|
| 219 | 219 | } |
|---|
| r7723537 |
r29cd7e5 |
|
| 83 | 83 | <mapping class="net.driftingsouls.ds2.server.entities.VersteigerungResource" /> |
|---|
| 84 | 84 | <mapping class="net.driftingsouls.ds2.server.entities.PaketVersteigerung" /> |
|---|
| 85 | | <!-- weaponfactory --> |
|---|
| | 85 | <mapping class="net.driftingsouls.ds2.server.entities.WeaponFactory" /> |
|---|
| 86 | 86 | <mapping class="net.driftingsouls.ds2.server.werften.WerftObject" /> |
|---|
| 87 | 87 | <mapping class="net.driftingsouls.ds2.server.werften.BaseWerft" /> |
|---|