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();
}
}