Prevent getAI NPE.
Contributed by Sahar.
This commit is contained in:
parent
eaa8f64803
commit
a7d7160fce
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -2250,7 +2250,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = new CreatureAI(new AIAccessor());
|
||||
}
|
||||
|
@ -2505,7 +2505,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -2507,7 +2507,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1748,7 +1748,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1748,7 +1748,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1748,7 +1748,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
@ -1748,7 +1748,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_ai == null)
|
||||
ai = _ai;
|
||||
if (ai == null)
|
||||
{
|
||||
_ai = ai = initAI();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user