Browse Source

box flag checker

lakebane-master
FatBoy-DOTC 5 months ago
parent
commit
4089f72d8f
  1. 4
      src/engine/InterestManagement/InterestManager.java
  2. 2
      src/engine/devcmd/cmds/SetAdminRuneCmd.java
  3. 2
      src/engine/devcmd/cmds/SetBaseClassCmd.java
  4. 2
      src/engine/devcmd/cmds/SetLevelCmd.java
  5. 2
      src/engine/devcmd/cmds/SetPromotionClassCmd.java
  6. 2
      src/engine/devcmd/cmds/SetRuneCmd.java
  7. 2
      src/engine/objects/Building.java
  8. 4
      src/engine/objects/PlayerCharacter.java
  9. 2
      src/engine/workthreads/ZergMechanicThread.java

4
src/engine/InterestManagement/InterestManager.java

@ -109,7 +109,7 @@ public enum InterestManager implements Runnable { @@ -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 { @@ -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 {

2
src/engine/devcmd/cmds/SetAdminRuneCmd.java

@ -62,7 +62,7 @@ public class SetAdminRuneCmd extends AbstractDevCmd { @@ -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);

2
src/engine/devcmd/cmds/SetBaseClassCmd.java

@ -47,7 +47,7 @@ public class SetBaseClassCmd extends AbstractDevCmd { @@ -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);
}

2
src/engine/devcmd/cmds/SetLevelCmd.java

@ -58,7 +58,7 @@ public class SetLevelCmd extends AbstractDevCmd { @@ -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

2
src/engine/devcmd/cmds/SetPromotionClassCmd.java

@ -42,7 +42,7 @@ public class SetPromotionClassCmd extends AbstractDevCmd { @@ -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

2
src/engine/devcmd/cmds/SetRuneCmd.java

@ -57,7 +57,7 @@ public class SetRuneCmd extends AbstractDevCmd { @@ -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);

2
src/engine/objects/Building.java

@ -435,7 +435,7 @@ public class Building extends AbstractWorldObject { @@ -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);
}
}
}

4
src/engine/objects/PlayerCharacter.java

@ -4876,7 +4876,7 @@ public class PlayerCharacter extends AbstractCharacter { @@ -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 { @@ -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);
}
}
}

2
src/engine/workthreads/ZergMechanicThread.java

@ -85,7 +85,7 @@ import java.util.HashSet; @@ -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();

Loading…
Cancel
Save