Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. void Welcome_Agree(Player *player, PacketReader &reader)
  2. {
  3.     FileType file = FileType(reader.GetChar());
  4.     bool result = false;
  5.  
  6.     switch (file)
  7.     {
  8.         case FILE_MAP: result = player->client->Upload(FILE_MAP, player->character->mapid, INIT_FILE_MAP); break;
  9.         case FILE_ITEM: result = player->client->Upload(FILE_ITEM, 1, INIT_FILE_EIF); break;
  10.         case FILE_NPC: result = player->client->Upload(FILE_NPC, 1, INIT_FILE_ENF); break;
  11.         case FILE_SPELL: result = player->client->Upload(FILE_SPELL, 1, INIT_FILE_ESF); break;
  12.         case FILE_CLASS: result = player->client->Upload(FILE_CLASS, 1, INIT_FILE_ECF); break;
  13.         default: return;
  14.     }
  15.  
  16.     if (!result)
  17.         throw std::runtime_error("Failed to upload file");
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement