Fixed Talking Island and Faeron Village scrolls of escape.
Dropped Batalion Zone due to lack of further development. Added Various missing syncs from L2jServer Ertheia.
This commit is contained in:
@@ -1762,7 +1762,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent monsters buffing players.
|
||||
// FIXME: Prevent monsters buffing players.
|
||||
if (isMonster() && !target.isMonster() && !skill.isBad() && skill.getName().contains("NPC"))
|
||||
{
|
||||
setTarget(this);
|
||||
|
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.model.actor.instance;
|
||||
|
||||
import com.l2jserver.gameserver.enums.InstanceType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jserver.gameserver.network.serverpackets.commission.ExShowCommission;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class CommissionManagerInstance extends L2Npc
|
||||
{
|
||||
public CommissionManagerInstance(L2NpcTemplate template)
|
||||
{
|
||||
super(template);
|
||||
setInstanceType(InstanceType.CommissionManagerInstance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBypassFeedback(L2PcInstance player, String command)
|
||||
{
|
||||
if (command.equalsIgnoreCase("show_commission"))
|
||||
{
|
||||
player.sendPacket(ExShowCommission.STATIC_PACKET);
|
||||
}
|
||||
else
|
||||
{
|
||||
super.onBypassFeedback(player, command);
|
||||
}
|
||||
}
|
||||
}
|
@@ -221,7 +221,6 @@ import com.l2jserver.gameserver.model.interfaces.IEventListener;
|
||||
import com.l2jserver.gameserver.model.interfaces.ILocational;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.ItemContainer;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.PcAuction;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.PcFreight;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.PcInventory;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.PcRefund;
|
||||
@@ -256,7 +255,6 @@ import com.l2jserver.gameserver.model.variables.AccountVariables;
|
||||
import com.l2jserver.gameserver.model.variables.PlayerVariables;
|
||||
import com.l2jserver.gameserver.model.zone.L2ZoneType;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
import com.l2jserver.gameserver.model.zone.type.L2BattalionZone;
|
||||
import com.l2jserver.gameserver.model.zone.type.L2BossZone;
|
||||
import com.l2jserver.gameserver.network.L2GameClient;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
@@ -332,6 +330,7 @@ import com.l2jserver.gameserver.network.serverpackets.TradeOtherDone;
|
||||
import com.l2jserver.gameserver.network.serverpackets.TradeStart;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ValidateLocation;
|
||||
import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.friend.L2FriendStatus;
|
||||
import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
import com.l2jserver.gameserver.util.Broadcast;
|
||||
@@ -550,7 +549,6 @@ public final class L2PcInstance extends L2Playable
|
||||
private int _vitalityPoints = 140000;
|
||||
|
||||
private final PcInventory _inventory = new PcInventory(this);
|
||||
private final PcAuction _auctionInventory = new PcAuction(this);
|
||||
private final PcFreight _freight = new PcFreight(this);
|
||||
private PcWarehouse _warehouse;
|
||||
private PcRefund _refund;
|
||||
@@ -679,7 +677,7 @@ public final class L2PcInstance extends L2Playable
|
||||
private boolean _exchangeRefusal = false; // Exchange refusal
|
||||
|
||||
private L2Party _party;
|
||||
PartyDistributionType _partyDistributionType;
|
||||
private PartyDistributionType _partyDistributionType;
|
||||
|
||||
// this is needed to find the inviting player for Party response
|
||||
// there can only be one active party request at once
|
||||
@@ -694,6 +692,8 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
private L2ItemInstance _lure = null;
|
||||
|
||||
private volatile Map<Integer, ExResponseCommissionInfo> _lastCommissionInfos;
|
||||
|
||||
public boolean isSpawnProtected()
|
||||
{
|
||||
return _protectEndTime > GameTimeController.getInstance().getGameTicks();
|
||||
@@ -723,17 +723,6 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
private volatile Map<Class<? extends AbstractRequest>, AbstractRequest> _requests;
|
||||
|
||||
private boolean _isEnchanting = false;
|
||||
private int _activeEnchantItemId = ID_NONE;
|
||||
private int _activeEnchantSupportItemId = ID_NONE;
|
||||
private int _activeEnchantAttrItemId = ID_NONE;
|
||||
private long _activeEnchantTimestamp = 0;
|
||||
|
||||
private int _firstCompoundOID = -1;
|
||||
private int _secondCompoundOID = -1;
|
||||
|
||||
private boolean _usingPrimeShop = false;
|
||||
|
||||
protected boolean _inventoryDisable = false;
|
||||
/** Player's cubics. */
|
||||
private final Map<Integer, L2CubicInstance> _cubics = new ConcurrentSkipListMap<>(); // TODO(Zoey76): This should be sorted in insert order.
|
||||
@@ -2434,63 +2423,6 @@ public final class L2PcInstance extends L2Playable
|
||||
return getStat().getExp();
|
||||
}
|
||||
|
||||
public void setActiveEnchantAttrItemId(int objectId)
|
||||
{
|
||||
_activeEnchantAttrItemId = objectId;
|
||||
}
|
||||
|
||||
public int getActiveEnchantAttrItemId()
|
||||
{
|
||||
return _activeEnchantAttrItemId;
|
||||
}
|
||||
|
||||
public void setActiveEnchantItemId(int objectId)
|
||||
{
|
||||
// If we don't have a Enchant Item, we are not enchanting.
|
||||
if (objectId == ID_NONE)
|
||||
{
|
||||
setActiveEnchantSupportItemId(ID_NONE);
|
||||
setActiveEnchantTimestamp(0);
|
||||
setIsEnchanting(false);
|
||||
}
|
||||
_activeEnchantItemId = objectId;
|
||||
}
|
||||
|
||||
public int getActiveEnchantItemId()
|
||||
{
|
||||
return _activeEnchantItemId;
|
||||
}
|
||||
|
||||
public void setActiveEnchantSupportItemId(int objectId)
|
||||
{
|
||||
_activeEnchantSupportItemId = objectId;
|
||||
}
|
||||
|
||||
public int getActiveEnchantSupportItemId()
|
||||
{
|
||||
return _activeEnchantSupportItemId;
|
||||
}
|
||||
|
||||
public long getActiveEnchantTimestamp()
|
||||
{
|
||||
return _activeEnchantTimestamp;
|
||||
}
|
||||
|
||||
public void setActiveEnchantTimestamp(long val)
|
||||
{
|
||||
_activeEnchantTimestamp = val;
|
||||
}
|
||||
|
||||
public void setIsEnchanting(boolean val)
|
||||
{
|
||||
_isEnchanting = val;
|
||||
}
|
||||
|
||||
public boolean isEnchanting()
|
||||
{
|
||||
return _isEnchanting;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the fists weapon of the L2PcInstance (used when no weapon is equiped).
|
||||
* @param weaponItem The fists L2Weapon to set to the L2PcInstance
|
||||
@@ -2858,11 +2790,6 @@ public final class L2PcInstance extends L2Playable
|
||||
return _inventory;
|
||||
}
|
||||
|
||||
public PcAuction getAuctionInventory()
|
||||
{
|
||||
return _auctionInventory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a ShortCut of the L2PcInstance _shortCuts.
|
||||
* @param objectId
|
||||
@@ -3976,7 +3903,7 @@ public final class L2PcInstance extends L2Playable
|
||||
return null;
|
||||
}
|
||||
|
||||
if (getActiveEnchantItemId() == objectId)
|
||||
if (isProcessingItem(objectId))
|
||||
{
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
@@ -5645,8 +5572,6 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
setPvpKills(getPvpKills() + 1);
|
||||
|
||||
L2BattalionZone.givereward(this);
|
||||
|
||||
// Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
|
||||
UserInfo ui = new UserInfo(this, false);
|
||||
ui.addComponentType(UserInfoType.SOCIAL);
|
||||
@@ -11364,7 +11289,7 @@ public final class L2PcInstance extends L2Playable
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getActiveEnchantItemId() == objectId)
|
||||
if (isProcessingItem(objectId))
|
||||
{
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
@@ -13983,7 +13908,7 @@ public final class L2PcInstance extends L2Playable
|
||||
sendPacket(sm);
|
||||
}
|
||||
|
||||
// Prevent falling in game graphics.
|
||||
// FIXME: Prevent falling in game graphics.
|
||||
sendPacket(new ValidateLocation(this));
|
||||
|
||||
setFalling();
|
||||
@@ -15093,11 +15018,17 @@ public final class L2PcInstance extends L2Playable
|
||||
return getPlayerSide() == CastleSide.LIGHT;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the maximum amount of points that player can use
|
||||
*/
|
||||
public int getMaxSummonPoints()
|
||||
{
|
||||
return (int) getStat().calcStat(Stats.MAX_SUMMON_POINTS, 0, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the amount of points that player used
|
||||
*/
|
||||
public int getSummonPoints()
|
||||
{
|
||||
return getServitors().values().stream().mapToInt(L2Summon::getSummonPoints).sum();
|
||||
@@ -15232,36 +15163,6 @@ public final class L2PcInstance extends L2Playable
|
||||
_vitalityPoints = points;
|
||||
}
|
||||
|
||||
public int getFirstCompoundOID()
|
||||
{
|
||||
return _firstCompoundOID;
|
||||
}
|
||||
|
||||
public void setFirstCompoundOID(int firstCompoundOID)
|
||||
{
|
||||
_firstCompoundOID = firstCompoundOID;
|
||||
}
|
||||
|
||||
public int getSecondCompoundOID()
|
||||
{
|
||||
return _secondCompoundOID;
|
||||
}
|
||||
|
||||
public void setSecondCompoundOID(int secondCompoundOID)
|
||||
{
|
||||
_secondCompoundOID = secondCompoundOID;
|
||||
}
|
||||
|
||||
public void setUsingPrimeShop(boolean isUsing)
|
||||
{
|
||||
_usingPrimeShop = isUsing;
|
||||
}
|
||||
|
||||
public boolean isUsingPrimeShop()
|
||||
{
|
||||
return _usingPrimeShop;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the prime shop points of the player.
|
||||
*/
|
||||
@@ -15282,6 +15183,25 @@ public final class L2PcInstance extends L2Playable
|
||||
vars.storeMe();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last commission infos.
|
||||
* @return the last commission infos
|
||||
*/
|
||||
public Map<Integer, ExResponseCommissionInfo> getLastCommissionInfos()
|
||||
{
|
||||
if (_lastCommissionInfos == null)
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_lastCommissionInfos == null)
|
||||
{
|
||||
_lastCommissionInfos = new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _lastCommissionInfos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the whisperers.
|
||||
* @return the whisperers
|
||||
|
@@ -182,6 +182,7 @@ public class PcKnownList extends PlayableKnownList
|
||||
return 2900;
|
||||
}
|
||||
|
||||
// Old custom/wrong method.
|
||||
// if (knownlistSize <= 70)
|
||||
// {
|
||||
// return 2300;
|
||||
|
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.model.actor.request;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.adenadistribution.ExDivideAdenaCancel;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
*/
|
||||
public class AdenaDistributionRequest extends AbstractRequest
|
||||
{
|
||||
private final L2PcInstance _distributor;
|
||||
private final List<L2PcInstance> _players;
|
||||
private final int _adenaObjectId;
|
||||
private final long _adenaCount;
|
||||
|
||||
public AdenaDistributionRequest(L2PcInstance activeChar, L2PcInstance distributor, List<L2PcInstance> players, int adenaObjectId, long adenaCount)
|
||||
{
|
||||
super(activeChar);
|
||||
_distributor = distributor;
|
||||
_adenaObjectId = adenaObjectId;
|
||||
_players = players;
|
||||
_adenaCount = adenaCount;
|
||||
}
|
||||
|
||||
public L2PcInstance getDistributor()
|
||||
{
|
||||
return _distributor;
|
||||
}
|
||||
|
||||
public List<L2PcInstance> getPlayers()
|
||||
{
|
||||
return _players;
|
||||
}
|
||||
|
||||
public int getAdenaObjectId()
|
||||
{
|
||||
return _adenaObjectId;
|
||||
}
|
||||
|
||||
public long getAdenaCount()
|
||||
{
|
||||
return _adenaCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsing(int objectId)
|
||||
{
|
||||
return objectId == _adenaObjectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTimeout()
|
||||
{
|
||||
super.onTimeout();
|
||||
_players.forEach(p ->
|
||||
{
|
||||
p.removeRequest(AdenaDistributionRequest.class);
|
||||
p.sendPacket(ExDivideAdenaCancel.STATIC_PACKET);
|
||||
});
|
||||
}
|
||||
}
|
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.model.actor.request;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class CompoundRequest extends AbstractRequest
|
||||
{
|
||||
private int _itemOne;
|
||||
private int _itemTwo;
|
||||
|
||||
public CompoundRequest(L2PcInstance activeChar)
|
||||
{
|
||||
super(activeChar);
|
||||
}
|
||||
|
||||
public L2ItemInstance getItemOne()
|
||||
{
|
||||
return getActiveChar().getInventory().getItemByObjectId(_itemOne);
|
||||
}
|
||||
|
||||
public void setItemOne(int itemOne)
|
||||
{
|
||||
_itemOne = itemOne;
|
||||
}
|
||||
|
||||
public L2ItemInstance getItemTwo()
|
||||
{
|
||||
return getActiveChar().getInventory().getItemByObjectId(_itemTwo);
|
||||
}
|
||||
|
||||
public void setItemTwo(int itemTwo)
|
||||
{
|
||||
_itemTwo = itemTwo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemRequest()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canWorkWith(AbstractRequest request)
|
||||
{
|
||||
return !request.isItemRequest();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsing(int objectId)
|
||||
{
|
||||
return (objectId > 0) && ((objectId == _itemOne) || (objectId == _itemTwo));
|
||||
}
|
||||
}
|
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.model.actor.request;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class EnchantItemAttributeRequest extends AbstractRequest
|
||||
{
|
||||
private volatile int _enchantingItemObjectId;
|
||||
private volatile int _enchantingStoneObjectId;
|
||||
|
||||
public EnchantItemAttributeRequest(L2PcInstance activeChar, int enchantingStoneObjectId)
|
||||
{
|
||||
super(activeChar);
|
||||
_enchantingStoneObjectId = enchantingStoneObjectId;
|
||||
}
|
||||
|
||||
public L2ItemInstance getEnchantingItem()
|
||||
{
|
||||
return getActiveChar().getInventory().getItemByObjectId(_enchantingItemObjectId);
|
||||
}
|
||||
|
||||
public void setEnchantingItem(int objectId)
|
||||
{
|
||||
_enchantingItemObjectId = objectId;
|
||||
}
|
||||
|
||||
public L2ItemInstance getEnchantingStone()
|
||||
{
|
||||
return getActiveChar().getInventory().getItemByObjectId(_enchantingStoneObjectId);
|
||||
}
|
||||
|
||||
public void setEnchantingStone(int objectId)
|
||||
{
|
||||
_enchantingStoneObjectId = objectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemRequest()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canWorkWith(AbstractRequest request)
|
||||
{
|
||||
return !request.isItemRequest();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsing(int objectId)
|
||||
{
|
||||
return (objectId > 0) && ((objectId == _enchantingItemObjectId) || (objectId == _enchantingStoneObjectId));
|
||||
}
|
||||
}
|
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.model.actor.request;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class EnchantItemRequest extends AbstractRequest
|
||||
{
|
||||
private volatile int _enchantingItemObjectId;
|
||||
private volatile int _enchantingScrollObjectId;
|
||||
private volatile int _supportItemObjectId;
|
||||
|
||||
public EnchantItemRequest(L2PcInstance activeChar, int enchantingScrollObjectId)
|
||||
{
|
||||
super(activeChar);
|
||||
_enchantingScrollObjectId = enchantingScrollObjectId;
|
||||
}
|
||||
|
||||
public L2ItemInstance getEnchantingItem()
|
||||
{
|
||||
return getActiveChar().getInventory().getItemByObjectId(_enchantingItemObjectId);
|
||||
}
|
||||
|
||||
public void setEnchantingItem(int objectId)
|
||||
{
|
||||
_enchantingItemObjectId = objectId;
|
||||
}
|
||||
|
||||
public L2ItemInstance getEnchantingScroll()
|
||||
{
|
||||
return getActiveChar().getInventory().getItemByObjectId(_enchantingScrollObjectId);
|
||||
}
|
||||
|
||||
public void setEnchantingScroll(int objectId)
|
||||
{
|
||||
_enchantingScrollObjectId = objectId;
|
||||
}
|
||||
|
||||
public L2ItemInstance getSupportItem()
|
||||
{
|
||||
return getActiveChar().getInventory().getItemByObjectId(_supportItemObjectId);
|
||||
}
|
||||
|
||||
public void setSupportItem(int objectId)
|
||||
{
|
||||
_supportItemObjectId = objectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemRequest()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canWorkWith(AbstractRequest request)
|
||||
{
|
||||
return !request.isItemRequest();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsing(int objectId)
|
||||
{
|
||||
return (objectId > 0) && ((objectId == _enchantingItemObjectId) || (objectId == _enchantingScrollObjectId) || (objectId == _supportItemObjectId));
|
||||
}
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.model.actor.request;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class PartyRequest extends AbstractRequest
|
||||
{
|
||||
private final L2PcInstance _targetPlayer;
|
||||
|
||||
public PartyRequest(L2PcInstance activeChar, L2PcInstance targetPlayer)
|
||||
{
|
||||
super(activeChar);
|
||||
Objects.requireNonNull(targetPlayer);
|
||||
_targetPlayer = targetPlayer;
|
||||
}
|
||||
|
||||
public L2PcInstance getTargetPlayer()
|
||||
{
|
||||
return _targetPlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsing(int objectId)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTimeout()
|
||||
{
|
||||
super.onTimeout();
|
||||
getActiveChar().removeRequest(getClass());
|
||||
_targetPlayer.removeRequest(getClass());
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.model.actor.request;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class PrimeShopRequest extends AbstractRequest
|
||||
{
|
||||
public PrimeShopRequest(L2PcInstance activeChar)
|
||||
{
|
||||
super(activeChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsing(int objectId)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user