Initial changes.
This commit is contained in:
@ -50,7 +50,9 @@ import com.l2jmobius.gameserver.data.xml.impl.BeautyShopData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.BuyListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CategoryData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanHallData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanMasteryData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanRewardData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanShopData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CombinationItemsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CubicData;
|
||||
@ -304,6 +306,8 @@ public class GameServer
|
||||
ClanHallData.getInstance();
|
||||
ClanHallAuctionManager.getInstance();
|
||||
ClanEntryManager.getInstance();
|
||||
ClanMasteryData.getInstance();
|
||||
ClanShopData.getInstance();
|
||||
|
||||
printSection("Geodata");
|
||||
long geodataMemory = getUsedMemoryMB();
|
||||
|
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import com.l2jmobius.commons.util.IGameXmlReader;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanMasteryHolder;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ClanMasteryData implements IGameXmlReader
|
||||
{
|
||||
private static Logger LOGGER = Logger.getLogger(ClanMasteryData.class.getName());
|
||||
|
||||
private final List<ClanMasteryHolder> _clanMasteryData = new ArrayList<>();
|
||||
|
||||
protected ClanMasteryData()
|
||||
{
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_clanMasteryData.clear();
|
||||
|
||||
parseDatapackFile("data/ClanMasteryData.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _clanMasteryData.size() + " clan masteries.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc, File f)
|
||||
{
|
||||
forEach(doc, "list", listNode -> forEach(listNode, "clan", clanNode ->
|
||||
{
|
||||
final StatsSet set = new StatsSet(parseAttributes(clanNode));
|
||||
final int mastery = set.getInt("mastery");
|
||||
final int level = set.getInt("level");
|
||||
final int previous = set.getInt("previous");
|
||||
|
||||
final Skill skill = SkillData.getInstance().getSkill(mastery, level);
|
||||
if (skill == null)
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Could not create clan mastery, skill id " + mastery + " with level " + level + " does not exist.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_clanMasteryData.add(new ClanMasteryHolder(skill, previous));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public List<ClanMasteryHolder> getMasteries()
|
||||
{
|
||||
return _clanMasteryData;
|
||||
}
|
||||
|
||||
public static ClanMasteryData getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final ClanMasteryData _instance = new ClanMasteryData();
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import com.l2jmobius.commons.util.IGameXmlReader;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanShopProductHolder;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ClanShopData implements IGameXmlReader
|
||||
{
|
||||
private static Logger LOGGER = Logger.getLogger(ClanShopData.class.getName());
|
||||
|
||||
private final List<ClanShopProductHolder> _clanShopProducts = new ArrayList<>();
|
||||
|
||||
protected ClanShopData()
|
||||
{
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_clanShopProducts.clear();
|
||||
|
||||
parseDatapackFile("config/ClanShop.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _clanShopProducts.size() + " clan shop products.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc, File f)
|
||||
{
|
||||
forEach(doc, "list", listNode -> forEach(listNode, "clan", productNode ->
|
||||
{
|
||||
final StatsSet set = new StatsSet(parseAttributes(productNode));
|
||||
final int clanLevel = set.getInt("level");
|
||||
final int itemId = set.getInt("item");
|
||||
final int count = set.getInt("count");
|
||||
final long adena = set.getLong("adena");
|
||||
final int fame = set.getInt("fame");
|
||||
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(itemId);
|
||||
if (item == null)
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Could not create clan shop item " + itemId + ", it does not exist.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_clanShopProducts.add(new ClanShopProductHolder(clanLevel, item, count, adena, fame));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public ClanShopProductHolder getProduct(int itemId)
|
||||
{
|
||||
for (ClanShopProductHolder product : _clanShopProducts)
|
||||
{
|
||||
if (product.getTradeItem().getItem().getId() == itemId)
|
||||
{
|
||||
return product;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<ClanShopProductHolder> getProducts()
|
||||
{
|
||||
return _clanShopProducts;
|
||||
}
|
||||
|
||||
public static ClanShopData getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final ClanShopData _instance = new ClanShopData();
|
||||
}
|
||||
}
|
@ -95,6 +95,7 @@ public class ItemTable
|
||||
SLOTS.put("babypet", L2Item.SLOT_BABYPET);
|
||||
SLOTS.put("brooch", L2Item.SLOT_BROOCH);
|
||||
SLOTS.put("brooch_jewel", L2Item.SLOT_BROOCH_JEWEL);
|
||||
SLOTS.put("agathion", L2Item.SLOT_AGATHION);
|
||||
SLOTS.put("none", L2Item.SLOT_NONE);
|
||||
|
||||
// retail compatibility
|
||||
|
@ -43,6 +43,11 @@ public enum InventorySlot implements IUpdateTypeComponent
|
||||
HAIR2(Inventory.PAPERDOLL_HAIR2),
|
||||
RBRACELET(Inventory.PAPERDOLL_RBRACELET),
|
||||
LBRACELET(Inventory.PAPERDOLL_LBRACELET),
|
||||
AGATHION1(Inventory.PAPERDOLL_AGATHION1),
|
||||
AGATHION2(Inventory.PAPERDOLL_AGATHION2),
|
||||
AGATHION3(Inventory.PAPERDOLL_AGATHION3),
|
||||
AGATHION4(Inventory.PAPERDOLL_AGATHION4),
|
||||
AGATHION5(Inventory.PAPERDOLL_AGATHION5),
|
||||
DECO1(Inventory.PAPERDOLL_DECO1),
|
||||
DECO2(Inventory.PAPERDOLL_DECO2),
|
||||
DECO3(Inventory.PAPERDOLL_DECO3),
|
||||
|
@ -92,7 +92,7 @@ public class CombatFlag
|
||||
}
|
||||
else
|
||||
{
|
||||
_player.sendItemList(false);
|
||||
_player.sendItemList();
|
||||
}
|
||||
// Refresh player stats
|
||||
_player.broadcastUserInfo();
|
||||
|
@ -126,7 +126,7 @@ public class CursedWeapon implements INamable
|
||||
}
|
||||
else
|
||||
{
|
||||
_player.sendItemList(false);
|
||||
_player.sendItemList();
|
||||
}
|
||||
|
||||
_player.broadcastUserInfo();
|
||||
@ -187,7 +187,7 @@ public class CursedWeapon implements INamable
|
||||
}
|
||||
else
|
||||
{
|
||||
_player.sendItemList(false);
|
||||
_player.sendItemList();
|
||||
}
|
||||
|
||||
_player.broadcastUserInfo();
|
||||
@ -453,7 +453,7 @@ public class CursedWeapon implements INamable
|
||||
}
|
||||
else
|
||||
{
|
||||
_player.sendItemList(false);
|
||||
_player.sendItemList();
|
||||
}
|
||||
|
||||
// Refresh player stats
|
||||
|
@ -2706,7 +2706,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
ui.addComponentType(UserInfoType.CURRENT_HPMPCP_EXP_SP);
|
||||
player.sendPacket(ui);
|
||||
|
||||
player.sendItemList(false);
|
||||
player.sendItemList();
|
||||
|
||||
changeLevel(_level + 1);
|
||||
|
||||
|
@ -617,7 +617,7 @@ public class TradeList
|
||||
}
|
||||
else
|
||||
{
|
||||
_owner.sendItemList(false);
|
||||
_owner.sendItemList();
|
||||
}
|
||||
|
||||
if (partnerIU != null)
|
||||
@ -626,7 +626,7 @@ public class TradeList
|
||||
}
|
||||
else
|
||||
{
|
||||
_partner.sendItemList(false);
|
||||
_partner.sendItemList();
|
||||
}
|
||||
success = true;
|
||||
}
|
||||
|
@ -993,7 +993,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
{
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
player.setActiveWarehouse(player.getClan().getWarehouse());
|
||||
player.sendPacket(new WareHouseDepositList(player, WareHouseDepositList.CLAN));
|
||||
player.sendPacket(new WareHouseDepositList(1, player, WareHouseDepositList.CLAN));
|
||||
}
|
||||
|
||||
private void showVaultWindowWithdraw(L2PcInstance player)
|
||||
@ -1002,7 +1002,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
{
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
player.setActiveWarehouse(player.getClan().getWarehouse());
|
||||
player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN));
|
||||
player.sendPacket(new WareHouseWithdrawalList(1, player, WareHouseWithdrawalList.CLAN));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2199,7 +2199,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
final int slot = _inventory.getSlotFromItem(item);
|
||||
// we can't unequip talisman by body slot
|
||||
if ((slot == L2Item.SLOT_DECO) || (slot == L2Item.SLOT_BROOCH_JEWEL))
|
||||
if ((slot == L2Item.SLOT_DECO) || (slot == L2Item.SLOT_BROOCH_JEWEL) || (slot == L2Item.SLOT_AGATHION))
|
||||
{
|
||||
items = _inventory.unEquipItemInSlotAndRecord(item.getLocationSlot());
|
||||
}
|
||||
@ -2993,7 +2993,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3034,7 +3034,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
|
||||
if (sendMessage)
|
||||
@ -3084,7 +3084,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
|
||||
if (sendMessage)
|
||||
@ -3137,7 +3137,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3178,7 +3178,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
|
||||
if (sendMessage)
|
||||
@ -3404,7 +3404,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
|
||||
// Sends message to client if requested
|
||||
@ -3518,7 +3518,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
|
||||
// Sends message to client if requested
|
||||
@ -3582,7 +3582,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
|
||||
// Send target update packet
|
||||
@ -3607,7 +3607,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
targetPlayer.sendItemList(false);
|
||||
targetPlayer.sendItemList();
|
||||
}
|
||||
}
|
||||
else if (target instanceof PetInventory)
|
||||
@ -3734,7 +3734,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
|
||||
// Sends message to client if requested
|
||||
@ -3821,7 +3821,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
}
|
||||
|
||||
// Sends message to client if requested
|
||||
@ -4614,7 +4614,8 @@ public final class L2PcInstance extends L2Playable
|
||||
standUp();
|
||||
}
|
||||
setPrivateStoreType(PrivateStoreType.BUY_MANAGE);
|
||||
sendPacket(new PrivateStoreManageListBuy(this));
|
||||
sendPacket(new PrivateStoreManageListBuy(1, this));
|
||||
sendPacket(new PrivateStoreManageListBuy(2, this));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -5661,7 +5662,8 @@ public final class L2PcInstance extends L2Playable
|
||||
final SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.YOU_BEGIN_TRADING_WITH_C1);
|
||||
msg.addPcName(partner);
|
||||
sendPacket(msg);
|
||||
sendPacket(new TradeStart(this));
|
||||
sendPacket(new TradeStart(1, this));
|
||||
sendPacket(new TradeStart(2, this));
|
||||
}
|
||||
|
||||
public void onTradeConfirm(L2PcInstance partner)
|
||||
@ -5897,7 +5899,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
// Equip arrows needed in left hand
|
||||
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
|
||||
sendItemList(false);
|
||||
sendItemList();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -13891,13 +13893,12 @@ public final class L2PcInstance extends L2Playable
|
||||
sendPacket(new ExUserInfoInvenWeight(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param open
|
||||
*/
|
||||
public void sendItemList(boolean open)
|
||||
public void sendItemList()
|
||||
{
|
||||
sendPacket(new ItemList(this, open));
|
||||
sendPacket(new ExQuestItemList(this));
|
||||
sendPacket(new ItemList(1, this));
|
||||
sendPacket(new ItemList(2, this));
|
||||
sendPacket(new ExQuestItemList(1, this));
|
||||
sendPacket(new ExQuestItemList(2, this));
|
||||
sendPacket(new ExAdenaInvenCount(this));
|
||||
sendPacket(new ExUserInfoInvenWeight(this));
|
||||
}
|
||||
|
@ -44,7 +44,6 @@ import com.l2jmobius.gameserver.network.serverpackets.PledgeShowMemberListUpdate
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.dailymission.ExOneDayReceiveRewardList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.friend.L2FriendStatus;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
@ -295,7 +294,8 @@ public class PcStat extends PlayableStat
|
||||
// Send acquirable skill list
|
||||
getActiveChar().sendPacket(new AcquireSkillList(getActiveChar()));
|
||||
getActiveChar().sendPacket(new ExVoteSystemInfo(getActiveChar()));
|
||||
getActiveChar().sendPacket(new ExOneDayReceiveRewardList(getActiveChar(), true));
|
||||
// Removed used by new Pledge system.
|
||||
// getActiveChar().sendPacket(new ExOneDayReceiveRewardList(getActiveChar(), true));
|
||||
return levelIncreased;
|
||||
}
|
||||
|
||||
@ -427,6 +427,12 @@ public class PcStat extends PlayableStat
|
||||
{
|
||||
super.setLevel(value);
|
||||
}
|
||||
|
||||
// Removed used by new Pledge system.
|
||||
// if (!getActiveChar().isDead())
|
||||
// {
|
||||
// getActiveChar().sendPacket(new ExOneDayReceiveRewardList(getActiveChar(), false));
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -666,6 +672,15 @@ public class PcStat extends PlayableStat
|
||||
return (int) getValue(Stats.BROOCH_JEWELS, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the maximum agathion count.
|
||||
* @return the maximum agathion count
|
||||
*/
|
||||
public int getAgathionSlots()
|
||||
{
|
||||
return (int) getValue(Stats.AGATHION_SLOTS, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRecalculateStats(boolean broadcast)
|
||||
{
|
||||
|
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.model.holders;
|
||||
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ClanMasteryHolder
|
||||
{
|
||||
private final Skill _skill;
|
||||
private final int _previousSkillId;
|
||||
|
||||
public ClanMasteryHolder(Skill skill, int previousSkillId)
|
||||
{
|
||||
_skill = skill;
|
||||
_previousSkillId = previousSkillId;
|
||||
}
|
||||
|
||||
public Skill getSkill()
|
||||
{
|
||||
return _skill;
|
||||
}
|
||||
|
||||
public int getPreviousSkillId()
|
||||
{
|
||||
return _previousSkillId;
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.model.holders;
|
||||
|
||||
import com.l2jmobius.gameserver.model.TradeItem;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ClanShopProductHolder
|
||||
{
|
||||
private final int _clanLevel;
|
||||
private final TradeItem _item;
|
||||
private final int _count;
|
||||
private final long _adena;
|
||||
private final int _fame;
|
||||
|
||||
public ClanShopProductHolder(int clanLevel, L2Item item, int count, long adena, int fame)
|
||||
{
|
||||
_clanLevel = clanLevel;
|
||||
_item = new TradeItem(item, 0, 0);
|
||||
_count = count;
|
||||
_adena = adena;
|
||||
_fame = fame;
|
||||
}
|
||||
|
||||
public int getClanLevel()
|
||||
{
|
||||
return _clanLevel;
|
||||
}
|
||||
|
||||
public TradeItem getTradeItem()
|
||||
{
|
||||
return _item;
|
||||
}
|
||||
|
||||
public int getCount()
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
||||
public long getAdena()
|
||||
{
|
||||
return _adena;
|
||||
}
|
||||
|
||||
public int getFame()
|
||||
{
|
||||
return _fame;
|
||||
}
|
||||
}
|
@ -98,22 +98,27 @@ public abstract class Inventory extends ItemContainer
|
||||
public static final int PAPERDOLL_LFINGER = 14;
|
||||
public static final int PAPERDOLL_LBRACELET = 15;
|
||||
public static final int PAPERDOLL_RBRACELET = 16;
|
||||
public static final int PAPERDOLL_DECO1 = 17;
|
||||
public static final int PAPERDOLL_DECO2 = 18;
|
||||
public static final int PAPERDOLL_DECO3 = 19;
|
||||
public static final int PAPERDOLL_DECO4 = 20;
|
||||
public static final int PAPERDOLL_DECO5 = 21;
|
||||
public static final int PAPERDOLL_DECO6 = 22;
|
||||
public static final int PAPERDOLL_CLOAK = 23;
|
||||
public static final int PAPERDOLL_BELT = 24;
|
||||
public static final int PAPERDOLL_BROOCH = 25;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL1 = 26;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL2 = 27;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL3 = 28;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL4 = 29;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL5 = 30;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL6 = 31;
|
||||
public static final int PAPERDOLL_TOTALSLOTS = 32;
|
||||
public static final int PAPERDOLL_AGATHION1 = 17;
|
||||
public static final int PAPERDOLL_AGATHION2 = 18;
|
||||
public static final int PAPERDOLL_AGATHION3 = 19;
|
||||
public static final int PAPERDOLL_AGATHION4 = 20;
|
||||
public static final int PAPERDOLL_AGATHION5 = 21;
|
||||
public static final int PAPERDOLL_DECO1 = 22;
|
||||
public static final int PAPERDOLL_DECO2 = 23;
|
||||
public static final int PAPERDOLL_DECO3 = 24;
|
||||
public static final int PAPERDOLL_DECO4 = 25;
|
||||
public static final int PAPERDOLL_DECO5 = 26;
|
||||
public static final int PAPERDOLL_DECO6 = 27;
|
||||
public static final int PAPERDOLL_CLOAK = 28;
|
||||
public static final int PAPERDOLL_BELT = 29;
|
||||
public static final int PAPERDOLL_BROOCH = 30;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL1 = 31;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL2 = 32;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL3 = 33;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL4 = 34;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL5 = 35;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL6 = 36;
|
||||
public static final int PAPERDOLL_TOTALSLOTS = 37;
|
||||
|
||||
// Speed percentage mods
|
||||
public static final double MAX_ARMOR_WEIGHT = 12000;
|
||||
@ -711,6 +716,34 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
}
|
||||
|
||||
private static final class AgathionBraceletListener implements PaperdollListener
|
||||
{
|
||||
private static AgathionBraceletListener instance = new AgathionBraceletListener();
|
||||
|
||||
public static AgathionBraceletListener getInstance()
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyUnequiped(int slot, L2ItemInstance item, Inventory inventory)
|
||||
{
|
||||
if (item.getItem().getBodyPart() == L2Item.SLOT_L_BRACELET)
|
||||
{
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_AGATHION1);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_AGATHION2);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_AGATHION3);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_AGATHION4);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_AGATHION5);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyEquiped(int slot, L2ItemInstance item, Inventory inventory)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor of the inventory
|
||||
*/
|
||||
@ -726,6 +759,7 @@ public abstract class Inventory extends ItemContainer
|
||||
addPaperdollListener(ItemSkillsListener.getInstance());
|
||||
addPaperdollListener(BraceletListener.getInstance());
|
||||
addPaperdollListener(BroochListener.getInstance());
|
||||
addPaperdollListener(AgathionBraceletListener.getInstance());
|
||||
}
|
||||
|
||||
// common
|
||||
@ -966,6 +1000,10 @@ public abstract class Inventory extends ItemContainer
|
||||
{
|
||||
return PAPERDOLL_BROOCH_JEWEL1;
|
||||
}
|
||||
case L2Item.SLOT_AGATHION:
|
||||
{
|
||||
return PAPERDOLL_AGATHION1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -1262,6 +1300,15 @@ public abstract class Inventory extends ItemContainer
|
||||
slot = L2Item.SLOT_BROOCH_JEWEL;
|
||||
break;
|
||||
}
|
||||
case PAPERDOLL_AGATHION1:
|
||||
case PAPERDOLL_AGATHION2:
|
||||
case PAPERDOLL_AGATHION3:
|
||||
case PAPERDOLL_AGATHION4:
|
||||
case PAPERDOLL_AGATHION5:
|
||||
{
|
||||
slot = L2Item.SLOT_AGATHION;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return slot;
|
||||
}
|
||||
@ -1452,6 +1499,11 @@ public abstract class Inventory extends ItemContainer
|
||||
pdollSlot = PAPERDOLL_BROOCH_JEWEL1;
|
||||
break;
|
||||
}
|
||||
case L2Item.SLOT_AGATHION:
|
||||
{
|
||||
pdollSlot = PAPERDOLL_AGATHION1;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
LOGGER.info("Unhandled slot type: " + slot);
|
||||
@ -1725,6 +1777,11 @@ public abstract class Inventory extends ItemContainer
|
||||
equipBroochJewel(item);
|
||||
break;
|
||||
}
|
||||
case L2Item.SLOT_AGATHION:
|
||||
{
|
||||
equipAgathion(item);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
LOGGER.warning("Unknown body slot " + targetSlot + " for Item ID: " + item.getId());
|
||||
@ -1874,7 +1931,7 @@ public abstract class Inventory extends ItemContainer
|
||||
{
|
||||
if (getPaperdollItemId(i) == item.getId())
|
||||
{
|
||||
// overwtite
|
||||
// overwrite
|
||||
setPaperdollItem(i, item);
|
||||
return;
|
||||
}
|
||||
@ -1912,7 +1969,7 @@ public abstract class Inventory extends ItemContainer
|
||||
{
|
||||
if ((_paperdoll[i] != null) && (getPaperdollItemId(i) == item.getId()))
|
||||
{
|
||||
// overwtite
|
||||
// overwrite
|
||||
setPaperdollItem(i, item);
|
||||
return;
|
||||
}
|
||||
@ -1932,6 +1989,43 @@ public abstract class Inventory extends ItemContainer
|
||||
setPaperdollItem(PAPERDOLL_BROOCH_JEWEL1, item);
|
||||
}
|
||||
|
||||
public int getAgathionSlots()
|
||||
{
|
||||
return getOwner().getActingPlayer().getStat().getAgathionSlots();
|
||||
}
|
||||
|
||||
private void equipAgathion(L2ItemInstance item)
|
||||
{
|
||||
if (getAgathionSlots() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// find same (or incompatible) agathion type
|
||||
for (int i = PAPERDOLL_AGATHION1; i < (PAPERDOLL_AGATHION1 + getAgathionSlots()); i++)
|
||||
{
|
||||
if ((_paperdoll[i] != null) && (getPaperdollItemId(i) == item.getId()))
|
||||
{
|
||||
// overwrite
|
||||
setPaperdollItem(i, item);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// no free slot found - put on first free
|
||||
for (int i = PAPERDOLL_AGATHION1; i < (PAPERDOLL_AGATHION1 + getAgathionSlots()); i++)
|
||||
{
|
||||
if (_paperdoll[i] == null)
|
||||
{
|
||||
setPaperdollItem(i, item);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// no free slots - put on first
|
||||
setPaperdollItem(PAPERDOLL_AGATHION1, item);
|
||||
}
|
||||
|
||||
public boolean canEquipCloak()
|
||||
{
|
||||
return getOwner().getActingPlayer().getStat().canEquipCloak();
|
||||
|
@ -413,7 +413,7 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
else
|
||||
{
|
||||
actor.sendItemList(false);
|
||||
actor.sendItemList();
|
||||
}
|
||||
|
||||
// Notify to scripts
|
||||
@ -481,7 +481,7 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
else
|
||||
{
|
||||
actor.sendItemList(false);
|
||||
actor.sendItemList();
|
||||
}
|
||||
}
|
||||
|
||||
@ -528,7 +528,7 @@ public class PcInventory extends Inventory
|
||||
|
||||
if ((item != null) && (actor != null))
|
||||
{
|
||||
actor.sendItemList(false);
|
||||
actor.sendItemList();
|
||||
}
|
||||
return item;
|
||||
}
|
||||
@ -737,7 +737,7 @@ public class PcInventory extends Inventory
|
||||
|
||||
public static int[][] restoreVisibleInventory(int objectId)
|
||||
{
|
||||
final int[][] paperdoll = new int[33][4];
|
||||
final int[][] paperdoll = new int[Inventory.PAPERDOLL_TOTALSLOTS][4];
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement statement2 = con.prepareStatement("SELECT object_id,item_id,loc_data,enchant_level FROM items WHERE owner_id=? AND loc='PAPERDOLL'"))
|
||||
{
|
||||
@ -865,7 +865,7 @@ public class PcInventory extends Inventory
|
||||
_blockMode = mode;
|
||||
_blockItems = items;
|
||||
|
||||
_owner.sendItemList(false);
|
||||
_owner.sendItemList();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -876,7 +876,7 @@ public class PcInventory extends Inventory
|
||||
_blockMode = InventoryBlockType.NONE;
|
||||
_blockItems = null;
|
||||
|
||||
_owner.sendItemList(false);
|
||||
_owner.sendItemList();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1048,7 +1048,7 @@ public class PcInventory extends Inventory
|
||||
{
|
||||
if (Config.FORCE_INVENTORY_UPDATE)
|
||||
{
|
||||
_owner.sendItemList(false);
|
||||
_owner.sendItemList();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -111,6 +111,7 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
|
||||
public static final int SLOT_BELT = 0x10000000;
|
||||
public static final int SLOT_BROOCH = 0x20000000;
|
||||
public static final int SLOT_BROOCH_JEWEL = 0x40000000;
|
||||
public static final int SLOT_AGATHION = 0x80000000;
|
||||
|
||||
public static final int SLOT_WOLF = -100;
|
||||
public static final int SLOT_HATCHLING = -101;
|
||||
|
@ -217,6 +217,23 @@ public enum AbnormalVisualEffect
|
||||
RO_GHOST_REFLECT(217),
|
||||
CHANGESHAPE_TRANSFORM_5(218),
|
||||
ICE_ELEMENTALDESTROY(219),
|
||||
DORMANT_USER(220),
|
||||
NUWBIE_USER(221),
|
||||
THIRTEENTH_BUFF(222),
|
||||
ARENA_UNSEAL_A(224),
|
||||
ARENA_UNSEAL_B(225),
|
||||
ARENA_UNSEAL_C(226),
|
||||
ARENA_UNSEAL_D(227),
|
||||
ARENA_UNSEAL_E(228),
|
||||
IN_BATTLE_RHAPSODY(229),
|
||||
IN_A_DECAL(230),
|
||||
IN_B_DECAL(231),
|
||||
CHANGESHAPE_TRANSFORM_6(232),
|
||||
CHANGESHAPE_TRANSFORM_7(234),
|
||||
POWER_BLOCKING(247),
|
||||
FOCUS_SHIELD(248),
|
||||
TRUE_VANGUARD(249),
|
||||
SHIELD_WALL(250),
|
||||
DRAGON_ULTIMATE(700),
|
||||
CHANGE_HALLOWEEN(1000),
|
||||
BR_Y_1_ACCESSORY_R_RING(10001),
|
||||
|
@ -248,6 +248,9 @@ public enum Stats
|
||||
// Brooches
|
||||
BROOCH_JEWELS("broochJewels"),
|
||||
|
||||
// Agathions
|
||||
AGATHION_SLOTS("agathionSlots"),
|
||||
|
||||
// Summon Points
|
||||
MAX_SUMMON_POINTS("summonPoints"),
|
||||
|
||||
|
@ -67,8 +67,6 @@ import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchant
|
||||
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantTry;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeEstimate;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.dailymission.RequestOneDayRewardReceive;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.dailymission.RequestTodoList;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.ensoul.RequestItemEnsoul;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.faction.RequestUserFactionInfo;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
|
||||
@ -82,6 +80,10 @@ import com.l2jmobius.gameserver.network.clientpackets.mentoring.RequestMentorLis
|
||||
import com.l2jmobius.gameserver.network.clientpackets.monsterbook.RequestMonsterBookClose;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.monsterbook.RequestMonsterBookOpen;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.monsterbook.RequestMonsterBookReward;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeItemBuy;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeItemList;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryInfo;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryReset;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusOpen;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusReward;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusRewardList;
|
||||
@ -351,6 +353,7 @@ public enum ExIncomingPackets implements IIncomingPackets<L2GameClient>
|
||||
REQUEST_NEW_ENCHANT_CLOSE(0xF8, RequestNewEnchantClose::new, ConnectionState.IN_GAME),
|
||||
REQUEST_NEW_ENCHANT_TRY(0xF9, RequestNewEnchantTry::new, ConnectionState.IN_GAME),
|
||||
REQUEST_NEW_ENCHANT_RETRY_TO_PUT_ITEMS(0xFA, RequestNewEnchantRetryToPutItems::new, ConnectionState.IN_GAME),
|
||||
REQUEST_TARGET_ACTION_MENU(0xFE, RequestTargetActionMenu::new, ConnectionState.IN_GAME),
|
||||
EX_SEND_SELECTED_QUEST_ZONE_ID(0xFF, ExSendSelectedQuestZoneID::new, ConnectionState.IN_GAME),
|
||||
REQUEST_ALCHEMY_SKILL_LIST(0x100, RequestAlchemySkillList::new, ConnectionState.IN_GAME),
|
||||
REQUEST_ALCHEMY_TRY_MIX_CUBE(0x101, RequestAlchemyTryMixCube::new, ConnectionState.IN_GAME),
|
||||
@ -382,9 +385,9 @@ public enum ExIncomingPackets implements IIncomingPackets<L2GameClient>
|
||||
REQUEST_EVENT_BALTHUS_TOKEN(0x11B, null, ConnectionState.IN_GAME),
|
||||
REQUEST_PARTY_MATCHING_HISTORY(0x11C, null, ConnectionState.IN_GAME),
|
||||
EX_ARENA_CUSTOM_NOTIFICATION(0x11D, null, ConnectionState.IN_GAME),
|
||||
REQUEST_TODO_LIST(0x11E, RequestTodoList::new, ConnectionState.IN_GAME),
|
||||
REQUEST_TODO_LIST(0x11E, null, ConnectionState.IN_GAME),
|
||||
REQUEST_TODO_LIST_HTML(0x11F, null, ConnectionState.IN_GAME),
|
||||
REQUEST_ONE_DAY_REWARD_RECEIVE(0x120, RequestOneDayRewardReceive::new, ConnectionState.IN_GAME),
|
||||
REQUEST_ONE_DAY_REWARD_RECEIVE(0x120, null, ConnectionState.IN_GAME),
|
||||
REQUEST_QUEUE_TICKET(0x121, null, ConnectionState.IN_GAME),
|
||||
REQUEST_PLEDGE_BONUS_OPEN(0x122, RequestPledgeBonusOpen::new, ConnectionState.IN_GAME),
|
||||
REQUEST_PLEDGE_BONUS_REWARD_LIST(0x123, RequestPledgeBonusRewardList::new, ConnectionState.IN_GAME),
|
||||
@ -406,9 +409,47 @@ public enum ExIncomingPackets implements IIncomingPackets<L2GameClient>
|
||||
EXREQUEST_MATCH_GROUP_WITHDRAW(0x133, null, ConnectionState.IN_GAME),
|
||||
EXREQUEST_MATCH_GROUP_OUST(0x134, null, ConnectionState.IN_GAME),
|
||||
EXREQUEST_MATCH_GROUP_CHANGE_MASTER(0x135, null, ConnectionState.IN_GAME),
|
||||
REQUEST_BLOCK_LIST_FOR_AD(0x136, null, ConnectionState.IN_GAME),
|
||||
REQUEST_UPGRADE_SYSTEM_RESULT(0x137, null, ConnectionState.IN_GAME),
|
||||
REQUEST_USER_BAN_INFO(0x138, null, ConnectionState.IN_GAME);
|
||||
REQUEST_UPGRADE_SYSTEM_RESULT(0x136, null, ConnectionState.IN_GAME),
|
||||
EX_CARD_UPDOWN_PICK_NUMB(0x137, null, ConnectionState.IN_GAME),
|
||||
EX_CARD_UPDOWN_GAME_REWARD_REQUEST(0x138, null, ConnectionState.IN_GAME),
|
||||
EX_CARD_UPDOWN_GAME_RETRY(0x139, null, ConnectionState.IN_GAME),
|
||||
EX_CARD_UPDOWN_GAME_QUIT(0x13A, null, ConnectionState.IN_GAME),
|
||||
EX_ARENA_RANK_ALL(0x13B, null, ConnectionState.IN_GAME),
|
||||
EX_ARENA_MYRANK(0x13C, null, ConnectionState.IN_GAME),
|
||||
EX_SWAP_AGATHION_SLOT_ITEMS(0x13D, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_CONTRIBUTION_RANK(0x13E, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_CONTRIBUTION_INFO(0x13F, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_CONTRIBUTION_REWARD(0x140, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_LEVEL_UP(0x141, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MISSION_INFO(0x142, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MISSION_REWARD(0x143, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MASTERY_INFO(0x144, RequestExPledgeMasteryInfo::new, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MASTERY_SET(0x145, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MASTERY_RESET(0x146, RequestExPledgeMasteryReset::new, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_SKILL_INFO(0x147, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_SKILL_ACTIVATE(0x148, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_ITEM_LIST(0x149, RequestExPledgeItemList::new, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_ITEM_ACTIVATE(0x14A, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_ANNOUNCE(0x14B, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_ANNOUNCE_SET(0x14C, null, ConnectionState.IN_GAME),
|
||||
EX_CREATE_PLEDGE(0x14D, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_ITEM_INFO(0x14E, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_ITEM_BUY(0x14F, RequestExPledgeItemBuy::new, ConnectionState.IN_GAME),
|
||||
EX_ELEMENTAL_SPIRIT_INFO(0x150, null, ConnectionState.IN_GAME),
|
||||
EX_ELEMENTAL_SPIRIT_EXTRACT_INFO(0x151, null, ConnectionState.IN_GAME),
|
||||
EX_ELEMENTAL_SPIRIT_EXTRACT(0x152, null, ConnectionState.IN_GAME),
|
||||
EX_ELEMENTAL_SPIRIT_EVOLUTION_INFO(0x153, null, ConnectionState.IN_GAME),
|
||||
EX_ELEMENTAL_SPIRIT_EVOLUTION(0x154, null, ConnectionState.IN_GAME),
|
||||
EX_ELEMENTAL_SPIRIT_SET_TALENT(0x155, null, ConnectionState.IN_GAME),
|
||||
EX_ELEMENTAL_SPIRIT_INIT_TALENT(0x156, null, ConnectionState.IN_GAME),
|
||||
EX_ELEMENTAL_SPIRIT_ABSORB_INFO(0x157, null, ConnectionState.IN_GAME),
|
||||
EX_ELEMENTAL_SPIRIT_ABSORB(0x158, null, ConnectionState.IN_GAME),
|
||||
EX_REQUEST_LOCKED_ITEM(0x159, null, ConnectionState.IN_GAME),
|
||||
EX_REQUEST_UNLOCKED_ITEM(0x15A, null, ConnectionState.IN_GAME),
|
||||
EX_LOCKED_ITEM_CANCEL(0x15B, null, ConnectionState.IN_GAME),
|
||||
EX_UNLOCKED_ITEM_CANCEL(0x15C, null, ConnectionState.IN_GAME),
|
||||
REQUEST_BLOCK_LIST_FOR_AD(0x15D, null, ConnectionState.IN_GAME),
|
||||
REQUEST_USER_BAN_INFO(0x15E, null, ConnectionState.IN_GAME);
|
||||
|
||||
public static final ExIncomingPackets[] PACKET_ARRAY;
|
||||
|
||||
|
@ -741,11 +741,53 @@ public enum OutgoingPackets
|
||||
EX_MATCH_GROUP_WITHDRAW(0xFE, 0x1CA),
|
||||
EX_MATCH_GROUP_OUST(0xFE, 0x1CB),
|
||||
EX_ARENA_SHOW_ENEMY_PARTY_LOCATION(0xFE, 0x1CC),
|
||||
EX_DRESS_ROOM_UI_OPEN(0xFE, 0x1CD),
|
||||
EX_DRESS_HANGER_LIST(0xFE, 0x1CE),
|
||||
EX_SHOW_UPGRADE_SYSTEM(0xFE, 0x1CF),
|
||||
EX_UPGRADE_SYSTEM_RESULT(0xFE, 0x1D0),
|
||||
EX_USER_BAN_INFO(0xFE, 0x1D1);
|
||||
EX_SHOW_UPGRADE_SYSTEM(0xFE, 0x1CD),
|
||||
EX_UPGRADE_SYSTEM_RESULT(0xFE, 0x1CE),
|
||||
EX_CARD_UPDOWN_GAME_START(0xFE, 0x1CF),
|
||||
EX_CARD_UPDOWN_PICK_RESULT(0xFE, 0x1D0),
|
||||
EX_CARD_UPDOWN_GAME_PREPARE_REWARD(0xFE, 0x1D1),
|
||||
EX_CARD_UPDOWN_GAME_REWARD_REPLY(0xFE, 0x1D2),
|
||||
EX_CARD_UPDOWN_GAME_QUIT(0xFE, 0x1D3),
|
||||
EX_ARENA_RANK_ALL(0xFE, 0x1D4),
|
||||
EX_ARENA_MYRANK(0xFE, 0x1D5),
|
||||
EX_PLEDGE_CLASSIC_RAID_INFO(0xFE, 0x1D6),
|
||||
EX_ARENA_OBSERVE(0xFE, 0x1D7),
|
||||
EX_HTML_WITH_NPC_VIEWPORT(0xFE, 0x1D8),
|
||||
EX_PLEDGE_CONTRIBUTION_RANK(0xFE, 0x1D9),
|
||||
EX_PLEDGE_CONTRIBUTION_INFO(0xFE, 0x1DA),
|
||||
EX_PLEDGE_CONTRIBUTION_REWARD(0xFE, 0x1DB),
|
||||
EX_PLEDGE_RAID_INFO(0xFE, 0x1DC),
|
||||
EX_PLEDGE_RAID_RANK(0xFE, 0x1DD),
|
||||
EX_PLEDGE_LEVEL_UP(0xFE, 0x1DE),
|
||||
EX_PLEDGE_SHOW_INFO_UPDATE(0xFE, 0x1DF),
|
||||
EX_PLEDGE_MISSION_INFO(0xFE, 0x1E0),
|
||||
EX_PLEDGE_MISSION_REWARD_COUNT(0xFE, 0x1E1),
|
||||
EX_PLEDGE_MASTERY_INFO(0xFE, 0x1E2),
|
||||
EX_PLEDGE_MASTERY_SET(0xFE, 0x1E3),
|
||||
EX_PLEDGE_MASTERY_RESET(0xFE, 0x1E4),
|
||||
EX_TUTORIAL_SHOW_ID(0xFE, 0x1E5),
|
||||
EX_PLEDGE_SKILL_INFO(0xFE, 0x1E6),
|
||||
EX_PLEDGE_SKILL_ACTIVATE(0xFE, 0x1E7),
|
||||
EX_PLEDGE_ITEM_LIST(0xFE, 0x1E8),
|
||||
EX_PLEDGE_ITEM_ACTIVATE(0xFE, 0x1E9),
|
||||
EX_PLEDGE_ANNOUNCE(0xFE, 0x1EA),
|
||||
EX_PLEDGE_ANNOUNCE_SET(0xFE, 0x1EB),
|
||||
EX_SET_PLEDGE_EMBLEM(0xFE, 0x1EC),
|
||||
EX_SHOW_CREATE_PLEDGE(0xFE, 0x1ED),
|
||||
EX_PLEDGE_ITEM_INFO(0xFE, 0x1EE),
|
||||
EX_PLEDGE_ITEM_BUY(0xFE, 0x1EF),
|
||||
EX_ELEMENTAL_SPIRIT_INFO(0xFE, 0x1F0),
|
||||
EX_ELEMENTAL_SPIRIT_EXTRACT_INFO(0xFE, 0x1F1),
|
||||
EX_ELEMENTAL_SPIRIT_EVOLUTION_INFO(0xFE, 0x1F2),
|
||||
EX_ELEMENTAL_SPIRIT_EVOLUTION(0xFE, 0x1F3),
|
||||
EX_ELEMENTAL_SPIRIT_SET_TALENT(0xFE, 0x1F4),
|
||||
EX_ELEMENTAL_SPIRIT_ABSORB_INFO(0xFE, 0x1F5),
|
||||
EX_ELEMENTAL_SPIRIT_ABSORB(0xFE, 0x1F6),
|
||||
EX_CHOOSE_LOCKED_ITEM(0xFE, 0x1F7),
|
||||
EX_LOCKED_RESULT(0xFE, 0x1F8),
|
||||
EX_DRESS_ROOM_UI_OPEN(0xFE, 0x1F9),
|
||||
EX_DRESS_HANGER_LIST(0xFE, 0x1FA),
|
||||
EX_USER_BAN_INFO(0xFE, 0x1FB);
|
||||
|
||||
private final int _id1;
|
||||
private final int _id2;
|
||||
|
@ -21,6 +21,7 @@ import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.TradeItem;
|
||||
import com.l2jmobius.gameserver.model.TradeList;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.TradeOtherAdd;
|
||||
@ -94,12 +95,16 @@ public final class AddTradeItem implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
final TradeItem item = trade.addItem(_objectId, _count);
|
||||
if (item != null)
|
||||
final L2ItemInstance item1 = player.getInventory().getItemByObjectId(_objectId);
|
||||
final TradeItem item2 = trade.addItem(_objectId, _count);
|
||||
if (item2 != null)
|
||||
{
|
||||
player.sendPacket(new TradeOwnAdd(item));
|
||||
player.sendPacket(new TradeUpdate(player, item));
|
||||
partner.sendPacket(new TradeOtherAdd(item));
|
||||
player.sendPacket(new TradeOwnAdd(1, item2));
|
||||
player.sendPacket(new TradeOwnAdd(2, item2));
|
||||
player.sendPacket(new TradeUpdate(1, null, null, 0));
|
||||
player.sendPacket(new TradeUpdate(2, player, item2, item1.getCount() - item2.getCount()));
|
||||
partner.sendPacket(new TradeOtherAdd(1, item2));
|
||||
partner.sendPacket(new TradeOtherAdd(2, item2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -100,8 +100,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SkillList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.attendance.ExVipAttendanceItemList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.dailymission.ExConnectedTimeAndGettableReward;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.dailymission.ExOneDayReceiveRewardList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.friend.L2FriendList;
|
||||
import com.l2jmobius.gameserver.util.BuilderUtil;
|
||||
|
||||
@ -326,10 +324,12 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
client.sendPacket(new ExGetBookMarkInfoPacket(activeChar));
|
||||
|
||||
// Send Item List
|
||||
client.sendPacket(new ItemList(activeChar, false));
|
||||
client.sendPacket(new ItemList(1, activeChar));
|
||||
client.sendPacket(new ItemList(2, activeChar));
|
||||
|
||||
// Send Quest Item List
|
||||
client.sendPacket(new ExQuestItemList(activeChar));
|
||||
client.sendPacket(new ExQuestItemList(1, activeChar));
|
||||
client.sendPacket(new ExQuestItemList(2, activeChar));
|
||||
|
||||
// Send Adena and Inventory Count
|
||||
client.sendPacket(new ExAdenaInvenCount(activeChar));
|
||||
@ -634,8 +634,9 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
{
|
||||
activeChar.sendPacket(new ExWorldChatCnt(activeChar));
|
||||
}
|
||||
activeChar.sendPacket(new ExConnectedTimeAndGettableReward(activeChar));
|
||||
activeChar.sendPacket(new ExOneDayReceiveRewardList(activeChar, true));
|
||||
// Removed used by new Pledge system.
|
||||
// activeChar.sendPacket(new ExConnectedTimeAndGettableReward(activeChar));
|
||||
// activeChar.sendPacket(new ExOneDayReceiveRewardList(activeChar, true));
|
||||
|
||||
// Handle soulshots, disable all on EnterWorld
|
||||
activeChar.sendPacket(new ExAutoSoulShot(0, true, 0));
|
||||
|
@ -706,7 +706,7 @@ public final class RequestAcquireSkill implements IClientIncomingPacket
|
||||
|
||||
player.addSkill(skill, store);
|
||||
|
||||
player.sendItemList(false);
|
||||
player.sendItemList();
|
||||
player.sendPacket(new ShortCutInit(player));
|
||||
player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
|
||||
player.sendSkillList(skill.getId());
|
||||
|
@ -37,6 +37,6 @@ public class RequestBuySellUIClose implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
activeChar.sendItemList(true);
|
||||
activeChar.sendItemList();
|
||||
}
|
||||
}
|
@ -203,7 +203,7 @@ public final class RequestCancelPostAttachment implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendItemList(false);
|
||||
activeChar.sendItemList();
|
||||
}
|
||||
|
||||
final L2PcInstance receiver = L2World.getInstance().getPlayer(msg.getReceiverId());
|
||||
|
@ -228,7 +228,7 @@ public final class RequestDestroyItem implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendItemList(true);
|
||||
activeChar.sendItemList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ public final class RequestDropItem implements IClientIncomingPacket
|
||||
{
|
||||
activeChar.getInventory().unEquipItemInSlot(item.getLocationSlot());
|
||||
activeChar.broadcastUserInfo();
|
||||
activeChar.sendItemList(true);
|
||||
activeChar.sendItemList();
|
||||
}
|
||||
|
||||
final L2ItemInstance dropedItem = activeChar.dropItem("Drop", _objectId, _count, _x, _y, _z, null, false, false);
|
||||
|
@ -490,7 +490,7 @@ public final class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendItemList(true);
|
||||
activeChar.sendItemList();
|
||||
}
|
||||
|
||||
request.setProcessing(false);
|
||||
|
@ -44,7 +44,6 @@ public final class RequestGMCommand implements IClientIncomingPacket
|
||||
{
|
||||
_targetName = packet.readS();
|
||||
_command = packet.readD();
|
||||
// _unknown = packet.readD();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -95,7 +94,8 @@ public final class RequestGMCommand implements IClientIncomingPacket
|
||||
}
|
||||
case 5: // player inventory
|
||||
{
|
||||
client.sendPacket(new GMViewItemList(player));
|
||||
client.sendPacket(new GMViewItemList(1, player));
|
||||
client.sendPacket(new GMViewItemList(2, player));
|
||||
client.sendPacket(new GMHennaInfo(player));
|
||||
break;
|
||||
}
|
||||
@ -113,7 +113,6 @@ public final class RequestGMCommand implements IClientIncomingPacket
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public final class RequestItemList implements IClientIncomingPacket
|
||||
{
|
||||
if ((client != null) && (client.getActiveChar() != null) && !client.getActiveChar().isInventoryDisabled())
|
||||
{
|
||||
client.getActiveChar().sendItemList(true);
|
||||
client.getActiveChar().sendItemList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ public class RequestPackageSend implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendItemList(false);
|
||||
player.sendItemList();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,7 @@ import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PackageSendableList;
|
||||
|
||||
/**
|
||||
* @author -Wooden-
|
||||
* @author UnAfraid Thanks mrTJO
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestPackageSendableItemList implements IClientIncomingPacket
|
||||
{
|
||||
@ -44,6 +43,7 @@ public class RequestPackageSendableItemList implements IClientIncomingPacket
|
||||
{
|
||||
return;
|
||||
}
|
||||
client.sendPacket(new PackageSendableList(activeChar, _objectId));
|
||||
client.sendPacket(new PackageSendableList(1, activeChar, _objectId));
|
||||
client.sendPacket(new PackageSendableList(2, activeChar, _objectId));
|
||||
}
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ public final class RequestPostAttachment implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendItemList(false);
|
||||
activeChar.sendItemList();
|
||||
}
|
||||
|
||||
msg.removeAttachments();
|
||||
|
@ -55,6 +55,7 @@ public final class RequestPostItemList implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExReplyPostItemList(activeChar));
|
||||
client.sendPacket(new ExReplyPostItemList(1, activeChar));
|
||||
client.sendPacket(new ExReplyPostItemList(2, activeChar));
|
||||
}
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ public final class RequestSendPost implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendItemList(false);
|
||||
player.sendItemList();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jmobius.commons.network.PacketReader;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestTargetActionMenu implements IClientIncomingPacket
|
||||
{
|
||||
private int _objectId;
|
||||
private int _type;
|
||||
|
||||
@Override
|
||||
public boolean read(L2GameClient client, PacketReader packet)
|
||||
{
|
||||
_objectId = packet.readD();
|
||||
_type = packet.readH(); // action?
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(L2GameClient client)
|
||||
{
|
||||
final L2PcInstance player = client.getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_type == 1)
|
||||
{
|
||||
for (L2Object object : L2World.getInstance().getVisibleObjects(player, L2Object.class))
|
||||
{
|
||||
if (_objectId == object.getObjectId())
|
||||
{
|
||||
player.setTarget(object);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -211,7 +211,7 @@ public final class SendWareHouseDepositList implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendItemList(false);
|
||||
player.sendItemList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ public final class SendWareHouseWithDrawList implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendItemList(false);
|
||||
player.sendItemList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,14 +144,16 @@ public final class SetPrivateStoreListBuy implements IClientIncomingPacket
|
||||
if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(player) || player.isInDuel())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.WHILE_YOU_ARE_ENGAGED_IN_COMBAT_YOU_CANNOT_OPERATE_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP);
|
||||
player.sendPacket(new PrivateStoreManageListBuy(player));
|
||||
player.sendPacket(new PrivateStoreManageListBuy(1, player));
|
||||
player.sendPacket(new PrivateStoreManageListBuy(2, player));
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isInsideZone(ZoneId.NO_STORE))
|
||||
{
|
||||
player.sendPacket(new PrivateStoreManageListBuy(player));
|
||||
player.sendPacket(new PrivateStoreManageListBuy(1, player));
|
||||
player.sendPacket(new PrivateStoreManageListBuy(2, player));
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE);
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
@ -163,7 +165,8 @@ public final class SetPrivateStoreListBuy implements IClientIncomingPacket
|
||||
// Check maximum number of allowed slots for pvt shops
|
||||
if (_items.length > player.getPrivateBuyStoreLimit())
|
||||
{
|
||||
player.sendPacket(new PrivateStoreManageListBuy(player));
|
||||
player.sendPacket(new PrivateStoreManageListBuy(1, player));
|
||||
player.sendPacket(new PrivateStoreManageListBuy(2, player));
|
||||
player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_THE_QUANTITY_THAT_CAN_BE_INPUTTED);
|
||||
return;
|
||||
}
|
||||
@ -190,7 +193,8 @@ public final class SetPrivateStoreListBuy implements IClientIncomingPacket
|
||||
// Check for available funds
|
||||
if (totalCost > player.getAdena())
|
||||
{
|
||||
player.sendPacket(new PrivateStoreManageListBuy(player));
|
||||
player.sendPacket(new PrivateStoreManageListBuy(1, player));
|
||||
player.sendPacket(new PrivateStoreManageListBuy(2, player));
|
||||
player.sendPacket(SystemMessageId.THE_PURCHASE_PRICE_IS_HIGHER_THAN_THE_AMOUNT_OF_MONEY_THAT_YOU_HAVE_AND_SO_YOU_CANNOT_OPEN_A_PERSONAL_STORE);
|
||||
return;
|
||||
}
|
||||
|
@ -97,14 +97,16 @@ public class SetPrivateStoreListSell implements IClientIncomingPacket
|
||||
if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(player) || player.isInDuel())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.WHILE_YOU_ARE_ENGAGED_IN_COMBAT_YOU_CANNOT_OPERATE_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP);
|
||||
player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
|
||||
player.sendPacket(new PrivateStoreManageListSell(1, player, _packageSale));
|
||||
player.sendPacket(new PrivateStoreManageListSell(2, player, _packageSale));
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isInsideZone(ZoneId.NO_STORE))
|
||||
{
|
||||
player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
|
||||
player.sendPacket(new PrivateStoreManageListSell(1, player, _packageSale));
|
||||
player.sendPacket(new PrivateStoreManageListSell(2, player, _packageSale));
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE);
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
@ -113,7 +115,8 @@ public class SetPrivateStoreListSell implements IClientIncomingPacket
|
||||
// Check maximum number of allowed slots for pvt shops
|
||||
if (_items.length > player.getPrivateSellStoreLimit())
|
||||
{
|
||||
player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
|
||||
player.sendPacket(new PrivateStoreManageListSell(1, player, _packageSale));
|
||||
player.sendPacket(new PrivateStoreManageListSell(2, player, _packageSale));
|
||||
player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_THE_QUANTITY_THAT_CAN_BE_INPUTTED);
|
||||
return;
|
||||
}
|
||||
|
@ -239,6 +239,15 @@ public final class UseItem implements IClientIncomingPacket
|
||||
}
|
||||
break;
|
||||
}
|
||||
case L2Item.SLOT_AGATHION:
|
||||
{
|
||||
if (!item.isEquipped() && (activeChar.getInventory().getAgathionSlots() == 0))
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (activeChar.isCastingNow())
|
||||
|
@ -50,6 +50,7 @@ public class RequestCommissionRegistrableItemList implements IClientIncomingPack
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExResponseCommissionItemList(player.getInventory().getAvailableItems(false, false, false)));
|
||||
client.sendPacket(new ExResponseCommissionItemList(1, player.getInventory().getAvailableItems(false, false, false)));
|
||||
client.sendPacket(new ExResponseCommissionItemList(2, player.getInventory().getAvailableItems(false, false, false)));
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.DailyMissionDataHolder;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.dailymission.ExConnectedTimeAndGettableReward;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.dailymission.ExOneDayReceiveRewardList;
|
||||
|
||||
/**
|
||||
@ -57,7 +56,7 @@ public class RequestOneDayRewardReceive implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
reward.stream().filter(o -> o.isDisplayable(player)).forEach(r -> r.requestReward(player));
|
||||
player.sendPacket(new ExConnectedTimeAndGettableReward(player));
|
||||
// player.sendPacket(new ExConnectedTimeAndGettableReward(player));
|
||||
player.sendPacket(new ExOneDayReceiveRewardList(player, true));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.network.clientpackets.pledgeV2;
|
||||
|
||||
import com.l2jmobius.commons.network.PacketReader;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanShopData;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanShopProductHolder;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.pledgeV2.ExPledgeItemBuy;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestExPledgeItemBuy implements IClientIncomingPacket
|
||||
{
|
||||
private int _itemId;
|
||||
private int _count;
|
||||
|
||||
@Override
|
||||
public boolean read(L2GameClient client, PacketReader packet)
|
||||
{
|
||||
_itemId = packet.readD();
|
||||
_count = packet.readD();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(L2GameClient client)
|
||||
{
|
||||
final L2PcInstance activeChar = client.getActiveChar();
|
||||
if ((activeChar == null) || (activeChar.getClan() == null))
|
||||
{
|
||||
client.sendPacket(new ExPledgeItemBuy(1));
|
||||
return;
|
||||
}
|
||||
|
||||
final ClanShopProductHolder product = ClanShopData.getInstance().getProduct(_itemId);
|
||||
if (product == null)
|
||||
{
|
||||
client.sendPacket(new ExPledgeItemBuy(1));
|
||||
return;
|
||||
}
|
||||
|
||||
if (activeChar.getClan().getLevel() < product.getClanLevel())
|
||||
{
|
||||
client.sendPacket(new ExPledgeItemBuy(2));
|
||||
return;
|
||||
}
|
||||
|
||||
final long slots = product.getTradeItem().getItem().isStackable() ? 1 : product.getTradeItem().getCount() * _count;
|
||||
final long weight = product.getTradeItem().getItem().getWeight() * product.getTradeItem().getCount() * _count;
|
||||
if (!activeChar.getInventory().validateWeight(weight) || !activeChar.getInventory().validateCapacity(slots))
|
||||
{
|
||||
client.sendPacket(new ExPledgeItemBuy(3));
|
||||
return;
|
||||
}
|
||||
|
||||
if ((activeChar.getAdena() < (product.getAdena() * _count)) || (activeChar.getFame() < (product.getFame() * _count)))
|
||||
{
|
||||
client.sendPacket(new ExPledgeItemBuy(3));
|
||||
return;
|
||||
}
|
||||
|
||||
if (product.getAdena() > 0)
|
||||
{
|
||||
activeChar.reduceAdena("ClanShop", product.getAdena() * _count, activeChar, true);
|
||||
}
|
||||
if (product.getFame() > 0)
|
||||
{
|
||||
activeChar.setFame(activeChar.getFame() - (product.getFame() * _count));
|
||||
}
|
||||
|
||||
activeChar.addItem("ClanShop", _itemId, product.getCount() * _count, activeChar, true);
|
||||
client.sendPacket(new ExPledgeItemBuy(0));
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.network.clientpackets.pledgeV2;
|
||||
|
||||
import com.l2jmobius.commons.network.PacketReader;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.pledgeV2.ExPledgeItemList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestExPledgeItemList implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(L2GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(L2GameClient client)
|
||||
{
|
||||
final L2PcInstance activeChar = client.getActiveChar();
|
||||
if ((activeChar == null) || (activeChar.getClan() == null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExPledgeItemList(activeChar));
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.network.clientpackets.pledgeV2;
|
||||
|
||||
import com.l2jmobius.commons.network.PacketReader;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.pledgeV2.ExPledgeMasteryInfo;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestExPledgeMasteryInfo implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(L2GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(L2GameClient client)
|
||||
{
|
||||
final L2PcInstance activeChar = client.getActiveChar();
|
||||
if ((activeChar == null) || (activeChar.getClan() == null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExPledgeMasteryInfo(activeChar));
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.network.clientpackets.pledgeV2;
|
||||
|
||||
import com.l2jmobius.commons.network.PacketReader;
|
||||
import com.l2jmobius.gameserver.model.L2Clan;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestExPledgeMasteryReset implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(L2GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(L2GameClient client)
|
||||
{
|
||||
final L2PcInstance activeChar = client.getActiveChar();
|
||||
if (activeChar == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
final L2Clan clan = activeChar.getClan();
|
||||
if ((clan == null) || (clan.getLeaderId() != activeChar.getId()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -84,7 +84,9 @@ public abstract class AbstractInventoryUpdate extends AbstractItemPacket
|
||||
|
||||
protected final void writeItems(PacketWriter packet)
|
||||
{
|
||||
packet.writeH(_items.size());
|
||||
packet.writeC(0); // 140
|
||||
packet.writeD(0); // 140
|
||||
packet.writeD(_items.size()); // 140
|
||||
for (ItemInfo item : _items.values())
|
||||
{
|
||||
packet.writeH(item.getChange()); // Update type : 01-add, 02-modify, 03-remove
|
||||
|
@ -43,6 +43,11 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
return MASKS;
|
||||
}
|
||||
|
||||
protected void writeItem(PacketWriter packet, TradeItem item, long count)
|
||||
{
|
||||
writeItem(packet, new ItemInfo(item), count);
|
||||
}
|
||||
|
||||
protected void writeItem(PacketWriter packet, TradeItem item)
|
||||
{
|
||||
writeItem(packet, new ItemInfo(item));
|
||||
@ -81,6 +86,8 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
packet.writeD(item.getMana());
|
||||
packet.writeD(item.getTime());
|
||||
packet.writeC(item.isAvailable() ? 1 : 0); // GOD Item enabled = 1 disabled (red) = 0
|
||||
packet.writeC(0x00); // 140 protocol
|
||||
packet.writeC(0x00); // 140 protocol
|
||||
if (containsMask(mask, ItemListType.AUGMENT_BONUS))
|
||||
{
|
||||
writeItemAugment(packet, item);
|
||||
@ -103,6 +110,56 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
}
|
||||
}
|
||||
|
||||
protected void writeItem(PacketWriter packet, ItemInfo item, long count)
|
||||
{
|
||||
final int mask = calculateMask(item);
|
||||
packet.writeC(mask);
|
||||
packet.writeD(item.getObjectId()); // ObjectId
|
||||
packet.writeD(item.getItem().getDisplayId()); // ItemId
|
||||
packet.writeC(item.getItem().isQuestItem() || (item.getEquipped() == 1) ? 0xFF : item.getLocation()); // T1
|
||||
packet.writeQ(count); // Quantity
|
||||
packet.writeC(item.getItem().getType2()); // Item Type 2 : 00-weapon, 01-shield/armor, 02-ring/earring/necklace, 03-questitem, 04-adena, 05-item
|
||||
packet.writeC(item.getCustomType1()); // Filler (always 0)
|
||||
packet.writeH(item.getEquipped()); // Equipped : 00-No, 01-yes
|
||||
packet.writeQ(item.getItem().getBodyPart()); // Slot : 0006-lr.ear, 0008-neck, 0030-lr.finger, 0040-head, 0100-l.hand, 0200-gloves, 0400-chest, 0800-pants, 1000-feet, 4000-r.hand, 8000-r.hand
|
||||
packet.writeC(item.getEnchantLevel()); // Enchant level (pet level shown in control item)
|
||||
packet.writeC(0x01); // TODO : Find me
|
||||
packet.writeD(item.getMana());
|
||||
packet.writeD(item.getTime());
|
||||
packet.writeC(item.isAvailable() ? 1 : 0); // GOD Item enabled = 1 disabled (red) = 0
|
||||
packet.writeC(0x00); // 140 protocol
|
||||
packet.writeC(0x00); // 140 protocol
|
||||
if (containsMask(mask, ItemListType.AUGMENT_BONUS))
|
||||
{
|
||||
writeItemAugment(packet, item);
|
||||
}
|
||||
if (containsMask(mask, ItemListType.ELEMENTAL_ATTRIBUTE))
|
||||
{
|
||||
writeItemElemental(packet, item);
|
||||
}
|
||||
if (containsMask(mask, ItemListType.ENCHANT_EFFECT))
|
||||
{
|
||||
writeItemEnchantEffect(packet, item);
|
||||
}
|
||||
if (containsMask(mask, ItemListType.VISUAL_ID))
|
||||
{
|
||||
packet.writeD(item.getVisualId()); // Item remodel visual ID
|
||||
}
|
||||
if (containsMask(mask, ItemListType.SOUL_CRYSTAL))
|
||||
{
|
||||
packet.writeC(item.getSoulCrystalOptions().size());
|
||||
for (EnsoulOption option : item.getSoulCrystalOptions())
|
||||
{
|
||||
packet.writeD(option.getId());
|
||||
}
|
||||
packet.writeC(item.getSoulCrystalSpecialOptions().size());
|
||||
for (EnsoulOption option : item.getSoulCrystalSpecialOptions())
|
||||
{
|
||||
packet.writeD(option.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected static int calculateMask(ItemInfo item)
|
||||
{
|
||||
int mask = 0;
|
||||
|
@ -55,7 +55,7 @@ public class AcquireSkillList implements IClientOutgoingPacket
|
||||
packet.writeD(skill.getSkillLevel());
|
||||
packet.writeQ(skill.getLevelUpSp());
|
||||
packet.writeC(skill.getGetLevel());
|
||||
packet.writeC(skill.getDualClassLevel());
|
||||
packet.writeH(skill.getDualClassLevel()); // Salvation: Changed from byte to short.
|
||||
packet.writeC(skill.getRequiredItems().size());
|
||||
for (ItemHolder item : skill.getRequiredItems())
|
||||
{
|
||||
|
@ -49,6 +49,43 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
private int _activeId;
|
||||
private final CharSelectInfoPackage[] _characterPackages;
|
||||
|
||||
private static final int[] PAPERDOLL_ORDER = new int[]
|
||||
{
|
||||
Inventory.PAPERDOLL_UNDER,
|
||||
Inventory.PAPERDOLL_REAR,
|
||||
Inventory.PAPERDOLL_LEAR,
|
||||
Inventory.PAPERDOLL_NECK,
|
||||
Inventory.PAPERDOLL_RFINGER,
|
||||
Inventory.PAPERDOLL_LFINGER,
|
||||
Inventory.PAPERDOLL_HEAD,
|
||||
Inventory.PAPERDOLL_RHAND,
|
||||
Inventory.PAPERDOLL_LHAND,
|
||||
Inventory.PAPERDOLL_GLOVES,
|
||||
Inventory.PAPERDOLL_CHEST,
|
||||
Inventory.PAPERDOLL_LEGS,
|
||||
Inventory.PAPERDOLL_FEET,
|
||||
Inventory.PAPERDOLL_CLOAK,
|
||||
Inventory.PAPERDOLL_RHAND,
|
||||
Inventory.PAPERDOLL_HAIR,
|
||||
Inventory.PAPERDOLL_HAIR2,
|
||||
Inventory.PAPERDOLL_RBRACELET,
|
||||
Inventory.PAPERDOLL_LBRACELET,
|
||||
Inventory.PAPERDOLL_DECO1,
|
||||
Inventory.PAPERDOLL_DECO2,
|
||||
Inventory.PAPERDOLL_DECO3,
|
||||
Inventory.PAPERDOLL_DECO4,
|
||||
Inventory.PAPERDOLL_DECO5,
|
||||
Inventory.PAPERDOLL_DECO6,
|
||||
Inventory.PAPERDOLL_BELT,
|
||||
Inventory.PAPERDOLL_BROOCH,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL1,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL2,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL3,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL4,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL5,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL6
|
||||
};
|
||||
|
||||
private static final int[] PAPERDOLL_ORDER_VISUAL_ID = new int[]
|
||||
{
|
||||
Inventory.PAPERDOLL_RHAND,
|
||||
@ -100,7 +137,7 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
packet.writeC(size == Config.MAX_CHARACTERS_NUMBER_PER_ACCOUNT ? 0x01 : 0x00); // if 1 can't create new char
|
||||
packet.writeC(0x01); // 0=can't play, 1=can play free until level 85, 2=100% free play
|
||||
packet.writeD(0x02); // if 1, Korean client
|
||||
packet.writeC(0x00); // Balthus Knights, if 1 suggests premium account
|
||||
packet.writeH(0x00); // Balthus Knights, if 1 suggests premium account
|
||||
|
||||
long lastAccess = 0;
|
||||
if (_activeId == -1)
|
||||
@ -172,6 +209,12 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
packet.writeD(charInfoPackage.getPaperdollItemId(slot));
|
||||
}
|
||||
|
||||
packet.writeD(0x00); // Salvation
|
||||
packet.writeD(0x00); // Salvation
|
||||
packet.writeD(0x00); // Salvation
|
||||
packet.writeD(0x00); // Salvation
|
||||
packet.writeD(0x00); // Salvation
|
||||
|
||||
for (int slot : getPaperdollOrderVisualId())
|
||||
{
|
||||
packet.writeD(charInfoPackage.getPaperdollItemVisualId(slot));
|
||||
@ -407,6 +450,12 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
return charInfopackage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getPaperdollOrder()
|
||||
{
|
||||
return PAPERDOLL_ORDER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getPaperdollOrderVisualId()
|
||||
{
|
||||
|
@ -28,11 +28,13 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
*/
|
||||
public class ExQuestItemList extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final L2PcInstance _activeChar;
|
||||
private final Collection<L2ItemInstance> _items;
|
||||
|
||||
public ExQuestItemList(L2PcInstance activeChar)
|
||||
public ExQuestItemList(int sendType, L2PcInstance activeChar)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_activeChar = activeChar;
|
||||
_items = activeChar.getInventory().getItems(L2ItemInstance::isQuestItem);
|
||||
}
|
||||
@ -41,8 +43,16 @@ public class ExQuestItemList extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_QUEST_ITEM_LIST.writeId(packet);
|
||||
|
||||
packet.writeH(_items.size());
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
packet.writeD(_items.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeH(0);
|
||||
}
|
||||
packet.writeD(_items.size());
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
|
@ -28,11 +28,13 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
*/
|
||||
public class ExReplyPostItemList extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final L2PcInstance _activeChar;
|
||||
private final Collection<L2ItemInstance> _itemList;
|
||||
|
||||
public ExReplyPostItemList(L2PcInstance activeChar)
|
||||
public ExReplyPostItemList(int sendType, L2PcInstance activeChar)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_activeChar = activeChar;
|
||||
_itemList = _activeChar.getInventory().getAvailableItems(true, false, false);
|
||||
}
|
||||
@ -41,11 +43,15 @@ public class ExReplyPostItemList extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_REPLY_POST_ITEM_LIST.writeId(packet);
|
||||
|
||||
packet.writeC(_sendType);
|
||||
packet.writeD(_itemList.size());
|
||||
for (L2ItemInstance item : _itemList)
|
||||
if (_sendType == 2)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeD(_itemList.size());
|
||||
for (L2ItemInstance item : _itemList)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -27,12 +27,14 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class GMViewItemList extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final List<L2ItemInstance> _items = new ArrayList<>();
|
||||
private final int _limit;
|
||||
private final String _playerName;
|
||||
|
||||
public GMViewItemList(L2PcInstance cha)
|
||||
public GMViewItemList(int sendType, L2PcInstance cha)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_playerName = cha.getName();
|
||||
_limit = cha.getInventoryLimit();
|
||||
for (L2ItemInstance item : cha.getInventory().getItems())
|
||||
@ -41,8 +43,9 @@ public class GMViewItemList extends AbstractItemPacket
|
||||
}
|
||||
}
|
||||
|
||||
public GMViewItemList(L2PetInstance cha)
|
||||
public GMViewItemList(int sendType, L2PetInstance cha)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_playerName = cha.getName();
|
||||
_limit = cha.getInventoryLimit();
|
||||
for (L2ItemInstance item : cha.getInventory().getItems())
|
||||
@ -55,11 +58,17 @@ public class GMViewItemList extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.GM_VIEW_ITEM_LIST.writeId(packet);
|
||||
|
||||
packet.writeS(_playerName);
|
||||
packet.writeD(_limit); // inventory limit
|
||||
packet.writeH(0x01); // show window ??
|
||||
packet.writeH(_items.size());
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
packet.writeD(_items.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeS(_playerName);
|
||||
packet.writeD(_limit); // inventory limit
|
||||
}
|
||||
packet.writeD(_items.size());
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
|
@ -52,6 +52,11 @@ public interface IClientOutgoingPacket extends IOutgoingPacket
|
||||
Inventory.PAPERDOLL_HAIR2,
|
||||
Inventory.PAPERDOLL_RBRACELET,
|
||||
Inventory.PAPERDOLL_LBRACELET,
|
||||
Inventory.PAPERDOLL_AGATHION1,
|
||||
Inventory.PAPERDOLL_AGATHION2,
|
||||
Inventory.PAPERDOLL_AGATHION3,
|
||||
Inventory.PAPERDOLL_AGATHION4,
|
||||
Inventory.PAPERDOLL_AGATHION5,
|
||||
Inventory.PAPERDOLL_DECO1,
|
||||
Inventory.PAPERDOLL_DECO2,
|
||||
Inventory.PAPERDOLL_DECO3,
|
||||
@ -66,7 +71,6 @@ public interface IClientOutgoingPacket extends IOutgoingPacket
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL4,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL5,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL6
|
||||
|
||||
};
|
||||
|
||||
int[] PAPERDOLL_ORDER_AUGMENT = new int[]
|
||||
|
@ -26,14 +26,14 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public final class ItemList extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final L2PcInstance _activeChar;
|
||||
private final List<L2ItemInstance> _items;
|
||||
private final boolean _showWindow;
|
||||
|
||||
public ItemList(L2PcInstance activeChar, boolean showWindow)
|
||||
public ItemList(int sendType, L2PcInstance activeChar)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_activeChar = activeChar;
|
||||
_showWindow = showWindow;
|
||||
_items = activeChar.getInventory().getItems(item -> !item.isQuestItem()).stream().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@ -41,12 +41,21 @@ public final class ItemList extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.ITEM_LIST.writeId(packet);
|
||||
|
||||
packet.writeH(_showWindow ? 0x01 : 0x00);
|
||||
packet.writeH(_items.size());
|
||||
for (L2ItemInstance item : _items)
|
||||
if (_sendType == 2)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeC(_sendType);
|
||||
packet.writeD(_items.size());
|
||||
packet.writeD(_items.size());
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeC(0x01); // _showWindow ? 0x01 : 0x00
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(_items.size());
|
||||
}
|
||||
writeInventoryBlock(packet, _activeChar.getInventory());
|
||||
return true;
|
||||
|
@ -24,17 +24,18 @@ import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
/**
|
||||
* @author -Wooden-
|
||||
* @author UnAfraid, mrTJO
|
||||
* @author Mobius
|
||||
*/
|
||||
public class PackageSendableList extends AbstractItemPacket
|
||||
{
|
||||
private final Collection<L2ItemInstance> _items;
|
||||
private final int _objectId;
|
||||
private final long _adena;
|
||||
private final int _sendType;
|
||||
|
||||
public PackageSendableList(L2PcInstance player, int objectId)
|
||||
public PackageSendableList(int sendType, L2PcInstance player, int objectId)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_items = player.getInventory().getAvailableItems(true, true, true);
|
||||
_objectId = objectId;
|
||||
_adena = player.getAdena();
|
||||
@ -45,13 +46,22 @@ public class PackageSendableList extends AbstractItemPacket
|
||||
{
|
||||
OutgoingPackets.PACKAGE_SENDABLE_LIST.writeId(packet);
|
||||
|
||||
packet.writeD(_objectId);
|
||||
packet.writeQ(_adena);
|
||||
packet.writeD(_items.size());
|
||||
for (L2ItemInstance item : _items)
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeD(item.getObjectId());
|
||||
packet.writeD(_items.size());
|
||||
packet.writeD(_items.size());
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeD(item.getObjectId());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(_objectId);
|
||||
packet.writeQ(_adena);
|
||||
packet.writeD(_items.size());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -26,13 +26,15 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class PrivateStoreManageListBuy extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final int _objId;
|
||||
private final long _playerAdena;
|
||||
private final Collection<L2ItemInstance> _itemList;
|
||||
private final TradeItem[] _buyList;
|
||||
|
||||
public PrivateStoreManageListBuy(L2PcInstance player)
|
||||
public PrivateStoreManageListBuy(int sendType, L2PcInstance player)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_objId = player.getObjectId();
|
||||
_playerAdena = player.getAdena();
|
||||
_itemList = player.getInventory().getUniqueItems(false, true);
|
||||
@ -43,24 +45,35 @@ public class PrivateStoreManageListBuy extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.PRIVATE_STORE_BUY_MANAGE_LIST.writeId(packet);
|
||||
|
||||
packet.writeD(_objId);
|
||||
packet.writeQ(_playerAdena);
|
||||
|
||||
packet.writeD(_itemList.size()); // inventory items for potential buy
|
||||
for (L2ItemInstance item : _itemList)
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeQ(item.getItem().getReferencePrice() * 2);
|
||||
packet.writeD(_itemList.size());
|
||||
packet.writeD(_itemList.size());
|
||||
for (L2ItemInstance item : _itemList)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeQ(item.getItem().getReferencePrice() * 2);
|
||||
}
|
||||
}
|
||||
|
||||
packet.writeD(_buyList.length); // count for all items already added for buy
|
||||
for (TradeItem item : _buyList)
|
||||
else
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeQ(item.getPrice());
|
||||
packet.writeQ(item.getItem().getReferencePrice() * 2);
|
||||
packet.writeQ(item.getCount());
|
||||
packet.writeD(_objId);
|
||||
packet.writeQ(_playerAdena);
|
||||
packet.writeD(0x00);
|
||||
for (L2ItemInstance item : _itemList)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeQ(item.getItem().getReferencePrice() * 2);
|
||||
}
|
||||
packet.writeD(0x00);
|
||||
for (TradeItem item2 : _buyList)
|
||||
{
|
||||
writeItem(packet, item2);
|
||||
packet.writeQ(item2.getPrice());
|
||||
packet.writeQ(item2.getItem().getReferencePrice() * 2);
|
||||
packet.writeQ(item2.getCount());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -25,14 +25,16 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class PrivateStoreManageListSell extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final int _objId;
|
||||
private final long _playerAdena;
|
||||
private final boolean _packageSale;
|
||||
private final Collection<TradeItem> _itemList;
|
||||
private final TradeItem[] _sellList;
|
||||
|
||||
public PrivateStoreManageListSell(L2PcInstance player, boolean isPackageSale)
|
||||
public PrivateStoreManageListSell(int sendType, L2PcInstance player, boolean isPackageSale)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_objId = player.getObjectId();
|
||||
_playerAdena = player.getAdena();
|
||||
player.getSellList().updateItems();
|
||||
@ -45,24 +47,35 @@ public class PrivateStoreManageListSell extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.PRIVATE_STORE_MANAGE_LIST.writeId(packet);
|
||||
|
||||
packet.writeD(_objId);
|
||||
packet.writeD(_packageSale ? 1 : 0); // Package sell
|
||||
packet.writeQ(_playerAdena);
|
||||
|
||||
packet.writeD(_itemList.size()); // for potential sells
|
||||
for (TradeItem item : _itemList)
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeQ(item.getItem().getReferencePrice() * 2);
|
||||
packet.writeD(_itemList.size());
|
||||
packet.writeD(_itemList.size());
|
||||
for (TradeItem item : _itemList)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeQ(item.getItem().getReferencePrice() * 2);
|
||||
}
|
||||
}
|
||||
|
||||
packet.writeD(_sellList.length); // count for any items already added for sell
|
||||
for (TradeItem item : _sellList)
|
||||
else
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeQ(item.getPrice());
|
||||
packet.writeQ(item.getItem().getReferencePrice() * 2);
|
||||
packet.writeD(_objId);
|
||||
packet.writeD(_packageSale ? 1 : 0);
|
||||
packet.writeQ(_playerAdena);
|
||||
packet.writeD(0x00);
|
||||
for (TradeItem item : _itemList)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeQ(item.getItem().getReferencePrice() * 2);
|
||||
}
|
||||
packet.writeD(0x00);
|
||||
for (TradeItem item2 : _sellList)
|
||||
{
|
||||
writeItem(packet, item2);
|
||||
packet.writeQ(item2.getPrice());
|
||||
packet.writeQ(item2.getItem().getReferencePrice() * 2);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -25,10 +25,12 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
*/
|
||||
public final class TradeOtherAdd extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final TradeItem _item;
|
||||
|
||||
public TradeOtherAdd(TradeItem item)
|
||||
public TradeOtherAdd(int sendType, TradeItem item)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_item = item;
|
||||
}
|
||||
|
||||
@ -36,7 +38,12 @@ public final class TradeOtherAdd extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.TRADE_OTHER_ADD.writeId(packet);
|
||||
packet.writeH(1); // item count
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
packet.writeD(0x01);
|
||||
}
|
||||
packet.writeD(0x01);
|
||||
writeItem(packet, _item);
|
||||
return true;
|
||||
}
|
||||
|
@ -25,10 +25,12 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
*/
|
||||
public final class TradeOwnAdd extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final TradeItem _item;
|
||||
|
||||
public TradeOwnAdd(TradeItem item)
|
||||
public TradeOwnAdd(int sendType, TradeItem item)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_item = item;
|
||||
}
|
||||
|
||||
@ -36,7 +38,12 @@ public final class TradeOwnAdd extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.TRADE_OWN_ADD.writeId(packet);
|
||||
packet.writeH(1); // items added count
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
packet.writeD(0x01);
|
||||
}
|
||||
packet.writeD(0x01);
|
||||
writeItem(packet, _item);
|
||||
return true;
|
||||
}
|
||||
|
@ -28,13 +28,15 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public final class TradeStart extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final L2PcInstance _activeChar;
|
||||
private final L2PcInstance _partner;
|
||||
private final Collection<L2ItemInstance> _itemList;
|
||||
private int _mask = 0;
|
||||
|
||||
public TradeStart(L2PcInstance player)
|
||||
public TradeStart(int sendType, L2PcInstance player)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_activeChar = player;
|
||||
_partner = player.getActiveTradeList().getPartner();
|
||||
_itemList = _activeChar.getInventory().getAvailableItems(true, (_activeChar.canOverrideCond(PcCondOverride.ITEM_CONDITIONS) && Config.GM_TRADE_RESTRICTED_ITEMS), false);
|
||||
@ -75,16 +77,24 @@ public final class TradeStart extends AbstractItemPacket
|
||||
}
|
||||
|
||||
OutgoingPackets.TRADE_START.writeId(packet);
|
||||
packet.writeD(_partner.getObjectId());
|
||||
packet.writeC(_mask); // some kind of mask
|
||||
if ((_mask & 0x10) == 0)
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
packet.writeC(_partner.getLevel());
|
||||
packet.writeD(_itemList.size());
|
||||
packet.writeD(_itemList.size());
|
||||
for (L2ItemInstance item : _itemList)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
}
|
||||
}
|
||||
packet.writeH(_itemList.size());
|
||||
for (L2ItemInstance item : _itemList)
|
||||
else
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeD(_partner.getObjectId());
|
||||
packet.writeC(_mask); // some kind of mask
|
||||
if ((_mask & 0x10) == 0)
|
||||
{
|
||||
packet.writeC(_partner.getLevel());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -26,23 +26,31 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
*/
|
||||
public class TradeUpdate extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final TradeItem _item;
|
||||
private final long _newCount;
|
||||
private final long _count;
|
||||
|
||||
public TradeUpdate(L2PcInstance player, TradeItem item)
|
||||
public TradeUpdate(int sendType, L2PcInstance player, TradeItem item, long count)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_count = count;
|
||||
_item = item;
|
||||
_newCount = player.getInventory().getItemByObjectId(item.getObjectId()).getCount() - item.getCount();
|
||||
_newCount = player == null ? 0 : player.getInventory().getItemByObjectId(item.getObjectId()).getCount() - item.getCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.TRADE_UPDATE.writeId(packet);
|
||||
|
||||
packet.writeH(1);
|
||||
packet.writeH((_newCount > 0) && _item.getItem().isStackable() ? 3 : 2);
|
||||
writeItem(packet, _item);
|
||||
packet.writeC(_sendType);
|
||||
packet.writeD(0x01);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
packet.writeD(0x01);
|
||||
packet.writeH((_newCount > 0) && _item.getItem().isStackable() ? 3 : 2);
|
||||
writeItem(packet, _item, _count);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
|
||||
packet.writeD(_activeChar.getObjectId());
|
||||
packet.writeD(_initSize);
|
||||
packet.writeH(23);
|
||||
packet.writeH(24);
|
||||
packet.writeB(_masks);
|
||||
|
||||
if (containsMask(UserInfoType.RELATION))
|
||||
@ -324,14 +324,25 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
|
||||
if (containsMask(UserInfoType.SLOTS))
|
||||
{
|
||||
packet.writeH(9);
|
||||
packet.writeC(_activeChar.getInventory().getTalismanSlots()); // Confirmed
|
||||
packet.writeC(_activeChar.getInventory().getBroochJewelSlots()); // Confirmed
|
||||
packet.writeC(_activeChar.getTeam().getId()); // Confirmed
|
||||
packet.writeC(0x00); // (1 = Red, 2 = White, 3 = White Pink) dotted ring on the floor
|
||||
packet.writeH(11); // 140
|
||||
packet.writeC(_activeChar.getInventory().getTalismanSlots());
|
||||
packet.writeC(_activeChar.getInventory().getBroochJewelSlots());
|
||||
packet.writeC(_activeChar.getTeam().getId());
|
||||
packet.writeC(0x00);
|
||||
packet.writeC(0x00);
|
||||
packet.writeC(0x00);
|
||||
packet.writeC(0x00);
|
||||
|
||||
if (_activeChar.getInventory().getAgathionSlots() > 0)
|
||||
{
|
||||
packet.writeC(0x01);
|
||||
packet.writeC(_activeChar.getInventory().getAgathionSlots() - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeC(0x00);
|
||||
packet.writeC(0x00);
|
||||
}
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.MOVEMENTS))
|
||||
|
@ -30,8 +30,8 @@ public final class WareHouseDepositList extends AbstractItemPacket
|
||||
public static final int CLAN = 2;
|
||||
public static final int CASTLE = 3;
|
||||
public static final int FREIGHT = 1;
|
||||
private final int _sendType;
|
||||
private final long _playerAdena;
|
||||
private final int _warehouseSize;
|
||||
private final List<L2ItemInstance> _items = new ArrayList<>();
|
||||
private final List<Integer> _itemsStackable = new ArrayList<>();
|
||||
/**
|
||||
@ -44,11 +44,11 @@ public final class WareHouseDepositList extends AbstractItemPacket
|
||||
*/
|
||||
private final int _whType;
|
||||
|
||||
public WareHouseDepositList(L2PcInstance player, int type)
|
||||
public WareHouseDepositList(int sendType, L2PcInstance player, int type)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_whType = type;
|
||||
_playerAdena = player.getAdena();
|
||||
_warehouseSize = player.getActiveWarehouse() != null ? player.getActiveWarehouse().getSize() : 0;
|
||||
|
||||
final boolean isPrivate = _whType == PRIVATE;
|
||||
for (L2ItemInstance temp : player.getInventory().getAvailableItems(true, isPrivate, false))
|
||||
@ -68,23 +68,23 @@ public final class WareHouseDepositList extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.WAREHOUSE_DEPOSIT_LIST.writeId(packet);
|
||||
|
||||
packet.writeH(_whType);
|
||||
packet.writeQ(_playerAdena);
|
||||
packet.writeD(_warehouseSize);
|
||||
packet.writeH(_itemsStackable.size());
|
||||
|
||||
for (int itemId : _itemsStackable)
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
packet.writeD(itemId);
|
||||
packet.writeD(_whType);
|
||||
packet.writeD(_items.size());
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeD(item.getObjectId());
|
||||
}
|
||||
}
|
||||
|
||||
packet.writeH(_items.size());
|
||||
|
||||
for (L2ItemInstance item : _items)
|
||||
else
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeD(item.getObjectId());
|
||||
packet.writeH(_whType);
|
||||
packet.writeQ(_playerAdena);
|
||||
packet.writeD(_itemsStackable.size());
|
||||
packet.writeD(_items.size());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ public final class WareHouseWithdrawalList extends AbstractItemPacket
|
||||
public static final int CLAN = 2;
|
||||
public static final int CASTLE = 3; // not sure
|
||||
public static final int FREIGHT = 1;
|
||||
private final int _sendType;
|
||||
private L2PcInstance _activeChar;
|
||||
private long _playerAdena;
|
||||
private final int _invSize;
|
||||
@ -46,8 +47,9 @@ public final class WareHouseWithdrawalList extends AbstractItemPacket
|
||||
*/
|
||||
private int _whType;
|
||||
|
||||
public WareHouseWithdrawalList(L2PcInstance player, int type)
|
||||
public WareHouseWithdrawalList(int sendType, L2PcInstance player, int type)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_activeChar = player;
|
||||
_whType = type;
|
||||
|
||||
@ -74,22 +76,26 @@ public final class WareHouseWithdrawalList extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.WAREHOUSE_WITHDRAW_LIST.writeId(packet);
|
||||
|
||||
packet.writeH(_whType);
|
||||
packet.writeQ(_playerAdena);
|
||||
packet.writeH(_items.size());
|
||||
packet.writeH(_itemsStackable.size());
|
||||
for (int itemId : _itemsStackable)
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
packet.writeD(itemId);
|
||||
packet.writeH(0x00);
|
||||
packet.writeD(_invSize);
|
||||
packet.writeD(_items.size());
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeD(item.getObjectId());
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
}
|
||||
}
|
||||
packet.writeD(_invSize);
|
||||
for (L2ItemInstance item : _items)
|
||||
else
|
||||
{
|
||||
writeItem(packet, item);
|
||||
packet.writeD(item.getObjectId());
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeH(_whType);
|
||||
packet.writeQ(_playerAdena);
|
||||
packet.writeD(_invSize);
|
||||
packet.writeD(_items.size());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -28,10 +28,12 @@ import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
*/
|
||||
public class ExResponseCommissionItemList extends AbstractItemPacket
|
||||
{
|
||||
private final int _sendType;
|
||||
private final Collection<L2ItemInstance> _items;
|
||||
|
||||
public ExResponseCommissionItemList(Collection<L2ItemInstance> items)
|
||||
public ExResponseCommissionItemList(int sendType, Collection<L2ItemInstance> items)
|
||||
{
|
||||
_sendType = sendType;
|
||||
_items = items;
|
||||
}
|
||||
|
||||
@ -39,11 +41,20 @@ public class ExResponseCommissionItemList extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_RESPONSE_COMMISSION_ITEM_LIST.writeId(packet);
|
||||
|
||||
packet.writeD(_items.size());
|
||||
for (L2ItemInstance itemInstance : _items)
|
||||
packet.writeC(_sendType);
|
||||
if (_sendType == 2)
|
||||
{
|
||||
writeItem(packet, itemInstance);
|
||||
packet.writeD(_items.size());
|
||||
packet.writeD(_items.size());
|
||||
for (L2ItemInstance itemInstance : _items)
|
||||
{
|
||||
writeItem(packet, itemInstance);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
|
||||
|
||||
import com.l2jmobius.commons.network.PacketWriter;
|
||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExPledgeItemBuy implements IClientOutgoingPacket
|
||||
{
|
||||
final int _result;
|
||||
|
||||
public ExPledgeItemBuy(int result)
|
||||
{
|
||||
_result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_PLEDGE_ITEM_BUY.writeId(packet);
|
||||
packet.writeD(_result); // 0 success, 2 not authorized, 3 trade requirements not met
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
|
||||
|
||||
import com.l2jmobius.commons.network.PacketWriter;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanShopData;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanShopProductHolder;
|
||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExPledgeItemList extends AbstractItemPacket
|
||||
{
|
||||
final L2PcInstance _player;
|
||||
|
||||
public ExPledgeItemList(L2PcInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
if (_player.getClan() == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
OutgoingPackets.EX_PLEDGE_ITEM_LIST.writeId(packet);
|
||||
|
||||
packet.writeH(ClanShopData.getInstance().getProducts().size()); // Product count.
|
||||
for (ClanShopProductHolder product : ClanShopData.getInstance().getProducts())
|
||||
{
|
||||
writeItem(packet, product.getTradeItem());
|
||||
packet.writeC(_player.getClan().getLevel() < product.getClanLevel() ? 0 : 2); // 0 locked, 1 need activation, 2 available
|
||||
packet.writeQ(product.getAdena()); // Purchase price: adena
|
||||
packet.writeD(product.getFame()); // Purchase price: fame
|
||||
packet.writeC(product.getClanLevel()); // Required pledge level
|
||||
packet.writeC(0); // Required pledge mastery
|
||||
packet.writeQ(0); // Activation price: adena
|
||||
packet.writeD(0); // Activation price: reputation
|
||||
packet.writeD(0); // Time to deactivation
|
||||
packet.writeD(0); // Time to restock
|
||||
packet.writeH(0); // Current stock
|
||||
packet.writeH(0); // Total stock
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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 com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
|
||||
|
||||
import com.l2jmobius.commons.network.PacketWriter;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExPledgeMasteryInfo extends AbstractItemPacket
|
||||
{
|
||||
final L2PcInstance _player;
|
||||
|
||||
public ExPledgeMasteryInfo(L2PcInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
if (_player.getClan() == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
OutgoingPackets.EX_PLEDGE_MASTERY_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(10); // Consumed development points
|
||||
packet.writeD(10); // Total development points
|
||||
|
||||
packet.writeD(1); // Masteries count
|
||||
|
||||
packet.writeD(10); // Mastery
|
||||
packet.writeD(1); // Purchased
|
||||
packet.writeC(1); // Availability
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -17,7 +17,6 @@
|
||||
package com.l2jmobius.gameserver.network.serverpackets.pledgebonus;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.network.PacketWriter;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanRewardData;
|
||||
@ -27,49 +26,24 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExPledgeBonusList implements IClientOutgoingPacket
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ExPledgeBonusList.class.getName());
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_PLEDGE_BONUS_LIST.writeId(packet);
|
||||
for (ClanRewardType type : ClanRewardType.values())
|
||||
packet.writeC(0x00); // 140
|
||||
ClanRewardData.getInstance().getClanRewardBonuses(ClanRewardType.MEMBERS_ONLINE).stream().sorted(Comparator.comparingInt(ClanRewardBonus::getLevel)).forEach(bonus ->
|
||||
{
|
||||
ClanRewardData.getInstance().getClanRewardBonuses(type).stream().sorted(Comparator.comparingInt(ClanRewardBonus::getLevel)).forEach(bonus ->
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MEMBERS_ONLINE:
|
||||
{
|
||||
if (bonus.getSkillReward() == null)
|
||||
{
|
||||
LOGGER.warning("Missing clan reward skill for reward level: " + bonus.getLevel());
|
||||
packet.writeD(0);
|
||||
return;
|
||||
}
|
||||
|
||||
packet.writeD(bonus.getSkillReward().getSkillId());
|
||||
break;
|
||||
}
|
||||
case HUNTING_MONSTERS:
|
||||
{
|
||||
if (bonus.getItemReward() == null)
|
||||
{
|
||||
LOGGER.warning("Missing clan reward skill for reward level: " + bonus.getLevel());
|
||||
packet.writeD(0);
|
||||
return;
|
||||
}
|
||||
|
||||
packet.writeD(bonus.getItemReward().getId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
packet.writeD(bonus.getSkillReward().getSkillId());
|
||||
});
|
||||
packet.writeC(0x01); // 140
|
||||
ClanRewardData.getInstance().getClanRewardBonuses(ClanRewardType.HUNTING_MONSTERS).stream().sorted(Comparator.comparingInt(ClanRewardBonus::getLevel)).forEach(bonus ->
|
||||
{
|
||||
packet.writeD(bonus.getItemReward().getId());
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -82,6 +82,7 @@ public class ExPledgeBonusOpen implements IClientOutgoingPacket
|
||||
// Members online bonus
|
||||
packet.writeD(highestMembersOnlineBonus.getRequiredAmount());
|
||||
packet.writeD(clan.getMaxOnlineMembers());
|
||||
packet.writeC(0x00); // 140
|
||||
packet.writeD(membersOnlineBonus != null ? highestMembersOnlineBonus.getSkillReward().getSkillId() : 0x00);
|
||||
packet.writeC(membersOnlineBonus != null ? membersOnlineBonus.getLevel() : 0x00);
|
||||
packet.writeC(membersOnlineBonus != null ? 0x01 : 0x00);
|
||||
@ -89,6 +90,7 @@ public class ExPledgeBonusOpen implements IClientOutgoingPacket
|
||||
// Hunting bonus
|
||||
packet.writeD(highestHuntingBonus.getRequiredAmount());
|
||||
packet.writeD(clan.getHuntingPoints());
|
||||
packet.writeC(0x00); // 140
|
||||
packet.writeD(huntingBonus != null ? highestHuntingBonus.getItemReward().getId() : 0x00);
|
||||
packet.writeC(huntingBonus != null ? huntingBonus.getLevel() : 0x00);
|
||||
packet.writeC(huntingBonus != null ? 0x01 : 0x00);
|
||||
|
Reference in New Issue
Block a user