forked from MagicBane/Server
stop invisible player plague
This commit is contained in:
@@ -5210,27 +5210,25 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
|
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.level < 10 && this.enteredWorld) {
|
|
||||||
while (this.level < 10) {
|
|
||||||
grantXP(Experience.getBaseExperience(this.level + 1) - this.exp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isBoxed){
|
if (this.isBoxed){
|
||||||
if(!this.title.equals(CharacterTitle.PVE)){
|
if(!this.title.equals(CharacterTitle.PVE)){
|
||||||
this.title = CharacterTitle.PVE;
|
this.title = CharacterTitle.PVE;
|
||||||
//InterestManager.setObjectDirty(this);
|
InterestManager.setObjectDirty(this);
|
||||||
//InterestManager.reloadCharacter(this, false);
|
InterestManager.reloadCharacter(this, false);
|
||||||
LoadCharacterMsg lcm = new LoadCharacterMsg(this, PlayerCharacter.hideNonAscii());
|
this.setDirtyLoad(true);
|
||||||
DispatchMessage.dispatchMsgToInterestArea(this,lcm,DispatchChannel.PRIMARY,MBServerStatics.CHARACTER_LOAD_RANGE,true,false);
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if (!this.title.equals(CharacterTitle.NONE)) {
|
if (!this.title.equals(CharacterTitle.NONE)) {
|
||||||
this.title = CharacterTitle.NONE;
|
this.title = CharacterTitle.NONE;
|
||||||
//InterestManager.setObjectDirty(this);
|
InterestManager.setObjectDirty(this);
|
||||||
//InterestManager.reloadCharacter(this, false);
|
InterestManager.reloadCharacter(this, false);
|
||||||
LoadCharacterMsg lcm = new LoadCharacterMsg(this, PlayerCharacter.hideNonAscii());
|
this.setDirtyLoad(true);
|
||||||
DispatchMessage.dispatchMsgToInterestArea(this,lcm,DispatchChannel.PRIMARY,MBServerStatics.CHARACTER_LOAD_RANGE,true,false);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.level < 10 && this.enteredWorld) {
|
||||||
|
while (this.level < 10) {
|
||||||
|
grantXP(Experience.getBaseExperience(this.level + 1) - this.exp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5278,14 +5276,8 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
if(pc.equals(player))
|
if(pc.equals(player))
|
||||||
continue;
|
continue;
|
||||||
pc.isBoxed = true;
|
pc.isBoxed = true;
|
||||||
pc.title = CharacterTitle.PVE;
|
|
||||||
InterestManager.setObjectDirty(pc);
|
|
||||||
InterestManager.reloadCharacter(pc, false);
|
|
||||||
}
|
}
|
||||||
player.isBoxed = false;
|
player.isBoxed = false;
|
||||||
player.title = CharacterTitle.NONE;
|
|
||||||
InterestManager.setObjectDirty(player);
|
|
||||||
InterestManager.reloadCharacter(player, false);
|
|
||||||
}
|
}
|
||||||
public static boolean checkIfBoxed(PlayerCharacter player){
|
public static boolean checkIfBoxed(PlayerCharacter player){
|
||||||
if(ConfigManager.MB_WORLD_BOXLIMIT.getValue().equals("false")) {
|
if(ConfigManager.MB_WORLD_BOXLIMIT.getValue().equals("false")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user