diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-12-14 00:40:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-12-14 22:05:09 +0300 |
commit | 1a26402c3bd986d0bba0435bfbd62e32abf07302 (patch) | |
tree | 8538ae13ea0dcb0d24385250aafe0741dec8f2a0 /src/map/clif.c | |
parent | 392c598c6ee3ce9e10eec9e44d6c2f93d4dae232 (diff) | |
download | hercules-1a26402c3bd986d0bba0435bfbd62e32abf07302.tar.gz hercules-1a26402c3bd986d0bba0435bfbd62e32abf07302.tar.bz2 hercules-1a26402c3bd986d0bba0435bfbd62e32abf07302.tar.xz hercules-1a26402c3bd986d0bba0435bfbd62e32abf07302.zip |
Add packet CZ_INVENTORY_EXPAND_REJECTED
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index a9fc3be74..659ff920e 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -3139,6 +3139,22 @@ static void clif_parse_inventoryExpansionConfirmed(int fd, struct map_session_da #endif } +static void clif_parse_inventoryExpansionRejected(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_inventoryExpansionRejected(int fd, struct map_session_data *sd) +{ +#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114 + char evname[EVENT_NAME_LENGTH]; + struct event_data *ev = NULL; + + safestrncpy(evname, "inventory_expansion::OnInvExpandRejected", EVENT_NAME_LENGTH); + if ((ev = strdb_get(npc->ev_db, evname))) { + script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id); + } else { + ShowError("clif_parse_inventoryExpansionRejected: event '%s' not found, operation failed.\n", evname); + } +#endif +} + /// Removes cart (ZC_CARTOFF). /// 012b /// Client behavior: @@ -22609,6 +22625,7 @@ void clif_defaults(void) clif->inventoryExpandResult = clif_inventoryExpandResult; clif->pInventoryExpansion = clif_parse_inventoryExpansion; clif->pInventoryExpansionConfirmed = clif_parse_inventoryExpansionConfirmed; + clif->pInventoryExpansionRejected = clif_parse_inventoryExpansionRejected; clif->favorite_item = clif_favorite_item; clif->clearcart = clif_clearcart; clif->item_identify_list = clif_item_identify_list; |