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

@ -16,8 +16,8 @@
*/
package handlers.playeractions;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.data.xml.impl.PetSkillData;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.handler.IPlayerActionHandler;
import com.l2jmobius.gameserver.model.ActionDataHolder;
import com.l2jmobius.gameserver.model.actor.L2Summon;
@ -33,11 +33,6 @@ public final class ServitorSkillUse implements IPlayerActionHandler
@Override
public void useAction(L2PcInstance activeChar, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
if (activeChar.getTarget() == null)
{
return;
}
final L2Summon summon = activeChar.getAnyServitor();
if ((summon == null) || !summon.isServitor())
{

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)

View File

@ -16,8 +16,8 @@
*/
package handlers.playeractions;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.data.xml.impl.PetSkillData;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.handler.IPlayerActionHandler;
import com.l2jmobius.gameserver.model.ActionDataHolder;
import com.l2jmobius.gameserver.model.actor.L2Summon;
@ -33,11 +33,6 @@ public final class ServitorSkillUse implements IPlayerActionHandler
@Override
public void useAction(L2PcInstance activeChar, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
if (activeChar.getTarget() == null)
{
return;
}
final L2Summon summon = activeChar.getAnyServitor();
if ((summon == null) || !summon.isServitor())
{

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)

View File

@ -16,8 +16,8 @@
*/
package handlers.playeractions;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.data.xml.impl.PetSkillData;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.handler.IPlayerActionHandler;
import com.l2jmobius.gameserver.model.ActionDataHolder;
import com.l2jmobius.gameserver.model.actor.L2Summon;
@ -33,11 +33,6 @@ public final class ServitorSkillUse implements IPlayerActionHandler
@Override
public void useAction(L2PcInstance activeChar, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
if (activeChar.getTarget() == null)
{
return;
}
final L2Summon summon = activeChar.getAnyServitor();
if ((summon == null) || !summon.isServitor())
{

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)

View File

@ -16,8 +16,8 @@
*/
package handlers.playeractions;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.data.xml.impl.PetSkillData;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.handler.IPlayerActionHandler;
import com.l2jmobius.gameserver.model.ActionDataHolder;
import com.l2jmobius.gameserver.model.actor.L2Summon;
@ -33,11 +33,6 @@ public final class ServitorSkillUse implements IPlayerActionHandler
@Override
public void useAction(L2PcInstance activeChar, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
if (activeChar.getTarget() == null)
{
return;
}
final L2Summon summon = activeChar.getAnyServitor();
if ((summon == null) || !summon.isServitor())
{

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)

View File

@ -16,8 +16,8 @@
*/
package handlers.playeractions;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.data.xml.impl.PetSkillData;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.handler.IPlayerActionHandler;
import com.l2jmobius.gameserver.model.ActionDataHolder;
import com.l2jmobius.gameserver.model.actor.L2Summon;
@ -33,11 +33,6 @@ public final class ServitorSkillUse implements IPlayerActionHandler
@Override
public void useAction(L2PcInstance activeChar, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
if (activeChar.getTarget() == null)
{
return;
}
final L2Summon summon = activeChar.getAnyServitor();
if ((summon == null) || !summon.isServitor())
{

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)

View File

@ -16,8 +16,8 @@
*/
package handlers.playeractions;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.data.xml.impl.PetSkillData;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.handler.IPlayerActionHandler;
import com.l2jmobius.gameserver.model.ActionDataHolder;
import com.l2jmobius.gameserver.model.actor.L2Summon;
@ -33,11 +33,6 @@ public final class ServitorSkillUse implements IPlayerActionHandler
@Override
public void useAction(L2PcInstance activeChar, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
if (activeChar.getTarget() == null)
{
return;
}
final L2Summon summon = activeChar.getAnyServitor();
if ((summon == null) || !summon.isServitor())
{

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)

View File

@ -16,8 +16,8 @@
*/
package handlers.playeractions;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.data.xml.impl.PetSkillData;
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
import com.l2jmobius.gameserver.handler.IPlayerActionHandler;
import com.l2jmobius.gameserver.model.ActionDataHolder;
import com.l2jmobius.gameserver.model.actor.L2Summon;
@ -33,11 +33,6 @@ public final class ServitorSkillUse implements IPlayerActionHandler
@Override
public void useAction(L2PcInstance activeChar, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
if (activeChar.getTarget() == null)
{
return;
}
final L2Summon summon = activeChar.getAnyServitor();
if ((summon == null) || !summon.isServitor())
{

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)