From dfcb1ff37ad077249c0050bb1bab8994225191e1 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 12 Nov 2017 01:56:57 +0100 Subject: Add ITEMINFO_MATK support to getiteminfo() / setiteminfo(). This item info type was documented in commit 315d632e69c60d2996872c9330164133101befdf, but never implemented. Signed-off-by: Haru --- src/map/script.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 72c33dc5d..133142625 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -14126,6 +14126,9 @@ BUILDIN(getiteminfo) case ITEMINFO_VIEWID: script_pushint(st, it->view_id); break; + case ITEMINFO_MATK: + script_pushint(st, it->matk); + break; default: ShowError("buildin_getiteminfo: Invalid item type %d.\n", n); script_pushint(st,-1); @@ -14386,6 +14389,9 @@ BUILDIN(setiteminfo) case ITEMINFO_VIEWID: it->view_id = value; break; + case ITEMINFO_MATK: + it->matk = value; + break; default: ShowError("buildin_setiteminfo: invalid type %d.\n", n); script_pushint(st,-1); @@ -24830,6 +24836,7 @@ void script_hardcoded_constants(void) script->set_constant("ITEMINFO_ELV", ITEMINFO_ELV, false, false); script->set_constant("ITEMINFO_WLV", ITEMINFO_WLV, false, false); script->set_constant("ITEMINFO_VIEWID", ITEMINFO_VIEWID, false, false); + script->set_constant("ITEMINFO_MATK", ITEMINFO_MATK, false, false); script->constdb_comment("Renewal"); #ifdef RENEWAL -- cgit v1.2.3-70-g09d2