Addition of target type for pet owners.

This commit is contained in:
MobiusDev 2018-09-10 21:23:59 +00:00
parent ec38e330a3
commit 73f4812951
63 changed files with 462 additions and 147 deletions

View File

@ -254,6 +254,7 @@ import handlers.targethandlers.MyParty;
import handlers.targethandlers.None;
import handlers.targethandlers.NpcBody;
import handlers.targethandlers.Others;
import handlers.targethandlers.OwnerPet;
import handlers.targethandlers.PcBody;
import handlers.targethandlers.Self;
import handlers.targethandlers.Summon;
@ -612,6 +613,7 @@ public class MasterHandler
None.class,
NpcBody.class,
Others.class,
OwnerPet.class,
PcBody.class,
Self.class,
Summon.class,

View File

@ -0,0 +1,41 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.targethandlers;
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.targets.TargetType;
/**
* @author Mobius
*/
public class OwnerPet implements ITargetTypeHandler
{
@Override
public Enum<TargetType> getTargetType()
{
return TargetType.OWNER_PET;
}
@Override
public L2Object getTarget(L2Character activeChar, L2Object selectedTarget, Skill skill, boolean forceUse, boolean dontMove, boolean sendMessage)
{
return activeChar.getActingPlayer();
}
}

View File

@ -489,7 +489,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">

View File

@ -1481,7 +1481,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">
@ -1541,7 +1541,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -3085,7 +3085,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalAttackSpeed">
@ -3135,7 +3135,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="VampiricAttack">
@ -3187,7 +3187,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="HpRegen">
@ -3253,7 +3253,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>ENEMY_NOT</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxHp">
@ -3322,7 +3322,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxMp">
@ -3376,7 +3376,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Accuracy">
@ -3422,7 +3422,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
@ -3472,7 +3472,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MagicalAttackSpeed">
@ -3523,7 +3523,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MAtk">
@ -3620,7 +3620,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -51,7 +51,7 @@
<reuseDelay>12000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>OTHERS</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">
@ -122,7 +122,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ReduceCancel">

View File

@ -2515,7 +2515,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PAtk">
@ -2566,7 +2566,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
@ -2617,7 +2617,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalRate">
@ -2668,7 +2668,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalDamage">
@ -2747,7 +2747,7 @@
<reuseDelay>3000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -2784,7 +2784,7 @@
<operateType>A1</operateType>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpCanEscape" />

View File

@ -62,4 +62,6 @@ public enum TargetType
MY_MENTOR,
/** Me or my party (if any). Seen in aura skills. */
MY_PARTY,
/** Pet's owner. */
OWNER_PET,
}

View File

@ -255,6 +255,7 @@ import handlers.targethandlers.MyParty;
import handlers.targethandlers.None;
import handlers.targethandlers.NpcBody;
import handlers.targethandlers.Others;
import handlers.targethandlers.OwnerPet;
import handlers.targethandlers.PcBody;
import handlers.targethandlers.Self;
import handlers.targethandlers.Summon;
@ -614,6 +615,7 @@ public class MasterHandler
None.class,
NpcBody.class,
Others.class,
OwnerPet.class,
PcBody.class,
Self.class,
Summon.class,

View File

@ -0,0 +1,41 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.targethandlers;
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.targets.TargetType;
/**
* @author Mobius
*/
public class OwnerPet implements ITargetTypeHandler
{
@Override
public Enum<TargetType> getTargetType()
{
return TargetType.OWNER_PET;
}
@Override
public L2Object getTarget(L2Character activeChar, L2Object selectedTarget, Skill skill, boolean forceUse, boolean dontMove, boolean sendMessage)
{
return activeChar.getActingPlayer();
}
}

View File

@ -489,7 +489,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">

View File

@ -1481,7 +1481,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">
@ -1541,7 +1541,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -3085,7 +3085,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalAttackSpeed">
@ -3135,7 +3135,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="VampiricAttack">
@ -3187,7 +3187,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="HpRegen">
@ -3253,7 +3253,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>ENEMY_NOT</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxHp">
@ -3322,7 +3322,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxMp">
@ -3376,7 +3376,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Accuracy">
@ -3422,7 +3422,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
@ -3472,7 +3472,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MagicalAttackSpeed">
@ -3523,7 +3523,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MAtk">
@ -3620,7 +3620,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -51,7 +51,7 @@
<reuseDelay>12000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>OTHERS</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">
@ -122,7 +122,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ReduceCancel">

