- Implemented Appearance Stones with engine.

- Fixed Private Stores, not showing items enchant level, attributes, appearance.
 - Fixed RelationChange packet, with reputation, for green name for normal players on login.
This commit is contained in:
erlandys56
2015-01-26 21:09:25 +00:00
parent 095d3bb620
commit eb8567590a
37 changed files with 1142 additions and 42 deletions

View File

@@ -276,7 +276,6 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>> i
{
return;
}
getConnection().sendPacket(gsp);
gsp.runImpl();
}

View File

@@ -38,6 +38,10 @@ import com.l2jserver.gameserver.network.clientpackets.friend.RequestFriendList;
import com.l2jserver.gameserver.network.clientpackets.friend.RequestSendFriendMsg;
import com.l2jserver.gameserver.network.clientpackets.friend.RequestUpdateBlockMemo;
import com.l2jserver.gameserver.network.clientpackets.friend.RequestUpdateFriendMemo;
import com.l2jserver.gameserver.network.clientpackets.itemappearance.RequestExCancelShape_Shifting_Item;
import com.l2jserver.gameserver.network.clientpackets.itemappearance.RequestExTryToPut_Shape_Shifting_EnchantSupportItem;
import com.l2jserver.gameserver.network.clientpackets.itemappearance.RequestExTryToPut_Shape_Shifting_TargetItem;
import com.l2jserver.gameserver.network.clientpackets.itemappearance.RequestShape_Shifting_Item;
import com.l2jserver.gameserver.network.clientpackets.mentoring.ConfirmMenteeAdd;
import com.l2jserver.gameserver.network.clientpackets.mentoring.RequestMenteeAdd;
import com.l2jserver.gameserver.network.clientpackets.mentoring.RequestMenteeWaitingList;
@@ -1459,16 +1463,16 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
// msg = new ExSysstring(); (chdS)
break;
case 0xC4:
// msg = new RequestExTryToPutShapeShiftingTargetItem();
msg = new RequestExTryToPut_Shape_Shifting_TargetItem();
break;
case 0xC5:
// msg = new RequestExTryToPutShapeShiftingEnchantSupportItem();
msg = new RequestExTryToPut_Shape_Shifting_EnchantSupportItem();
break;
case 0xC6:
// msg = new RequestExCancelShape_Shifting_Item();
msg = new RequestExCancelShape_Shifting_Item();
break;
case 0xC7:
// msg = new RequestShapeShiftingItem();
msg = new RequestShape_Shifting_Item();
break;
case 0xC8:
// msg = new NCGuardSendDataToServer(); // (chdb)

View File

