Fixed probable processQuestEvent NPE.
Contributed by Sero.
This commit is contained in:
parent
de143b8c2a
commit
cdcad605af
@ -1491,7 +1491,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1497,7 +1497,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1499,7 +1499,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1509,7 +1509,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1502,7 +1502,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1502,7 +1502,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1502,7 +1502,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1517,7 +1517,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1516,7 +1516,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1516,7 +1516,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1455,7 +1455,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1455,7 +1455,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1453,7 +1453,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1463,7 +1463,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1463,7 +1463,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1479,7 +1479,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1457,7 +1457,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1519,7 +1519,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
@ -1519,7 +1519,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_questNpcObject > 0)
|
||||
{
|
||||
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
|
||||
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
|
||||
{
|
||||
final Npc npc = (Npc) object;
|
||||
quest.notifyEvent(event, npc, this);
|
||||
|
Loading…
Reference in New Issue
Block a user