L2JMobius

Interlude Show hair2 accessories

Lenox102 · 4 · 3789

Offline Lenox102

  • Heir
  • **
    • Posts: 19
/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java

Quote
find this code

Code: [Select]
   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

Code: [Select]
   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
Quote
find this code

Code: [Select]
      writeInt(_player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));
      writeInt(_player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));

and replace it with this

Code: [Select]
      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
Quote
find this code

Code: [Select]
      writeInt(_player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));     
      writeInt(_player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));

and replace it with this

Code: [Select]
      writeInt(_player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR2));
      writeInt(_player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR2));


Offline proelf

  • Vassal
  • *
    • Posts: 2
Which files should i pull out after build, i already have server running and lot of things has been done. THX


Offline lovepako

  • Heir
  • **
    • Posts: 30
/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


     
Quote
writeInt(_player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR2));
      writeInt(_player.getInventory().getPaperdollItemDisplayId(Inventory.PAPERDOLL_HAIR2));


Offline lovepako

  • Heir
  • **
    • Posts: 30
/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

Code: [Select]
-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%

   
Code: [Select]
+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;
+}