forked from MagicBane/Server
forge manager cleanup and special drop rates
This commit is contained in:
@@ -105,13 +105,24 @@ public class SpecialLootHandler {
|
||||
}
|
||||
|
||||
public static Zone getMacroZone(Mob mob){
|
||||
for(Zone zone : ZoneManager.macroZones){
|
||||
HashSet<AbstractWorldObject> inZone = WorldGrid.getObjectsInRangePartial(zone.getLoc(),zone.getBounds().getHalfExtents().x * 2f, MBServerStatics.MASK_MOB);
|
||||
if(inZone.contains(mob)){
|
||||
return zone;
|
||||
}
|
||||
|
||||
Zone parentZone = mob.parentZone;
|
||||
if(parentZone == null)
|
||||
return null;
|
||||
|
||||
while(!parentZone.isMacroZone() && !parentZone.equals(ZoneManager.getSeaFloor())){
|
||||
parentZone = parentZone.getParent();
|
||||
}
|
||||
return null;
|
||||
|
||||
return parentZone;
|
||||
|
||||
//for(Zone zone : ZoneManager.macroZones){
|
||||
// HashSet<AbstractWorldObject> inZone = WorldGrid.getObjectsInRangePartial(zone.getLoc(),zone.getBounds().getHalfExtents().x * 2f, MBServerStatics.MASK_MOB);
|
||||
// if(inZone.contains(mob)){
|
||||
// return zone;
|
||||
// }
|
||||
//}
|
||||
//return null;
|
||||
}
|
||||
|
||||
public static int getContractForZone(Zone zone){
|
||||
|
||||
Reference in New Issue
Block a user