View File

@ -2515,7 +2515,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PAtk">
@ -2566,7 +2566,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
@ -2617,7 +2617,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalRate">
@ -2668,7 +2668,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalDamage">
@ -2747,7 +2747,7 @@
<reuseDelay>3000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -2784,7 +2784,7 @@
<operateType>A1</operateType>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpCanEscape" />

View File

@ -62,4 +62,6 @@ public enum TargetType
MY_MENTOR,
/** Me or my party (if any). Seen in aura skills. */
MY_PARTY,
/** Pet's owner. */
OWNER_PET,
}

View File

@ -256,6 +256,7 @@ import handlers.targethandlers.MyParty;
import handlers.targethandlers.None;
import handlers.targethandlers.NpcBody;
import handlers.targethandlers.Others;
import handlers.targethandlers.OwnerPet;
import handlers.targethandlers.PcBody;
import handlers.targethandlers.Self;
import handlers.targethandlers.Summon;
@ -616,6 +617,7 @@ public class MasterHandler
None.class,
NpcBody.class,
Others.class,
OwnerPet.class,
PcBody.class,
Self.class,
Summon.class,

View File

@ -0,0 +1,41 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.targethandlers;
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.targets.TargetType;
/**
* @author Mobius
*/
public class OwnerPet implements ITargetTypeHandler
{
@Override
public Enum<TargetType> getTargetType()
{
return TargetType.OWNER_PET;
}
@Override
public L2Object getTarget(L2Character activeChar, L2Object selectedTarget, Skill skill, boolean forceUse, boolean dontMove, boolean sendMessage)
{
return activeChar.getActingPlayer();
}
}

View File

@ -489,7 +489,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">

View File

@ -1481,7 +1481,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">
@ -1541,7 +1541,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -3085,7 +3085,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalAttackSpeed">
@ -3135,7 +3135,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="VampiricAttack">
@ -3187,7 +3187,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="HpRegen">
@ -3253,7 +3253,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>ENEMY_NOT</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxHp">
@ -3322,7 +3322,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxMp">
@ -3376,7 +3376,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Accuracy">
@ -3422,7 +3422,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
@ -3472,7 +3472,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MagicalAttackSpeed">
@ -3523,7 +3523,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MAtk">
@ -3620,7 +3620,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -51,7 +51,7 @@
<reuseDelay>12000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>OTHERS</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">
@ -122,7 +122,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ReduceCancel">

View File

@ -2515,7 +2515,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PAtk">
@ -2566,7 +2566,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
@ -2617,7 +2617,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalRate">
@ -2668,7 +2668,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalDamage">
@ -2747,7 +2747,7 @@
<reuseDelay>3000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -2784,7 +2784,7 @@
<operateType>A1</operateType>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpCanEscape" />

View File

@ -62,4 +62,6 @@ public enum TargetType
MY_MENTOR,
/** Me or my party (if any). Seen in aura skills. */
MY_PARTY,
/** Pet's owner. */
OWNER_PET,
}

View File

@ -256,6 +256,7 @@ import handlers.targethandlers.MyParty;
import handlers.targethandlers.None;
import handlers.targethandlers.NpcBody;
import handlers.targethandlers.Others;
import handlers.targethandlers.OwnerPet;
import handlers.targethandlers.PcBody;
import handlers.targethandlers.Self;
import handlers.targethandlers.Summon;
@ -616,6 +617,7 @@ public class MasterHandler
None.class,
NpcBody.class,
Others.class,
OwnerPet.class,
PcBody.class,
Self.class,
Summon.class,

View File

@ -0,0 +1,41 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.targethandlers;
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.targets.TargetType;
/**
* @author Mobius
*/
public class OwnerPet implements ITargetTypeHandler
{
@Override
public Enum<TargetType> getTargetType()
{
return TargetType.OWNER_PET;
}
@Override
public L2Object getTarget(L2Character activeChar, L2Object selectedTarget, Skill skill, boolean forceUse, boolean dontMove, boolean sendMessage)
{
return activeChar.getActingPlayer();
}
}

View File

@ -489,7 +489,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">

View File

