Fixed probable BeeHive pet NPE.

This commit is contained in:
MobiusDevelopment
2022-08-06 21:01:35 +00:00
parent d53e842a0a
commit f3a14ffb1d
4 changed files with 4 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ public class BeeHive extends AbstractNpcAI
} }
final Pet pet = attacker.getPet(); final Pet pet = attacker.getPet();
if ((pet.getCurrentFed() == 0) || pet.isDead() || pet.isAffectedBySkill(SKILLS[0]) || pet.isAffectedBySkill(SKILLS[1])) if ((pet == null) || (pet.getCurrentFed() == 0) || pet.isDead() || pet.isAffectedBySkill(SKILLS[0]) || pet.isAffectedBySkill(SKILLS[1]))
{ {
return super.onAttack(npc, attacker, damage, isSummon); return super.onAttack(npc, attacker, damage, isSummon);
} }

View File

@@ -83,7 +83,7 @@ public class BeeHive extends AbstractNpcAI
} }
final Pet pet = attacker.getPet(); final Pet pet = attacker.getPet();
if ((pet.getCurrentFed() == 0) || pet.isDead() || pet.isAffectedBySkill(SKILLS[0]) || pet.isAffectedBySkill(SKILLS[1])) if ((pet == null) || (pet.getCurrentFed() == 0) || pet.isDead() || pet.isAffectedBySkill(SKILLS[0]) || pet.isAffectedBySkill(SKILLS[1]))
{ {
return super.onAttack(npc, attacker, damage, isSummon); return super.onAttack(npc, attacker, damage, isSummon);
} }

View File

@@ -83,7 +83,7 @@ public class BeeHive extends AbstractNpcAI
} }
final Pet pet = attacker.getPet(); final Pet pet = attacker.getPet();
if ((pet.getCurrentFed() == 0) || pet.isDead() || pet.isAffectedBySkill(SKILLS[0]) || pet.isAffectedBySkill(SKILLS[1])) if ((pet == null) || (pet.getCurrentFed() == 0) || pet.isDead() || pet.isAffectedBySkill(SKILLS[0]) || pet.isAffectedBySkill(SKILLS[1]))
{ {
return super.onAttack(npc, attacker, damage, isSummon); return super.onAttack(npc, attacker, damage, isSummon);
} }

View File

@@ -83,7 +83,7 @@ public class BeeHive extends AbstractNpcAI
} }
final Pet pet = attacker.getPet(); final Pet pet = attacker.getPet();
if ((pet.getCurrentFed() == 0) || pet.isDead() || pet.isAffectedBySkill(SKILLS[0]) || pet.isAffectedBySkill(SKILLS[1])) if ((pet == null) || (pet.getCurrentFed() == 0) || pet.isDead() || pet.isAffectedBySkill(SKILLS[0]) || pet.isAffectedBySkill(SKILLS[1]))
{ {
return super.onAttack(npc, attacker, damage, isSummon); return super.onAttack(npc, attacker, damage, isSummon);
} }