Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. using PBServer;
  2. using PBServer.src.model;
  3. using PBServer.src.model.accounts;
  4. using System;
  5.  
  6. namespace PBServer.network.serverpackets
  7. {
  8. public class SM_CHAT_NORMAL : SendBaseGamePacket
  9. {
  10. protected Chat _chat;
  11.  
  12. private Account player;
  13.  
  14. public SM_CHAT_NORMAL(Chat chat, Account player)
  15. {
  16. this._chat = chat;
  17. this.player = player;
  18. base.makeme();
  19. }
  20.  
  21. protected internal override void write()
  22. {
  23. if (player._rank == 53 || player._rank == 54)
  24. {
  25. base.writeH(0xc15);
  26. base.writeB(new byte[] { 0x1d, 0, 0x15, 12, 0x93 });
  27. base.writeS(this._chat.playername, 0x22);
  28. base.writeC(3);
  29. base.writeH((short)this._chat.chat.Length);
  30. base.writeS(this._chat.chat, this._chat.chat.Length);
  31. }
  32. else
  33. {
  34. player.name_color = 3;
  35. base.writeH(0xc15);
  36. base.writeB(new byte[] { 0x1d, 0, 0x15, 12, 0x93 });
  37. base.writeS(this._chat.playername, 0x22);
  38. base.writeC(0);
  39. base.writeH((short)this._chat.chat.Length);
  40. base.writeS(this._chat.chat, this._chat.chat.Length);
  41. }
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement