Fixed invisible NPCs spawned by scripts.
This commit is contained in:
@ -2201,7 +2201,6 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
{
|
||||
try
|
||||
{
|
||||
final Spawn spawn = new Spawn(npcId);
|
||||
if ((xValue == 0) && (yValue == 0))
|
||||
{
|
||||
LOGGER.severe("addSpawn(): invalid spawn coordinates for NPC #" + npcId + "!");
|
||||
@ -2226,6 +2225,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
y += offset;
|
||||
}
|
||||
|
||||
final Spawn spawn = new Spawn(npcId);
|
||||
spawn.setInstanceId(instance);
|
||||
spawn.setHeading(heading);
|
||||
spawn.setXYZ(x, y, zValue);
|
||||
@ -2241,6 +2241,10 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
{
|
||||
summoner.addSummonedNpc(npc);
|
||||
}
|
||||
|
||||
// Fixes invisible NPCs spawned by script.
|
||||
npc.broadcastInfo();
|
||||
|
||||
return npc;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
Reference in New Issue
Block a user