Merge pull request #7714 from deathbeam/user-sync-cleanup

Make party UserSync event extend PartyMemberMessage
This commit is contained in:
Tomas Slusny
2019-02-06 07:26:31 +00:00
committed by GitHub
3 changed files with 7 additions and 5 deletions

View File

@@ -24,11 +24,9 @@
*/ */
package net.runelite.http.api.ws.messages.party; package net.runelite.http.api.ws.messages.party;
import java.util.UUID;
import lombok.Value; import lombok.Value;
@Value @Value
public class UserSync extends PartyMessage public class UserSync extends PartyMemberMessage
{ {
private final UUID memberId;
} }

View File

@@ -283,7 +283,9 @@ public class PartyPlugin extends Plugin implements KeyListener
if (doSync && !party.getMembers().isEmpty()) if (doSync && !party.getMembers().isEmpty())
{ {
// Request sync // Request sync
ws.send(new UserSync(party.getLocalMember().getMemberId())); final UserSync userSync = new UserSync();
userSync.setMemberId(party.getLocalMember().getMemberId());
ws.send(userSync);
} }
doSync = false; doSync = false;

View File

@@ -123,7 +123,9 @@ public class PartyService
// Send info to other clients that this user successfully finished joining party // Send info to other clients that this user successfully finished joining party
if (localMember != null && message.getMemberId().equals(localMember.getMemberId())) if (localMember != null && message.getMemberId().equals(localMember.getMemberId()))
{ {
wsClient.send(new UserSync(message.getMemberId())); final UserSync userSync = new UserSync();
userSync.setMemberId(message.getMemberId());
wsClient.send(userSync);
} }
} }