@ -1481,7 +1481,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">
@ -1541,7 +1541,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -3085,7 +3085,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalAttackSpeed">
@ -3135,7 +3135,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="VampiricAttack">
@ -3187,7 +3187,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="HpRegen">
@ -3253,7 +3253,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>ENEMY_NOT</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxHp">
@ -3322,7 +3322,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxMp">
@ -3376,7 +3376,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Accuracy">
@ -3422,7 +3422,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
@ -3472,7 +3472,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MagicalAttackSpeed">
@ -3523,7 +3523,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MAtk">
@ -3620,7 +3620,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -51,7 +51,7 @@
<reuseDelay>12000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>OTHERS</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">
@ -122,7 +122,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ReduceCancel">

View File

@ -2515,7 +2515,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PAtk">
@ -2566,7 +2566,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
@ -2617,7 +2617,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalRate">
@ -2668,7 +2668,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalDamage">
@ -2747,7 +2747,7 @@
<reuseDelay>3000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -2784,7 +2784,7 @@
<operateType>A1</operateType>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpCanEscape" />

View File

@ -62,4 +62,6 @@ public enum TargetType
MY_MENTOR,
/** Me or my party (if any). Seen in aura skills. */
MY_PARTY,
/** Pet's owner. */
OWNER_PET,
}

View File

@ -256,6 +256,7 @@ import handlers.targethandlers.MyParty;
import handlers.targethandlers.None;
import handlers.targethandlers.NpcBody;
import handlers.targethandlers.Others;
import handlers.targethandlers.OwnerPet;
import handlers.targethandlers.PcBody;
import handlers.targethandlers.Self;
import handlers.targethandlers.Summon;
@ -616,6 +617,7 @@ public class MasterHandler
None.class,
NpcBody.class,
Others.class,
OwnerPet.class,
PcBody.class,
Self.class,
Summon.class,

View File

@ -0,0 +1,41 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.targethandlers;
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.targets.TargetType;
/**
* @author Mobius
*/
public class OwnerPet implements ITargetTypeHandler
{
@Override
public Enum<TargetType> getTargetType()
{
return TargetType.OWNER_PET;
}
@Override
public L2Object getTarget(L2Character activeChar, L2Object selectedTarget, Skill skill, boolean forceUse, boolean dontMove, boolean sendMessage)
{
return activeChar.getActingPlayer();
}
}

View File

@ -477,7 +477,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">

View File

@ -1481,7 +1481,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">
@ -1541,7 +1541,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -3065,7 +3065,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalAttackSpeed">
@ -3115,7 +3115,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="VampiricAttack">
@ -3167,7 +3167,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="HpRegen">
@ -3233,7 +3233,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>ENEMY_NOT</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxHp">
@ -3302,7 +3302,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxMp">
@ -3356,7 +3356,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Accuracy">
@ -3402,7 +3402,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
@ -3452,7 +3452,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MagicalAttackSpeed">
@ -3503,7 +3503,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MAtk">
@ -3600,7 +3600,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -51,7 +51,7 @@
<reuseDelay>12000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>OTHERS</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">
@ -122,7 +122,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ReduceCancel">

View File

@ -2515,7 +2515,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PAtk">
@ -2566,7 +2566,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
@ -2617,7 +2617,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalRate">
@ -2668,7 +2668,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalDamage">
@ -2747,7 +2747,7 @@
<reuseDelay>3000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -2723,7 +2723,7 @@
<operateType>A1</operateType>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpCanEscape" />

View File

@ -62,4 +62,6 @@ public enum TargetType
MY_MENTOR,
/** Me or my party (if any). Seen in aura skills. */
MY_PARTY,
/** Pet's owner. */
OWNER_PET,
}

View File

@ -256,6 +256,7 @@ import handlers.targethandlers.MyParty;
import handlers.targethandlers.None;
import handlers.targethandlers.NpcBody;
import handlers.targethandlers.Others;
import handlers.targethandlers.OwnerPet;
import handlers.targethandlers.PcBody;
import handlers.targethandlers.Self;
import handlers.targethandlers.Summon;
@ -616,6 +617,7 @@ public class MasterHandler
None.class,
NpcBody.class,
Others.class,
OwnerPet.class,
PcBody.class,
Self.class,
Summon.class,

View File

