FIX UPDATE: Loot Related Exploits (Rec. Lvl & 2Handers)
Greetings!
Please Read Post Below for Important Line Change You may want to call me the 'Nerf Master' after this one, but here it is: These following changes will prevent players from auto-equipping items they loot if they do not now ALSO meet the Required Level. As well, the secondary slot must now be empty for a player to auto-equip a 2-Hander from a corpse. This does not affect looting much, items which cannot be equipped now will move to your inventory. The second change will validate characters logging in \ zoning, and will delete all item configurations deemed 'impossible' (basically, right now it just deletes any items equipped before Req. Level or 2Hand + Secondary configurations). As always, these changes are implemented on The Green Leaf server-build (which will be available open-source, once I get a site up). If you run into build errors, you may want to check my other posts to see if there are any pre-req changes you need to make. common\database.h - around line 434 (after ConvertItemBlob) add: Code:
bool Database::ValidateInventory( uint32 char_id, PlayerProfile_Struct* pp, Inventory* inv ) Code:
if (guilddbid) Code:
virtual bool IsEquipable(int16 race, int16 class_, uint8 level) const; Code:
virtual bool IsEquipable(int16 race, int16 class_, uint8 level) const; Code:
bool ItemInst::IsEquipable(int16, int16, uint8) const Code:
// Can item be equipped? zone\client.cpp - around line 2350 (autoputlootininventory), change entire first if block (auto equip) to: Code:
// #1: Try to auto equip ValidateInventory can be modified to include any new checks for item errors etc. Enjoy - this made a lot of sploiters on my server angry, Oh well! ;) |
ill give it a try :P thanks
|
IMPORTANT
The following line in ItemCommonInst::IsEquipable must be altered: Code:
if( level_ < level ) Code:
if( level_ <= level ) Next, ValidateInventory now looks like this: Code:
bool Database::ValidateInventory( uint32 char_id, PlayerProfile_Struct* pp, Inventory* inv ) |
What file(s) are these in?
Code:
IMPORTANT |
Quote:
|
Oh, i see it now, hehe /bonk
Thanks |
Ok, compiled in just this section, just like you said and here is what I got in the output. This was using the CVS from 5/9/04:
Code:
Compiling... |
Code:
DBMemLeak.cpp |
Code:
c:\Documents and Settings\Administrator\Desktop\5.7DR2\zone\../common\database.h(446) : error C2027: use of undefined type 'Inventory' |
Code:
c:\Documents and Settings\Administrator\Desktop\5.7DR2\zone\../common\database.h(461) : error C2027: use of undefined type 'ItemInst' |
Code:
c:\Documents and Settings\Administrator\Desktop\5.7DR2\zone\../common\database.h(446) : error C2027: use of undefined type 'Inventory' |
Code:
c:\Documents and Settings\Administrator\Desktop\5.7DR2\zone\../common\database.h(446) : error C2027: use of undefined type 'Inventory' |
Ok, that sucked, maybe I shouldn't have posted all of that, but that is Zone.exe. I should have done emumemshare or something instead hehe, well there it is....sooo?
|
:shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock:
|
Wow :shock:
First, I'd make sure you fixed all instances of 'DUAL' spelled like 'DUEL' (in regards to DUAL WIELD). |
All times are GMT -4. The time now is 03:14 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.