Replaced GeoData engine with newest version.
This commit is contained in:
@@ -72,6 +72,8 @@ public abstract class Inventory extends ItemContainer
|
||||
// Speed percentage mods
|
||||
public static final double MAX_ARMOR_WEIGHT = 12000;
|
||||
|
||||
public static final int ADENA_ID = 57;
|
||||
|
||||
private final L2ItemInstance[] _paperdoll;
|
||||
private final List<PaperdollListener> _paperdollListeners;
|
||||
|
||||
|
@@ -26,7 +26,6 @@ import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
@@ -36,6 +35,9 @@ import com.l2jmobius.gameserver.datatables.DoorTable;
|
||||
import com.l2jmobius.gameserver.datatables.MapRegionTable;
|
||||
import com.l2jmobius.gameserver.datatables.MapRegionTable.TeleportWhereType;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geodata.pathfinding.AbstractNodeLoc;
|
||||
import com.l2jmobius.gameserver.geodata.pathfinding.PathFinding;
|
||||
import com.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import com.l2jmobius.gameserver.handler.SkillHandler;
|
||||
import com.l2jmobius.gameserver.instancemanager.TownManager;
|
||||
@@ -80,8 +82,6 @@ import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.TeleportToLocation;
|
||||
import com.l2jmobius.gameserver.pathfinding.AbstractNodeLoc;
|
||||
import com.l2jmobius.gameserver.pathfinding.PathFinding;
|
||||
import com.l2jmobius.gameserver.skills.Calculator;
|
||||
import com.l2jmobius.gameserver.skills.Formulas;
|
||||
import com.l2jmobius.gameserver.skills.Stats;
|
||||
@@ -4407,10 +4407,10 @@ public abstract class L2Character extends L2Object
|
||||
final boolean isFloating = isFlying() || isInsideZone(L2Character.ZONE_WATER);
|
||||
|
||||
// Z coordinate will follow geodata or client values
|
||||
if ((Config.GEODATA > 0) && (Config.COORD_SYNCHRONIZE == 2) && !isFloating && !m.disregardingGeodata && !(this instanceof L2BoatInstance) && ((GameTimeController.getGameTicks() % 10) == 0 // once a second to reduce possible cpu load
|
||||
if ((Config.PATHFINDING > 0) && (Config.COORD_SYNCHRONIZE == 2) && !isFloating && !m.disregardingGeodata && !(this instanceof L2BoatInstance) && ((GameTimeController.getGameTicks() % 10) == 0 // once a second to reduce possible cpu load
|
||||
) && GeoData.getInstance().hasGeo(xPrev, yPrev))
|
||||
{
|
||||
final int geoHeight = GeoData.getInstance().getSpawnHeight(xPrev, yPrev, zPrev - 30, zPrev + 30);
|
||||
final int geoHeight = GeoData.getInstance().getSpawnHeight(xPrev, yPrev, zPrev - 30);
|
||||
dz = m._zDestination - geoHeight;
|
||||
// quite a big difference, compare to validatePosition packet
|
||||
if ((this instanceof L2PcInstance) && (Math.abs(((L2PcInstance) this).getClientZ() - geoHeight) > 200) && (Math.abs(((L2PcInstance) this).getClientZ() - geoHeight) < 1500))
|
||||
@@ -4650,7 +4650,7 @@ public abstract class L2Character extends L2Object
|
||||
|
||||
// make water move short and use no geodata checks for swimming chars
|
||||
// distance in a click can easily be over 3000
|
||||
if ((Config.GEODATA > 0) && !(this instanceof L2BoatInstance) && isInsideZone(ZONE_WATER) && (distance > 700))
|
||||
if ((Config.PATHFINDING > 0) && !(this instanceof L2BoatInstance) && isInsideZone(ZONE_WATER) && (distance > 700))
|
||||
{
|
||||
final double divider = 700 / distance;
|
||||
x = curX + (int) (divider * dx);
|
||||
@@ -4728,7 +4728,7 @@ public abstract class L2Character extends L2Object
|
||||
m.onGeodataPathIndex = -1; // Initialize not on geodata path
|
||||
m.disregardingGeodata = false;
|
||||
|
||||
if ((Config.GEODATA > 0) && !isFlying() // currently flying characters not checked
|
||||
if ((Config.PATHFINDING > 0) && !isFlying() // currently flying characters not checked
|
||||
&& !(this instanceof L2NpcWalkerInstance) && !(this instanceof L2BoatInstance) && (!isInsideZone(ZONE_WATER) || isInsideZone(ZONE_SIEGE))) // swimming also not checked - but distance is limited
|
||||
{
|
||||
final boolean isInBoat = (this instanceof L2PcInstance) && ((L2PcInstance) this).isInBoat();
|
||||
@@ -4747,12 +4747,7 @@ public abstract class L2Character extends L2Object
|
||||
// Movement checks:
|
||||
// when geodata == 2, for all characters except mobs returning home (could be changed later to teleport if pathfinding fails)
|
||||
// when geodata == 1, for l2playableinstance and l2riftinvaderinstance
|
||||
if (((Config.GEODATA == 2) && !((this instanceof L2Attackable) && ((L2Attackable) this).isReturningToSpawnPoint())) || ((this instanceof L2PcInstance) && !(isInBoat && (distance > 1500))) || isAfraid() || (this instanceof L2RiftInvaderInstance) || ((this instanceof L2Summon) && !(getAI().getIntention() == CtrlIntention.AI_INTENTION_FOLLOW))) // assuming
|
||||
// intention_follow
|
||||
// only
|
||||
// when
|
||||
// following
|
||||
// owner
|
||||
if (((Config.PATHFINDING == 2) && !((this instanceof L2Attackable) && ((L2Attackable) this).isReturningToSpawnPoint())) || ((this instanceof L2PcInstance) && !(isInBoat && (distance > 1500))) || isAfraid() || (this instanceof L2RiftInvaderInstance) || ((this instanceof L2Summon) && !(getAI().getIntention() == CtrlIntention.AI_INTENTION_FOLLOW))) // assuming
|
||||
{
|
||||
if (isOnGeodataPath())
|
||||
{
|
||||
@@ -4806,7 +4801,7 @@ public abstract class L2Character extends L2Object
|
||||
// Pathfinding checks. Only when geodata setting is 2, the LoS check gives shorter result
|
||||
// than the original movement was and the LoS gives a shorter distance than 2000
|
||||
// This way of detecting need for pathfinding could be changed.
|
||||
if ((Config.GEODATA == 2) && ((originalDistance - distance) > 30) && (distance < 2000) && !isAfraid())
|
||||
if ((Config.PATHFINDING == 2) && ((originalDistance - distance) > 30) && (distance < 2000) && !isAfraid())
|
||||
{
|
||||
// Path calculation
|
||||
// Overrides previous movement check
|
||||
@@ -4876,7 +4871,7 @@ public abstract class L2Character extends L2Object
|
||||
}
|
||||
|
||||
// If no distance to go through, the movement is cancelled
|
||||
if ((distance < 1) && ((Config.GEODATA == 2) || (this instanceof L2PlayableInstance) || isAfraid() || (this instanceof L2RiftInvaderInstance)))
|
||||
if ((distance < 1) && ((Config.PATHFINDING == 2) || (this instanceof L2PlayableInstance) || isAfraid() || (this instanceof L2RiftInvaderInstance)))
|
||||
{
|
||||
if (this instanceof L2Summon)
|
||||
{
|
||||
|
@@ -27,10 +27,10 @@ import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.L2DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.MercTicketManager;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -931,7 +931,7 @@ public final class L2ItemInstance extends L2Object
|
||||
assert getPosition().getWorldRegion() == null;
|
||||
}
|
||||
|
||||
if ((Config.GEODATA > 0) && (dropper != null))
|
||||
if ((Config.PATHFINDING > 0) && (dropper != null))
|
||||
{
|
||||
final Location dropDest = GeoData.getInstance().moveCheck(dropper.getX(), dropper.getY(), dropper.getZ(), x, y, z);
|
||||
x = dropDest.getX();
|
||||
|
@@ -23,8 +23,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTreeTable;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2ArtefactInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2ChestInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
|
@@ -22,9 +22,9 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.Territory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
@@ -581,7 +581,7 @@ public class L2Spawn
|
||||
// don't correct z of flying npc's
|
||||
if (!mob.isFlying())
|
||||
{
|
||||
newlocz = GeoData.getInstance().getSpawnHeight(newlocx, newlocy, newlocz, newlocz);
|
||||
newlocz = GeoData.getInstance().getSpawnHeight(newlocx, newlocy, newlocz);
|
||||
}
|
||||
|
||||
for (final L2Effect f : mob.getAllEffects())
|
||||
|
@@ -17,11 +17,11 @@
|
||||
package com.l2jmobius.gameserver.model;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.ai.L2CharacterAI;
|
||||
import com.l2jmobius.gameserver.ai.L2SummonAI;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.model.L2Attackable.AggroInfo;
|
||||
import com.l2jmobius.gameserver.model.L2Skill.SkillTargetType;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
@@ -213,7 +213,7 @@ public abstract class L2Summon extends L2PlayableInstance
|
||||
player.sendPacket(new ValidateLocation(this));
|
||||
if (isAutoAttackable(player))
|
||||
{
|
||||
if (Config.GEODATA > 0)
|
||||
if (Config.PATHFINDING > 0)
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(player, this))
|
||||
{
|
||||
@@ -231,7 +231,7 @@ public abstract class L2Summon extends L2PlayableInstance
|
||||
{
|
||||
// This Action Failed packet avoids player getting stuck when clicking three or more times
|
||||
player.sendPacket(new ActionFailed());
|
||||
if (Config.GEODATA > 0)
|
||||
if (Config.PATHFINDING > 0)
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(player, this))
|
||||
{
|
||||
|
@@ -47,6 +47,10 @@ public final class L2World
|
||||
public static final int SHIFT_BY = 12;
|
||||
|
||||
/** Map dimensions */
|
||||
public static final int TILE_X_MIN = 11;
|
||||
public static final int TILE_Y_MIN = 10;
|
||||
public static final int TILE_X_MAX = 28;
|
||||
public static final int TILE_Y_MAX = 26;
|
||||
public static final int MAP_MIN_X = -131072;
|
||||
public static final int MAP_MAX_X = 228608;
|
||||
public static final int MAP_MIN_Y = -262144;
|
||||
|
@@ -18,8 +18,8 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.model.L2Character;
|
||||
import com.l2jmobius.gameserver.model.L2Spawn;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
|
@@ -35,7 +35,6 @@ import java.util.logging.Level;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.L2DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||
import com.l2jmobius.gameserver.LoginServerThread;
|
||||
import com.l2jmobius.gameserver.Olympiad;
|
||||
@@ -63,6 +62,7 @@ import com.l2jmobius.gameserver.datatables.NobleSkillTable;
|
||||
import com.l2jmobius.gameserver.datatables.NpcTable;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTreeTable;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import com.l2jmobius.gameserver.handler.ItemHandler;
|
||||
import com.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
@@ -3996,7 +3996,7 @@ public final class L2PcInstance extends L2PlayableInstance
|
||||
|
||||
{
|
||||
|
||||
if (Config.GEODATA > 0)
|
||||
if (Config.PATHFINDING > 0)
|
||||
|
||||
{
|
||||
|
||||
@@ -4030,7 +4030,7 @@ public final class L2PcInstance extends L2PlayableInstance
|
||||
// This Action Failed packet avoids player getting stuck when clicking three or more times
|
||||
|
||||
player.sendPacket(new ActionFailed());
|
||||
if (Config.GEODATA > 0)
|
||||
if (Config.PATHFINDING > 0)
|
||||
|
||||
{
|
||||
|
||||
|
@@ -24,10 +24,10 @@ import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.L2DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import com.l2jmobius.gameserver.handler.ItemHandler;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
@@ -316,7 +316,7 @@ public class L2PetInstance extends L2Summon
|
||||
// Check if the pet is attackable (without a forced attack) and isn't dead
|
||||
if (isAutoAttackable(player) && !isOwner)
|
||||
{
|
||||
if (Config.GEODATA > 0)
|
||||
if (Config.PATHFINDING > 0)
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(player, this))
|
||||
{
|
||||
@@ -333,7 +333,7 @@ public class L2PetInstance extends L2Summon
|
||||
}
|
||||
else if (!isInsideRadius(player, 150, false, false))
|
||||
{
|
||||
if (Config.GEODATA > 0)
|
||||
if (Config.PATHFINDING > 0)
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(player, this))
|
||||
{
|
||||
|
Reference in New Issue
Block a user