Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. case PACKET_ADMIN: // Player logging in through Control Panel
  2. {
  3. if (this->state != EOClient::Initialized) return false;
  4.  
  5. std::string username = reader.GetBreakString();
  6. std::string password = reader.GetBreakString();
  7.  
  8. username = util::lowercase(username);
  9.  
  10. reply.SetID(PACKET_LOGIN, PACKET_REPLY);
  11.  
  12. LoginReply login_reply = this->server->world->AdminLoginCheck(username, password);
  13.  
  14. if (login_reply != LOGIN_OK)
  15. {
  16. reply.AddShort(login_reply);
  17. CLIENT_SEND(reply);
  18. return true;
  19. }
  20.  
  21. reply.AddShort(LOGIN_OK);
  22. /*reply.AddChar(this->player->characters.size());
  23. reply.AddByte(2);
  24. reply.AddByte(255);
  25. UTIL_PTR_VECTOR_FOREACH(this->player->characters, Character, character)
  26. {
  27. reply.AddBreakString(character->name);
  28. reply.AddInt(character->id);
  29. reply.AddChar(character->level);
  30. reply.AddChar(character->gender);
  31. reply.AddChar(character->hairstyle);
  32. reply.AddChar(character->haircolor);
  33. reply.AddChar(character->race);
  34. reply.AddChar(character->admin);
  35. reply.AddShort(this->server->world->eif->Get(character->paperdoll[Character::Boots])->dollgraphic);
  36. reply.AddShort(this->server->world->eif->Get(character->paperdoll[Character::Armor])->dollgraphic);
  37. reply.AddShort(this->server->world->eif->Get(character->paperdoll[Character::Hat])->dollgraphic);
  38. reply.AddShort(this->server->world->eif->Get(character->paperdoll[Character::Shield])->dollgraphic);
  39. reply.AddShort(this->server->world->eif->Get(character->paperdoll[Character::Weapon])->dollgraphic);
  40. reply.AddByte(255);
  41. }*/
  42. CLIENT_SEND(reply);
  43. }
  44. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement