Fixed not been able to attack doors.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user