Replaced instanceof L2ServitorInstance with isServitor method.

This commit is contained in:
MobiusDev 2018-07-02 01:14:06 +00:00
parent e9e7d40628
commit b33537aa50
9 changed files with 9 additions and 10 deletions

View File

@ -40,7 +40,7 @@ public class PetStatusUpdate implements IClientOutgoingPacket
_curFed = pet.getCurrentFed(); // how fed it is
_maxFed = pet.getMaxFed(); // max fed it can be
}
else if (_summon instanceof L2ServitorInstance)
else if (_summon.isServitor())
{
final L2ServitorInstance sum = (L2ServitorInstance) _summon;
_curFed = sum.getLifeTimeRemaining();

View File

@ -40,7 +40,7 @@ public class PetStatusUpdate implements IClientOutgoingPacket
_curFed = pet.getCurrentFed(); // how fed it is
_maxFed = pet.getMaxFed(); // max fed it can be
}
else if (_summon instanceof L2ServitorInstance)
else if (_summon.isServitor())
{
final L2ServitorInstance sum = (L2ServitorInstance) _summon;
_curFed = sum.getLifeTimeRemaining();

View File

@ -40,7 +40,7 @@ public class PetStatusUpdate implements IClientOutgoingPacket
_curFed = pet.getCurrentFed(); // how fed it is
_maxFed = pet.getMaxFed(); // max fed it can be
}
else if (_summon instanceof L2ServitorInstance)
else if (_summon.isServitor())
{
final L2ServitorInstance sum = (L2ServitorInstance) _summon;
_curFed = sum.getLifeTimeRemaining();

View File

@ -40,7 +40,7 @@ public class PetStatusUpdate implements IClientOutgoingPacket
_curFed = pet.getCurrentFed(); // how fed it is
_maxFed = pet.getMaxFed(); // max fed it can be
}
else if (_summon instanceof L2ServitorInstance)
else if (_summon.isServitor())
{
final L2ServitorInstance sum = (L2ServitorInstance) _summon;
_curFed = sum.getLifeTimeRemaining();

View File

@ -40,7 +40,6 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.L2Summon;
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2ServitorInstance;
import com.l2jmobius.gameserver.model.events.EventDispatcher;
import com.l2jmobius.gameserver.model.events.impl.events.OnTvTEventFinish;
import com.l2jmobius.gameserver.model.events.impl.events.OnTvTEventKill;
@ -816,7 +815,7 @@ public class TvTEvent
L2PcInstance killerPlayerInstance = null;
if (killerCharacter.isPet() || (killerCharacter instanceof L2ServitorInstance))
if (killerCharacter.isPet() || killerCharacter.isServitor())
{
killerPlayerInstance = ((L2Summon) killerCharacter).getOwner();

View File

@ -40,7 +40,7 @@ public class PetStatusUpdate implements IClientOutgoingPacket
_curFed = pet.getCurrentFed(); // how fed it is
_maxFed = pet.getMaxFed(); // max fed it can be
}
else if (_summon instanceof L2ServitorInstance)
else if (_summon.isServitor())
{
final L2ServitorInstance sum = (L2ServitorInstance) _summon;
_curFed = sum.getLifeTimeRemaining();

View File

@ -40,7 +40,7 @@ public class PetStatusUpdate implements IClientOutgoingPacket
_curFed = pet.getCurrentFed(); // how fed it is
_maxFed = pet.getMaxFed(); // max fed it can be
}
else if (_summon instanceof L2ServitorInstance)
else if (_summon.isServitor())
{
final L2ServitorInstance sum = (L2ServitorInstance) _summon;
_curFed = sum.getLifeTimeRemaining();

View File

@ -40,7 +40,7 @@ public class PetStatusUpdate implements IClientOutgoingPacket
_curFed = pet.getCurrentFed(); // how fed it is
_maxFed = pet.getMaxFed(); // max fed it can be
}
else if (_summon instanceof L2ServitorInstance)
else if (_summon.isServitor())
{
final L2ServitorInstance sum = (L2ServitorInstance) _summon;
_curFed = sum.getLifeTimeRemaining();

View File

@ -40,7 +40,7 @@ public class PetStatusUpdate implements IClientOutgoingPacket
_curFed = pet.getCurrentFed(); // how fed it is
_maxFed = pet.getMaxFed(); // max fed it can be
}
else if (_summon instanceof L2ServitorInstance)
else if (_summon.isServitor())
{
final L2ServitorInstance sum = (L2ServitorInstance) _summon;
_curFed = sum.getLifeTimeRemaining();