Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. static PacketBuilder add_common(Character *character, short item, int amount)
  2. {
  3. character->DelItem(item, amount);
  4.  
  5. character->CalculateStats();
  6.  
  7. PacketBuilder reply(PACKET_LOCKER, PACKET_REPLY, 8 + character->bank.size() * 5);
  8. reply.AddShort(item);
  9. reply.AddInt(character->HasItem(item));
  10. reply.AddChar(character->weight);
  11. reply.AddChar(character->maxweight);
  12.  
  13. UTIL_FOREACH(character->bank, item)
  14. {
  15. reply.AddShort(item.id);
  16. reply.AddThree(item.amount);
  17. }
  18.  
  19. return reply;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement