diff options
-rw-r--r-- | conf/messages.conf | 5 | ||||
-rw-r--r-- | npc/mapflag/noteleport.txt | 1 | ||||
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/itemdb.h | 3 | ||||
-rw-r--r-- | src/map/pc.c | 45 | ||||
-rw-r--r-- | src/map/status.c | 6 |
6 files changed, 55 insertions, 7 deletions
diff --git a/conf/messages.conf b/conf/messages.conf index 5080e7932..7adff9dff 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -74,7 +74,10 @@ 46: %s recalled! 47: Base level can't go any higher. 48: Any work in progress (NPC dialog, manufacturing ...) quit and try again. -//49-52 FREE +49: Unable to Teleport in this area +50: This skill cannot be used within this area. +51: This item cannot be used within this area. +//52 FREE 53: '%s' stats: 54: No player found in map '%s'. 55: 1 player found in map '%s'. diff --git a/npc/mapflag/noteleport.txt b/npc/mapflag/noteleport.txt index 700964da4..b80498f89 100644 --- a/npc/mapflag/noteleport.txt +++ b/npc/mapflag/noteleport.txt @@ -154,6 +154,7 @@ thor_camp mapflag noteleport moc_para01 mapflag noteleport // Job Quests ==================== +pay_arche mapflag noteleport job_sword1 mapflag noteleport job_thief1 mapflag noteleport // 2-1 ----------------------- diff --git a/src/map/clif.c b/src/map/clif.c index e57f6e01b..63f44dd85 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5468,6 +5468,7 @@ void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 s /// 0 = "Saved location as a Memo Point for Warp skill." in color 0xFFFF00 (cyan) /// 1 = "Skill Level is not high enough." in color 0x0000FF (red) /// 2 = "You haven't learned Warp." in color 0x0000FF (red) +/// 3 = "Cannot save location as a Memo Point at current location." in color 0x0000FF (red) /// /// @param sd Who receives the message /// @param type What message @@ -5490,6 +5491,7 @@ void clif_skill_memomessage(struct map_session_data* sd, int type) /// 0 = "Unable to Teleport in this area" in color 0xFFFF00 (cyan) /// 1 = "Saved point cannot be memorized." in color 0x0000FF (red) /// 2 = "This skill cannot be used within this area." in color 0xFFFF00 (cyan) +/// 3 = "This item cannot be used within this area." in color 0xFFFF00 (cyan) /// /// @param sd Who receives the message /// @param type What message diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 5344a7cd6..b170059ca 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -137,6 +137,8 @@ enum item_itemid { ITEMID_MAGIC_CASTLE = 12308, ITEMID_BULGING_HEAD = 12309, ITEMID_THICK_MANUAL50 = 12312, + ITEMID_N_FLY_WING = 12323, + ITEMID_N_BUTTERFLY_WING = 12324, ITEMID_N_MAGNIFIER = 12325, ITEMID_ANSILA = 12333, ITEMID_REPAIRA = 12392, @@ -162,6 +164,7 @@ enum item_itemid { ITEMID_THURISAZ = 12731, ITEMID_WYRD = 12732, ITEMID_HAGALAZ = 12733, + ITEMID_C_WING_OF_FLY = 12887, ITEMID_DUN_TELE_SCROLL1 = 14527, ITEMID_BATTLE_MANUAL25 = 14532, ITEMID_BATTLE_MANUAL100 = 14533, diff --git a/src/map/pc.c b/src/map/pc.c index dd9a7126f..ee1fcd7da 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4904,8 +4904,14 @@ int pc_isUseitem(struct map_session_data *sd,int n) switch( nameid ) { // TODO: Is there no better way to handle this, other than hardcoding item IDs? case ITEMID_ANODYNE: - if (map_flag_gvg2(sd->bl.m)) + if (map_flag_gvg2(sd->bl.m)) { +#if PACKETVER >= 20080311 + clif->skill_mapinfomessage(sd, 3); +#else + clif->messagecolor_self(sd->fd, COLOR_CYAN, msg_sd(sd, 51)); +#endif return 0; + } break; case ITEMID_GIANT_FLY_WING: { @@ -4939,12 +4945,19 @@ int pc_isUseitem(struct map_session_data *sd,int n) } FALLTHROUGH case ITEMID_WING_OF_FLY: + case ITEMID_N_FLY_WING: + case ITEMID_C_WING_OF_FLY: if (map->list[sd->bl.m].flag.noteleport || map_flag_gvg2(sd->bl.m)) { +#if PACKETVER >= 20080311 clif->skill_mapinfomessage(sd, 0); +#else + clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd, 49)); +#endif return 0; } /* Fall through */ case ITEMID_WING_OF_BUTTERFLY: + case ITEMID_N_BUTTERFLY_WING: case ITEMID_DUN_TELE_SCROLL1: case ITEMID_DUN_TELE_SCROLL2: case ITEMID_WOB_RUNE: // Yellow Butterfly Wing @@ -4956,15 +4969,27 @@ int pc_isUseitem(struct map_session_data *sd,int n) clif->message(sd->fd, msg_sd(sd,863)); // "Duel: Can't use this item in duel." return 0; } - if( nameid != ITEMID_WING_OF_FLY && nameid != ITEMID_GIANT_FLY_WING && map->list[sd->bl.m].flag.noreturn ) + if (nameid != ITEMID_WING_OF_FLY && nameid != ITEMID_GIANT_FLY_WING && map->list[sd->bl.m].flag.noreturn) { +#if PACKETVER >= 20080311 + clif->skill_mapinfomessage(sd, 0); +#else + clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd, 49)); +#endif return 0; + } break; case ITEMID_BRANCH_OF_DEAD_TREE: case ITEMID_RED_POUCH_OF_SURPRISE: case ITEMID_BLOODY_DEAD_BRANCH: case ITEMID_PORING_BOX: - if( map->list[sd->bl.m].flag.nobranch || map_flag_gvg2(sd->bl.m) ) + if (map->list[sd->bl.m].flag.nobranch || map_flag_gvg2(sd->bl.m)) { +#if PACKETVER >= 20080311 + clif->skill_mapinfomessage(sd, 3); +#else + clif->messagecolor_self(sd->fd, COLOR_CYAN, msg_sd(sd, 51)); +#endif return 0; + } break; // Mercenary Items @@ -4984,8 +5009,14 @@ int pc_isUseitem(struct map_session_data *sd,int n) break; case ITEMID_NEURALIZER: - if( !map->list[sd->bl.m].flag.reset ) + if (!map->list[sd->bl.m].flag.reset) { +#if PACKETVER >= 20080311 + clif->skill_mapinfomessage(sd, 3); +#else + clif->messagecolor_self(sd->fd, COLOR_CYAN, msg_sd(sd, 51)); +#endif return 0; + } break; } @@ -5179,7 +5210,11 @@ 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->msgtable(sd, MSG_ITEM_CANT_USE_AREA); // This item cannot be used within this area +#if PACKETVER >= 20080311 + clif->skill_mapinfomessage(sd, 3); +#else + clif->messagecolor_self(sd->fd, COLOR_CYAN, msg_sd(sd, 50)); +#endif 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, DELITEM_NORMAL, LOG_TYPE_CONSUME); diff --git a/src/map/status.c b/src/map/status.c index 3e4b4a45c..b2f67735b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1780,7 +1780,11 @@ 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->msgtable(sd, MSG_SKILL_CANT_USE_AREA); // This skill cannot be used within this area +#if PACKETVER >= 20080311 + clif->skill_mapinfomessage(sd, 2); +#else + clif->messagecolor_self(sd->fd, COLOR_CYAN, msg_sd(sd, 50)); +#endif } 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 ) ) |