root/trunk/AE-go_GameServer/src/com/aionemu/gameserver/skillengine/action/ItemUseAction.java
| 966 | 993 | ||
|---|---|---|---|
21 | import javax.xml.bind.annotation.XmlAttribute; | 21 | import javax.xml.bind.annotation.XmlAttribute; |
22 | import javax.xml.bind.annotation.XmlType; | 22 | import javax.xml.bind.annotation.XmlType; |
23 | 23 | ||
24 | import com.aionemu.gameserver.model.gameobjects.player.Inventory; | 24 | import com.aionemu.gameserver.model.gameobjects.player.Storage; |
25 | import com.aionemu.gameserver.model.gameobjects.player.Player; | 25 | import com.aionemu.gameserver.model.gameobjects.player.Player; |
26 | import com.aionemu.gameserver.skillengine.model.Skill; | 26 | import com.aionemu.gameserver.skillengine.model.Skill; |
27 | 27 | ||
... | ... | ||
34 | public class ItemUseAction extends Action | 34 | public class ItemUseAction extends Action |
35 | { | 35 | { |
36 | @XmlAttribute(required = true) | 36 | @XmlAttribute(required = true) |
37 | protected int itemid; | 37 | protected int itemid; |
38 | | 38 | |
39 | @XmlAttribute(required = true) | 39 | @XmlAttribute(required = true) |
40 | protected int count; | 40 | protected int count; |
41 | | 41 | |
42 | @Override | 42 | @Override |
43 | public void act(Skill skill) | 43 | public void act(Skill skill) |
44 | { | 44 | { |
45 | Player player = skill.getEffector(); | 45 | Player player = skill.getEffector(); |
46 | Inventory inventory = player.getInventory(); | 46 | Storage inventory = player.getInventory(); |
47 | 47 | ||
48 | if(!inventory.removeFromBagByItemId(itemid, count)) | 48 | if(!inventory.removeFromBagByItemId(itemid, count)) |
49 | { | 49 | { |
Download diff