Changeset 8630 for trunk/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2DoorInstanceActionShift.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/L2DoorInstanceActionShift.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/L2DoorInstanceActionShift.java
r7665 r8630 18 18 import com.l2jserver.gameserver.model.L2Object; 19 19 import com.l2jserver.gameserver.model.L2Object.InstanceType; 20 import com.l2jserver.gameserver.model.actor.L2Character;21 20 import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance; 22 21 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; … … 27 26 public class L2DoorInstanceActionShift implements IActionHandler 28 27 { 28 @Override 29 29 public boolean action(L2PcInstance activeChar, L2Object target, boolean interact) 30 30 { … … 35 35 36 36 StaticObject su; 37 L2DoorInstance door = (L2DoorInstance)target; 37 38 // send HP amount if doors are inside castle/fortress zone 38 // TODO: needed to be added here doors from conquerable clanhalls 39 if ((((L2DoorInstance)target).getCastle() != null 40 && ((L2DoorInstance)target).getCastle().getCastleId() > 0) 41 || (((L2DoorInstance)target).getFort() != null 42 && ((L2DoorInstance)target).getFort().getFortId() > 0 43 && !((L2DoorInstance)target).getIsCommanderDoor())) 44 su = new StaticObject((L2DoorInstance)target, true); 39 40 if ((door.getCastle() != null && door.getCastle().getCastleId() > 0) 41 || (door.getFort() != null && door.getFort().getFortId() > 0 42 || (door.getClanHall() != null && door.getClanHall().isSiegableHall()) 43 && !door.getIsCommanderDoor())) 44 { 45 su = new StaticObject(door, true); 46 } 45 47 else 46 su = new StaticObject((L2DoorInstance)target, false); 48 { 49 su = new StaticObject(door, false); 50 } 47 51 48 52 activeChar.sendPacket(su); … … 51 55 html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/doorinfo.htm"); 52 56 html.replace("%class%", target.getClass().getSimpleName()); 53 html.replace("%hp%", String.valueOf((int) ((L2Character)target).getCurrentHp()));54 html.replace("%hpmax%", String.valueOf( ((L2Character)target).getMaxHp()));57 html.replace("%hp%", String.valueOf((int)door.getCurrentHp())); 58 html.replace("%hpmax%", String.valueOf(door.getMaxHp())); 55 59 html.replace("%objid%", String.valueOf(target.getObjectId())); 56 html.replace("%doorid%", String.valueOf( ((L2DoorInstance)target).getDoorId()));60 html.replace("%doorid%", String.valueOf(door.getDoorId())); 57 61 58 html.replace("%minx%", String.valueOf( ((L2DoorInstance)target).getXMin()));59 html.replace("%miny%", String.valueOf( ((L2DoorInstance)target).getYMin()));60 html.replace("%minz%", String.valueOf( ((L2DoorInstance)target).getZMin()));62 html.replace("%minx%", String.valueOf(door.getXMin())); 63 html.replace("%miny%", String.valueOf(door.getYMin())); 64 html.replace("%minz%", String.valueOf(door.getZMin())); 61 65 62 html.replace("%maxx%", String.valueOf( ((L2DoorInstance)target).getXMax()));63 html.replace("%maxy%", String.valueOf( ((L2DoorInstance)target).getYMax()));64 html.replace("%maxz%", String.valueOf( ((L2DoorInstance)target).getZMax()));65 html.replace("%unlock%", ((L2DoorInstance)target).isUnlockable() ? "<font color=00FF00>YES<font>" : "<font color=FF0000>NO</font>");66 html.replace("%maxx%", String.valueOf(door.getXMax())); 67 html.replace("%maxy%", String.valueOf(door.getYMax())); 68 html.replace("%maxz%", String.valueOf(door.getZMax())); 69 html.replace("%unlock%", door.isUnlockable() ? "<font color=00FF00>YES<font>" : "<font color=FF0000>NO</font>"); 66 70 67 71 activeChar.sendPacket(html); … … 70 74 } 71 75 76 @Override 72 77 public InstanceType getInstanceType() 73 78 {
Note: See TracChangeset
for help on using the changeset viewer.
