protected void runImpl()
{
L2PcInstance activeChar = getClient().getActiveChar();
if (activeChar == null) return;
// avoid using expensive operations if not needed
L2Object target;
if (activeChar.getTargetId() == _objectId)
target = activeChar.getTarget();
else
target = L2World.getInstance().findObject(_objectId);
if (target == null) return;
if (activeChar.getTarget() != target)
{
target.onAction(activeChar);
}
else
{
if ((target.getObjectId() != activeChar.getObjectId())
&& activeChar.getPrivateStoreType() ==0
&& activeChar.getActiveRequester() ==null)
{
//_log.config("Starting ForcedAttack");
target.onForcedAttack(activeChar);
//_log.config("Ending ForcedAttack");
}
else
{
sendPacket(new ActionFailed());