Fixed invisible NPCs spawned by scripts.

This commit is contained in:
MobiusDevelopment
2022-08-19 21:07:49 +00:00
parent 20ed2a6ef9
commit 5d5b9c62c9
28 changed files with 134 additions and 43 deletions

View File

@@ -1865,7 +1865,7 @@ public abstract class AbstractScript extends ManagedScript
{
if ((xValue == 0) && (yValue == 0))
{
LOGGER.log(Level.SEVERE, "addSpawn(): invalid spawn coordinates for NPC #" + npcId + "!");
LOGGER.severe("addSpawn(): invalid spawn coordinates for NPC #" + npcId + "!");
return null;
}
@@ -1904,11 +1904,8 @@ public abstract class AbstractScript extends ManagedScript
summoner.addSummonedNpc(npc);
}
// Make sure info is broadcasted in instances
if (npc.getInstanceId() > 0)
{
npc.broadcastInfo();
}
// Fixes invisible NPCs spawned by script.
npc.broadcastInfo();
return npc;
}