NPC Trading
I've been trying to work out some kinks I've had with NPC trading. The first problem I had was getting a bunch of "GetItemAt(X)" messages spamming my chat window. I looked through the code and found this in client.cpp:
Code:
bool Client::MoveItem(int16 to_slot, int16 from_slot, uint8 quantity){ I've noticed that at least one server doesn't have this problem, so I'm not sure if something is dorked in my setup or if that admin has altered the code. I'm also seeing a problem with items traded to NPCs remaining tied to the cursor so that they reapear if I camp and come back. While this is great for quests, it's not ideal. Hopefully I can figure this out by comparing the code for selling which seems to remove the item okay. |
Ok first off if you ever come across an "#if 0" or "#if 1" Odds are it's me reimplenting something for whatever reason struck me (didn't make sense, didn't work, just plain felt like it..)
Onto OP_MoveItem, theres a bug in the client_proccess file with cursored items. The trade code in MoveItem() is a direct copy and paste from this original code, including all it's problems. Code:
if ( to_slot >=3000 && to_slot <= 3016){// Item Trade |
Thanks for the response! I can make sense of having an offset of 250 instead of 80, I would assume it's to account for placing a container in the trade window. I'll look more closely at the trade code, to be sure, but it seems like this should be changed back to point into the container space.
|
All times are GMT -4. The time now is 07:16 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.