Pickpocketing weapons
So I'm not much of a programmer. Let me just add that up front...
I've had reports of rogues being able to pickpocket weapons right off an NPC. In an effort to try to fix it, I've come up with the following in zone/npc.cpp: Code:
bool is_arrow = (item->ItemType == ItemTypeArrow) ? true : false; Also, I'm sure there's a better way than checking against all the weapon types, so if there's something more efficient please do tell. Thanks! :) |
The best way to see if this will work is compile it in your own source and test it.
|
Should change is_weapon into a ternary like how is_arrow is written above would look like this... (hopefully no typos here... I just woke up :p)
Code:
bool is_arrow = (item->ItemType == ItemTypeArrow) ? true : false; |
Thanks! I knew there had to be a better way. I just basically monkeyed through the syntax until it compiled.
|
All times are GMT -4. The time now is 03:37 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.