L2JMobius

C6 Party [ BuG Report ] - FIXED

Pirsys · 7 · 200

Offline Pirsys

  • Knight
  • ***
    • Posts: 65
The problem lies at the time of leaving and entering the party, it does not update the members and the number of members of the same nick will accumulate. I am attaching a picture below https://ibb.co/kXWrZRt



Offline Pirsys

  • Knight
  • ***
    • Posts: 65
I have already added the code line but the problem still persists

https://pastebin.com/DKzdguEs


Offline ver

  • Knight
  • ***
    • Posts: 68
Yes...
One of my players reports the same/similar thing






Online Mobius

  • Administrator
  • Distinguished King
  • *****
    • Posts: 11579
Currently I work on a new Interlude project based on L2jMobius Epilogue.
I do not see myself fixing things on old C6 branch any time soon.
Will gladly commit any fixes shared tho.

https://l2jmobius.org/forum/index.php?topic=8454


Offline Pirsys

  • Knight
  • ***
    • Posts: 65
After several days, and attempts to solve the visual bug, I was able to achieve it. I share the part of the code that I modified, I don't know if it's right or wrong, but at least it works.


Code: [Select]
/**
* adds new member to party
* @param player
*/
public synchronized void addPartyMember(Player player)
{
if (_members.contains(player))
{
return;
}

// add player to party
_members.add(player);

// sends new member party window for all members
// we do all actions before adding member to a list, this speeds things up a little
player.sendPacket(new PartySmallWindowAll(player, this));

SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_JOINED_S1_S_PARTY);
msg.addString(getLeader().getName());
player.sendPacket(msg);

msg = new SystemMessage(SystemMessageId.YOU_HAVE_JOINED_S1_S_PARTY);
msg.addString(player.getName());
broadcastToPartyMembers(msg);

for (Player member : _members)
{
if (member != player)
{
member.updateEffectIcons(true); // update party icons only
member.broadcastUserInfo();
member.sendPacket(new PartySmallWindowAdd(player, this));
}
}


Online Mobius

  • Administrator
  • Distinguished King
  • *****
    • Posts: 11579
Can you try this?
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/Party.java
===================================================================
--- java/org/l2jmobius/gameserver/model/Party.java (revision 10203)
+++ java/org/l2jmobius/gameserver/model/Party.java (working copy)
@@ -351,23 +351,20 @@
  return;
  }
 
- // sends new member party window for all members
- player.sendPacket(new PartySmallWindowAll(player, this));
- SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_JOINED_S1_S_PARTY);
- msg.addString(getLeader().getName());
- player.sendPacket(msg);
-
- msg = new SystemMessage(SystemMessageId.S1_HAS_JOINED_THE_PARTY);
+ SystemMessage msg = new SystemMessage(SystemMessageId.S1_HAS_JOINED_THE_PARTY);
  msg.addString(player.getName());
  broadcastToPartyMembers(msg);
  broadcastToPartyMembers(new PartySmallWindowAdd(player, this));
- for (Player member : _members)
- {
- player.sendPacket(new PartySmallWindowAdd(member, this));
- }
 
  // add player to party, adjust party level
  _members.add(player);
+
+ // sends new member party window for all members
+ player.sendPacket(new PartySmallWindowAll(player, this));
+ msg = new SystemMessage(SystemMessageId.YOU_HAVE_JOINED_S1_S_PARTY);
+ msg.addString(getLeader().getName());
+ player.sendPacket(msg);
+
  if (player.getLevel() > _partyLvl)
  {
  _partyLvl = player.getLevel();