box flag checker
This commit is contained in:
@@ -109,7 +109,7 @@ public enum InterestManager implements Runnable {
|
||||
origin.sendMsg(moveMsg);
|
||||
}
|
||||
|
||||
public static void reloadCharacter(AbstractCharacter absChar) {
|
||||
public static void reloadCharacter(AbstractCharacter absChar, boolean sendToSelf) {
|
||||
|
||||
UnloadObjectsMsg uom = new UnloadObjectsMsg();
|
||||
uom.addObject(absChar);
|
||||
@@ -135,7 +135,7 @@ public enum InterestManager implements Runnable {
|
||||
if (cc == null)
|
||||
continue;
|
||||
|
||||
if (pcc.getObjectUUID() == absChar.getObjectUUID())
|
||||
if (pcc.getObjectUUID() == absChar.getObjectUUID() && !sendToSelf)
|
||||
continue;
|
||||
|
||||
else {
|
||||
|
||||
@@ -62,7 +62,7 @@ public class SetAdminRuneCmd extends AbstractDevCmd {
|
||||
if (worked) {
|
||||
ChatManager.chatSayInfo(pcSender,
|
||||
"rune of ID " + runeID + " removed");
|
||||
InterestManager.reloadCharacter(pcSender);
|
||||
InterestManager.reloadCharacter(pcSender,false);
|
||||
} else
|
||||
throwbackError(pcSender, "Failed to remove the rune of type "
|
||||
+ runeID);
|
||||
|
||||
@@ -47,7 +47,7 @@ public class SetBaseClassCmd extends AbstractDevCmd {
|
||||
this.setTarget(pc); //for logging
|
||||
ChatManager.chatSayInfo(pc,
|
||||
"BaseClass changed to " + classID);
|
||||
InterestManager.reloadCharacter(pc);
|
||||
InterestManager.reloadCharacter(pc,false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public class SetLevelCmd extends AbstractDevCmd {
|
||||
tar.setLevel((short) level);
|
||||
this.setTarget(tar); //for logging
|
||||
ChatManager.chatSayInfo(pc, tar.getFirstName() + " level changed to " + level);
|
||||
InterestManager.reloadCharacter(tar);
|
||||
InterestManager.reloadCharacter(tar,false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ public class SetPromotionClassCmd extends AbstractDevCmd {
|
||||
pc.setPromotionClass(classID);
|
||||
ChatManager.chatSayInfo(pc,
|
||||
"PromotionClass changed to " + classID);
|
||||
InterestManager.reloadCharacter(pc);
|
||||
InterestManager.reloadCharacter(pc,false);
|
||||
this.setTarget(pc); //for logging
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public class SetRuneCmd extends AbstractDevCmd {
|
||||
if (worked) {
|
||||
ChatManager.chatSayInfo(pcSender,
|
||||
"rune of ID " + runeID + " removed");
|
||||
InterestManager.reloadCharacter(pcSender);
|
||||
InterestManager.reloadCharacter(pcSender,false);
|
||||
} else
|
||||
throwbackError(pcSender, "Failed to remove the rune of type "
|
||||
+ runeID);
|
||||
|
||||
@@ -435,7 +435,7 @@ public class Building extends AbstractWorldObject {
|
||||
int index = 0;
|
||||
for (AbstractCharacter hireling : this.hirelings.keySet()) {
|
||||
hireling.setLoc(BuildingManager._slotLocations.get(newMeshUUID).get(index).getLocation());
|
||||
InterestManager.reloadCharacter(hireling);
|
||||
InterestManager.reloadCharacter(hireling,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4876,7 +4876,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
if (this.isBoxed) {
|
||||
if (this.title.equals(CharacterTitle.BOX) == false) {
|
||||
this.title = CharacterTitle.BOX;
|
||||
InterestManager.reloadCharacter(this);
|
||||
InterestManager.reloadCharacter(this,true);
|
||||
}
|
||||
if (this.containsEffect(1672601862) == false) {//Deathshroud
|
||||
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
|
||||
@@ -4884,7 +4884,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
} else {
|
||||
if (this.title.equals(CharacterTitle.NONE) == false) {
|
||||
this.title = CharacterTitle.NONE;
|
||||
InterestManager.reloadCharacter(this);
|
||||
InterestManager.reloadCharacter(this,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ import java.util.HashSet;
|
||||
}
|
||||
|
||||
private void RunBaneMechanic() {
|
||||
while (bane.getSiegePhase().equals(Enum.SiegePhase.WAR)) {
|
||||
while (bane != null && bane.getSiegePhase().equals(Enum.SiegePhase.WAR)) {
|
||||
HashSet<AbstractWorldObject> currentPlayers = WorldGrid.getObjectsInRangePartial(bane.getCity().loc, Enum.CityBoundsType.GRID.extents * 2.0f, MBServerStatics.MASK_PLAYER);
|
||||
Guild attacker = bane.getStone().getGuild().getNation();
|
||||
Guild defender = bane.getCity().getGuild().getNation();
|
||||
|
||||
Reference in New Issue
Block a user