Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void RefreshAutoSS(DWORD * pSocket, WORD itemID)
- {
- //file << "<<<< Entered RequestAutoSS: pSocket: " << hex << pSocket
- // << " itemID: " << itemID << ".\n";
- //file.flush();
- //if the item passed is a valid ID
- if( itemID != 0 )
- {
- if (pSocket != NULL)
- {
- DWORD * pUser = GetUser(pSocket);
- if(pUser != NULL)
- {
- if( !bPrivateStore && !bActiveRequest && bIsAlive )
- {
- DWORD * pUserInventory = GetUserInventory(pUser);
- //ExUser * tempExUser = GetExUser(pUser);
- //Find the item in the player's inventory
- DWORD * pItem = CInventory::FindFirstItemByClassID(pUserInventory, itemID);
- if(pItem != NULL)
- {
- //Use the requested item so their SS is charged
- CCreature::UseItem(pUser, pItem);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement