Changeset 0f80e75ad3bc135cf584aa7b3e6f74c91464688b
- Timestamp:
- 05/01/07 14:25:35
(2 years ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1178022335 +0200
- git-parent:
[679bd9529d0b3a0e457c47aca38b1c4f27320db4]
- git-author:
- Christopher Jung <bktheg@web.de> 1178022335 +0200
- Message:
Flotte landen gefixt
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rc7fedd5 |
r0f80e75 |
|
| 90 | 90 | "global.awac", ShipTypes.hasShipTypeFlag(datatype, ShipTypes.SF_SRS_AWAC) ); |
|---|
| 91 | 91 | |
|---|
| 92 | | int jaegerfleet = -1; |
|---|
| | 92 | List<Integer> fleetlist = null; |
|---|
| 93 | 93 | |
|---|
| 94 | 94 | Map<Integer,SQLResultRow> fleetcache = new HashMap<Integer,SQLResultRow>(); |
|---|
| … | … | |
| 651 | 651 | if( ShipTypes.hasShipTypeFlag(datatype, ShipTypes.SF_JAEGER) && (currentDockID != datas.getInt("id")) ) { |
|---|
| 652 | 652 | if( ( ashiptype.getInt("jdocks") > 0 ) && ( datas.getInt("owner") == user.getID() ) ) { |
|---|
| 653 | | if( fullcount + 1 <= ashiptype.getInt("jdocks") ) { |
|---|
| | 653 | int carrierFullCount = db.first("SELECT count(*) fullcount FROM ships WHERE id>0 AND docked='l ",datas.getInt("id"),"'").getInt("fullcount"); |
|---|
| | 654 | |
|---|
| | 655 | if( carrierFullCount + 1 <= ashiptype.getInt("jdocks") ) { |
|---|
| 654 | 656 | t.set_var("sships.action.land",1); |
|---|
| 655 | 657 | if( data.getInt("fleet") > 0 ) { |
|---|
| 656 | | List<Integer> fleetlist = new ArrayList<Integer>(); |
|---|
| 657 | | |
|---|
| 658 | 658 | boolean ok = true; |
|---|
| 659 | | if( jaegerfleet == -1) { |
|---|
| | 659 | if( fleetlist == null ) { |
|---|
| | 660 | fleetlist = new ArrayList<Integer>(); |
|---|
| | 661 | |
|---|
| 660 | 662 | SQLQuery tmp = db.query("SELECT id,type,status FROM ships WHERE id>0 AND fleet='"+data.getInt("fleet")+"'"); |
|---|
| 661 | 663 | while( tmp.next() ) { |
|---|
| … | … | |
| 668 | 670 | } |
|---|
| 669 | 671 | tmp.free(); |
|---|
| 670 | | if( ok ) jaegerfleet = 1; |
|---|
| 671 | | else jaegerfleet = 0; |
|---|
| | 672 | if( !ok ) { |
|---|
| | 673 | fleetlist.clear(); |
|---|
| | 674 | } |
|---|
| 672 | 675 | } |
|---|
| 673 | 676 | |
|---|
| 674 | | if( (jaegerfleet == 1) && (fleetlist.size() <= ashiptype.getInt("jdocks")) ) { |
|---|
| 675 | | if( fullcount + fleetlist.size() <= ashiptype.getInt("jdocks") ) |
|---|
| | 677 | if( !fleetlist.isEmpty() && (fleetlist.size() <= ashiptype.getInt("jdocks")) ) { |
|---|
| | 678 | if( carrierFullCount + fleetlist.size() <= ashiptype.getInt("jdocks") ) |
|---|
| 676 | 679 | t.set_var( "sships.action.landfleet", 1, |
|---|
| 677 | 680 | "global.shiplist", Common.implode("|",fleetlist) ); |
|---|