forked from MagicBane/Server
player update organisation
This commit is contained in:
@@ -5182,6 +5182,33 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
this.safeZone = this.isInSafeZone();
|
||||
|
||||
if(this.isActive && this.enteredWorld) {
|
||||
|
||||
if (this.level < 10 && this.enteredWorld) {
|
||||
while (this.level < 10) {
|
||||
grantXP(Experience.getBaseExperience(this.level + 1) - this.exp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.auditBoxedStatus();
|
||||
|
||||
if (this.isFlying()) {
|
||||
this.auditFlightStatus();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
} finally {
|
||||
this.updateLock.writeLock().unlock();
|
||||
}
|
||||
}
|
||||
}catch(Exception e){
|
||||
Logger.error("UPDATE ISSUE: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
public void auditBoxedStatus(){
|
||||
|
||||
if (!this.timestamps.containsKey("nextBoxCheck"))
|
||||
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 3000);
|
||||
|
||||
@@ -5191,21 +5218,25 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
}
|
||||
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 3000);
|
||||
}
|
||||
if (this.level < 10 && this.enteredWorld) {
|
||||
while (this.level < 10) {
|
||||
grantXP(Experience.getBaseExperience(this.level + 1) - this.exp);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.isBoxed && !this.containsEffect(-654906771)) {
|
||||
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, -935138707, 40, false);
|
||||
}else if(!this.isBoxed && this.containsEffect(-654906771)){
|
||||
this.effects.remove("PvE-Flagged");
|
||||
this.effects.remove("1258");
|
||||
WorldGrid.updateObject(this);
|
||||
try {
|
||||
this.effects.get("PvE-Flagged").endEffect();
|
||||
//this.effects.remove("PvE-Flagged");
|
||||
}catch(Exception ignored){
|
||||
|
||||
}
|
||||
try{
|
||||
this.effects.get("1258").endEffect();
|
||||
//this.effects.remove("1258");
|
||||
}catch(Exception ignored){
|
||||
|
||||
}
|
||||
}
|
||||
if (this.isFlying()) {
|
||||
}
|
||||
public void auditFlightStatus(){
|
||||
if (this.effects.containsKey("MoveBuff")) {
|
||||
GroundPlayer(this);
|
||||
}
|
||||
@@ -5224,18 +5255,6 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
ChatManager.chatSystemInfo(this, "Applying 1 Tier Ground");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
} finally {
|
||||
this.updateLock.writeLock().unlock();
|
||||
}
|
||||
}
|
||||
}catch(Exception e){
|
||||
Logger.error("UPDATE ISSUE: " + e);
|
||||
}
|
||||
}
|
||||
public static void unboxPlayer(PlayerCharacter player){
|
||||
String machineID = player.getClientConnection().machineID;
|
||||
|
||||
Reference in New Issue
Block a user