- 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

@@ -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
}
}