Prevent NPC spawns on top of buildings.
This commit is contained in:
parent
d096d02f97
commit
d91843d43c
@ -26,7 +26,6 @@ import java.util.logging.Logger;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
@ -541,11 +540,12 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
newlocz = getZ();
|
||||
}
|
||||
|
||||
// DO NOT CORRECT SPAWN Z IN GENERAL - Prevent NPC spawns on top of buildings
|
||||
// don't correct z of flying npc's
|
||||
if (!npc.isFlying())
|
||||
{
|
||||
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
||||
}
|
||||
// if (!npc.isFlying())
|
||||
// {
|
||||
// newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
||||
// }
|
||||
|
||||
// Set is not random walk default value
|
||||
npc.setRandomWalking(getRandomWalking());
|
||||
|
@ -26,7 +26,6 @@ import java.util.logging.Logger;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
@ -541,11 +540,12 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
newlocz = getZ();
|
||||
}
|
||||
|
||||
// DO NOT CORRECT SPAWN Z IN GENERAL - Prevent NPC spawns on top of buildings
|
||||
// don't correct z of flying npc's
|
||||
if (!npc.isFlying())
|
||||
{
|
||||
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
||||
}
|
||||
// if (!npc.isFlying())
|
||||
// {
|
||||
// newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
||||
// }
|
||||
|
||||
// Set is not random walk default value
|
||||
npc.setRandomWalking(getRandomWalking());
|
||||
|
@ -26,7 +26,6 @@ import java.util.logging.Logger;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
@ -541,11 +540,12 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
newlocz = getZ();
|
||||
}
|
||||
|
||||
// DO NOT CORRECT SPAWN Z IN GENERAL - Prevent NPC spawns on top of buildings
|
||||
// don't correct z of flying npc's
|
||||
if (!npc.isFlying())
|
||||
{
|
||||
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
||||
}
|
||||
// if (!npc.isFlying())
|
||||
// {
|
||||
// newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
||||
// }
|
||||
|
||||
// Set is not random walk default value
|
||||
npc.setRandomWalking(getRandomWalking());
|
||||
|
@ -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();
|
||||
|
||||
|
@ -26,7 +26,6 @@ import java.util.logging.Logger;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
@ -541,11 +540,12 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
newlocz = getZ();
|
||||
}
|
||||
|
||||
// DO NOT CORRECT SPAWN Z IN GENERAL - Prevent NPC spawns on top of buildings
|
||||
// don't correct z of flying npc's
|
||||
if (!npc.isFlying())
|
||||
{
|
||||
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
||||
}
|
||||
// if (!npc.isFlying())
|
||||
// {
|
||||
// newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
||||
// }
|
||||
|
||||
// Set is not random walk default value
|
||||
npc.setRandomWalking(getRandomWalking());
|
||||
|
Loading…
Reference in New Issue
Block a user