From 3f06bc2bded05a27e1982d1e71c0983009a2f701 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 18 May 2015 01:09:37 +0200 Subject: Removed duplicates of clif->msgtable - Removed clif->msgtable, and renamed clif->msg to clif->msgtable. - Removed clif->msgtable_num, and renamed clif->msg_value to clif->msgtable_num - Renamed clif->msg_skill to clif->msgtable_skill - Removed clif_viewequip_fail - Replaced hardcoded message IDs with constants (see enum clif_messages) Signed-off-by: Haru --- src/map/clif.c | 100 +++++++++++++++++++++++++++---------------------------- src/map/clif.h | 36 +++++++++++++++----- src/map/pc.c | 38 ++++++++++----------- src/map/script.c | 2 +- src/map/skill.c | 14 ++++---- src/map/status.c | 10 +++--- 6 files changed, 109 insertions(+), 91 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index efad7b5e1..09e3ddc69 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5267,7 +5267,7 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id if( skill_id != AM_PHARMACY ) { // AM_PHARMACY is used to Cooking. // It fails. #if PACKETVER >= 20090922 - clif->msg_skill(sd,skill_id,0x625); + clif->msgtable_skill(sd, skill_id, MSG_COOKING_LIST_FAIL); #else WFIFOW(fd,2) = 6 + 2 * c; WFIFOSET(fd,WFIFOW(fd,2)); @@ -8731,9 +8731,15 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts } -/// Display msgstringtable.txt string (ZC_MSG). -/// 0291 .W -void clif_msg(struct map_session_data* sd, unsigned short id) +/** + * Displays a string from msgstringtable.txt (ZC_MSG). + * + * 0291 .W + * + * @param sd The target character. + * @param msg_id msgstringtable message index, 0-based (@see enum clif_messages) + */ +void clif_msgtable(struct map_session_data* sd, unsigned short msg_id) { int fd; nullpo_retv(sd); @@ -8741,31 +8747,47 @@ void clif_msg(struct map_session_data* sd, unsigned short id) WFIFOHEAD(fd, packet_len(0x291)); WFIFOW(fd, 0) = 0x291; - WFIFOW(fd, 2) = id; // zero-based msgstringtable.txt index + WFIFOW(fd, 2) = msg_id; // zero-based msgstringtable.txt index WFIFOSET(fd, packet_len(0x291)); } - -/// Display msgstringtable.txt string and fill in a valid for %d format (ZC_MSG_VALUE). -/// 0x7e2 .W .L -void clif_msg_value(struct map_session_data* sd, unsigned short id, int value) +/** + * Displays a format string from msgstringtable.txt with a %d value (ZC_MSG_VALUE). + * + * 0x7e2 .W .L + * + * @param sd The target character. + * @param msg_id msgstringtable message index, 0-based (@see enum clif_messages) + * @param value The value to fill %d. + */ +void clif_msgtable_num(struct map_session_data *sd, unsigned short msg_id, int value) { - int fd = sd->fd; +#if PACKETVER >= 20090805 + int fd; + nullpo_retv(sd); + fd = sd->fd; WFIFOHEAD(fd, packet_len(0x7e2)); - WFIFOW(fd,0) = 0x7e2; - WFIFOW(fd,2) = id; - WFIFOL(fd,4) = value; + WFIFOW(fd, 0) = 0x7e2; + WFIFOW(fd, 2) = msg_id; + WFIFOL(fd, 4) = value; WFIFOSET(fd, packet_len(0x7e2)); +#endif } - -/// Displays msgstringtable.txt string, prefixed with a skill name. (ZC_MSG_SKILL). -/// 07e6 .W .L -/// -/// NOTE: Message has following format and is printed in color 0xCDCDFF (purple): -/// "[SkillName] Message" -void clif_msg_skill(struct map_session_data* sd, uint16 skill_id, int msg_id) +/** + * Displays a string from msgstringtable.txt, prefixed with a skill name (ZC_MSG_SKILL). + * + * 07e6 .W .L + * + * NOTE: Message has following format and is printed in color 0xCDCDFF (purple): + * "[SkillName] Message" + * + * @param sd The target character. + * @param skill_id ID of the skill to display. + * @param msg_id msgstringtable message index, 0-based (@see enum clif_messages) + */ +void clif_msgtable_skill(struct map_session_data* sd, uint16 skill_id, int msg_id) { int fd = sd->fd; @@ -10337,7 +10359,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) } if( sd->npc_id || sd->state.workinprogress&2 ){ #ifdef RENEWAL - clif->msg(sd, 0x783); // TODO look for the client date that has this message. + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. #endif return; } @@ -10352,7 +10374,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) case BL_NPC: if( sd->ud.skill_id < RK_ENCHANTBLADE && sd->ud.skilltimer != INVALID_TIMER ) {// TODO: should only work with none 3rd job skills #ifdef RENEWAL - clif->msg(sd, 0x783); + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); #endif break; } @@ -10704,7 +10726,7 @@ void clif_parse_ChangeCart(int fd,struct map_session_data *sd) #ifdef RENEWAL if( sd->npc_id || sd->state.workinprogress&1 ){ - clif->msg(sd, 0x783); + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); return; } #endif @@ -10894,7 +10916,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) if( sd->npc_id || sd->state.workinprogress&1 ){ #ifdef RENEWAL - clif->msg(sd, 0x783); // TODO look for the client date that has this message. + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. #endif return; } @@ -10990,7 +11012,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski #ifdef RENEWAL if( sd->state.workinprogress&1 ){ - clif->msg(sd, 0x783); // TODO look for the client date that has this message. + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. return; } #endif @@ -15291,7 +15313,7 @@ void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) { if( tsd->status.show_equip || pc_has_permission(sd, PC_PERM_VIEW_EQUIPMENT) ) clif->viewequip_ack(sd, tsd); else - clif_viewequip_fail(sd); + clif->msgtable(sd, MSG_EQUIP_NOT_PUBLIC); } @@ -15689,7 +15711,7 @@ void clif_parse_mercenary_action(int fd, struct map_session_data* sd) /// 3 = Your mercenary soldier has ran away. void clif_mercenary_message(struct map_session_data* sd, int message) { - clif->msg(sd, 1266 + message); + clif->msgtable(sd, MSG_MERCENARY_EXPIRED + message); } @@ -16924,26 +16946,6 @@ int clif_skill_itemlistwindow( struct map_session_data *sd, uint16 skill_id, uin return 1; -} -// msgstringtable.txt -// 0x291 .W -void clif_msgtable(int fd, int line) { - WFIFOHEAD(fd, packet_len(0x291)); - WFIFOW(fd, 0) = 0x291; - WFIFOW(fd, 2) = line; - WFIFOSET(fd, packet_len(0x291)); -} - -// msgstringtable.txt -// 0x7e2 .W .L -void clif_msgtable_num(int fd, int line, int num) { -#if PACKETVER >= 20090805 - WFIFOHEAD(fd, packet_len(0x7e2)); - WFIFOW(fd, 0) = 0x7e2; - WFIFOW(fd, 2) = line; - WFIFOL(fd, 4) = num; - WFIFOSET(fd, packet_len(0x7e2)); -#endif } /*========================================== * used by SC_AUTOSHADOWSPELL @@ -18677,9 +18679,7 @@ void clif_defaults(void) { clif->broadcast2 = clif_broadcast2; clif->messagecolor = clif_messagecolor; clif->disp_overhead = clif_disp_overhead; - clif->msg = clif_msg; - clif->msg_value = clif_msg_value; - clif->msg_skill = clif_msg_skill; + clif->msgtable_skill = clif_msgtable_skill; clif->msgtable = clif_msgtable; clif->msgtable_num = clif_msgtable_num; clif->message = clif_displaymessage; diff --git a/src/map/clif.h b/src/map/clif.h index 5f1a2a899..4426be974 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -47,7 +47,6 @@ struct channel_data; #define P2PTR(fd) RFIFO2PTR(fd) #define clif_menuskill_clear(sd) ((sd)->menuskill_id = (sd)->menuskill_val = (sd)->menuskill_val2 = 0) #define clif_disp_onlyself(sd,mes,len) clif->disp_message( &(sd)->bl, (mes), (len), SELF ) -#define clif_viewequip_fail( sd ) clif->msg( (sd), 0x54d ); #define MAX_ROULETTE_LEVEL 7 /** client-defined value **/ #define MAX_ROULETTE_COLUMNS 9 /** client-defined value **/ @@ -344,9 +343,30 @@ typedef enum useskill_fail_cause { // clif_skill_fail }useskill_fail_cause; enum clif_messages { - ITEM_CANT_OBTAIN_WEIGHT = 0x34, /* you cannot carry more items because you are overweight. */ - SKILL_CANT_USE_AREA = 0x536, - ITEM_CANT_USE_AREA = 0x537, + MSG_ITEM_CANT_OBTAIN_WEIGHT = 0x034, ///< You cannot carry more items because you are overweight. + MSG_ITEM_NEED_STANDING = 0x297, ///< You cannot use this item while sitting. + MSG_MERCENARY_EXPIRED = 0x4f2, ///< The mercenary contract has expired. + MSG_MERCENARY_DIED = 0x4f3, ///< The mercenary has died. + MSG_MERCENARY_RELEASED = 0x4f4, ///< You have released the mercenary. + MSG_MERCENARY_ESCAPED = 0x4f5, ///< The mercenary has run away. + MSG_SKILL_CANT_USE_AREA = 0x536, ///< This skill cannot be used within this area + MSG_ITEM_CANT_USE_AREA = 0x537, ///< This item cannot be used within this area. + MSG_EQUIP_NOT_PUBLIC = 0x54d, ///< This character's equipment information is not open to the public. + MSG_ITEM_NEED_MADO = 0x59b, ///< Item can only be used when Mado Gear is mounted. + MSG_ITEM_NEED_CART = 0x5ef, ///< Usable only when cart is put on + MSG_RUNE_STONE_MAX_AMOUNT = 0x61b, ///< Cannot create Rune stone more than the maximum amount. + MSG_SKILL_POINTS_LEFT_JOB1 = 0x61e, ///< You must consume all '%d' remaining points in your 1st Job tab. + MSG_SKILL_POINTS_LEFT_JOB2 = 0x61f, ///< You must consume all '%d' remaining points in your 2nd Job tab. 1st Tab is already done. + MSG_SKILL_ITEM_NOT_FOUND = 0x623, // FIXME[Haru]: This seems to be 0x622 in the msgstringtable files I found. + MSG_SKILL_SUCCESS = 0x627, // FIXME[Haru]: This seems to be 0x626 in the msgstringtable files I found. + MSG_SKILL_FAILURE = 0x628, // FIXME[Haru]: This seems to be 0x627 in the msgstringtable files I found. + MSG_SKILL_ITEM_NEED_IDENTIFY = 0x62d, ///< Unable to use unchecked items as materials. + MSG_ITEM_CANT_EQUIP_LVL = 0x6ed, // FIXME[Haru]: This seems to be 0x6ee in the msgstringtable files I found. + MSG_ITEM_CANT_USE_LVL = 0x6ee, // FIXME[Haru]: This seems to be 0x6ef in the msgstringtable files I found. + MSG_COOKING_LIST_FAIL = 0x625, // FIXME[Haru]: This might be a wrong message ID. Not sure what it should be. + MSG_SECONDS_UNTIL_USE = 0x746, ///< %d seconds left until you can use + MSG_NPC_WORK_IN_PROGRESS = 0x783, // FIXME[Haru]: This seems to be 0x784 in the msgstringtable files I found. + MSG_REINS_CANT_USE_MOUNTED = 0x78b, // FIXME[Haru]: This seems to be 0x785 in the msgstringtalbe files I found. }; /** @@ -798,11 +818,9 @@ struct clif_interface { void (*broadcast2) (struct block_list* bl, const char* mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target); void (*messagecolor) (struct block_list* bl, unsigned int color, const char* msg); void (*disp_overhead) (struct block_list *bl, const char* mes); - void (*msg) (struct map_session_data* sd, unsigned short id); - void (*msg_value) (struct map_session_data* sd, unsigned short id, int value); - void (*msg_skill) (struct map_session_data* sd, uint16 skill_id, int msg_id); - void (*msgtable) (int fd, int line); - void (*msgtable_num) (int fd, int line, int num); + void (*msgtable) (struct map_session_data* sd, unsigned short msg_id); + void (*msgtable_num) (struct map_session_data *sd, unsigned short msg_id, int value); + void (*msgtable_skill) (struct map_session_data *sd, uint16 skill_id, int msg_id); void (*message) (const int fd, const char* mes); void (*messageln) (const int fd, const char* mes); /* message+s(printf) */ diff --git a/src/map/pc.c b/src/map/pc.c index 4b372ebc5..7ae446c90 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -892,12 +892,12 @@ int pc_isequip(struct map_session_data *sd,int n) if(pc_has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT)) return 1; - if(item->elv && sd->status.base_level < (unsigned int)item->elv){ - clif->msg(sd, 0x6ED); + if (item->elv && sd->status.base_level < (unsigned int)item->elv) { + clif->msgtable(sd, MSG_ITEM_CANT_EQUIP_LVL); return 0; } - if(item->elvmax && sd->status.base_level > (unsigned int)item->elvmax){ - clif->msg(sd, 0x6ED); + if (item->elvmax && sd->status.base_level > (unsigned int)item->elvmax) { + clif->msgtable(sd, MSG_ITEM_CANT_EQUIP_LVL); return 0; } if(item->sex != 2 && sd->status.sex != item->sex) @@ -906,11 +906,11 @@ int pc_isequip(struct map_session_data *sd,int n) if ( item->equip & EQP_AMMO ) { if ( (sd->state.active && !pc_iscarton(sd)) // check if sc data is already loaded. && (sd->status.class_ == JOB_GENETIC_T || sd->status.class_ == JOB_GENETIC) ) { - clif->msg(sd, 0x5EF); + clif->msgtable(sd, MSG_ITEM_NEED_CART); return 0; } if ( !pc_ismadogear(sd) && (sd->status.class_ == JOB_MECHANIC_T || sd->status.class_ == JOB_MECHANIC) ) { - clif->msg(sd, 0x59B); + clif->msgtable(sd, MSG_ITEM_NEED_MADO); return 0; } } @@ -4306,8 +4306,8 @@ int pc_isUseitem(struct map_session_data *sd,int n) if( !item->script ) //if it has no script, you can't really consume it! return 0; - if( (item->item_usage.flag&INR_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) { - clif->msgtable(sd->fd,0x297); + if ((item->item_usage.flag&INR_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override)) { + clif->msgtable(sd, MSG_ITEM_NEED_STANDING); //clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474)); return 0; // You cannot use this item while sitting. } @@ -4412,8 +4412,8 @@ int pc_isUseitem(struct map_session_data *sd,int n) return 0; if( item->package || item->group ) { - if( pc_is90overweight(sd) ) { - clif->msgtable(sd->fd,ITEM_CANT_OBTAIN_WEIGHT); + if (pc_is90overweight(sd)) { + clif->msgtable(sd, MSG_ITEM_CANT_OBTAIN_WEIGHT); return 0; } if( !pc->inventoryblank(sd) ) { @@ -4426,13 +4426,13 @@ int pc_isUseitem(struct map_session_data *sd,int n) if(item->sex != 2 && sd->status.sex != item->sex) return 0; //Required level check - if(item->elv && sd->status.base_level < (unsigned int)item->elv){ - clif->msg(sd, 0x6EE); + if (item->elv && sd->status.base_level < (unsigned int)item->elv) { + clif->msgtable(sd, MSG_ITEM_CANT_USE_LVL); return 0; } - if(item->elvmax && sd->status.base_level > (unsigned int)item->elvmax){ - clif->msg(sd, 0x6EE); + if (item->elvmax && sd->status.base_level > (unsigned int)item->elvmax) { + clif->msgtable(sd, MSG_ITEM_CANT_USE_LVL); return 0; } @@ -4484,7 +4484,7 @@ int pc_useitem(struct map_session_data *sd,int n) { if( sd->npc_id || sd->state.workinprogress&1 ){ /* TODO: add to clif->messages enum */ #ifdef RENEWAL - clif->msg(sd, 0x783); // TODO look for the client date that has this message. + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. #endif return 0; } @@ -4547,7 +4547,7 @@ int pc_useitem(struct map_session_data *sd,int n) { if( sd->item_delay[i].nameid ) {// found if( DIFF_TICK(sd->item_delay[i].tick, tick) > 0 ) { int e_tick = (int)(DIFF_TICK(sd->item_delay[i].tick, tick)/1000); - clif->msgtable_num(sd->fd, 0x746, e_tick + 1); // [%d] seconds left until you can use + clif->msgtable_num(sd, MSG_SECONDS_UNTIL_USE, e_tick + 1); // [%d] seconds left until you can use return 0; // Delay has not expired yet } } else {// not yet used item (all slots are initially empty) @@ -4570,7 +4570,7 @@ int pc_useitem(struct map_session_data *sd,int n) { /* on restricted maps the item is consumed but the effect is not used */ for(i = 0; i < map->list[sd->bl.m].zone->disabled_items_count; i++) { if( map->list[sd->bl.m].zone->disabled_items[i] == nameid ) { - clif->msg(sd, ITEM_CANT_USE_AREA); // This item cannot be used within this area + clif->msgtable(sd, MSG_ITEM_CANT_USE_AREA); // This item cannot be used within this area if( battle_config.item_restricted_consumption_type && sd->status.inventory[n].expire_time == 0 ) { clif->useitemack(sd,n,sd->status.inventory[n].amount-1,true); pc->delitem(sd,n,1,1,0,LOG_TYPE_CONSUME); @@ -6626,9 +6626,9 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) { clif->skillinfoblock(sd); } else if( battle_config.skillup_limit ){ if( sd->sktree.second ) - clif->msg_value(sd, 0x61E, sd->sktree.second); + clif->msgtable_num(sd, MSG_SKILL_POINTS_LEFT_JOB1, sd->sktree.second); else if( sd->sktree.third ) - clif->msg_value(sd, 0x61F, sd->sktree.third); + clif->msgtable_num(sd, MSG_SKILL_POINTS_LEFT_JOB2, sd->sktree.third); else if( pc->calc_skillpoint(sd) < 9 ) { /* TODO: official response? */ clif->colormes(sd->fd,COLOR_RED,"You need the basic skills"); diff --git a/src/map/script.c b/src/map/script.c index bcc3fd710..a86ccfdc9 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -18195,7 +18195,7 @@ BUILDIN(setcashmount) if ((sd = script->rid2sd(st)) == NULL) return true; if (pc_hasmount(sd)) { - clif->msgtable(sd->fd, 0X78b); + clif->msgtable(sd, MSG_REINS_CANT_USE_MOUNTED); script_pushint(st,0);//can't mount with one of these } else { if (sd->sc.data[SC_ALL_RIDING]) diff --git a/src/map/skill.c b/src/map/skill.c index 64b0cebe8..41d872b77 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -16906,7 +16906,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, for( i = 0; i < MAX_INVENTORY; i++ ) { if( sd->status.inventory[i].nameid == nameid ) { if( sd->status.inventory[i].amount >= data->stack.amount ) { - clif->msgtable(sd->fd,0x61b); + clif->msgtable(sd, MSG_RUNE_STONE_MAX_AMOUNT); return 0; } else { /** @@ -17363,7 +17363,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, break; } if( k ){ - clif->msg_skill(sd,skill_id,0x627); + clif->msgtable_skill(sd, skill_id, MSG_SKILL_SUCCESS); return 1; } } else if (tmp_item.amount) { //Success @@ -17372,7 +17372,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, map->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } if( skill_id == GN_MIX_COOKING || skill_id == GN_MAKEBOMB || skill_id == GN_S_PHARMACY ) - clif->msg_skill(sd,skill_id,0x627); + clif->msgtable_skill(sd, skill_id, MSG_SKILL_SUCCESS); return 1; } } @@ -17431,13 +17431,13 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, clif->additem(sd,0,0,flag); map->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } - clif->msg_skill(sd,skill_id,0x628); + clif->msgtable_skill(sd, skill_id, MSG_SKILL_FAILURE); } break; case GN_MAKEBOMB: case GN_S_PHARMACY: case GN_CHANGEMATERIAL: - clif->msg_skill(sd,skill_id,0x628); + clif->msgtable_skill(sd, skill_id, MSG_SKILL_FAILURE); break; default: if( skill->produce_db[idx].itemlv > 10 && skill->produce_db[idx].itemlv <= 20 ) @@ -17747,7 +17747,7 @@ int skill_changematerial(struct map_session_data *sd, int n, unsigned short *ite nameid = sd->status.inventory[idx].nameid; amount = item_list[k*2+1]; if( nameid > 0 && sd->status.inventory[idx].identify == 0 ){ - clif->msg_skill(sd,GN_CHANGEMATERIAL,0x62D); + clif->msgtable_skill(sd, GN_CHANGEMATERIAL, MSG_SKILL_ITEM_NEED_IDENTIFY); return 0; } if( nameid == skill->produce_db[i].mat_id[j] && (amount-p*skill->produce_db[i].mat_amount[j]) >= skill->produce_db[i].mat_amount[j] @@ -17769,7 +17769,7 @@ int skill_changematerial(struct map_session_data *sd, int n, unsigned short *ite } if( p == 0) - clif->msg_skill(sd,GN_CHANGEMATERIAL,0x623); + clif->msgtable_skill(sd, GN_CHANGEMATERIAL, MSG_SKILL_ITEM_NOT_FOUND); return 0; } diff --git a/src/map/status.c b/src/map/status.c index fa6d4ea8c..b84650b07 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1596,13 +1596,13 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin for(i = 0; i < map->list[src->m].zone->disabled_skills_count; i++) { if( skill_id == map->list[src->m].zone->disabled_skills[i]->nameid && (map->list[src->m].zone->disabled_skills[i]->type&src->type) ) { - if( src->type == BL_PC ) - clif->msg((TBL_PC*)src, SKILL_CANT_USE_AREA); // This skill cannot be used within this area - else if( src->type == BL_MOB && map->list[src->m].zone->disabled_skills[i]->subtype != MZS_NONE ) { - if( st->mode&MD_BOSS ) { /** is boss **/ + if (src->type == BL_PC) { + clif->msgtable((TBL_PC*)src, MSG_SKILL_CANT_USE_AREA); // This skill cannot be used within this area + } else if (src->type == BL_MOB && map->list[src->m].zone->disabled_skills[i]->subtype != MZS_NONE) { + if( st->mode&MD_BOSS ) { /* is boss */ if( !( map->list[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS ) ) break; - } else { /** is not boss **/ + } else { /* is not boss */ if( map->list[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS ) break; } -- cgit v1.2.3-70-g09d2