Fixed SilentValley NPE.

Contributed by gigilo1968.
This commit is contained in:
MobiusDev
2017-04-19 20:21:55 +00:00
parent deed32c64e
commit 6aa09924c0
2 changed files with 2 additions and 2 deletions

View File

@@ -153,7 +153,7 @@ public final class SilentValley extends AbstractNpcAI
if (creature.isPlayable())
{
final L2PcInstance player = (isSummon) ? ((L2Summon) creature).getOwner() : creature.getActingPlayer();
if ((npc.getId() == GUARD1) || (npc.getId() == GUARD2))
if ((npc != null) && ((npc.getId() == GUARD1) || (npc.getId() == GUARD2)))
{
npc.setTarget(player);
npc.doCast(BLAZE.getSkill());

View File

@@ -153,7 +153,7 @@ public final class SilentValley extends AbstractNpcAI
if (creature.isPlayable())
{
final L2PcInstance player = (isSummon) ? ((L2Summon) creature).getOwner() : creature.getActingPlayer();
if ((npc.getId() == GUARD1) || (npc.getId() == GUARD2))
if ((npc != null) && ((npc.getId() == GUARD1) || (npc.getId() == GUARD2)))
{
npc.setTarget(player);
npc.doCast(BLAZE.getSkill());