Follow up fa75733cc109f926b1df4156ccdf1292c78f8f79
* `getiteminfo` fix after `elvmax` added Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
This commit is contained in:
parent
d8ecfeb48b
commit
7d42cf2ba4
@ -17,7 +17,7 @@ prontera,156,179,6 script test_getiteminfo 117,{
|
|||||||
mes "Item ID: " + .@value + " ^nItemID^" + .@value;
|
mes "Item ID: " + .@value + " ^nItemID^" + .@value;
|
||||||
|
|
||||||
mes "Current item info:";
|
mes "Current item info:";
|
||||||
for(.@id = 0; .@id < 14; .@id++)
|
for(.@id = 0; .@id <= 16; .@id++)
|
||||||
mes " getiteminfo(" + .@value + "," + .@id + ") = " + getiteminfo(.@value,.@id);
|
mes " getiteminfo(" + .@value + "," + .@id + ") = " + getiteminfo(.@value,.@id);
|
||||||
close;
|
close;
|
||||||
}
|
}
|
@ -2829,7 +2829,8 @@ Valid types are:
|
|||||||
12 - eLV
|
12 - eLV
|
||||||
13 - wLV
|
13 - wLV
|
||||||
14 - SpriteID from 'db/item_avail.txt'
|
14 - SpriteID from 'db/item_avail.txt'
|
||||||
15 - matk if RENEWAL is defined
|
15 - eLVMax
|
||||||
|
16 - matk if RENEWAL is defined
|
||||||
|
|
||||||
See the sample in 'doc/sample/getiteminfo.txt'.
|
See the sample in 'doc/sample/getiteminfo.txt'.
|
||||||
|
|
||||||
|
@ -390,9 +390,9 @@ struct item_data
|
|||||||
int slot;
|
int slot;
|
||||||
int look;
|
int look;
|
||||||
int elv;
|
int elv;
|
||||||
int elvmax; ///< Maximum level for this item
|
|
||||||
int wlv;
|
int wlv;
|
||||||
int view_id;
|
int view_id;
|
||||||
|
int elvmax; ///< Maximum level for this item
|
||||||
#ifdef RENEWAL
|
#ifdef RENEWAL
|
||||||
int matk;
|
int matk;
|
||||||
#endif
|
#endif
|
||||||
|
@ -12590,6 +12590,8 @@ BUILDIN_FUNC(getitemslots)
|
|||||||
12 elv;
|
12 elv;
|
||||||
13 wlv;
|
13 wlv;
|
||||||
14 view id
|
14 view id
|
||||||
|
15 eLvmax
|
||||||
|
16 matk (renewal)
|
||||||
*------------------------------------------*/
|
*------------------------------------------*/
|
||||||
BUILDIN_FUNC(getiteminfo)
|
BUILDIN_FUNC(getiteminfo)
|
||||||
{
|
{
|
||||||
@ -12600,8 +12602,13 @@ BUILDIN_FUNC(getiteminfo)
|
|||||||
n = script_getnum(st,3);
|
n = script_getnum(st,3);
|
||||||
i_data = itemdb_exists(item_id);
|
i_data = itemdb_exists(item_id);
|
||||||
|
|
||||||
if (i_data && n <= 14) {
|
if (i_data && n <= 16) {
|
||||||
int *item_arr = (int*)&i_data->value_buy;
|
int *item_arr = (int*)&i_data->value_buy;
|
||||||
|
#ifndef RENEWAL
|
||||||
|
if (n == 16)
|
||||||
|
script_pushint(st,0);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
script_pushint(st,item_arr[n]);
|
script_pushint(st,item_arr[n]);
|
||||||
} else
|
} else
|
||||||
script_pushint(st,-1);
|
script_pushint(st,-1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user