Extracted SummonRequestHolder class to a separate file.
This commit is contained in:
parent
2e5fe7f64c
commit
873551943c
@ -137,6 +137,7 @@ import org.l2jmobius.gameserver.model.entity.siege.FortSiege;
|
|||||||
import org.l2jmobius.gameserver.model.entity.siege.Siege;
|
import org.l2jmobius.gameserver.model.entity.siege.Siege;
|
||||||
import org.l2jmobius.gameserver.model.entity.siege.clanhalls.DevastatedCastle;
|
import org.l2jmobius.gameserver.model.entity.siege.clanhalls.DevastatedCastle;
|
||||||
import org.l2jmobius.gameserver.model.holders.PlayerStatsHolder;
|
import org.l2jmobius.gameserver.model.holders.PlayerStatsHolder;
|
||||||
|
import org.l2jmobius.gameserver.model.holders.SummonRequestHolder;
|
||||||
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||||
import org.l2jmobius.gameserver.model.itemcontainer.PetInventory;
|
import org.l2jmobius.gameserver.model.itemcontainer.PetInventory;
|
||||||
@ -399,7 +400,7 @@ public class PlayerInstance extends Playable
|
|||||||
private FolkInstance _lastFolkNpc = null;
|
private FolkInstance _lastFolkNpc = null;
|
||||||
private int _questNpcObject = 0;
|
private int _questNpcObject = 0;
|
||||||
private int _partyFind = 0;
|
private int _partyFind = 0;
|
||||||
private final SummonRequest _summonRequest = new SummonRequest();
|
private final SummonRequestHolder _summonRequest = new SummonRequestHolder();
|
||||||
private final Map<String, QuestState> _quests = new HashMap<>();
|
private final Map<String, QuestState> _quests = new HashMap<>();
|
||||||
private final ShortCuts _shortCuts = new ShortCuts(this);
|
private final ShortCuts _shortCuts = new ShortCuts(this);
|
||||||
private final MacroList _macroses = new MacroList(this);
|
private final MacroList _macroses = new MacroList(this);
|
||||||
@ -768,35 +769,6 @@ public class PlayerInstance extends Playable
|
|||||||
return savedStatus;
|
return savedStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static class SummonRequest
|
|
||||||
{
|
|
||||||
private PlayerInstance _summoner;
|
|
||||||
private Location _location;
|
|
||||||
private Skill _skill;
|
|
||||||
|
|
||||||
public void setTarget(PlayerInstance summoner, Skill skill)
|
|
||||||
{
|
|
||||||
_summoner = summoner;
|
|
||||||
_location = new Location(summoner.getX(), summoner.getY(), summoner.getZ(), summoner.getHeading());
|
|
||||||
_skill = skill;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PlayerInstance getSummoner()
|
|
||||||
{
|
|
||||||
return _summoner;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Location getLocation()
|
|
||||||
{
|
|
||||||
return _location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Skill getSkill()
|
|
||||||
{
|
|
||||||
return _skill;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSpawnProtected()
|
public boolean isSpawnProtected()
|
||||||
{
|
{
|
||||||
return (_protectEndTime != 0) && (_protectEndTime > GameTimeController.getGameTicks());
|
return (_protectEndTime != 0) && (_protectEndTime > GameTimeController.getGameTicks());
|
||||||
|
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* 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 org.l2jmobius.gameserver.model.holders;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
|
import org.l2jmobius.gameserver.model.Skill;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class SummonRequestHolder
|
||||||
|
{
|
||||||
|
private PlayerInstance _summoner;
|
||||||
|
private Location _location;
|
||||||
|
private Skill _skill;
|
||||||
|
|
||||||
|
public void setTarget(PlayerInstance summoner, Skill skill)
|
||||||
|
{
|
||||||
|
_summoner = summoner;
|
||||||
|
_location = new Location(summoner.getX(), summoner.getY(), summoner.getZ(), summoner.getHeading());
|
||||||
|
_skill = skill;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlayerInstance getSummoner()
|
||||||
|
{
|
||||||
|
return _summoner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Location getLocation()
|
||||||
|
{
|
||||||
|
return _location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Skill getSkill()
|
||||||
|
{
|
||||||
|
return _skill;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user