forked from MagicBane/Server
Variable hidden elevated to abschar.
This commit is contained in:
@@ -140,7 +140,7 @@ public enum InterestManager implements Runnable {
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
if (pc != null)
|
if (pc != null)
|
||||||
if (pcc.getSeeInvis() < pc.getHidden())
|
if (pcc.getSeeInvis() < pc.hidden)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!cc.sendMsg(uom)) {
|
if (!cc.sendMsg(uom)) {
|
||||||
@@ -340,7 +340,7 @@ public enum InterestManager implements Runnable {
|
|||||||
if (loadedPlayer.getObjectUUID() == player.getObjectUUID())
|
if (loadedPlayer.getObjectUUID() == player.getObjectUUID())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (player.getSeeInvis() < loadedPlayer.getHidden())
|
if (player.getSeeInvis() < loadedPlayer.hidden)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (loadedPlayer.safemodeInvis())
|
if (loadedPlayer.safemodeInvis())
|
||||||
@@ -372,7 +372,7 @@ public enum InterestManager implements Runnable {
|
|||||||
|
|
||||||
if (playerLoadedObject.getObjectType().equals(GameObjectType.PlayerCharacter)) {
|
if (playerLoadedObject.getObjectType().equals(GameObjectType.PlayerCharacter)) {
|
||||||
PlayerCharacter loadedPlayer = (PlayerCharacter) playerLoadedObject;
|
PlayerCharacter loadedPlayer = (PlayerCharacter) playerLoadedObject;
|
||||||
if (player.getSeeInvis() < loadedPlayer.getHidden())
|
if (player.getSeeInvis() < loadedPlayer.hidden)
|
||||||
toRemove.add(playerLoadedObject);
|
toRemove.add(playerLoadedObject);
|
||||||
else if (loadedPlayer.safemodeInvis())
|
else if (loadedPlayer.safemodeInvis())
|
||||||
toRemove.add(playerLoadedObject);
|
toRemove.add(playerLoadedObject);
|
||||||
@@ -437,7 +437,7 @@ public enum InterestManager implements Runnable {
|
|||||||
|
|
||||||
// dont load if invis
|
// dont load if invis
|
||||||
|
|
||||||
if (player.getSeeInvis() < awopc.getHidden())
|
if (player.getSeeInvis() < awopc.hidden)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
lcm = new LoadCharacterMsg(awopc, PlayerCharacter.hideNonAscii());
|
lcm = new LoadCharacterMsg(awopc, PlayerCharacter.hideNonAscii());
|
||||||
|
|||||||
@@ -788,7 +788,7 @@ public enum ChatManager {
|
|||||||
it.remove();
|
it.remove();
|
||||||
else {
|
else {
|
||||||
PlayerCharacter pcc = (PlayerCharacter) awo;
|
PlayerCharacter pcc = (PlayerCharacter) awo;
|
||||||
if (pcc.getSeeInvis() < pc.getHidden())
|
if (pcc.getSeeInvis() < pc.hidden)
|
||||||
it.remove();
|
it.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ public class MobAI {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mob.canSee((PlayerCharacter) mob.getCombatTarget())) {
|
if (!mob.canSee((AbstractCharacter) mob.getCombatTarget())) {
|
||||||
mob.setCombatTarget(null);
|
mob.setCombatTarget(null);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,6 +119,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
private long takeOffTime = 0;
|
private long takeOffTime = 0;
|
||||||
private long lastHateUpdate = 0;
|
private long lastHateUpdate = 0;
|
||||||
private byte aoecntr = 0;
|
private byte aoecntr = 0;
|
||||||
|
|
||||||
|
public int hidden = 0; // current rank of hide/sneak/invis
|
||||||
|
|
||||||
public final ConcurrentHashMap<Mob, Integer> siegeMinionMap = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
public final ConcurrentHashMap<Mob, Integer> siegeMinionMap = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||||
|
|
||||||
public AbstractCharacter() {
|
public AbstractCharacter() {
|
||||||
|
|||||||
@@ -1679,8 +1679,8 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
return new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
return new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canSee(PlayerCharacter target) {
|
public boolean canSee(AbstractCharacter target) {
|
||||||
return this.mobBase.getSeeInvis() >= target.getHidden();
|
return this.mobBase.getSeeInvis() >= target.hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getBuildingID() {
|
public int getBuildingID() {
|
||||||
|
|||||||
@@ -135,7 +135,6 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
private Vector3fImmutable lastStaticLoc = new Vector3fImmutable(0.0f, 0.0f, 0.0f);
|
private Vector3fImmutable lastStaticLoc = new Vector3fImmutable(0.0f, 0.0f, 0.0f);
|
||||||
private GameObjectType lastTargetType;
|
private GameObjectType lastTargetType;
|
||||||
private int lastTargetID;
|
private int lastTargetID;
|
||||||
private int hidden = 0; // current rank of hide/sneak/invis
|
|
||||||
private int seeInvis = 0; // current rank of see invis
|
private int seeInvis = 0; // current rank of see invis
|
||||||
private float speedMod;
|
private float speedMod;
|
||||||
private boolean teleportMode = false; // Teleport on MoveToPoint
|
private boolean teleportMode = false; // Teleport on MoveToPoint
|
||||||
@@ -2774,10 +2773,6 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
this.lastStaticLoc = value;
|
this.lastStaticLoc = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHidden() {
|
|
||||||
return this.hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHidden(int value) {
|
public void setHidden(int value) {
|
||||||
this.hidden = value;
|
this.hidden = value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user