SHARE
TWEET

Untitled

a guest Aug 26th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func makeResponseFriendsData(friendsData map[uint64]models.FriendTackingData, dateRemaining int16, eventTrackingData map[uint32]models.FriendsEventTrackingData) []byte {
  2.     packetWriter := packet.NewWriter(uint16(SCResponseFriendEventData))
  3.     packetWriter.WriteInt16(dateRemaining)
  4.     packetWriter.WriteUInt32(models.FriendsEventData.NumMaxFriendsEvent)
  5.     packetWriter.WriteUInt32(uint32(len(models.FriendsReward)))
  6.     for _, eventData := range models.FriendsReward {
  7.         packetWriter.WriteUInt32(eventData.Chip)
  8.         packetWriter.WriteUInt32(eventData.Gold)
  9.         packetWriter.WriteUInt32(eventData.Ticket)
  10.     }
  11.  
  12.     packetWriter.WriteUInt32(uint32(len(eventTrackingData)))
  13.     for _, data := range eventTrackingData {
  14.         packetWriter.WriteUInt32(data.ID)
  15.         packetWriter.WriteUInt32(data.RewardID)
  16.         packetWriter.WriteBoolean(data.IsReceivedReward)
  17.         packetWriter.WriteBoolean(data.IsReceivedRewardTracking)
  18.     }
  19.  
  20.     packetWriter.WriteUInt32(uint32(len(friendsData)))
  21.     for _, data := range friendsData {
  22.         packetWriter.WriteUInt64(data.TackingUID)
  23.         packetWriter.WriteString(data.Name)
  24.         packetWriter.WriteInt32(data.Level)
  25.     }
  26.  
  27.     return packetWriter.GetData()
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top