Originally posted by [b]Aleos[/b]
The NPC script function [i]getiteminfo[/i] is a little off after the addition of the MATK 'type' to items.
[quote]/*==========================================
* Returns some values of an item [Lupus]
* Price, Weight, etc...
getiteminfo(itemID,n), where n
0 value_buy;
1 value_sell;
2 type;
3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
if = 0, then monsters don't drop it at all (rare or a quest item)
if = -1, then this item is sold in NPC shops only
4 sex;
5 equip;
6 weight;
7 atk;
8 def;
9 range;
10 slot;
11 look;
12 elv;
13 wlv;
14 view id
*------------------------------------------*/[/quote]
Anything after 7 (atk) is off by 1 because it is trying to get the MATK value, thus anything after is resulting in incorrect returns. Also the check needs to be expanded to include 15 types rather than 14 in [i]src/script.c[/i].
It took me a bit to realize that this was the issue with items (i.e: Beholder Master Card) that weren't giving their bonuses to players that use the getiteminfo function.
So there is the simple route which is to move the MATK value to the end of the item type list (Found in [i]src/item_db.h[/i]), or the more detailed route of modifying all items/NPC that use [i]getiteminfo[/i] (That are looking for a value greater than 7) to the new listing.
This post has been edited by
Aleos
on Feb 29, 2012 2:48