summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-12-14 06:27:52 +0300
committerAndrei Karas <akaras@inbox.ru>2018-12-14 23:52:47 +0300
commitd17b51770830d9e9e395d1b87b26572d8434fd57 (patch)
tree3798be1ab06953fb21ca58a2a93cd257848a7640 /src/map
parentbc682624496b854607b8e1bd976bb317eb8b0d4f (diff)
downloadhercules-d17b51770830d9e9e395d1b87b26572d8434fd57.tar.gz
hercules-d17b51770830d9e9e395d1b87b26572d8434fd57.tar.bz2
hercules-d17b51770830d9e9e395d1b87b26572d8434fd57.tar.xz
hercules-d17b51770830d9e9e395d1b87b26572d8434fd57.zip
Add script command expandInventoryAck
It send initial response for inventory expanding request.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 8d3de56a5..cf192fce8 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -24860,6 +24860,20 @@ static BUILDIN(enchantitem)
return true;
}
+// send ack to inventory expand request
+static BUILDIN(expandInventoryAck)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ if (sd == NULL)
+ return false;
+ int itemId = 0;
+ if (script_hasdata(st, 3)) {
+ itemId = script_getnum(st, 3);
+ }
+ clif->inventoryExpandAck(sd, script_getnum(st, 2), itemId);
+ return true;
+}
+
/**
* Adds a built-in script function.
*
@@ -25600,6 +25614,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(itempreview, "i"),
BUILDIN_DEF(enchantitem, "iii"),
+ BUILDIN_DEF(expandInventoryAck, "i?"),
};
int i, len = ARRAYLENGTH(BUILDIN);
RECREATE(script->buildin, char *, script->buildin_count + len); // Pre-alloc to speed up
@@ -26023,6 +26038,12 @@ static void script_hardcoded_constants(void)
script->set_constant("ITR_NOAUCTION", ITR_NOAUCTION, false, false);
script->set_constant("ITR_ALL", ITR_ALL, false, false);
+ script->constdb_comment("inventory expand ack responds");
+ script->set_constant("EXPAND_INV_ASK_CONFIRMATION", EXPAND_INVENTORY_ASK_CONFIRMATION, false, false);
+ script->set_constant("EXPAND_INV_FAILED", EXPAND_INVENTORY_FAILED, false, false);
+ script->set_constant("EXPAND_INV_OTHER_WORK", EXPAND_INVENTORY_OTHER_WORK, false, false);
+ script->set_constant("EXPAND_INV_MISSING_ITEM", EXPAND_INVENTORY_MISSING_ITEM, false, false);
+ script->set_constant("EXPAND_INV_MAX_SIZE", EXPAND_INVENTORY_MAX_SIZE, false, false);
script->constdb_comment("Renewal");
#ifdef RENEWAL