diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/achievement.c | 69 | ||||
-rw-r--r-- | src/map/achievement.h | 4 | ||||
-rw-r--r-- | src/map/atcommand.c | 21 | ||||
-rw-r--r-- | src/map/clif.c | 324 | ||||
-rw-r--r-- | src/map/clif.h | 35 | ||||
-rw-r--r-- | src/map/guild.c | 5 | ||||
-rw-r--r-- | src/map/instance.c | 61 | ||||
-rw-r--r-- | src/map/instance.h | 1 | ||||
-rw-r--r-- | src/map/map.h | 8 | ||||
-rw-r--r-- | src/map/messages_main.h | 62 | ||||
-rw-r--r-- | src/map/messages_re.h | 62 | ||||
-rw-r--r-- | src/map/messages_zero.h | 48 | ||||
-rw-r--r-- | src/map/mob.c | 3 | ||||
-rw-r--r-- | src/map/npc.h | 2 | ||||
-rw-r--r-- | src/map/packets.h | 87 | ||||
-rw-r--r-- | src/map/packets_keys_main.h | 9 | ||||
-rw-r--r-- | src/map/packets_keys_zero.h | 9 | ||||
-rw-r--r-- | src/map/packets_shuffle_main.h | 9 | ||||
-rw-r--r-- | src/map/packets_shuffle_re.h | 8 | ||||
-rw-r--r-- | src/map/packets_shuffle_zero.h | 9 | ||||
-rw-r--r-- | src/map/packets_struct.h | 107 | ||||
-rw-r--r-- | src/map/pc.c | 38 | ||||
-rw-r--r-- | src/map/pc.h | 2 | ||||
-rw-r--r-- | src/map/pet.c | 2 | ||||
-rw-r--r-- | src/map/quest.c | 26 | ||||
-rw-r--r-- | src/map/script.c | 209 | ||||
-rw-r--r-- | src/map/skill.c | 6 | ||||
-rw-r--r-- | src/map/storage.c | 4 |
28 files changed, 977 insertions, 253 deletions
diff --git a/src/map/achievement.c b/src/map/achievement.c index 1fb513ea0..68fc8a983 100644 --- a/src/map/achievement.c +++ b/src/map/achievement.c @@ -1016,44 +1016,56 @@ static bool achievement_check_title(struct map_session_data *sd, int title_id) { return false; } -/** - * Achievement rewards are given to player - * @param sd session data - * @param ad achievement data - */ -static void achievement_get_rewards(struct map_session_data *sd, const struct achievement_data *ad) { - int i = 0; - struct achievement *ach = NULL; - +static void achievement_get_rewards_buffs(struct map_session_data *sd, const struct achievement_data *ad) +{ nullpo_retv(sd); nullpo_retv(ad); - if ((ach = achievement->ensure(sd, ad)) == NULL) - return; - - /* Buff */ if (ad->rewards.bonus != NULL) script->run(ad->rewards.bonus, 0, sd->bl.id, 0); +} - /* Give Items */ - for (i = 0; i < VECTOR_LENGTH(ad->rewards.item); i++) { - struct item it = { 0 }; - int total = 0; +// TODO: kro send items by rodex +static void achievement_get_rewards_items(struct map_session_data *sd, const struct achievement_data *ad) +{ + nullpo_retv(sd); + nullpo_retv(ad); - it.nameid = VECTOR_INDEX(ad->rewards.item, i).id; - total = VECTOR_INDEX(ad->rewards.item, i).amount; + struct item it = { 0 }; + it.identify = 1; - it.identify = 1; + for (int i = 0; i < VECTOR_LENGTH(ad->rewards.item); i++) { + it.nameid = VECTOR_INDEX(ad->rewards.item, i).id; + int total = VECTOR_INDEX(ad->rewards.item, i).amount; //Check if it's stackable. if (!itemdb->isstackable(it.nameid)) { - int j = 0; - for (j = 0; j < total; ++j) - pc->additem(sd, &it, (it.amount = 1), LOG_TYPE_SCRIPT); + it.amount = 1; + for (int j = 0; j < total; ++j) + pc->additem(sd, &it, 1, LOG_TYPE_SCRIPT); } else { - pc->additem(sd, &it, (it.amount = total), LOG_TYPE_SCRIPT); + it.amount = total; + pc->additem(sd, &it, total, LOG_TYPE_SCRIPT); } } +} + +/** + * Achievement rewards are given to player + * @param sd session data + * @param ad achievement data + */ +static bool achievement_get_rewards(struct map_session_data *sd, const struct achievement_data *ad) +{ + nullpo_retr(false, sd); + nullpo_retr(false, ad); + + struct achievement *ach = achievement->ensure(sd, ad); + if (ach == NULL) + return false; + + /* Buff */ + achievement->get_rewards_buffs(sd, ad); ach->rewarded_at = time(NULL); @@ -1062,9 +1074,14 @@ static void achievement_get_rewards(struct map_session_data *sd, const struct ac VECTOR_PUSH(sd->title_ids, ad->rewards.title_id); clif->achievement_send_list(sd->fd, sd); } else { - clif->achievement_reward_ack(sd->fd, sd, ad); clif->achievement_send_update(sd->fd, sd, ad); // send update. + clif->achievement_reward_ack(sd->fd, sd, ad); } + + /* Give Items */ + achievement->get_rewards_items(sd, ad); + + return true; } /** @@ -1977,4 +1994,6 @@ void achievement_defaults(void) achievement->init_titles = achievement_init_titles; achievement->check_title = achievement_check_title; achievement->get_rewards = achievement_get_rewards; + achievement->get_rewards_buffs = achievement_get_rewards_buffs; + achievement->get_rewards_items = achievement_get_rewards_items; } diff --git a/src/map/achievement.h b/src/map/achievement.h index beba120a2..de5eaa060 100644 --- a/src/map/achievement.h +++ b/src/map/achievement.h @@ -277,7 +277,9 @@ struct achievement_interface { /* */ void (*init_titles) (struct map_session_data *sd); bool (*check_title) (struct map_session_data *sd, int title_id); - void (*get_rewards) (struct map_session_data *sd, const struct achievement_data *ad); + bool (*get_rewards) (struct map_session_data *sd, const struct achievement_data *ad); + void (*get_rewards_buffs) (struct map_session_data *sd, const struct achievement_data *ad); + void (*get_rewards_items) (struct map_session_data *sd, const struct achievement_data *ad); }; #ifdef HERCULES_CORE diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 6522f3013..a7dc5dd95 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4297,7 +4297,7 @@ ACMD(repairall) if (count > 0) { clif->misceffect(&sd->bl, 3); - clif->equiplist(sd); + clif->equipList(sd); clif->message(fd, msg_fd(fd,107)); // All items have been repaired. } else { clif->message(fd, msg_fd(fd,108)); // No item need to be repaired. @@ -9810,6 +9810,24 @@ ACMD(reloadclans) return true; } +// show camera window or change camera parameters +ACMD(camerainfo) +{ + if (*message == '\0') { + clif->camera_showWindow(sd); + return true; + } + float range = 0; + float rotation = 0; + float latitude = 0; + if (sscanf(message, "%15f %15f %15f", &range, &rotation, &latitude) < 3) { + clif->message(fd, msg_fd(fd, 452)); // usage @camerainfo range rotation latitude + return false; + } + clif->camera_change(sd, range, rotation, latitude, SELF); + return true; +} + /** * Fills the reference of available commands in atcommand DBMap **/ @@ -10092,6 +10110,7 @@ static void atcommand_basecommands(void) ACMD_DEF(leaveclan), ACMD_DEF(reloadclans), ACMD_DEF(setzone), + ACMD_DEF(camerainfo), }; int i; diff --git a/src/map/clif.c b/src/map/clif.c index 4e48d7886..1e9844f14 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -86,8 +86,8 @@ static struct s_packet_db packet_db[MAX_PACKET_DB + 1]; /* re-usable */ static struct packet_itemlist_normal itemlist_normal; static struct packet_itemlist_equip itemlist_equip; -static struct packet_storelist_normal storelist_normal; -static struct packet_storelist_equip storelist_equip; +static struct ZC_STORE_ITEMLIST_NORMAL storelist_normal; +static struct ZC_STORE_ITEMLIST_EQUIP storelist_equip; static struct packet_viewequip_ack viewequip_list; #if PACKETVER >= 20131223 static struct packet_npc_market_result_ack npcmarket_result; @@ -2641,7 +2641,7 @@ static void clif_item_movefailed(struct map_session_data *sd, int n) WFIFOHEAD(fd, len); struct PACKET_ZC_INVENTORY_MOVE_FAILED *p = WFIFOP(fd, 0); p->packetType = 0xaa7; - p->index = n; + p->index = n + 2; p->unknown = 1; WFIFOSET(fd, len); #else @@ -2787,7 +2787,18 @@ static void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item * #endif } -static void clif_inventorylist(struct map_session_data *sd) +static void clif_inventoryList(struct map_session_data *sd) +{ +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + clif->inventoryStart(sd, INVTYPE_INVENTORY, ""); +#endif + clif->inventoryItems(sd, INVTYPE_INVENTORY); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + clif->inventoryEnd(sd, INVTYPE_INVENTORY); +#endif +} + +static void clif_inventoryItems(struct map_session_data *sd, enum inventory_type type) { int i, normal = 0, equip = 0; @@ -2802,9 +2813,12 @@ static void clif_inventorylist(struct map_session_data *sd) clif->item_normal(i+2,&itemlist_normal.list[normal++],&sd->status.inventory[i],sd->inventory_data[i]); } - if( normal ) { - itemlist_normal.PacketType = inventorylistnormalType; - itemlist_normal.PacketLength = 4 + (sizeof(struct NORMALITEM_INFO) * normal); + if (normal) { + itemlist_normal.PacketType = inventorylistnormalType; + itemlist_normal.PacketLength = (sizeof(itemlist_normal) - sizeof(itemlist_normal.list)) + (sizeof(struct NORMALITEM_INFO) * normal); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + itemlist_normal.invType = type; +#endif clif->send(&itemlist_normal, itemlist_normal.PacketLength, &sd->bl, SELF); } @@ -2814,7 +2828,10 @@ static void clif_inventorylist(struct map_session_data *sd) if( equip ) { itemlist_equip.PacketType = inventorylistequipType; - itemlist_equip.PacketLength = 4 + (sizeof(struct EQUIPITEM_INFO) * equip); + itemlist_equip.PacketLength = (sizeof(itemlist_equip) - sizeof(itemlist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + itemlist_equip.invType = type; +#endif clif->send(&itemlist_equip, itemlist_equip.PacketLength, &sd->bl, SELF); } @@ -2830,8 +2847,20 @@ static void clif_inventorylist(struct map_session_data *sd) #endif } +static void clif_equipList(struct map_session_data *sd) +{ +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + clif->inventoryStart(sd, INVTYPE_INVENTORY, ""); + clif->inventoryItems(sd, INVTYPE_INVENTORY); + clif->inventoryEnd(sd, INVTYPE_INVENTORY); +#else + // [4144] for old packet version it send only equipment. this is bug? + clif->equipItems(sd, INVTYPE_INVENTORY); +#endif +} + //Required when items break/get-repaired. Only sends equippable item list. -static void clif_equiplist(struct map_session_data *sd) +static void clif_equipItems(struct map_session_data *sd, enum inventory_type type) { int i, equip = 0; @@ -2844,9 +2873,12 @@ static void clif_equiplist(struct map_session_data *sd) clif->item_equip(i+2,&itemlist_equip.list[equip++],&sd->status.inventory[i],sd->inventory_data[i],pc->equippoint(sd,i)); } - if( equip ) { - itemlist_equip.PacketType = inventorylistequipType; - itemlist_equip.PacketLength = 4 + (sizeof(struct EQUIPITEM_INFO) * equip); + if (equip) { + itemlist_equip.PacketType = inventorylistequipType; + itemlist_equip.PacketLength = (sizeof(itemlist_equip) - sizeof(itemlist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + itemlist_equip.invType = type; +#endif clif->send(&itemlist_equip, itemlist_equip.PacketLength, &sd->bl, SELF); } @@ -2863,13 +2895,74 @@ static void clif_equiplist(struct map_session_data *sd) #endif } -static void clif_storagelist(struct map_session_data *sd, struct item *items, int items_length) +static void clif_storageList(struct map_session_data *sd, struct item *items, int items_length) { - int i = 0; - struct item_data *id; + nullpo_retv(sd); + + clif->inventoryStart(sd, INVTYPE_STORAGE, "Storage"); + if (sd->storage.aggregate > 0) + clif->storageItems(sd, INVTYPE_STORAGE, items, items_length); + clif->inventoryEnd(sd, INVTYPE_STORAGE); +} + +static void clif_guildStorageList(struct map_session_data *sd, struct item *items, int items_length) +{ + clif->inventoryStart(sd, INVTYPE_GUILD_STORAGE, "Guild storage"); + clif->storageItems(sd, INVTYPE_GUILD_STORAGE, items, items_length); + clif->inventoryEnd(sd, INVTYPE_GUILD_STORAGE); +} +static void clif_inventoryStart(struct map_session_data *sd, enum inventory_type type, const char *name) +{ +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + nullpo_retv(sd); + nullpo_retv(name); + + char buf[sizeof(struct ZC_INVENTORY_START) + 24]; + memset(buf, 0, sizeof(buf)); + struct ZC_INVENTORY_START *p = (struct ZC_INVENTORY_START *)buf; + p->packetType = 0xb08; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + p->invType = type; +#endif +#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + int strLen = (int)safestrnlen(name, 24); + if (strLen > 24) + strLen = 24; + const int len = sizeof(struct ZC_INVENTORY_START) + strLen; + p->packetLength = len; + safestrncpy(p->name, name, strLen); +#else + const int len = sizeof(struct ZC_INVENTORY_START); + safestrncpy(p->name, name, NAME_LENGTH); +#endif + clif->send(p, len, &sd->bl, SELF); +#endif +} + +static void clif_inventoryEnd(struct map_session_data *sd, enum inventory_type type) +{ +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + nullpo_retv(sd); + + struct ZC_INVENTORY_END p; + p.packetType = 0xb0b; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + p.invType = type; +#endif + p.flag = 0; + clif->send(&p, sizeof(p), &sd->bl, SELF); +#endif +} + +static void clif_storageItems(struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length) +{ nullpo_retv(sd); nullpo_retv(items); + + int i = 0; + struct item_data *id; + do { int normal = 0, equip = 0, k = 0; @@ -2887,10 +2980,13 @@ static void clif_storagelist(struct map_session_data *sd, struct item *items, in } if( normal ) { - storelist_normal.PacketType = storagelistnormalType; + storelist_normal.PacketType = storageListNormalType; storelist_normal.PacketLength = ( sizeof( storelist_normal ) - sizeof( storelist_normal.list ) ) + (sizeof(struct NORMALITEM_INFO) * normal); -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + storelist_normal.invType = type; +#endif +#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002 safestrncpy(storelist_normal.name, "Storage", NAME_LENGTH); #endif @@ -2898,10 +2994,13 @@ static void clif_storagelist(struct map_session_data *sd, struct item *items, in } if( equip ) { - storelist_equip.PacketType = storagelistequipType; + storelist_equip.PacketType = storageListEquipType; storelist_equip.PacketLength = ( sizeof( storelist_equip ) - sizeof( storelist_equip.list ) ) + (sizeof(struct EQUIPITEM_INFO) * equip); -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + storelist_equip.invType = type; +#endif +#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002 safestrncpy(storelist_equip.name, "Storage", NAME_LENGTH); #endif @@ -2912,7 +3011,18 @@ static void clif_storagelist(struct map_session_data *sd, struct item *items, in } -static void clif_cartlist(struct map_session_data *sd) +static void clif_cartList(struct map_session_data *sd) +{ +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + clif->inventoryStart(sd, INVTYPE_CART, ""); +#endif + clif->cartItems(sd, INVTYPE_CART); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + clif->inventoryEnd(sd, INVTYPE_CART); +#endif +} + +static void clif_cartItems(struct map_session_data *sd, enum inventory_type type) { int i, normal = 0, equip = 0; struct item_data *id; @@ -2930,16 +3040,22 @@ static void clif_cartlist(struct map_session_data *sd) clif->item_normal(i+2,&itemlist_normal.list[normal++],&sd->status.cart[i],id); } - if( normal ) { - itemlist_normal.PacketType = cartlistnormalType; - itemlist_normal.PacketLength = 4 + (sizeof(struct NORMALITEM_INFO) * normal); + if (normal) { + itemlist_normal.PacketType = cartlistnormalType; + itemlist_normal.PacketLength = (sizeof(itemlist_normal) - sizeof(itemlist_normal.list)) + (sizeof(struct NORMALITEM_INFO) * normal); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + itemlist_normal.invType = type; +#endif clif->send(&itemlist_normal, itemlist_normal.PacketLength, &sd->bl, SELF); } - if( equip ) { - itemlist_equip.PacketType = cartlistequipType; - itemlist_equip.PacketLength = 4 + (sizeof(struct EQUIPITEM_INFO) * equip); + if (equip) { + itemlist_equip.PacketType = cartlistequipType; + itemlist_equip.PacketLength = (sizeof(itemlist_equip) - sizeof(itemlist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + itemlist_equip.invType = type; +#endif clif->send(&itemlist_equip, itemlist_equip.PacketLength, &sd->bl, SELF); } @@ -7571,22 +7687,16 @@ static void clif_mvp_item(struct map_session_data *sd, int nameid) /// 010b <exp>.L static void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { -#if PACKETVER >= 20131223 // Kro removed this packet [Napster] - if (battle_config.mvp_exp_reward_message) { - char e_msg[CHAT_SIZE_MAX]; - sprintf(e_msg, msg_txt(855), exp); - clif->messagecolor_self(sd->fd, COLOR_CYAN, e_msg); // Congratulations! You are the MVP! Your reward EXP Points are %u !! - } -#else +#if PACKETVER_RE_NUM >= 20080827 || PACKETVER_MAIN_NUM >= 20090401 || defined(PACKETVER_ZERO) int fd; nullpo_retv(sd); - fd=sd->fd; - WFIFOHEAD(fd,packet_len(0x10b)); - WFIFOW(fd,0)=0x10b; - WFIFOL(fd,2)=cap_value(exp,0,INT32_MAX); - WFIFOSET(fd,packet_len(0x10b)); + fd = sd->fd; + WFIFOHEAD(fd, packet_len(0x10b)); + WFIFOW(fd, 0) = 0x10b; + WFIFOL(fd, 2) = cap_value(exp, 0, INT32_MAX); + WFIFOSET(fd, packet_len(0x10b)); #endif } @@ -7611,6 +7721,7 @@ static void clif_mvp_noitem(struct map_session_data *sd) /// 1 = "You are already in a Guild." /// 2 = "That Guild Name already exists." /// 3 = "You need the necessary item to create a Guild." +/// 4 = "Can't create a Guild in this area." static void clif_guild_created(struct map_session_data *sd, int flag) { int fd; @@ -8097,6 +8208,7 @@ static void clif_guild_invite(struct map_session_data *sd, struct guild *g) /// 1 = Offer rejected. /// 2 = Offer accepted. /// 3 = Guild full. +/// 4 = Offline or not exists static void clif_guild_inviteack(struct map_session_data *sd, int flag) { int fd; @@ -8753,6 +8865,45 @@ static void clif_specialeffect_value(struct block_list *bl, int effect_id, int n clif->send(buf, packet_len(0x284), bl, SELF); } } + +/// Remove special effects (ZC_REMOVE_EFFECT). +/// 0b0d <id>.L <effect id>.L +/// effect id: +/// @see doc/effect_list.txt +static void clif_removeSpecialEffect(struct block_list *bl, int effectId, enum send_target target) +{ +#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 + nullpo_retv(bl); + + struct PACKET_ZC_REMOVE_EFFECT p; + p.packetType = 0xb0d; + p.aid = bl->id; + p.effectId = effectId; + + clif->send(&p, sizeof(p), bl, target); + + if (clif->isdisguised(bl)) { + p.aid = -bl->id; + clif->send(&p, sizeof(p), bl, SELF); + } +#endif +} + +static void clif_removeSpecialEffect_single(struct block_list *bl, int effectId, struct block_list *targetBl) +{ +#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 + nullpo_retv(bl); + nullpo_retv(targetBl); + + struct PACKET_ZC_REMOVE_EFFECT p; + p.packetType = 0xb0d; + p.aid = bl->id; + p.effectId = effectId; + + clif->send(&p, sizeof(p), targetBl, SELF); +#endif +} + /** * Modification of clif_messagecolor to send colored messages to players to chat log only (doesn't display overhead). * @@ -8825,8 +8976,8 @@ static void clif_refresh_storagewindow(struct map_session_data *sd) if (sd->state.storage_flag == STORAGE_FLAG_NORMAL) { if (sd->storage.aggregate > 0) { storage->sortitem(VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); - clif->storagelist(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); } + clif->storageList(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); clif->updatestorageamount(sd, sd->storage.aggregate, MAX_STORAGE); } // Notify the client that the gstorage is open otherwise it will @@ -8838,7 +8989,7 @@ static void clif_refresh_storagewindow(struct map_session_data *sd) intif->request_guild_storage(sd->status.account_id,sd->status.guild_id); } else { storage->sortitem(gstor->items, ARRAYLENGTH(gstor->items)); - clif->storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items)); + clif->guildStorageList(sd, gstor->items, ARRAYLENGTH(gstor->items)); clif->updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE); } } @@ -8850,9 +9001,9 @@ static void clif_refresh(struct map_session_data *sd) nullpo_retv(sd); clif->changemap(sd,sd->bl.m,sd->bl.x,sd->bl.y); - clif->inventorylist(sd); + clif->inventoryList(sd); if(pc_iscarton(sd)) { - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd,SP_CARTINFO); } clif->updatestatus(sd,SP_WEIGHT); @@ -9884,11 +10035,11 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) // Send character inventory to the client. // call this before pc->checkitem() so that the client isn't called to delete a non-existent item. - clif->inventorylist(sd); + clif->inventoryList(sd); // Send the cart inventory, counts & weight to the client. if(pc_iscarton(sd)) { - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd, SP_CARTINFO); } @@ -11088,7 +11239,7 @@ static void clif_parse_DropItem(int fd, struct map_session_data *sd) } //Because the client does not like being ignored. - clif->item_movefailed(sd, item_index); + clif->dropitem(sd, item_index, 0); } static void clif_parse_UseItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); @@ -17446,6 +17597,7 @@ static int clif_instance(int instance_id, int type, int flag) case 2: // S 0x2cc <Standby Position>.W // To announce Instancing queue creation if no maps available + // flag is priority, negative value mean cancel reservation WBUFW(buf,0) = 0x02CC; WBUFW(buf,2) = flag; clif->send(buf,packet_len(0x02CC),&sd->bl,target); @@ -18727,8 +18879,20 @@ static void clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd } /* [Ind/Hercules] placeholder for unsupported incoming packets (avoids server disconnecting client) */ -static void __attribute__ ((unused)) clif_parse_dull(int fd, struct map_session_data *sd) +static void clif_parse_dull(int fd, struct map_session_data *sd) { + const int cmd = clif->cmd; + Assert_retv(cmd <= MAX_PACKET_DB && cmd >= MIN_PACKET_DB); + + int packet_len = packet_db[cmd].len; + if (packet_len == -1) { // variable-length packet + packet_len = RFIFOW(fd, 2); + } + if (sd) { + ShowWarning("Unhandled packet 0x%04d (length %d), %s session #%d, %d/%d (AID/CID)\n", cmd, packet_len, sd->state.active ? "authed" : "unauthed", fd, sd->status.account_id, sd->status.char_id); + } else { + ShowWarning("Unhandled packet 0x%04d (length %d), session #%d\n", cmd, packet_len, fd); + } return; } @@ -20514,7 +20678,7 @@ static void clif_achievement_reward_ack(int fd, struct map_session_data *sd, con nullpo_retv(ad); p.packet_id = achievementRewardAckType; - p.received = 1; + p.failed = 0; p.ach_id = ad->id; clif->send(&p, packet_len(achievementRewardAckType), &sd->bl, SELF); @@ -21747,6 +21911,43 @@ static void clif_party_dead_notification(struct map_session_data *sd) #endif } +static void clif_parse_memorial_dungeon_command(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +static void clif_parse_memorial_dungeon_command(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_MEMORIALDUNGEON_COMMAND *p = RP2PTR(fd); + + switch (p->command) { + case COMMAND_MEMORIALDUNGEON_DESTROY_FORCE: + instance->force_destroy(sd); + } +} + +static void clif_camera_showWindow(struct map_session_data *sd) +{ +#if PACKETVER >= 20160525 + struct PACKET_ZC_CAMERA_INFO p; + p.packetType = 0xa78; + p.action = 1; + p.range = 0; + p.rotation = 0; + p.latitude = 0; + clif->send(&p, sizeof(p), &sd->bl, SELF); +#endif +} + +static void clif_camera_change(struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target) +{ +#if PACKETVER >= 20160525 + struct PACKET_ZC_CAMERA_INFO p; + p.packetType = 0xa78; + p.action = 0; + p.range = range; + p.rotation = rotation; + p.latitude = latitude; + clif->send(&p, sizeof(p), &sd->bl, target); +#endif +} + /*========================================== * Main client packet processing function *------------------------------------------*/ @@ -21798,6 +21999,7 @@ static int clif_parse(int fd) parse_cmd_func = clif->parse_cmd; cmd = parse_cmd_func(fd,sd); + clif->cmd = cmd; if (VECTOR_LENGTH(HPM->packets[hpClif_Parse]) > 0) { int result = HPM->parse_packets(fd,cmd,hpClif_Parse); @@ -21861,8 +22063,8 @@ static int clif_parse(int fd) else packet_db[cmd].func(fd, sd); } -#ifdef DUMP_UNKNOWN_PACKET else { +#ifdef DUMP_UNKNOWN_PACKET const char* packet_txt = "save/packet.txt"; FILE* fp; @@ -21888,8 +22090,10 @@ static int clif_parse(int fd) ShowDump(RFIFOP(fd,0), packet_len); } - } +#else + clif->pDull(fd, sd); #endif + } RFIFOSKIP(fd, packet_len); @@ -22061,6 +22265,7 @@ void clif_defaults(void) clif->map_port = 5121; clif->ally_only = false; clif->delayed_damage_ers = NULL; + clif->cmd = -1; /* core */ clif->init = do_init_clif; clif->final = do_final_clif; @@ -22197,9 +22402,12 @@ void clif_defaults(void) clif->combo_delay = clif_combo_delay; clif->status_change = clif_status_change; clif->insert_card = clif_insert_card; - clif->inventorylist = clif_inventorylist; - clif->equiplist = clif_equiplist; - clif->cartlist = clif_cartlist; + clif->inventoryList = clif_inventoryList; + clif->inventoryItems = clif_inventoryItems; + clif->equipList = clif_equipList; + clif->equipItems = clif_equipItems; + clif->cartList = clif_cartList; + clif->cartItems = clif_cartItems; clif->favorite_item = clif_favorite_item; clif->clearcart = clif_clearcart; clif->item_identify_list = clif_item_identify_list; @@ -22292,6 +22500,8 @@ void clif_defaults(void) clif->specialeffect = clif_specialeffect; clif->specialeffect_single = clif_specialeffect_single; clif->specialeffect_value = clif_specialeffect_value; + clif->removeSpecialEffect = clif_removeSpecialEffect; + clif->removeSpecialEffect_single = clif_removeSpecialEffect_single; clif->millenniumshield = clif_millenniumshield; clif->spiritcharm = clif_charm; clif->charm_single = clif_charm_single; @@ -22355,7 +22565,11 @@ void clif_defaults(void) clif->openvendingAck = clif_openvendingAck; clif->vendingreport = clif_vendingreport; /* storage handling */ - clif->storagelist = clif_storagelist; + clif->storageList = clif_storageList; + clif->guildStorageList = clif_guildStorageList; + clif->storageItems = clif_storageItems; + clif->inventoryStart = clif_inventoryStart; + clif->inventoryEnd = clif_inventoryEnd; clif->updatestorageamount = clif_updatestorageamount; clif->storageitemadded = clif_storageitemadded; clif->storageitemremoved = clif_storageitemremoved; @@ -22898,8 +23112,12 @@ void clif_defaults(void) clif->cz_req_style_change_sub = clif_cz_req_style_change_sub; clif->style_change_response = clif_style_change_response; + clif->camera_showWindow = clif_camera_showWindow; + clif->camera_change = clif_camera_change; + // -- Pet Evolution clif->pPetEvolution = clif_parse_pet_evolution; clif->petEvolutionResult = clif_pet_evolution_result; + clif->pMemorialDungeonCommand = clif_parse_memorial_dungeon_command; } diff --git a/src/map/clif.h b/src/map/clif.h index e3b2a90d3..13c34c77d 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -612,6 +612,16 @@ enum pet_evolution_result { }; /** + * Inventory type for clients 2018-09-12 RE + + **/ +enum inventory_type { + INVTYPE_INVENTORY = 0, + INVTYPE_CART = 1, + INVTYPE_STORAGE = 2, + INVTYPE_GUILD_STORAGE = 3, +}; + +/** * Structures **/ typedef void (*pFunc)(int, struct map_session_data *); //cant help but put it first @@ -660,6 +670,10 @@ enum stylist_shop { STYLIST_SHOP_FAILURE }; +enum memorial_dungeon_command { + COMMAND_MEMORIALDUNGEON_DESTROY_FORCE = 0x3, +}; + /** * Clif.c Interface **/ @@ -670,6 +684,7 @@ struct clif_interface { uint16 map_port; char map_ip_str[128]; int map_fd; + int cmd; /* for clif_clearunit_delayed */ struct eri *delay_clearunit_ers; /* Cash Shop [Ind/Hercules] */ @@ -827,9 +842,12 @@ struct clif_interface { void (*combo_delay) (struct block_list *bl,int wait); void (*status_change) (struct block_list *bl,int type,int flag,int tick,int val1, int val2, int val3); void (*insert_card) (struct map_session_data *sd,int idx_equip,int idx_card,int flag); - void (*inventorylist) (struct map_session_data *sd); - void (*equiplist) (struct map_session_data *sd); - void (*cartlist) (struct map_session_data *sd); + void (*inventoryList) (struct map_session_data *sd); + void (*inventoryItems) (struct map_session_data *sd, enum inventory_type type); + void (*equipList) (struct map_session_data *sd); + void (*equipItems) (struct map_session_data *sd, enum inventory_type type); + void (*cartList) (struct map_session_data *sd); + void (*cartItems) (struct map_session_data *sd, enum inventory_type type); void (*favorite_item) (struct map_session_data* sd, unsigned short index); void (*clearcart) (int fd); void (*item_identify_list) (struct map_session_data *sd); @@ -922,6 +940,8 @@ struct clif_interface { void (*specialeffect) (struct block_list* bl, int type, enum send_target target); void (*specialeffect_single) (struct block_list* bl, int type, int fd); void (*specialeffect_value) (struct block_list* bl, int effect_id, int num, send_target target); + void (*removeSpecialEffect) (struct block_list *bl, int effectId, enum send_target target); + void (*removeSpecialEffect_single) (struct block_list *bl, int effectId, struct block_list *targetBl); void (*millenniumshield) (struct block_list *bl, short shields ); void (*spiritcharm) (struct map_session_data *sd); void (*charm_single) (int fd, struct map_session_data *sd); @@ -986,7 +1006,11 @@ struct clif_interface { void (*openvendingAck) (int fd, int result); void (*vendingreport) (struct map_session_data* sd, int index, int amount, uint32 char_id, int zeny); /* storage handling */ - void (*storagelist) (struct map_session_data* sd, struct item* items, int items_length); + void (*storageList) (struct map_session_data* sd, struct item* items, int items_length); + void (*guildStorageList) (struct map_session_data* sd, struct item* items, int items_length); + void (*storageItems) (struct map_session_data* sd, enum inventory_type type, struct item* items, int items_length); + void (*inventoryStart) (struct map_session_data* sd, enum inventory_type type, const char* name); + void (*inventoryEnd) (struct map_session_data* sd, enum inventory_type type); void (*updatestorageamount) (struct map_session_data* sd, int amount, int max_amount); void (*storageitemadded) (struct map_session_data* sd, struct item* i, int index, int amount); void (*storageitemremoved) (struct map_session_data* sd, int index, int amount); @@ -1527,6 +1551,9 @@ struct clif_interface { void (*pPetEvolution) (int fd, struct map_session_data *sd); void (*petEvolutionResult) (int fd, enum pet_evolution_result result); void (*party_dead_notification) (struct map_session_data *sd); + void (*pMemorialDungeonCommand) (int fd, struct map_session_data *sd); + void (*camera_showWindow) (struct map_session_data *sd); + void (*camera_change) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target); }; #ifdef HERCULES_CORE diff --git a/src/map/guild.c b/src/map/guild.c index 780d21326..757dbb445 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -721,7 +721,6 @@ static int guild_reply_invite(struct map_session_data *sd, int guild_id, int fla } else {// accepted - struct guild_member m; struct guild* g; int i; @@ -741,8 +740,8 @@ static int guild_reply_invite(struct map_session_data *sd, int guild_id, int fla return 0; } - guild->makemember(&m,sd); - intif->guild_addmember(guild_id, &m); + guild->makemember(&g->member[i], sd); + intif->guild_addmember(guild_id, &g->member[i]); //TODO: send a minimap update to this player } diff --git a/src/map/instance.c b/src/map/instance.c index 8bd45ba50..1e83b0b76 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -727,6 +727,66 @@ static void instance_check_kick(struct map_session_data *sd) } } +/** + * Look up existing memorial dungeon of the player and destroy it + * + * @param sd session data. + * + */ +static void instance_force_destroy(struct map_session_data *sd) +{ + nullpo_retv(sd); + + for (int i = 0; i < instance->instances; ++i) { + switch (instance->list[i].owner_type) { + case IOT_CHAR: + { + if (instance->list[i].owner_id != sd->status.char_id) + continue; + break; + } + case IOT_PARTY: + { + int party_id = sd->status.party_id; + if (instance->list[i].owner_id != party_id) + continue; + int j = 0; + struct party_data *pt = party->search(party_id); + nullpo_retv(pt); + + ARR_FIND(0, MAX_PARTY, j, pt->party.member[j].leader); + if (j == MAX_PARTY) { + ShowWarning("clif_parse_memorial_dungeon_command: trying to destroy a party instance, while the party has no leader."); + return; + } + if (pt->party.member[j].char_id != sd->status.char_id) { + ShowWarning("clif_parse_memorial_dungeon_command: trying to destroy a party instance, from a non party-leader player."); + return; + } + break; + } + case IOT_GUILD: + { + int guild_id = sd->status.guild_id; + if (instance->list[i].owner_id != guild_id) + continue; + struct guild *g = guild->search(guild_id); + nullpo_retv(g); + + if (g->member[0].char_id != sd->status.char_id) { + ShowWarning("clif_parse_memorial_dungeon_command: trying to destroy a guild instance, from a non guild-master player."); + return; + } + break; + } + default: + continue; + } + instance->destroy(instance->list[i].id); + return; + } +} + static void do_reload_instance(void) { struct s_mapiterator *iter; @@ -810,4 +870,5 @@ void instance_defaults(void) instance->set_timeout = instance_set_timeout; instance->valid = instance_is_valid; instance->destroy_timer = instance_destroy_timer; + instance->force_destroy = instance_force_destroy; } diff --git a/src/map/instance.h b/src/map/instance.h index ff7e49a7f..91928bf40 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -96,6 +96,7 @@ struct instance_interface { void (*set_timeout) (int instance_id, unsigned int progress_timeout, unsigned int idle_timeout); bool (*valid) (int instance_id); int (*destroy_timer) (int tid, int64 tick, int id, intptr_t data); + void (*force_destroy) (struct map_session_data *sd); }; #ifdef HERCULES_CORE diff --git a/src/map/map.h b/src/map/map.h index cf3a4e57c..d50666d4b 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -789,6 +789,12 @@ struct questinfo_qreq { int state; }; +struct questinfo_itemreq { + int nameid; + int min; + int max; +}; + struct questinfo { struct npc_data *nd; unsigned short icon; @@ -805,7 +811,7 @@ struct questinfo { int min; int max; } job_level; - VECTOR_DECL(struct item) items; + VECTOR_DECL(struct questinfo_itemreq) items; struct s_homunculus homunculus; int homunculus_type; VECTOR_DECL(struct questinfo_qreq) quest_requirement; diff --git a/src/map/messages_main.h b/src/map/messages_main.h index dd000d2f1..e56eb42a1 100644 --- a/src/map/messages_main.h +++ b/src/map/messages_main.h @@ -23,7 +23,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20180808 +Latest version: 20181002 */ enum clif_messages { @@ -17569,9 +17569,11 @@ DEATH: %.1f%% (Basic 100.0%% VIP Bonus %.1f%% + %s %.1f%%) MSG_ID_AFB = 0xafb, #endif #if PACKETVER >= 20150826 -/*20150826 to latest +/*20150826 to 20180919 해당 태그는 이름으로 사용하실 수 없습니다. Name with this tag cannot be used. +20181002 to latest + 해당 내용은 이름으로 사용하실 수 없습니다. */ MSG_ID_AFC = 0xafc, #endif @@ -21267,6 +21269,62 @@ DEATH : %.1f%% ( basic 100.0%% %s %.1f%%) */ MSG_ID_DD1 = 0xdd1, #endif +#if PACKETVER >= 20180829 +/*20180829 to latest +영문이나 러시아어 단독으로만 사용이 가능합니다. +*/ + MSG_ID_DD2 = 0xdd2, +/*20180829 to latest +you must have an AccessTicket to login +*/ + MSG_ID_DD3 = 0xdd3, +/*20180829 to latest +창고를 불러오는 중입니다. +*/ + MSG_ID_DD4 = 0xdd4, +/*20180829 to latest +NOW LOADING.. +*/ + MSG_ID_DD5 = 0xdd5, +#endif +#if PACKETVER >= 20181002 +/*20181002 to latest +삭제 +*/ + MSG_ID_DD6 = 0xdd6, +/*20181002 to latest +답장 +*/ + MSG_ID_DD7 = 0xdd7, +/*20181002 to latest +전송 +*/ + MSG_ID_DD8 = 0xdd8, +/*20181002 to latest +이름확인 +*/ + MSG_ID_DD9 = 0xdd9, +/*20181002 to latest +공지 +Notice +*/ + MSG_ID_DDA = 0xdda, +/*20181002 to latest +일반 +General +*/ + MSG_ID_DDB = 0xddb, +/*20181002 to latest +반송 +Clear +*/ + MSG_ID_DDC = 0xddc, +/*20181002 to latest +검색 +Search +*/ + MSG_ID_DDD = 0xddd, +#endif }; #endif /* MAP_MESSAGES_MAIN_H */ diff --git a/src/map/messages_re.h b/src/map/messages_re.h index bf2927d6b..474030df1 100644 --- a/src/map/messages_re.h +++ b/src/map/messages_re.h @@ -23,7 +23,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20180808 +Latest version: 20181002 */ enum clif_messages { @@ -17045,9 +17045,11 @@ DEATH: %.1f%% (Basic 100.0%% VIP Bonus %.1f%% + %s %.1f%%) MSG_ID_AFB = 0xafb, #endif #if PACKETVER >= 20150826 -/*20150826 to latest +/*20150826 to 20180919 해당 태그는 이름으로 사용하실 수 없습니다. Name with this tag cannot be used. +20181002 to latest + 해당 내용은 이름으로 사용하실 수 없습니다. */ MSG_ID_AFC = 0xafc, #endif @@ -20746,6 +20748,62 @@ DEATH : %.1f%% ( basic 100.0%% %s %.1f%%) */ MSG_ID_DD1 = 0xdd1, #endif +#if PACKETVER >= 20180829 +/*20180829 to latest +영문이나 러시아어 단독으로만 사용이 가능합니다. +*/ + MSG_ID_DD2 = 0xdd2, +/*20180829 to latest +you must have an AccessTicket to login +*/ + MSG_ID_DD3 = 0xdd3, +/*20180829 to latest +창고를 불러오는 중입니다. +*/ + MSG_ID_DD4 = 0xdd4, +/*20180829 to latest +NOW LOADING.. +*/ + MSG_ID_DD5 = 0xdd5, +#endif +#if PACKETVER >= 20180919 +/*20180919 to latest +삭제 +*/ + MSG_ID_DD6 = 0xdd6, +/*20180919 to latest +답장 +*/ + MSG_ID_DD7 = 0xdd7, +/*20180919 to latest +전송 +*/ + MSG_ID_DD8 = 0xdd8, +/*20180919 to latest +이름확인 +*/ + MSG_ID_DD9 = 0xdd9, +/*20180919 to latest +공지 +Notice +*/ + MSG_ID_DDA = 0xdda, +/*20180919 to latest +일반 +General +*/ + MSG_ID_DDB = 0xddb, +/*20180919 to latest +반송 +Clear +*/ + MSG_ID_DDC = 0xddc, +/*20180919 to latest +검색 +Search +*/ + MSG_ID_DDD = 0xddd, +#endif }; #endif /* MAP_MESSAGES_RE_H */ diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h index 05e3f1479..c562bb07c 100644 --- a/src/map/messages_zero.h +++ b/src/map/messages_zero.h @@ -23,7 +23,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20180822 +Latest version: 20180919 */ enum clif_messages { @@ -17371,9 +17371,55 @@ you must have an AccessTicket to login MSG_ID_DD3 = 0xdd3, /*20180725 to 20180801 -- +20180905 to latest +창고를 불러오는 중입니다. */ MSG_ID_DD4 = 0xdd4, #endif +#if PACKETVER >= 20180905 +/*20180905 to latest +NOW LOADING.. +*/ + MSG_ID_DD5 = 0xdd5, +#endif +#if PACKETVER >= 20180919 +/*20180919 to latest +삭제 +*/ + MSG_ID_DD6 = 0xdd6, +/*20180919 to latest +답장 +*/ + MSG_ID_DD7 = 0xdd7, +/*20180919 to latest +전송 +*/ + MSG_ID_DD8 = 0xdd8, +/*20180919 to latest +이름확인 +*/ + MSG_ID_DD9 = 0xdd9, +/*20180919 to latest +공지 +Notice +*/ + MSG_ID_DDA = 0xdda, +/*20180919 to latest +일반 +General +*/ + MSG_ID_DDB = 0xddb, +/*20180919 to latest +반송 +Clear +*/ + MSG_ID_DDC = 0xddc, +/*20180919 to latest +검색 +Search +*/ + MSG_ID_DDD = 0xddd, +#endif }; #endif /* MAP_MESSAGES_ZERO_H */ diff --git a/src/map/mob.c b/src/map/mob.c index d398d938c..765acafe7 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2426,7 +2426,8 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type) if(zeny) // zeny from mobs [Valaris] pc->getzeny(tmpsd[i], zeny, LOG_TYPE_PICKDROP_MONSTER, NULL); - achievement->validate_mob_kill(tmpsd[i], md->db->mob_id); // Achievements [Smokexyz/Hercules] + if (!md->special_state.clone && !mob->is_clone(md->class_)) + achievement->validate_mob_kill(tmpsd[i], md->db->mob_id); // Achievements [Smokexyz/Hercules] } } diff --git a/src/map/npc.h b/src/map/npc.h index eff4ed4ec..ed5f4138d 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -144,7 +144,7 @@ enum actor_classes { #define MAX_NPC_CLASS 1000 // New NPC range #define MAX_NPC_CLASS2_START 10001 -#define MAX_NPC_CLASS2_END 10248 +#define MAX_NPC_CLASS2_END 10310 //Script NPC events. enum npce_event { diff --git a/src/map/packets.h b/src/map/packets.h index 1d1046e8a..dc610ce2a 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -1142,7 +1142,7 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x02cc,4); packet(0x02cd,26); packet(0x02ce,10); - packet(0x02cf,6); + packet(0x02cf,6,clif->pMemorialDungeonCommand); packet(0x02d0,-1); packet(0x02d1,-1); packet(0x02d2,-1); @@ -4270,4 +4270,89 @@ packet(0x96e,-1,clif->ackmergeitems); // changed packet sizes #endif +// 2018-08-29aRagexe +#if PACKETVER_MAIN_NUM >= 20180829 +// new packets + packet(0x0b05,59); + packet(0x0b06,53,clif->pDull/*,XXX*/); + packet(0x0b07,-1); + packet(0x0b08,26); // ZC_INVENTORY_START + packet(0x0b09,-1); // ZC_STORE_ITEMLIST_NORMAL_V6 + packet(0x0b0a,-1); // ZC_STORE_ITEMLIST_EQUIP_V6 + packet(0x0b0b,3); // ZC_INVENTORY_END + packet(0x0b0c,155,clif->pDull/*,XXX*/); +// changed packet sizes +#endif + +// 2018-08-29aRagexeRE +#if PACKETVER_RE_NUM >= 20180829 +// new packets + packet(0x0b05,63); + packet(0x0b06,53,clif->pDull/*,XXX*/); + packet(0x0b07,-1); + packet(0x0b08,26); // ZC_INVENTORY_START + packet(0x0b09,-1); // ZC_STORE_ITEMLIST_NORMAL_V6 + packet(0x0b0a,-1); // ZC_STORE_ITEMLIST_EQUIP_V6 + packet(0x0b0b,3); // ZC_INVENTORY_END + packet(0x0b0c,155,clif->pDull/*,XXX*/); +// changed packet sizes +#endif + +// 2018-09-05aRagexe_zero +#if PACKETVER_ZERO_NUM >= 20180905 +// new packets + packet(0x0b0d,6,clif->pDull/*,XXX*/); +// changed packet sizes + packet(0x0b08,27); // ZC_INVENTORY_START + packet(0x0b0b,4); // ZC_INVENTORY_END +#endif + +#ifndef PACKETVER_ZERO +// 2018-09-12dRagexe, 2018-09-12dRagexeRE +#if PACKETVER >= 20180912 +// new packets + packet(0x0b0d,10,clif->pDull/*,XXX*/); + packet(0x0b0e,-1,clif->pDull/*,XXX*/); + packet(0x0b0f,-1,clif->pDull/*,XXX*/); +// changed packet sizes + packet(0x0b08,27,clif->pDull/*,XXX*/); // ZC_INVENTORY_START + packet(0x0b0b,4,clif->pDull/*,XXX*/); // ZC_INVENTORY_END +#endif +#endif + +// 2018-09-19aRagexeRE +#if PACKETVER_RE_NUM >= 20180919 +// new packets +// changed packet sizes + packet(0x0b08,-1); // ZC_INVENTORY_START +#endif + +// 2018-09-19aRagexe_zero +#if PACKETVER_ZERO_NUM >= 20180919 +// new packets + packet(0x0b0e,-1,clif->pDull/*,XXX*/); + packet(0x0b0f,-1,clif->pDull/*,XXX*/); +// changed packet sizes + packet(0x0b08,-1); // ZC_INVENTORY_START + packet(0x0b0d,10,clif->pDull/*,XXX*/); +#endif + + +// 2018-10-02aRagexe +#if PACKETVER_MAIN_NUM >= 20181002 +// new packets + packet(0x0b10,10,clif->pDull/*,XXX*/); + packet(0x0b11,4,clif->pDull/*,XXX*/); +// changed packet sizes + packet(0x0b08,-1); // ZC_INVENTORY_START +#endif + +// 2018-10-02aRagexeRE +#if PACKETVER_RE_NUM >= 20181002 +// new packets + packet(0x0b10,10,clif->pDull/*,XXX*/); + packet(0x0b11,4,clif->pDull/*,XXX*/); +// changed packet sizes +#endif + #endif /* MAP_PACKETS_H */ diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h index 6e7f27166..03ece5d27 100644 --- a/src/map/packets_keys_main.h +++ b/src/map/packets_keys_main.h @@ -874,7 +874,7 @@ packetKeys(0x6A596301,0x76866D0E,0x32294A45); #endif -// 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE +// 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE, 2018-08-29aRagexe, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-12dRagexeRE, 2018-09-19aRagexe, 2018-09-19aRagexeRE, 2018-10-02aRagexe, 2018-10-02aRagexeRE, 2018-10-02bRagexe, 2018-10-02bRagexeRE #if PACKETVER == 20131223 || \ PACKETVER == 20140508 || \ PACKETVER == 20140611 || \ @@ -899,7 +899,12 @@ PACKETVER == 20180718 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180831 || \ + PACKETVER == 20180912 || \ + PACKETVER == 20180919 || \ + PACKETVER >= 20181002 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h index 42a6aaf37..1b6cd537c 100644 --- a/src/map/packets_keys_zero.h +++ b/src/map/packets_keys_zero.h @@ -29,7 +29,7 @@ /* This file is autogenerated, please do not commit manual changes */ -// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero +// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero, 2018-09-28aRagexe_zero #if PACKETVER == 20171018 || \ PACKETVER == 20171019 || \ PACKETVER == 20171023 || \ @@ -54,7 +54,12 @@ PACKETVER == 20180725 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180905 || \ + PACKETVER == 20180912 || \ + PACKETVER == 20180919 || \ + PACKETVER >= 20180928 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h index 441415df2..53bdfa59d 100644 --- a/src/map/packets_shuffle_main.h +++ b/src/map/packets_shuffle_main.h @@ -3344,7 +3344,7 @@ packet(0x0969,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE #endif -// 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-28bRagexe, 2018-04-04bRagexe, 2018-04-18aRagexe, 2018-04-25cRagexe, 2018-05-02bRagexe, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-23aRagexe, 2018-05-30aRagexe, 2018-06-05bRagexe, 2018-06-20cRagexe, 2018-06-20eRagexe, 2018-06-21aRagexe, 2018-07-04aRagexe, 2018-07-18bRagexe, 2018-07-18cRagexe, 2018-08-01cRagexe, 2018-08-08bRagexe, 2018-08-22cRagexe +// 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-28bRagexe, 2018-04-04bRagexe, 2018-04-18aRagexe, 2018-04-25cRagexe, 2018-05-02bRagexe, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-23aRagexe, 2018-05-30aRagexe, 2018-06-05bRagexe, 2018-06-20cRagexe, 2018-06-20eRagexe, 2018-06-21aRagexe, 2018-07-04aRagexe, 2018-07-18bRagexe, 2018-07-18cRagexe, 2018-08-01cRagexe, 2018-08-08bRagexe, 2018-08-22cRagexe, 2018-08-29aRagexe, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-19aRagexe, 2018-10-02aRagexe, 2018-10-02bRagexe #if PACKETVER == 20140611 || \ PACKETVER == 20150225 || \ PACKETVER == 20180315 || \ @@ -3365,7 +3365,12 @@ PACKETVER == 20180718 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180831 || \ + PACKETVER == 20180912 || \ + PACKETVER == 20180919 || \ + PACKETVER >= 20181002 packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD diff --git a/src/map/packets_shuffle_re.h b/src/map/packets_shuffle_re.h index ee268a8f5..e77b97cac 100644 --- a/src/map/packets_shuffle_re.h +++ b/src/map/packets_shuffle_re.h @@ -9662,13 +9662,17 @@ packet(0x083c,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK #endif -// 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexeRE, 2018-08-01cRagexeRE, 2018-08-08bRagexeRE, 2018-08-22cRagexeRE +// 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexeRE, 2018-08-01cRagexeRE, 2018-08-08bRagexeRE, 2018-08-22cRagexeRE, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-09-12dRagexeRE, 2018-09-19aRagexeRE, 2018-10-02aRagexeRE, 2018-10-02bRagexeRE #if PACKETVER == 20180704 || \ PACKETVER == 20180711 || \ PACKETVER == 20180718 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180912 || \ + PACKETVER == 20180919 || \ + PACKETVER >= 20181002 packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD diff --git a/src/map/packets_shuffle_zero.h b/src/map/packets_shuffle_zero.h index 479cf634a..fedefbe3d 100644 --- a/src/map/packets_shuffle_zero.h +++ b/src/map/packets_shuffle_zero.h @@ -36,7 +36,7 @@ /* This file is autogenerated, please do not commit manual changes */ -// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero +// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero, 2018-09-28aRagexe_zero #if PACKETVER == 20171018 || \ PACKETVER == 20171019 || \ PACKETVER == 20171023 || \ @@ -61,7 +61,12 @@ PACKETVER == 20180725 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180905 || \ + PACKETVER == 20180912 || \ + PACKETVER == 20180919 || \ + PACKETVER >= 20180928 packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 852a44cb8..29a3355f7 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -198,7 +198,9 @@ enum packet_headers { #else dropflooritemType = 0x9e, #endif -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + inventorylistnormalType = 0xb09, +#elif PACKETVER >= 20120925 inventorylistnormalType = 0x991, #elif PACKETVER >= 20080102 inventorylistnormalType = 0x2e8, @@ -207,7 +209,9 @@ enum packet_headers { #else inventorylistnormalType = 0xa3, #endif -#if PACKETVER >= 20150226 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + inventorylistequipType = 0xb0a, +#elif PACKETVER >= 20150226 inventorylistequipType = 0xa0d, #elif PACKETVER >= 20120925 inventorylistequipType = 0x992, @@ -218,27 +222,33 @@ enum packet_headers { #else inventorylistequipType = 0xa4, #endif -#if PACKETVER >= 20120925 - storagelistnormalType = 0x995, +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + storageListNormalType = 0xb09, +#elif PACKETVER >= 20120925 + storageListNormalType = 0x995, #elif PACKETVER >= 20080102 - storagelistnormalType = 0x2ea, + storageListNormalType = 0x2ea, #elif PACKETVER >= 20071002 - storagelistnormalType = 0x295, + storageListNormalType = 0x295, #else - storagelistnormalType = 0xa5, + storageListNormalType = 0xa5, #endif -#if PACKETVER >= 20150226 - storagelistequipType = 0xa10, +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + storageListEquipType = 0xb0a, +#elif PACKETVER >= 20150226 + storageListEquipType = 0xa10, #elif PACKETVER >= 20120925 - storagelistequipType = 0x996, + storageListEquipType = 0x996, #elif PACKETVER >= 20080102 - storagelistequipType = 0x2d1, + storageListEquipType = 0x2d1, #elif PACKETVER >= 20071002 - storagelistequipType = 0x296, + storageListEquipType = 0x296, #else - storagelistequipType = 0xa6, + storageListEquipType = 0xa6, #endif -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + cartlistnormalType = 0xb09, +#elif PACKETVER >= 20120925 cartlistnormalType = 0x993, #elif PACKETVER >= 20080102 cartlistnormalType = 0x2e9, @@ -247,7 +257,9 @@ enum packet_headers { #else cartlistnormalType = 0x123, #endif -#if PACKETVER >= 20150226 +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + cartlistequipType = 0xb0a, +#elif PACKETVER >= 20150226 cartlistequipType = 0xa0f, #elif PACKETVER >= 20120925 cartlistequipType = 0x994, @@ -1162,28 +1174,63 @@ struct packet_roulette_itemrecv_ack { struct packet_itemlist_normal { int16 PacketType; int16 PacketLength; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + uint8 invType; +#endif struct NORMALITEM_INFO list[MAX_ITEMLIST]; } __attribute__((packed)); struct packet_itemlist_equip { int16 PacketType; int16 PacketLength; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + uint8 invType; +#endif struct EQUIPITEM_INFO list[MAX_ITEMLIST]; } __attribute__((packed)); -struct packet_storelist_normal { +struct ZC_STORE_ITEMLIST_NORMAL { int16 PacketType; int16 PacketLength; -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + uint8 invType; +#endif +#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002 char name[NAME_LENGTH]; #endif struct NORMALITEM_INFO list[MAX_ITEMLIST]; } __attribute__((packed)); -struct packet_storelist_equip { +struct ZC_INVENTORY_START { + int16 packetType; +#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + int16 packetLength; +#endif +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + uint8 invType; +#endif +#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + char name[]; +#else + char name[NAME_LENGTH]; +#endif +} __attribute__((packed)); + +struct ZC_INVENTORY_END { + int16 packetType; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + uint8 invType; +#endif + char flag; +} __attribute__((packed)); + +struct ZC_STORE_ITEMLIST_EQUIP { int16 PacketType; int16 PacketLength; -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + uint8 invType; +#endif +#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002 char name[NAME_LENGTH]; #endif struct EQUIPITEM_INFO list[MAX_ITEMLIST]; @@ -2675,7 +2722,7 @@ struct packet_achievement_update { struct packet_achievement_reward_ack { uint16 packet_id; - uint8 received; + uint8 failed; uint32 ach_id; } __attribute__((packed)); @@ -2784,6 +2831,26 @@ struct PACKET_ZC_ACK_LEAVE_GUILD2 { char reason[40]; } __attribute__((packed)); +struct PACKET_CZ_MEMORIALDUNGEON_COMMAND { + int16 packetType; + int32 command; +} __attribute__((packed)); + +struct PACKET_ZC_REMOVE_EFFECT { + int16 packetType; + uint32 aid; + uint32 effectId; +} __attribute__((packed)); + +struct PACKET_ZC_CAMERA_INFO { + int16 packetType; + int8 action; + float range; + float rotation; + float latitude; +} __attribute__((packed)); + + #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) #endif // not NetBSD < 6 / Solaris diff --git a/src/map/pc.c b/src/map/pc.c index e20b3760e..b8a6912ee 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2075,7 +2075,7 @@ static int pc_disguise(struct map_session_data *sd, int class) clif->spawn(&sd->bl); if (class == sd->status.class && pc_iscarton(sd)) { //It seems the cart info is lost on undisguise. - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd,SP_CARTINFO); } if (sd->chat_id != 0) { @@ -4504,14 +4504,15 @@ static int pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_typ sd->status.zeny -= zeny; clif->updatestatus(sd,SP_ZENY); - achievement->validate_zeny(sd, -zeny); // Achievements [Smokexyz/Hercules] + if (zeny > 0) { + achievement->validate_zeny(sd, -zeny); // Achievements [Smokexyz/Hercules] + logs->zeny(sd, type, tsd ? tsd : sd, -zeny); - if(!tsd) tsd = sd; - logs->zeny(sd, type, tsd, -zeny); - if( zeny > 0 && sd->state.showzeny ) { - char output[255]; - sprintf(output, "Removed %dz.", zeny); - clif_disp_onlyself(sd, output); + if (sd->state.showzeny) { + char output[255]; + sprintf(output, "Removed %dz.", zeny); + clif_disp_onlyself(sd, output); + } } return 0; @@ -4642,14 +4643,15 @@ static int pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_typ sd->status.zeny += zeny; clif->updatestatus(sd,SP_ZENY); - achievement->validate_zeny(sd, zeny); // Achievements [Smokexyz/Hercules] + if (zeny > 0) { + achievement->validate_zeny(sd, zeny); // Achievements [Smokexyz/Hercules] + logs->zeny(sd, type, tsd ? tsd : sd, zeny); - if(!tsd) tsd = sd; - logs->zeny(sd, type, tsd, zeny); - if( zeny > 0 && sd->state.showzeny ) { - char output[255]; - sprintf(output, "Gained %dz.", zeny); - clif_disp_onlyself(sd, output); + if (sd->state.showzeny) { + char output[255]; + sprintf(output, "Gained %dz.", zeny); + clif_disp_onlyself(sd, output); + } } return 0; @@ -4687,7 +4689,7 @@ static int pc_search_inventory(struct map_session_data *sd, int item_id) * 6 = ? * 7 = stack limitation *------------------------------------------*/ -static int pc_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) +static int pc_additem(struct map_session_data *sd, const struct item *item_data, int amount, e_log_pick_type log_type) { struct item_data *data; int i; @@ -9196,7 +9198,7 @@ static int pc_setoption(struct map_session_data *sd, int type) #ifndef NEW_CARTS if( type&OPTION_CART && !( p_type&OPTION_CART ) ) { //Cart On - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd, SP_CARTINFO); if(pc->checkskill(sd, MC_PUSHCART) < 10) status_calc_pc(sd,SCO_NONE); //Apply speed penalty. @@ -9303,7 +9305,7 @@ static int pc_setcart(struct map_session_data *sd, int type) break; default:/* everything else is an allowed ID so we can move on */ if( !sd->sc.data[SC_PUSH_CART] ) /* first time, so fill cart data */ - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd, SP_CARTINFO); sc_start(NULL,&sd->bl, SC_PUSH_CART, 100, type, 0); clif->sc_load(&sd->bl, sd->bl.id, AREA, SI_ON_PUSH_CART, type, 0, 0); diff --git a/src/map/pc.h b/src/map/pc.h index 17a9b8200..4ee5f560b 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -937,7 +937,7 @@ END_ZEROED_BLOCK; /* End */ int (*inventoryblank) (struct map_session_data *sd); int (*search_inventory) (struct map_session_data *sd,int item_id); int (*payzeny) (struct map_session_data *sd,int zeny, enum e_log_pick_type type, struct map_session_data *tsd); - int (*additem) (struct map_session_data *sd,struct item *item_data,int amount,e_log_pick_type log_type); + int (*additem) (struct map_session_data *sd, const struct item *item_data, int amount, e_log_pick_type log_type); int (*getzeny) (struct map_session_data *sd,int zeny, enum e_log_pick_type type, struct map_session_data *tsd); int (*delitem) (struct map_session_data *sd,int n,int amount,int type, short reason, e_log_pick_type log_type); diff --git a/src/map/pet.c b/src/map/pet.c index cfb3e8253..c32a92b78 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -350,7 +350,7 @@ static int pet_return_egg(struct map_session_data *sd, struct pet_data *pd) sd->status.inventory[i].bound = IBT_NONE; } #if PACKETVER >= 20180704 - clif->inventorylist(sd); + clif->inventoryList(sd); clif->send_petdata(sd, pd, 6, 0); #endif pd->pet.incubate = 1; diff --git a/src/map/quest.c b/src/map/quest.c index ab0b06974..02bf7638b 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -805,18 +805,17 @@ static bool quest_questinfo_validate_joblevel(struct map_session_data *sd, struc */ static bool quest_questinfo_validate_items(struct map_session_data *sd, struct questinfo *qi) { - int i, idx; - nullpo_retr(false, sd); nullpo_retr(false, qi); - - for (i = 0; i < VECTOR_LENGTH(qi->items); i++) { - struct item *item = &VECTOR_INDEX(qi->items, i); - idx = pc->search_inventory(sd, item->nameid); - if (idx == INDEX_NOT_FOUND) - return false; - if (sd->status.inventory[idx].amount < item->amount) + for (int i = 0; i < VECTOR_LENGTH(qi->items); i++) { + struct questinfo_itemreq *item = &VECTOR_INDEX(qi->items, i); + int count = 0; + for (int j = 0; j < MAX_INVENTORY; j++) { + if (sd->status.inventory[j].nameid == item->nameid) + count += sd->status.inventory[j].amount; + } + if (count < item->min || count > item->max) return false; } @@ -887,7 +886,14 @@ static bool quest_questinfo_validate_quests(struct map_session_data *sd, struct for (i = 0; i < VECTOR_LENGTH(qi->quest_requirement); i++) { struct questinfo_qreq *quest_requirement = &VECTOR_INDEX(qi->quest_requirement, i); - if (quest->check(sd, quest_requirement->id, HAVEQUEST) != quest_requirement->state) + int quest_progress = quest->check(sd, quest_requirement->id, HAVEQUEST); + if (quest_progress == -1) + quest_progress = 0; + else if (quest_progress == 0 || quest_progress == 1) + quest_progress = 1; + else + quest_progress = 2; + if (quest_progress != quest_requirement->state) return false; } diff --git a/src/map/script.c b/src/map/script.c index 65ffc1a6d..5eed58977 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3316,95 +3316,28 @@ static void set_reg_npcscope_str(struct script_state *st, struct reg_db *n, int6 static void set_reg_pc_ref_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { - struct script_reg_str *p = NULL; - unsigned int index = script_getvaridx(num); - - nullpo_retv(n); - - if ((p = i64db_get(n->vars, num)) != NULL) { - if (str[0]) { - if (p->value) { - aFree(p->value); - } else if (index) { - script->array_update(n, num, false); - } - p->value = aStrdup(str); - } else { - p->value = NULL; - if (index) { - script->array_update(n, num, true); - } - } - - if (!pc->reg_load) { - p->flag.update = 1; - } - } else if (str[0]) { - struct DBData prev; - if (index) { - script->array_update(n, num, false); - } + struct DBIterator *iter = db_iterator(map->pc_db); - p = ers_alloc(pc->str_reg_ers, struct script_reg_str); - p->value = aStrdup(str); - - if (!pc->reg_load) { - p->flag.update = 1; - } - p->flag.type = 1; - - if(n->vars->put(n->vars, DB->i642key(num), DB->ptr2data(p), &prev)) { - p = DB->data2ptr(&prev); - if (p->value) { - aFree(p->value); - } - ers_free(pc->str_reg_ers, p); + for (struct map_session_data *sd = dbi_first(iter); dbi_exists(iter); sd = dbi_next(iter)) { + if (sd != NULL && n == &sd->regs) { + pc->setregistry_str(sd, num, str); + break; } } + dbi_destroy(iter); } static void set_reg_pc_ref_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { - struct script_reg_num *p = NULL; - unsigned int index = script_getvaridx(num); - - nullpo_retv(n); + struct DBIterator *iter = db_iterator(map->pc_db); - if ((p = i64db_get(n->vars, num)) != NULL) { - if (val) { - if (!p->value && index) { - script->array_update(n, num, false); - } - p->value = val; - } else { - p->value = 0; - if (index) { - script->array_update(n, num, true); - } - } - - if (!pc->reg_load) { - p->flag.update = 1; - } - } else if (val) { - struct DBData prev; - if (index) { - script->array_update(n, num, false); - } - - p = ers_alloc(pc->num_reg_ers, struct script_reg_num); - p->value = val; - - if (!pc->reg_load) { - p->flag.update = 1; - } - p->flag.type = 1; - - if(n->vars->put(n->vars, DB->i642key(num), DB->ptr2data(p), &prev)) { - p = DB->data2ptr(&prev); - ers_free(pc->num_reg_ers, p); + for (struct map_session_data *sd = dbi_first(iter); dbi_exists(iter); sd = dbi_next(iter)) { + if (sd != NULL && n == &sd->regs) { + pc->setregistry(sd, num, val); + break; } } + dbi_destroy(iter); } static void set_reg_npcscope_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) @@ -5965,10 +5898,14 @@ static bool script_sprintf_helper(struct script_state *st, int start, struct Str static BUILDIN(mes) { struct map_session_data *sd = script->rid2sd(st); + if (sd == NULL) return true; - clif->scriptmes(sd, st->oid, script_getstr(st, 2)); + if (script_hasdata(st, 2)) + clif->scriptmes(sd, st->oid, script_getstr(st, 2)); + else + clif->scriptmes(sd, st->oid, ""); return true; } @@ -9361,7 +9298,7 @@ static BUILDIN(repair) if(num==repaircounter) { sd->status.inventory[i].attribute |= ATTR_BROKEN; sd->status.inventory[i].attribute ^= ATTR_BROKEN; - clif->equiplist(sd); + clif->equipList(sd); clif->produce_effect(sd, 0, sd->status.inventory[i].nameid); clif->misceffect(&sd->bl, 3); break; @@ -9398,7 +9335,7 @@ static BUILDIN(repairall) if(repaircounter) { clif->misceffect(&sd->bl, 3); - clif->equiplist(sd); + clif->equipList(sd); } return true; @@ -12331,7 +12268,9 @@ static BUILDIN(sc_end) } //This should help status_change_end force disabling the SC in case it has no limit. - sce->val1 = sce->val2 = sce->val3 = sce->val4 = 0; + if (type != SC_BERSERK) + sce->val1 = 0; // SC_BERSERK requires skill_lv that's stored in sce->val1 when being removed [KirieZ] + sce->val2 = sce->val3 = sce->val4 = 0; status_change_end(bl, (sc_type)type, INVALID_TIMER); } else @@ -15424,6 +15363,50 @@ static BUILDIN(specialeffect2) return true; } +static BUILDIN(removespecialeffect) +{ + struct block_list *bl = NULL; + int type = script_getnum(st, 2); + enum send_target target = AREA; + + if (script_hasdata(st, 3)) { + target = script_getnum(st, 3); + } + + if (script_hasdata(st, 4)) { + if (script_isstringtype(st, 4)) { + struct npc_data *nd = npc->name2id(script_getstr(st, 4)); + if (nd != NULL) { + bl = &nd->bl; + } + } else { + bl = map->id2bl(script_getnum(st, 4)); + } + } else { + bl = map->id2bl(st->oid); + } + + if (bl == NULL) { + return true; + } + + if (target == SELF) { + struct map_session_data *sd; + if (script_hasdata(st, 5)) { + sd = map->id2sd(script_getnum(st, 5)); + } else { + sd = script->rid2sd(st); + } + if (sd != NULL) { + clif->removeSpecialEffect_single(bl, type, &sd->bl); + } + } else { + clif->removeSpecialEffect(bl, type, target); + } + + return true; +} + /*========================================== * Nude [Valaris] *------------------------------------------*/ @@ -17866,7 +17849,9 @@ static BUILDIN(getd) id = script->add_variable(varname); - if (script->str_data[id].type != C_NAME) { + if (script->str_data[id].type != C_NAME && // variable + script->str_data[id].type != C_PARAM && // param + script->str_data[id].type != C_INT) { // constant ShowError("script:getd: `%s` is already used by something that is not a variable.\n", varname); st->state = END; return false; @@ -20694,7 +20679,7 @@ static BUILDIN(getvariableofpc) } if (!sd->regs.vars) - sd->regs.vars = i64db_alloc(DB_OPT_RELEASE_DATA); + sd->regs.vars = i64db_alloc(DB_OPT_BASE); script->push_val(st->stack, C_NAME, reference_getuid(data), &sd->regs); return true; @@ -21114,17 +21099,26 @@ static BUILDIN(setquestinfo) } case QINFO_ITEM: { - struct item item = { 0 }; + struct questinfo_itemreq item = { 0 }; item.nameid = script_getnum(st, 3); - item.amount = script_getnum(st, 4); + item.min = script_hasdata(st, 4) ? script_getnum(st, 4) : 0; + item.max = script_hasdata(st, 5) ? script_getnum(st, 5) : 0; if (itemdb->exists(item.nameid) == NULL) { ShowWarning("buildin_setquestinfo: non existing item (%d) have been given.\n", item.nameid); return false; } - if (item.amount <= 0 || item.amount > MAX_AMOUNT) { - ShowWarning("buildin_setquestinfo: given amount (%d) must be bigger than 0 and smaller than %d.\n", item.amount, MAX_AMOUNT + 1); + if (item.min > item.max) { + ShowWarning("buildin_setquestinfo: minimal amount (%d) is bigger than the maximal amount (%d).\n", item.min, item.max); + return false; + } + if (item.min < 0 || item.min > MAX_AMOUNT) { + ShowWarning("buildin_setquestinfo: given amount (%d) must be bigger than or equal to 0 and smaller than %d.\n", item.min, MAX_AMOUNT + 1); + return false; + } + if (item.max < 0 || item.max > MAX_AMOUNT) { + ShowWarning("buildin_setquestinfo: given amount (%d) must be bigger than or equal to 0 and smaller than %d.\n", item.max, MAX_AMOUNT + 1); return false; } if (VECTOR_LENGTH(qi->items) == 0) @@ -24790,6 +24784,32 @@ static BUILDIN(msgtable2) return true; } +// show/hide camera info +static BUILDIN(camerainfo) +{ + struct map_session_data *sd = script_rid2sd(st); + if (sd == NULL) + return false; + + clif->camera_showWindow(sd); + return true; +} + +// allow change some camera parameters +static BUILDIN(changecamera) +{ + struct map_session_data *sd = script_rid2sd(st); + if (sd == NULL) + return false; + + enum send_target target = SELF; + if (script_hasdata(st, 5)) { + target = script_getnum(st, 5); + } + clif->camera_change(sd, (float)script_getnum(st, 2), (float)script_getnum(st, 3), (float)script_getnum(st, 4), target); + return true; +} + /** * Adds a built-in script function. * @@ -24951,8 +24971,8 @@ static void script_parse_builtin(void) BUILDIN_DEF(__setr,"rv?"), // NPC interaction - BUILDIN_DEF(mes,"s"), - BUILDIN_DEF(mesf,"s*"), + BUILDIN_DEF(mes, "?"), + BUILDIN_DEF(mesf, "s*"), BUILDIN_DEF(next,""), BUILDIN_DEF(close,""), BUILDIN_DEF(close2,""), @@ -25186,6 +25206,7 @@ static void script_parse_builtin(void) BUILDIN_DEF(skilleffect,"vi"), // skill effect [Celest] BUILDIN_DEF(npcskilleffect,"viii"), // npc skill effect [Valaris] BUILDIN_DEF(specialeffect,"i???"), // npc skill effect [Valaris] + BUILDIN_DEF(removespecialeffect,"i???"), BUILDIN_DEF_DEPRECATED(specialeffect2,"i??"), // skill effect on players[Valaris] BUILDIN_DEF(nude,""), // nude command [Valaris] BUILDIN_DEF(mapwarp,"ssii??"), // Added by RoVeRT @@ -25447,7 +25468,7 @@ static void script_parse_builtin(void) //Quest Log System [Inkfish] BUILDIN_DEF(questinfo, "i?"), - BUILDIN_DEF(setquestinfo, "i??"), + BUILDIN_DEF(setquestinfo, "i???"), BUILDIN_DEF(setquest, "i?"), BUILDIN_DEF(erasequest, "i?"), BUILDIN_DEF(completequest, "i?"), @@ -25519,6 +25540,10 @@ static void script_parse_builtin(void) // -- HatEffect BUILDIN_DEF(hateffect, "ii"), + + // camera + BUILDIN_DEF(camerainfo, ""), + BUILDIN_DEF(changecamera, "iii?"), }; int i, len = ARRAYLENGTH(BUILDIN); RECREATE(script->buildin, char *, script->buildin_count + len); // Pre-alloc to speed up diff --git a/src/map/skill.c b/src/map/skill.c index c5579c2f6..4eaab5457 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2588,7 +2588,7 @@ static int skill_break_equip(struct block_list *bl, unsigned short where, int ra pc->unequipitem(sd, j, PCUNEQUIPITEM_RECALC|PCUNEQUIPITEM_FORCE); } } - clif->equiplist(sd); + clif->equipList(sd); } return where; //Return list of pieces broken. @@ -16139,7 +16139,7 @@ static void skill_repairweapon(struct map_session_data *sd, int idx) item->attribute |= ATTR_BROKEN; item->attribute ^= ATTR_BROKEN; /* clear broken state */ - clif->equiplist(target_sd); + clif->equipList(target_sd); pc->delitem(sd, pc->search_inventory(sd, material), 1, 0, DELITEM_NORMAL, LOG_TYPE_CONSUME); // FIXME: is this the correct reason flag? @@ -16222,7 +16222,7 @@ static void skill_weaponrefine(struct map_session_data *sd, int idx) } clif->delitem(sd, idx, 1, DELITEM_NORMAL); clif->upgrademessage(sd->fd, 0,item->nameid); - clif->inventorylist(sd); + clif->inventoryList(sd); clif->refine(sd->fd,0,idx,item->refine); if (ep) pc->equipitem(sd,idx,ep); diff --git a/src/map/storage.c b/src/map/storage.c index ba8dcee3a..a6f0715e7 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -122,8 +122,8 @@ static int storage_storageopen(struct map_session_data *sd) if (sd->storage.aggregate > 0) { storage->sortitem(VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); - clif->storagelist(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); } + clif->storageList(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); clif->updatestorageamount(sd, sd->storage.aggregate, MAX_STORAGE); return 0; @@ -512,7 +512,7 @@ static int storage_guild_storageopen(struct map_session_data *sd) gstor->storage_status = 1; sd->state.storage_flag = STORAGE_FLAG_GUILD; storage->sortitem(gstor->items, ARRAYLENGTH(gstor->items)); - clif->storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items)); + clif->guildStorageList(sd, gstor->items, ARRAYLENGTH(gstor->items)); clif->updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE); return 0; } |