Advertisement
Rochet2

BG arena salja

Dec 26th, 2014
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.73 KB | None | 0 0
  1. local MSG_PVP_LOG_DATA  = 0x2E0
  2.  
  3. function Player:PvPLogData()
  4.     local score_records = 2
  5.  
  6.     local data = CreatePacket(MSG_PVP_LOG_DATA, 1 + 1 + 4 + 40*score_records)
  7.     data:WriteUByte(1) -- arena = 1, bg = 0
  8.    
  9.     --- this is for arena
  10.     -- team 1
  11.     data:WriteULong(0) -- ratingLost
  12.     data:WriteULong(0) -- ratingWon
  13.     data:WriteULong(0) -- MatchmakerRating
  14.    
  15.     -- team 2
  16.     data:WriteULong(0) -- ratingLost
  17.     data:WriteULong(0) -- ratingWon
  18.     data:WriteULong(0) -- MatchmakerRating
  19.    
  20.     data:WriteString("Test1") -- team name 1
  21.     data:WriteString("Test2") -- team name 2
  22.     ---
  23.    
  24.     data:WriteUByte(1) -- ended = 1, else = 0
  25.     data:WriteUByte(1) -- winner ID
  26.     data:WriteULong(score_records) -- scoressize
  27.    
  28.     --- this is for arena
  29.     -- player 1
  30.     data:WriteGUID(self:GetGUID()) -- player guid
  31.     data:WriteULong(1) -- KillingBlows
  32.     data:WriteUByte(0) -- teamId
  33.     data:WriteULong(2) -- DamageDone
  34.     data:WriteULong(3) -- HealingDone
  35.     data:WriteULong(0) -- objectives count
  36.    
  37.     -- player 2
  38.     data:WriteGUID(self:GetGUID()) -- player guid
  39.     data:WriteULong(1) -- KillingBlows
  40.     data:WriteUByte(1) -- teamId
  41.     data:WriteULong(2) -- DamageDone
  42.     data:WriteULong(3) -- HealingDone
  43.     data:WriteULong(0) -- objectives count
  44.     ---
  45.    
  46.     -- Template for BG player row
  47.     -- data:WriteGUID(self:GetGUID()) -- player guid
  48.     -- data:WriteULong(1) -- KillingBlows
  49.     -- data:WriteULong(1) -- HonorableKills
  50.     -- data:WriteULong(2) -- Deaths
  51.     -- data:WriteULong(3) -- BonusHonor
  52.     -- data:WriteULong(3) -- DamageDone
  53.     -- data:WriteULong(3) -- HealingDone
  54.     -- data:WriteULong(0) -- objectives count
  55.    
  56.     self:SendPacket(data)
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement