relog crash bug

This commit is contained in:
2025-02-27 19:16:37 -06:00
parent 140ba6ae75
commit 80b1ab709d
2 changed files with 21 additions and 3 deletions
+9 -3
View File
@@ -976,8 +976,8 @@ public class MobAI {
if (mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardCaptain.ordinal())
CheckForPlayerGuardAggro(mob);
} else {
//CheckForAggro(mob);
NewAggroMechanic(mob);
if(mob.combatTarget == null)
NewAggroMechanic(mob);
}
}
@@ -1416,10 +1416,16 @@ public class MobAI {
public static void NewAggroMechanic(Mob mob){
if(mob == null || !mob.isAlive()){
if(mob == null || !mob.isAlive() || mob.playerAgroMap.isEmpty()){
return;
}
if(mob.hate_values == null)
mob.hate_values = new HashMap<>();
if(mob.combatTarget != null)
return;
HashSet<AbstractWorldObject> inRange = WorldGrid.getObjectsInRangePartial(mob.loc,60.0f,MBServerStatics.MASK_PLAYER);
if(inRange.isEmpty()){