Browse Source

Workaround for mob region issue.

master
MagicBot 2 years ago
parent
commit
a85391e5a4
  1. 21
      src/engine/net/client/msg/LoadCharacterMsg.java
  2. 5
      src/engine/objects/NPC.java

21
src/engine/net/client/msg/LoadCharacterMsg.java

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
package engine.net.client.msg;
import engine.Enum;
import engine.Enum.GameObjectType;
import engine.exception.SerializationException;
import engine.net.AbstractConnection;
@ -102,13 +103,25 @@ public class LoadCharacterMsg extends ClientNetMsg { @@ -102,13 +103,25 @@ public class LoadCharacterMsg extends ClientNetMsg {
}
}
//TODO below is Mob Region Serialization, not implemented. default to -1, which is ground.
}else{
writer.putInt(-1);
writer.putInt(-1);
}
}else {
Mob mobile = (Mob) absChar;
if (mobile.building != null &&
mobile.building.getBlueprint() != null) {
Blueprint blueprint = mobile.building.getBlueprint();
if (blueprint.getBuildingGroup().equals(Enum.BuildingGroup.ARTYTOWER)) {
writer.putInt(-0);
writer.putInt(-0);
return;
}
writer.putInt(-1);
writer.putInt(-1);
}
}
} else if (corpse != null){
writer.putInt(-1);

5
src/engine/objects/NPC.java

@ -1451,11 +1451,6 @@ public class NPC extends AbstractCharacter { @@ -1451,11 +1451,6 @@ public class NPC extends AbstractCharacter {
else if (!siegeMinionMap.containsValue(2))
slot = 2;
// Corner trebs always are slot 1
if (this.building.getBlueprint().getBuildingGroup().equals(BuildingGroup.ARTYTOWER))
slot = 1;
siegeMinionMap.put(mob, slot);
mob.setInBuildingLoc(this.building, this);

Loading…
Cancel
Save