Fixed not been able to attack doors.
This commit is contained in:
parent
8cbb988bea
commit
118ca0d877
@ -582,6 +582,12 @@ public final class L2DoorInstance extends L2Character
|
||||
{
|
||||
broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_CASTLE_GATE_HAS_BEEN_DESTROYED));
|
||||
}
|
||||
|
||||
// Correct position in case pathfinding moved player to a restricted location, since door coordinates can be behind objects.
|
||||
if (killer.isPlayer())
|
||||
{
|
||||
killer.setLocation(killer.getActingPlayer().getLastServerPosition());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,8 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_name = set.getString("name");
|
||||
|
||||
// position
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = set.getInt("z");
|
||||
_height = set.getInt("height", 150);
|
||||
_nodeZ = set.getInt("nodeZ");
|
||||
|
||||
_nodeX = new int[4]; // 4 * x
|
||||
_nodeY = new int[4]; // 4 * y
|
||||
for (int i = 0; i < 4; i++)
|
||||
@ -77,6 +73,9 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_nodeX[i] = set.getInt("nodeX_" + i);
|
||||
_nodeY[i] = set.getInt("nodeY_" + i);
|
||||
}
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = Math.min(set.getInt("z"), _nodeZ);
|
||||
|
||||
// optional
|
||||
_emmiter = set.getInt("emmiterId", 0);
|
||||
|
@ -582,6 +582,12 @@ public final class L2DoorInstance extends L2Character
|
||||
{
|
||||
broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_CASTLE_GATE_HAS_BEEN_DESTROYED));
|
||||
}
|
||||
|
||||
// Correct position in case pathfinding moved player to a restricted location, since door coordinates can be behind objects.
|
||||
if (killer.isPlayer())
|
||||
{
|
||||
killer.setLocation(killer.getActingPlayer().getLastServerPosition());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,8 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_name = set.getString("name");
|
||||
|
||||
// position
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = set.getInt("z");
|
||||
_height = set.getInt("height", 150);
|
||||
_nodeZ = set.getInt("nodeZ");
|
||||
|
||||
_nodeX = new int[4]; // 4 * x
|
||||
_nodeY = new int[4]; // 4 * y
|
||||
for (int i = 0; i < 4; i++)
|
||||
@ -77,6 +73,9 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_nodeX[i] = set.getInt("nodeX_" + i);
|
||||
_nodeY[i] = set.getInt("nodeY_" + i);
|
||||
}
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = Math.min(set.getInt("z"), _nodeZ);
|
||||
|
||||
// optional
|
||||
_emmiter = set.getInt("emmiterId", 0);
|
||||
|
@ -582,6 +582,12 @@ public final class L2DoorInstance extends L2Character
|
||||
{
|
||||
broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_CASTLE_GATE_HAS_BEEN_DESTROYED));
|
||||
}
|
||||
|
||||
// Correct position in case pathfinding moved player to a restricted location, since door coordinates can be behind objects.
|
||||
if (killer.isPlayer())
|
||||
{
|
||||
killer.setLocation(killer.getActingPlayer().getLastServerPosition());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,8 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_name = set.getString("name");
|
||||
|
||||
// position
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = set.getInt("z");
|
||||
_height = set.getInt("height", 150);
|
||||
_nodeZ = set.getInt("nodeZ");
|
||||
|
||||
_nodeX = new int[4]; // 4 * x
|
||||
_nodeY = new int[4]; // 4 * y
|
||||
for (int i = 0; i < 4; i++)
|
||||
@ -77,6 +73,9 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_nodeX[i] = set.getInt("nodeX_" + i);
|
||||
_nodeY[i] = set.getInt("nodeY_" + i);
|
||||
}
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = Math.min(set.getInt("z"), _nodeZ);
|
||||
|
||||
// optional
|
||||
_emmiter = set.getInt("emmiterId", 0);
|
||||
|
@ -582,6 +582,12 @@ public final class L2DoorInstance extends L2Character
|
||||
{
|
||||
broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_CASTLE_GATE_HAS_BEEN_DESTROYED));
|
||||
}
|
||||
|
||||
// Correct position in case pathfinding moved player to a restricted location, since door coordinates can be behind objects.
|
||||
if (killer.isPlayer())
|
||||
{
|
||||
killer.setLocation(killer.getActingPlayer().getLastServerPosition());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,8 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_name = set.getString("name");
|
||||
|
||||
// position
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = set.getInt("z");
|
||||
_height = set.getInt("height", 150);
|
||||
_nodeZ = set.getInt("nodeZ");
|
||||
|
||||
_nodeX = new int[4]; // 4 * x
|
||||
_nodeY = new int[4]; // 4 * y
|
||||
for (int i = 0; i < 4; i++)
|
||||
@ -77,6 +73,9 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_nodeX[i] = set.getInt("nodeX_" + i);
|
||||
_nodeY[i] = set.getInt("nodeY_" + i);
|
||||
}
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = Math.min(set.getInt("z"), _nodeZ);
|
||||
|
||||
// optional
|
||||
_emmiter = set.getInt("emmiterId", 0);
|
||||
|
@ -635,6 +635,12 @@ public class L2DoorInstance extends L2Character
|
||||
{
|
||||
broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_CASTLE_GATE_HAS_BEEN_DESTROYED));
|
||||
}
|
||||
|
||||
// Correct position in case pathfinding moved player to a restricted location, since door coordinates can be behind objects.
|
||||
if (killer.isPlayer())
|
||||
{
|
||||
killer.setLocation(killer.getActingPlayer().getLastServerPosition());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -65,9 +65,6 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
|
||||
// position
|
||||
final String[] pos = set.getString("pos").split(";");
|
||||
_posX = Integer.parseInt(pos[0]);
|
||||
_posY = Integer.parseInt(pos[1]);
|
||||
_posZ = Integer.parseInt(pos[2]);
|
||||
_height = set.getInt("height");
|
||||
_nodeZ = set.getInt("nodeZ");
|
||||
_nodeX = new int[4]; // 4 * x
|
||||
@ -78,6 +75,9 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_nodeX[i] = Integer.parseInt(split[0]);
|
||||
_nodeY[i] = Integer.parseInt(split[1]);
|
||||
}
|
||||
_posX = Integer.parseInt(pos[0]);
|
||||
_posY = Integer.parseInt(pos[1]);
|
||||
_posZ = Math.min(Integer.parseInt(pos[2]), _nodeZ);
|
||||
|
||||
// optional
|
||||
_emmiter = set.getInt("emitter_id", 0);
|
||||
|
@ -582,6 +582,12 @@ public final class L2DoorInstance extends L2Character
|
||||
{
|
||||
broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_CASTLE_GATE_HAS_BEEN_DESTROYED));
|
||||
}
|
||||
|
||||
// Correct position in case pathfinding moved player to a restricted location, since door coordinates can be behind objects.
|
||||
if (killer.isPlayer())
|
||||
{
|
||||
killer.setLocation(killer.getActingPlayer().getLastServerPosition());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,8 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_name = set.getString("name");
|
||||
|
||||
// position
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = set.getInt("z");
|
||||
_height = set.getInt("height", 150);
|
||||
_nodeZ = set.getInt("nodeZ");
|
||||
|
||||
_nodeX = new int[4]; // 4 * x
|
||||
_nodeY = new int[4]; // 4 * y
|
||||
for (int i = 0; i < 4; i++)
|
||||
@ -77,6 +73,9 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_nodeX[i] = set.getInt("nodeX_" + i);
|
||||
_nodeY[i] = set.getInt("nodeY_" + i);
|
||||
}
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = Math.min(set.getInt("z"), _nodeZ);
|
||||
|
||||
// optional
|
||||
_emmiter = set.getInt("emmiterId", 0);
|
||||
|
@ -582,6 +582,12 @@ public final class L2DoorInstance extends L2Character
|
||||
{
|
||||
broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_CASTLE_GATE_HAS_BEEN_DESTROYED));
|
||||
}
|
||||
|
||||
// Correct position in case pathfinding moved player to a restricted location, since door coordinates can be behind objects.
|
||||
if (killer.isPlayer())
|
||||
{
|
||||
killer.setLocation(killer.getActingPlayer().getLastServerPosition());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,8 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_name = set.getString("name");
|
||||
|
||||
// position
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = set.getInt("z");
|
||||
_height = set.getInt("height", 150);
|
||||
_nodeZ = set.getInt("nodeZ");
|
||||
|
||||
_nodeX = new int[4]; // 4 * x
|
||||
_nodeY = new int[4]; // 4 * y
|
||||
for (int i = 0; i < 4; i++)
|
||||
@ -77,6 +73,9 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_nodeX[i] = set.getInt("nodeX_" + i);
|
||||
_nodeY[i] = set.getInt("nodeY_" + i);
|
||||
}
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = Math.min(set.getInt("z"), _nodeZ);
|
||||
|
||||
// optional
|
||||
_emmiter = set.getInt("emmiterId", 0);
|
||||
|
@ -582,6 +582,12 @@ public final class L2DoorInstance extends L2Character
|
||||
{
|
||||
broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_CASTLE_GATE_HAS_BEEN_DESTROYED));
|
||||
}
|
||||
|
||||
// Correct position in case pathfinding moved player to a restricted location, since door coordinates can be behind objects.
|
||||
if (killer.isPlayer())
|
||||
{
|
||||
killer.setLocation(killer.getActingPlayer().getLastServerPosition());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,8 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_name = set.getString("name");
|
||||
|
||||
// position
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = set.getInt("z");
|
||||
_height = set.getInt("height", 150);
|
||||
_nodeZ = set.getInt("nodeZ");
|
||||
|
||||
_nodeX = new int[4]; // 4 * x
|
||||
_nodeY = new int[4]; // 4 * y
|
||||
for (int i = 0; i < 4; i++)
|
||||
@ -77,6 +73,9 @@ public class L2DoorTemplate extends L2CharTemplate implements IIdentifiable
|
||||
_nodeX[i] = set.getInt("nodeX_" + i);
|
||||
_nodeY[i] = set.getInt("nodeY_" + i);
|
||||
}
|
||||
_posX = set.getInt("x");
|
||||
_posY = set.getInt("y");
|
||||
_posZ = Math.min(set.getInt("z"), _nodeZ);
|
||||
|
||||
// optional
|
||||
_emmiter = set.getInt("emmiterId", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user