@ -0,0 +1,41 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.targethandlers;
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.targets.TargetType;
/**
* @author Mobius
*/
public class OwnerPet implements ITargetTypeHandler
{
@Override
public Enum<TargetType> getTargetType()
{
return TargetType.OWNER_PET;
}
@Override
public L2Object getTarget(L2Character activeChar, L2Object selectedTarget, Skill skill, boolean forceUse, boolean dontMove, boolean sendMessage)
{
return activeChar.getActingPlayer();
}
}

View File

@ -477,7 +477,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">

View File

@ -1481,7 +1481,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">
@ -1541,7 +1541,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -3065,7 +3065,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalAttackSpeed">
@ -3115,7 +3115,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="VampiricAttack">
@ -3167,7 +3167,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="HpRegen">
@ -3233,7 +3233,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>ENEMY_NOT</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxHp">
@ -3302,7 +3302,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxMp">
@ -3356,7 +3356,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Accuracy">
@ -3402,7 +3402,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
@ -3452,7 +3452,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MagicalAttackSpeed">
@ -3503,7 +3503,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MAtk">
@ -3600,7 +3600,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -51,7 +51,7 @@
<reuseDelay>12000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>OTHERS</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">
@ -122,7 +122,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ReduceCancel">

View File

@ -2515,7 +2515,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PAtk">
@ -2566,7 +2566,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
@ -2617,7 +2617,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalRate">
@ -2668,7 +2668,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalDamage">
@ -2747,7 +2747,7 @@
<reuseDelay>3000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -2723,7 +2723,7 @@
<operateType>A1</operateType>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpCanEscape" />

View File

@ -62,4 +62,6 @@ public enum TargetType
MY_MENTOR,
/** Me or my party (if any). Seen in aura skills. */
MY_PARTY,
/** Pet's owner. */
OWNER_PET,
}

View File

@ -256,6 +256,7 @@ import handlers.targethandlers.MyParty;
import handlers.targethandlers.None;
import handlers.targethandlers.NpcBody;
import handlers.targethandlers.Others;
import handlers.targethandlers.OwnerPet;
import handlers.targethandlers.PcBody;
import handlers.targethandlers.Self;
import handlers.targethandlers.Summon;
@ -616,6 +617,7 @@ public class MasterHandler
None.class,
NpcBody.class,
Others.class,
OwnerPet.class,
PcBody.class,
Self.class,
Summon.class,

View File

@ -0,0 +1,41 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.targethandlers;
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.targets.TargetType;
/**
* @author Mobius
*/
public class OwnerPet implements ITargetTypeHandler
{
@Override
public Enum<TargetType> getTargetType()
{
return TargetType.OWNER_PET;
}
@Override
public L2Object getTarget(L2Character activeChar, L2Object selectedTarget, Skill skill, boolean forceUse, boolean dontMove, boolean sendMessage)
{
return activeChar.getActingPlayer();
}
}

View File

@ -477,7 +477,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">

View File

@ -1481,7 +1481,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">
@ -1541,7 +1541,7 @@
<reuseDelay>8000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -3065,7 +3065,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalAttackSpeed">
@ -3115,7 +3115,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="VampiricAttack">
@ -3167,7 +3167,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="HpRegen">
@ -3233,7 +3233,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>ENEMY_NOT</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxHp">
@ -3302,7 +3302,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MaxMp">
@ -3356,7 +3356,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Accuracy">
@ -3402,7 +3402,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
@ -3452,7 +3452,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MagicalAttackSpeed">
@ -3503,7 +3503,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MAtk">
@ -3600,7 +3600,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -51,7 +51,7 @@
<reuseDelay>12000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>OTHERS</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ManaHealByLevel">
@ -122,7 +122,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="ReduceCancel">

View File

@ -2515,7 +2515,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PAtk">
@ -2566,7 +2566,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
@ -2617,7 +2617,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalRate">
@ -2668,7 +2668,7 @@
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="CriticalDamage">
@ -2747,7 +2747,7 @@
<reuseDelay>3000</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Heal">

View File

@ -2723,7 +2723,7 @@
<operateType>A1</operateType>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>-5</magicCriticalRate>
<targetType>TARGET</targetType>
<targetType>OWNER_PET</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpCanEscape" />

View File

@ -62,4 +62,6 @@ public enum TargetType
MY_MENTOR,
/** Me or my party (if any). Seen in aura skills. */
MY_PARTY,
/** Pet's owner. */
OWNER_PET,
}