Exemplo n.º 1
0
 /**
  * rev 478 dddddddddddddddddddffffdddcccccSSdddddddddddddddddddddddddddhc
  *
  * @param _characters
  */
 public PetInfo(L2Summon summon, int val) {
   _summon = summon;
   _isSummoned = _summon.isShowSummonAnimation();
   _x = _summon.getX();
   _y = _summon.getY();
   _z = _summon.getZ();
   _heading = _summon.getHeading();
   _mAtkSpd = _summon.getMAtkSpd();
   _pAtkSpd = _summon.getPAtkSpd();
   _multiplier = _summon.getMovementSpeedMultiplier();
   _runSpd = _summon.getTemplate().baseRunSpd;
   _walkSpd = _summon.getTemplate().baseWalkSpd;
   _swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
   _swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
   _maxHp = _summon.getMaxVisibleHp();
   _maxMp = _summon.getMaxMp();
   _val = val;
   if (_summon instanceof L2PetInstance) {
     L2PetInstance pet = (L2PetInstance) _summon;
     _curFed = pet.getCurrentFed(); // how fed it is
     _maxFed = pet.getMaxFed(); // max fed it can be
   } else if (_summon instanceof L2SummonInstance) {
     L2SummonInstance sum = (L2SummonInstance) _summon;
     _curFed = sum.getTimeRemaining();
     _maxFed = sum.getTotalLifeTime();
   }
 }
 public PetStatusUpdate(L2Summon summon) {
   _summon = summon;
   if (_summon instanceof L2PetInstance) {
     L2PetInstance pet = (L2PetInstance) _summon;
     _curFed = pet.getCurrentFed(); // how fed it is
     _maxFed = pet.getMaxFed(); // max fed it can be
   } else if (_summon instanceof L2ServitorInstance) {
     L2ServitorInstance sum = (L2ServitorInstance) _summon;
     _curFed = sum.getLifeTimeRemaining();
     _maxFed = sum.getLifeTime();
   }
 }