Advertisement
Guest User

char.cpp

a guest
Jan 16th, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #ifdef OFFLINE_SHOP
  2. extern std::map<DWORD, DWORD> g_ShopIndexCount; // char.cpp
  3. extern std::map<int, TShopCost> g_ShopCosts;
  4. void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE bItemCount, DWORD id)
  5. {
  6.     [...]
  7.  
  8. #ifndef FULL_YANG
  9. long long nTotalMoney = 0;
  10.  
  11.     for (int n = 0; n < bItemCount; ++n)
  12.     {
  13.         nTotalMoney += static_cast<long long>((pTable+n)->price);
  14.     }
  15.  
  16.     nTotalMoney += static_cast<long long>(GetGold());
  17.  
  18.     if (GOLD_MAX <= nTotalMoney)
  19.     {
  20.         sys_err("[OVERFLOW_GOLD] Overflow (GOLD_MAX) id %u name %s", GetPlayerID(), GetName());
  21.         ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You have too much yang in your inventory"));
  22.         return;
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement