L2JMobius
Public Development => Shares/Contributions => Topic started by: Lenox102 on March 13, 2024, 07:27:35 AM
-
/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
find this code
public static final int PAPERDOLL_FACE = 14;
public static final int PAPERDOLL_HAIR = 15;
public static final int PAPERDOLL_HAIR2 = 16;
and replace it with this
public static final int PAPERDOLL_HAIR = 14;
public static final int PAPERDOLL_HAIR2 = 15;
public static final int PAPERDOLL_HAIRALL = 16;
/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/GMViewCharacterInfo.java
find this code
writeInt(_player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));
writeInt(_player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));
and replace it with this
writeInt(_player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR2));
writeInt(_player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR2));
/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java
find this code
writeInt(_player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));
writeInt(_player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));
and replace it with this
writeInt(_player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR2));
writeInt(_player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR2));
-
Which files should i pull out after build, i already have server running and lot of things has been done. THX
-
/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/GMViewCharacterInfo.java
/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java
grato
UPDATER CODE
and replace it with this
writeInt(_player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR2));
writeInt(_player.getInventory().getPaperdollItemDisplayId(Inventory.PAPERDOLL_HAIR2));
-
/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
To complete the correction, you need to change the inventory code.
because when you put something in hair 2 it removes the item from the hair the correct code would be this in the inventory look for the line and replace the code completely
-case ItemTemplate.SLOT_HAIR2:
-{
-final Item hair2 = getPaperdollItem(PAPERDOLL_HAIR);
-if ((hair2 != null) && (hair2.getTemplate().getBodyPart() == ItemTemplate.SLOT_HAIRALL))
-{
- setPaperdollItem(PAPERDOLL_HAIR2, null);
-}
-else
-{
- setPaperdollItem(PAPERDOLL_HAIR, null);
-}
-setPaperdollItem(PAPERDOLL_HAIR2, item);
-break;
-}
with this code the correction is 100%
+case ItemTemplate.SLOT_HAIR2:
+{
+final Item hair2 = getPaperdollItem(PAPERDOLL_HAIR2);
+if ((hair2 != null) && (hair2.getTemplate().getBodyPart() == ItemTemplate.SLOT_HAIR2))
+{
+ setPaperdollItem(PAPERDOLL_HAIR2, null);
+}
+setPaperdollItem(PAPERDOLL_HAIR2, item);
+break;
+}