@@ -24,6 +24,7 @@ import com.l2jserver.Config;
import com.l2jserver.gameserver.enums.PrivateStoreType;
import com.l2jserver.gameserver.model.TradeList;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.model.zone.ZoneId;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
@@ -47,6 +48,11 @@ public final class SetPrivateStoreListBuy extends L2GameClientPacket
@Override
protected void readImpl()
{
L2PcInstance player = getClient().getActiveChar();
if (player == null)
{
return;
}
int count = readD();
if ((count < 1) || (count > Config.MAX_ITEM_IN_PACKET) || ((count * BATCH_LENGTH) != _buf.remaining()))
{
@@ -57,9 +63,7 @@ public final class SetPrivateStoreListBuy extends L2GameClientPacket
for (int i = 0; i < count; i++)
{
int itemId = readD();
readH(); // TODO analyse this
readH(); // TODO analyse this
int enchantLevel = readD();
long cnt = readQ();
long price = readQ();
@@ -69,12 +73,37 @@ public final class SetPrivateStoreListBuy extends L2GameClientPacket
_items = null;
return;
}
readD(); // Unk
readD(); // Unk
readD(); // Unk
readD(); // Unk
_items[i] = new Item(itemId, cnt, price);
int attackAttribute = readH(); // Attack Attribute Type
int attackAttributeValue = readH(); // Attack Attribute Value
int defenseAttributes[] = new int[6];
for (int h = 0; h < 6; h++)
{
defenseAttributes[i] = readH(); // Defense attributes
}
int appearanceId = readD(); // Appearance ID
boolean canUse = false;
for (L2ItemInstance item : player.getInventory().getItemsByItemId(itemId))
{
if ((enchantLevel == item.getEnchantLevel()) && (attackAttribute == item.getAttackElementType()) && (attackAttributeValue == item.getAttackElementPower()) && (appearanceId == item.getAppearanceId()) && (item.getElementDefAttr((byte) 0) == defenseAttributes[0]) && (item.getElementDefAttr((byte) 1) == defenseAttributes[1]) && (item.getElementDefAttr((byte) 2) == defenseAttributes[2]) && (item.getElementDefAttr((byte) 3) == defenseAttributes[3]) && (item.getElementDefAttr((byte) 4) == defenseAttributes[4]) && (item.getElementDefAttr((byte) 5) == defenseAttributes[5]))
{
canUse = true;
break;
}
}
if (!canUse)
{
enchantLevel = 0;
attackAttribute = -1;
attackAttributeValue = 0;
defenseAttributes[0] = 0;
defenseAttributes[1] = 0;
defenseAttributes[2] = 0;
defenseAttributes[3] = 0;
defenseAttributes[4] = 0;
defenseAttributes[5] = 0;
appearanceId = 0;
}
_items[i] = new Item(itemId, cnt, price, enchantLevel, attackAttribute, attackAttributeValue, defenseAttributes, appearanceId);
}
}
@@ -170,12 +199,22 @@ public final class SetPrivateStoreListBuy extends L2GameClientPacket
private final int _itemId;
private final long _count;
private final long _price;
private final int _enchantLevel;
private final int _attackAttribute;
private final int _attackAttributeValue;
private final int _defenseAttributes[];
private final int _appearanceId;
public Item(int id, long num, long pri)
public Item(int itemId, long cnt, long price, int enchantLevel, int attackAttribute, int attackAttributeValue, int defenseAttributes[], int appearanceId)
{
_itemId = id;
_count = num;
_price = pri;
_itemId = itemId;
_count = cnt;
_price = price;
_enchantLevel = enchantLevel;
_attackAttribute = attackAttribute;
_attackAttributeValue = attackAttributeValue;
_defenseAttributes = defenseAttributes;
_appearanceId = appearanceId;
}
public boolean addToTradeList(TradeList list)
@@ -185,7 +224,7 @@ public final class SetPrivateStoreListBuy extends L2GameClientPacket
return false;
}
list.addItemByItemId(_itemId, _count, _price);
list.addItemByItemId(_itemId, _count, _price, _enchantLevel, _attackAttribute, _attackAttributeValue, _defenseAttributes, _appearanceId);
return true;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.clientpackets.itemappearance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
public final class RequestExCancelShape_Shifting_Item extends L2GameClientPacket
{
private static final String _C__D0_C6_REQUESTEXCANCELSHAPE_SHIFTING_ITEM = "[C] D0:C6 RequestExCancelShape_Shifting_Item";
@Override
protected void readImpl()
{
}
@Override
protected void runImpl()
{
L2PcInstance player = getClient().getActiveChar();
if (player == null)
{
return;
}
player.setAppearanceItem(null);
player.setTargetAppearanceItem(null);
player.setUsingAppearanceStone(null);
}
@Override
public String getType()
{
return _C__D0_C6_REQUESTEXCANCELSHAPE_SHIFTING_ITEM;
}
}

View File

