Prevent NPC spawns on top of buildings.

This commit is contained in:
MobiusDev
2017-09-11 02:29:39 +00:00
parent d096d02f97
commit d91843d43c
5 changed files with 25 additions and 24 deletions

View File

@ -620,11 +620,12 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
}
}
// DO NOT CORRECT SPAWN Z IN GENERAL - Prevent NPC spawns on top of buildings
// don't correct z of flying npc's
if (!mob.isFlying())
{
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
}
// if (!npc.isFlying())
// {
// newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// }
mob.stopAllEffects();