Pet owner target type skills should not need target.

This commit is contained in:
MobiusDev
2018-09-11 01:36:44 +00:00
parent ce23b6842f
commit 222b1d1136
14 changed files with 77 additions and 49 deletions

View File

@ -51,6 +51,7 @@ import com.l2jmobius.gameserver.model.items.type.ActionType;
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
import com.l2jmobius.gameserver.model.skills.targets.TargetType;
import com.l2jmobius.gameserver.model.zone.ZoneId;
import com.l2jmobius.gameserver.model.zone.ZoneRegion;
import com.l2jmobius.gameserver.network.SystemMessageId;
@ -609,7 +610,15 @@ public abstract class L2Summon extends L2Playable
}
// Get the target for the skill
final L2Object target = skill.getTarget(this, forceUse, dontMove, false);
final L2Object target;
if (skill.getTargetType() == TargetType.OWNER_PET)
{
target = _owner;
}
else
{
target = skill.getTarget(this, forceUse, dontMove, false);
}
// Check the validity of the target
if (target == null)