@@ -0,0 +1,91 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.clientpackets.itemappearance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
import com.l2jserver.gameserver.network.serverpackets.itemappearance.ExPut_Shape_Shifting_Extraction_Item_Result;
import com.l2jserver.gameserver.network.serverpackets.itemappearance.ExPut_Shape_Shifting_Target_Item_Result;
public final class RequestExTryToPut_Shape_Shifting_EnchantSupportItem extends L2GameClientPacket
{
private static final String _C__D0_C5_REQUESTEXTRYTOPUT_SHAPE_SHIFTING_ENCHANTSUPPORTITEM = "[C] D0:C5 RequestExTryToPut_Shape_Shifting_EnchantSupportItem";
private int _itemOID;
@Override
protected void readImpl()
{
readD();
_itemOID = readD();
}
@Override
protected void runImpl()
{
L2PcInstance player = getClient().getActiveChar();
if (player == null)
{
return;
}
L2ItemInstance stone = player.getUsingAppearanceStone();
if ((stone == null) || (stone.getEtcItem().getAppearanceStone() == null))
{
player.sendPacket(new ExPut_Shape_Shifting_Target_Item_Result(0));
return;
}
L2ItemInstance targetItem = player.getInventory().getItemByObjectId(_itemOID);
if (targetItem == null)
{
player.sendPacket(new ExPut_Shape_Shifting_Target_Item_Result(0));
return;
}
if (stone.getEtcItem().getAppearanceStone().getMaxGrade() < targetItem.getItem().getCrystalType().getId())
{
player.sendPacket(new ExPut_Shape_Shifting_Target_Item_Result(0));
return;
}
L2ItemInstance item = player.getAppearanceItem();
if (item == null)
{
player.sendPacket(new ExPut_Shape_Shifting_Target_Item_Result(0));
return;
}
if (!item.getItemType().equals(targetItem.getItemType()))
{
player.sendPacket(new ExPut_Shape_Shifting_Extraction_Item_Result(0));
return;
}
if ((item.isWeapon() && (item.getWeaponItem().getItemType() != targetItem.getWeaponItem().getItemType())) || (item.isArmor() && (item.getArmorItem().getItemType() != targetItem.getArmorItem().getItemType())))
{
player.sendPacket(new ExPut_Shape_Shifting_Extraction_Item_Result(0));
return;
}
player.sendPacket(new ExPut_Shape_Shifting_Target_Item_Result(1));
player.setTargetAppearanceItem(targetItem);
}
@Override
public String getType()
{
return _C__D0_C5_REQUESTEXTRYTOPUT_SHAPE_SHIFTING_ENCHANTSUPPORTITEM;
}
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.clientpackets.itemappearance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.entity.AppearanceStone.AppearanceItemType;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
import com.l2jserver.gameserver.network.serverpackets.itemappearance.ExPut_Shape_Shifting_Extraction_Item_Result;
public final class RequestExTryToPut_Shape_Shifting_TargetItem extends L2GameClientPacket
{
private static final String _C__D0_C4_REQUESTEXTRYTOPUT_SHAPE_SHIFTING_TARGETITEM = "[C] D0:C4 RequestExTryToPut_Shape_Shifting_TargetItem";
private int _itemId;
@Override
protected void readImpl()
{
_itemId = readD();
}
@Override
protected void runImpl()
{
L2PcInstance player = getClient().getActiveChar();
if (player == null)
{
return;
}
L2ItemInstance item = player.getInventory().getItemByObjectId(_itemId);
if (item == null)
{
return;
}
L2ItemInstance stone = player.getUsingAppearanceStone();
if ((stone == null) || (stone.getEtcItem().getAppearanceStone() == null))
{
return;
}
if (stone.getEtcItem().getAppearanceStone().getMaxGrade() < item.getItem().getCrystalType().getId())
{
player.sendPacket(new ExPut_Shape_Shifting_Extraction_Item_Result(0));
return;
}
boolean isSameType = ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.Armor) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.Weapon) && item.isWeapon()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.Accessory) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.All));
if (!isSameType)
{
player.sendPacket(new ExPut_Shape_Shifting_Extraction_Item_Result(0));
return;
}
player.setAppearanceItem(item);
player.sendPacket(new ExPut_Shape_Shifting_Extraction_Item_Result(1, stone.getEtcItem().getAppearanceStone().getPrice()));
}
@Override
public String getType()
{
return _C__D0_C4_REQUESTEXTRYTOPUT_SHAPE_SHIFTING_TARGETITEM;
}
}

View File

@@ -0,0 +1,109 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.clientpackets.itemappearance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.entity.AppearanceStone;
import com.l2jserver.gameserver.model.entity.AppearanceStone.StoneType;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
import com.l2jserver.gameserver.network.serverpackets.ExUserInfoEquipSlot;
import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate;
import com.l2jserver.gameserver.network.serverpackets.itemappearance.ExShape_Shifting_Result;
public final class RequestShape_Shifting_Item extends L2GameClientPacket
{
private static final String _C__D0_C7_REQUESTSHAPE_SHIFTING_ITEM = "[C] D0:C7 RequestShape_Shifting_Item";
@Override
protected void readImpl()
{
readD();
}
@Override
protected void runImpl()
{
L2PcInstance player = getClient().getActiveChar();
if (player == null)
{
return;
}
L2ItemInstance stone = player.getUsingAppearanceStone();
L2ItemInstance item = player.getAppearanceItem();
L2ItemInstance targetItem = player.getTargetAppearanceItem();
boolean needTargetItem = (stone != null) && (stone.getEtcItem().getAppearanceStone() != null) && (stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.Blessed) || stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.Normal)) ? true : false;
player.setUsingAppearanceStone(null);
player.setAppearanceItem(null);
player.setTargetAppearanceItem(null);
if ((stone == null) || (item == null) || ((needTargetItem && (targetItem == null))))
{
return;
}
AppearanceStone st = stone.getEtcItem().getAppearanceStone();
if (st == null)
{
return;
}
long cost = st.getPrice();
if (cost > player.getAdena())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_MODIFY_AS_YOU_DO_NOT_HAVE_ENOUGH_ADENA);
return;
}
int targetItemId = 0;
int time = -1;
switch (st.getType())
{
case Normal:
targetItemId = targetItem.getId();
player.destroyItem("AppearanceStone", targetItem, null, true);
break;
case Blessed:
targetItemId = targetItem.getId();
break;
case Fixed:
targetItemId = st.getTargetItem();
time = (int) st.getTimeForAppearance();
break;
default:
break;
}
if (cost > 0)
{
player.reduceAdena("AppearanceStone", cost, null, true);
}
player.destroyItem("AppearanceStone", stone.getObjectId(), 1, null, true);
item.setAppearanceId(targetItemId);
item.setAppearanceTime(time);
InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(item);
player.sendPacket(iu);
player.sendPacket(new ExUserInfoEquipSlot(player));
player.broadcastUserInfo();
player.sendPacket(new ExShape_Shifting_Result(1, item.getId(), targetItemId, time));
}
@Override
public String getType()
{
return _C__D0_C7_REQUESTSHAPE_SHIFTING_ITEM;
}
}

View File

@@ -71,6 +71,8 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
protected void writeTradeItem(TradeItem item)
{
// final int mask = calculateMask(item);
// writeC(mask);
writeH(item.getItem().getType1());
writeD(item.getObjectId()); // ObjectId
writeD(item.getItem().getDisplayId()); // ItemId
@@ -115,7 +117,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
}
if (containsMask(mask, ItemListType.VISUAL_ID))
{
writeD(0x00); // Item remodel visual ID
writeD(item.getAppearanceId()); // Item remodel visual ID
}
}
@@ -177,6 +179,11 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
}
}
if (item.getAppearanceId() > 0)
{
mask |= ItemListType.VISUAL_ID.getMask();
}
return mask;
}

View File

@@ -83,7 +83,7 @@ public class ExUserInfoEquipSlot extends AbstractMaskPacket<InventorySlot>
writeD(inventory.getPaperdollObjectId(slot.getSlot()));
writeD(inventory.getPaperdollItemId(slot.getSlot()));
writeD(inventory.getPaperdollAugmentationId(slot.getSlot()));
writeD(0x00); // Item Visual ID
writeD(inventory.getPaperdollVisualId(slot.getSlot()));
}
}
}

View File

@@ -51,7 +51,6 @@ public class PrivateStoreListBuy extends AbstractItemPacket
for (TradeItem item : _items)
{
writeItem(item);
// writeD(item.getObjectId());
writeD(0x00); // unk
writeQ(item.getPrice());
writeQ(item.getItem().getReferencePrice() * 2);

View File

@@ -92,7 +92,7 @@ public final class RelationChanged extends L2GameServerPacket
r._objId = activeChar.getObjectId();
r._relation = relation;
r._autoAttackable = autoattackable ? 1 : 0;
r._karma = 1 - activeChar.getKarma();
r._karma = activeChar.getKarma();
r._pvpFlag = activeChar.getPvpFlag();
_multi.add(r);
}

View File

@@ -300,7 +300,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
{
writeH(22);
writeC(_activeChar.getPvpFlag());
writeD(_activeChar.getKarma()); // Reputation
writeD(_activeChar.getKarma());
writeC(_activeChar.isNoble() ? 0x01 : 0x00);
writeC(_activeChar.isHero() ? 0x01 : 0x00);
writeC(_activeChar.getPledgeClass());

View File

@@ -0,0 +1,49 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.serverpackets.itemappearance;
import com.l2jserver.gameserver.model.entity.AppearanceStone;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author Erlandys
*/
public class ExChoose_Shape_Shifting_Item extends L2GameServerPacket
{
private final int _itemId;
private final int _type;
private final int _itemType;
public ExChoose_Shape_Shifting_Item(AppearanceStone stone)
{
_itemId = stone.getItemId();
_type = stone.getType().ordinal();
_itemType = stone.getItemType().ordinal();
}
@Override
protected void writeImpl()
{
writeC(0xFE);
writeH(0x129);
writeD(_type);
writeD(_itemType);
writeD(_itemId);
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.serverpackets.itemappearance;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author Erlandys
*/
public class ExPut_Shape_Shifting_Extraction_Item_Result extends L2GameServerPacket
{
int _type;
long _price = 0;
public ExPut_Shape_Shifting_Extraction_Item_Result(int type)
{
_type = type;
}
public ExPut_Shape_Shifting_Extraction_Item_Result(int type, long price)
{
_type = type;
_price = price;
}
@Override
protected void writeImpl()
{
writeC(0xFE);
writeH(0x12A);
writeD(_type);
writeQ(_price);
}
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.serverpackets.itemappearance;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author Erlandys
*/
public class ExPut_Shape_Shifting_Target_Item_Result extends L2GameServerPacket
{
private final int _success;
public ExPut_Shape_Shifting_Target_Item_Result(int success)
{
_success = success;
}
@Override
protected void writeImpl()
{
writeC(0xFE);
writeH(0x12B);
writeD(_success);
}
}

View File

@@ -0,0 +1,61 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.serverpackets.itemappearance;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author Erlandys
*/
public class ExShape_Shifting_Result extends L2GameServerPacket
{
private final int _success;
private int _itemId = 0, _targetItemId = 0, _time = -1;
public ExShape_Shifting_Result(int success)
{
_success = success;
}
public ExShape_Shifting_Result(int success, int itemId, int targetItemId)
{
_success = success;
_itemId = itemId;
_targetItemId = targetItemId;
}
public ExShape_Shifting_Result(int success, int itemId, int targetItemId, int time)
{
_success = success;
_itemId = itemId;
_targetItemId = targetItemId;
_time = time;
}
@Override
protected void writeImpl()
{
writeC(0xFE);
writeH(0x12C);
writeD(_success); // Success - 1, Fail - 0
writeD(_itemId); // targetItemId
writeD(_targetItemId); // extractItemId
writeD(_time); // time
}
}