public GMViewItemList(L2PetInstance cha) { _playerName = cha.getName(); _limit = cha.getInventoryLimit(); for (L2ItemInstance item : cha.getInventory().getItems()) { _items.add(item); } }
public PetInfo(L2Summon summon, int val) { _summon = summon; _moveMultiplier = summon.getMovementSpeedMultiplier(); _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier); _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier); _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier); _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier); _flyRunSpd = summon.isFlying() ? _runSpd : 0; _flyWalkSpd = summon.isFlying() ? _walkSpd : 0; _val = val; if (summon.isPet()) { final L2PetInstance pet = (L2PetInstance) _summon; _curFed = pet.getCurrentFed(); // how fed it is _maxFed = pet.getMaxFed(); // max fed it can be } else if (summon.isServitor()) { final L2ServitorInstance sum = (L2ServitorInstance) _summon; _curFed = sum.getLifeTimeRemaining(); _maxFed = sum.getLifeTime(); } }