Changeset cd77adf4ce331fbfadcbaa0f3fbc0e844d60d87f

Show
Ignore:
Timestamp:
05/05/07 14:05:25 (2 years ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1178366725 +0200
git-parent:

[0f3188f11844e932476b689c8349d9c4717de33d]

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

Exploit gefixt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/net/driftingsouls/ds2/server/modules/TransportController.java

    r679bd95 rcd77adf  
    243243                        Database db = ContextMap.getContext().getDatabase(); 
    244244                         
    245                         String list = db.first("SELECT CAST(GROUP_CONCAT(id SEPARATOR '|') AS CHAR) fleetlist FROM ships WHERE fleet='",fleet,"'").getString("fleetlist"); 
     245                        String list = db.first("SELECT CAST(GROUP_CONCAT(id SEPARATOR '|') AS CHAR) fleetlist " + 
     246                                        "FROM ships " + 
     247                                        "WHERE fleet='",fleet,"' AND x="+data.getInt("x")+" AND y="+data.getInt("y")+" AND system="+data.getInt("system")) 
     248                                        .getString("fleetlist"); 
    246249                         
    247250                        return new MultiTarget("Flotte", list); 
     
    404407                                        TransportTarget handler = wayhandler.get(way[0]).getConstructor().newInstance(); 
    405408                                        handler.create( TransportTarget.ROLE_SOURCE, fromlist[i] ); 
     409                                        if( this.from.size() > 0 ) { 
     410                                                Location loc = Location.fromResult(this.from.get(0).getData()); 
     411                                                Location thisLoc = Location.fromResult(handler.getData()); 
     412                                                if( !loc.sameSector(this.from.get(0).getSize(), thisLoc, handler.getSize()) ) { 
     413                                                        continue; 
     414                                                } 
     415                                        } 
    406416                                        this.from.add(handler); 
    407417                                } 
     
    429439                                        TransportTarget handler = wayhandler.get(way[1]).getConstructor().newInstance(); 
    430440                                        handler.create( TransportTarget.ROLE_TARGET, tolist[i] ); 
     441                                        if( this.to.size() > 0 ) { 
     442                                                Location loc = Location.fromResult(this.to.get(0).getData()); 
     443                                                Location thisLoc = Location.fromResult(handler.getData()); 
     444                                                if( !loc.sameSector(this.to.get(0).getSize(), thisLoc, handler.getSize()) ) { 
     445                                                        continue; 
     446                                                } 
     447                                        } 
    431448                                        this.to.add(handler); 
    432449                                }