SHARE
TWEET

Untitled

a guest Feb 20th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifdef ENABLE_SHOW_CHEST_DROP
  2. void CInputMain::ChestDropInfo(LPCHARACTER ch, const char* c_pData)
  3. {
  4.     TPacketCGChestDropInfo* p = (TPacketCGChestDropInfo*) c_pData;
  5.  
  6.     if(p->wInventoryCell >= INVENTORY_MAX_NUM)
  7.         return;
  8.    
  9.     LPITEM pkItem = ch->GetInventoryItem(p->wInventoryCell);
  10.  
  11.     if (!pkItem)
  12.         return;
  13.    
  14.     std::vector<TChestDropInfoTable> vec_ItemList;
  15.     ITEM_MANAGER::instance().GetChestItemList(pkItem->GetVnum(), vec_ItemList);
  16.  
  17.     TPacketGCChestDropInfo packet;
  18.     packet.bHeader = HEADER_GC_CHEST_DROP_INFO;
  19.     packet.wSize = sizeof(packet) + sizeof(TChestDropInfoTable) * vec_ItemList.size();
  20.     packet.dwChestVnum = pkItem->GetVnum();
  21.  
  22.     ch->GetDesc()->BufferedPacket(&packet, sizeof(packet));
  23.     ch->GetDesc()->Packet(&vec_ItemList[0], sizeof(TChestDropInfoTable) * vec_ItemList.size());
  24. }
  25. #endif
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top