Changeset 8630 for trunk/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2DoorInstanceAction.java
- Timestamp:
- Jan 16, 2012 7:56:19 AM (4 months ago)
- Location:
- trunk/L2J_DataPack
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
dist/game/data/scripts/handlers/actionhandlers/L2DoorInstanceAction.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/L2J_DataPack
- Property svn:mergeinfo changed
/branches/unstable/L2J_DataPack_BETA merged: 8407-8426,8428-8480,8482-8491,8493-8588,8590-8629
- Property svn:mergeinfo changed
-
trunk/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2DoorInstanceAction.java
r7665 r8630 23 23 import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance; 24 24 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; 25 import com.l2jserver.gameserver.model.entity.clanhall.SiegableHall; 25 26 import com.l2jserver.gameserver.network.serverpackets.ConfirmDlg; 26 27 import com.l2jserver.gameserver.network.serverpackets.MyTargetSelected; … … 30 31 public class L2DoorInstanceAction implements IActionHandler 31 32 { 33 @Override 32 34 public boolean action(L2PcInstance activeChar, L2Object target, boolean interact) 33 35 { … … 42 44 43 45 StaticObject su; 46 L2DoorInstance door = (L2DoorInstance)target; 44 47 // send HP amount if doors are inside castle/fortress zone 45 48 // TODO: needed to be added here doors from conquerable clanhalls 46 if ((((L2DoorInstance)target).getCastle() != null 47 && ((L2DoorInstance)target).getCastle().getCastleId() > 0) 48 || (((L2DoorInstance)target).getFort() != null 49 && ((L2DoorInstance)target).getFort().getFortId() > 0 50 && !((L2DoorInstance)target).getIsCommanderDoor())) 51 su = new StaticObject((L2DoorInstance)target, true); 49 if ((door.getCastle() != null && door.getCastle().getCastleId() > 0) 50 || (door.getFort() != null && door.getFort().getFortId() > 0) 51 || (door.getClanHall() != null && door.getClanHall().isSiegableHall()) 52 && !door.getIsCommanderDoor()) 53 su = new StaticObject(door, true); 52 54 else 53 su = new StaticObject( (L2DoorInstance)target, false);55 su = new StaticObject(door, false); 54 56 55 57 activeChar.sendPacket(su); 56 58 57 59 // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client 58 activeChar.sendPacket(new ValidateLocation( (L2Character)target));60 activeChar.sendPacket(new ValidateLocation(door)); 59 61 } 60 62 else if (interact) 61 63 { 64 L2DoorInstance door = (L2DoorInstance)target; 62 65 // MyTargetSelected my = new MyTargetSelected(getObjectId(), activeChar.getLevel()); 63 66 // activeChar.sendPacket(my); … … 68 71 } 69 72 else if (activeChar.getClan() != null 70 && ((L2DoorInstance)target).getClanHall() != null71 && activeChar.getClanId() == ((L2DoorInstance)target).getClanHall().getOwnerId())73 && door.getClanHall() != null 74 && activeChar.getClanId() == door.getClanHall().getOwnerId()) 72 75 { 73 if (! ((L2Character)target).isInsideRadius(activeChar, L2Npc.INTERACTION_DISTANCE, false, false))76 if (!door.isInsideRadius(activeChar, L2Npc.INTERACTION_DISTANCE, false, false)) 74 77 { 75 78 activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, target); 76 79 } 77 else 80 else if(!door.getClanHall().isSiegableHall() || 81 !((SiegableHall)door.getClanHall()).isInSiege()) 78 82 { 79 activeChar.gatesRequest( (L2DoorInstance)target);80 if (! ((L2DoorInstance)target).getOpen())83 activeChar.gatesRequest(door); 84 if (!door.getOpen()) 81 85 activeChar.sendPacket(new ConfirmDlg(1140)); 82 86 else … … 107 111 } 108 112 113 @Override 109 114 public InstanceType getInstanceType() 110 115 {
Note: See TracChangeset
for help on using the changeset viewer.
