Browse Source

group teleport restricted to active banes and active mines

lakebane-strongholds
FatBoy-DOTC 2 months ago
parent
commit
d7270ffb84
  1. 35
      src/engine/gameManager/PowersManager.java

35
src/engine/gameManager/PowersManager.java

@ -205,6 +205,41 @@ public enum PowersManager {
boolean CSRCast = false; boolean CSRCast = false;
if(msg.getPowerUsedID() == 430628895) {
boolean failed = false;// group teleport
City city = ZoneManager.getCityAtLocation(playerCharacter.loc);
if (city == null) {
failed = true;
}else{
Bane bane = city.getBane();
if (bane == null) {
failed = true;
}else{
if(!bane.getSiegePhase().equals(SiegePhase.WAR)){
failed = true;
}
}
}
if(failed){
//check to see if we are at an active mine
Zone zone = ZoneManager.findSmallestZone(playerCharacter.loc);
if(zone != null){
Mine mine = null;
for(Building building : zone.zoneBuildingSet){
if(building.getBlueprint().getBuildingGroup().equals(BuildingGroup.MINE)){
mine = Mine.getMineFromTower(building.getObjectUUID());
}
}
if(mine != null){
failed = !mine.isActive;
}
}
}
if(failed)
return false;
}
if (MBServerStatics.POWERS_DEBUG) { if (MBServerStatics.POWERS_DEBUG) {
ChatManager.chatSayInfo( ChatManager.chatSayInfo(

Loading…
Cancel
Save