summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-05-11 06:24:43 +0300
committerAndrei Karas <akaras@inbox.ru>2018-05-29 05:01:37 +0300
commit73b971c66f460f5a1dcb600097b2551434f8726f (patch)
tree2dc277c64d8c4c1346d0e1cfc11704efb0c6ba71 /src/map
parentd4213cd795a6a5e3241d1f3d9de147a11bf21097 (diff)
downloadhercules-73b971c66f460f5a1dcb600097b2551434f8726f.tar.gz
hercules-73b971c66f460f5a1dcb600097b2551434f8726f.tar.bz2
hercules-73b971c66f460f5a1dcb600097b2551434f8726f.tar.xz
hercules-73b971c66f460f5a1dcb600097b2551434f8726f.zip
Fix wrong values in clif_messages enum.
Also use official constant names with custom prefix in clif_messages enum.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c16
-rw-r--r--src/map/clif.h56
-rw-r--r--src/map/party.c2
-rw-r--r--src/map/pc.c30
-rw-r--r--src/map/script.c2
-rw-r--r--src/map/skill.c10
6 files changed, 58 insertions, 58 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index bf7c31460..2546b07b3 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5639,7 +5639,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->msgtable_skill(sd, skill_id, MSG_COOKING_LIST_FAIL);
+ clif->msgtable_skill(sd, skill_id, MSG_SKILL_MATERIAL_FAIL);
#else
WFIFOW(fd,2) = 6 + 2 * c;
WFIFOSET(fd,WFIFOW(fd,2));
@@ -10917,7 +10917,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
}
if (sd->npc_id || sd->state.workinprogress & 2) {
#if PACKETVER >= 20110309
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+ clif->msgtable(sd, MSG_BUSY);
#else
clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
#endif
@@ -10934,7 +10934,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
#if PACKETVER >= 20110309
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+ clif->msgtable(sd, MSG_BUSY);
#else
clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
#endif
@@ -11331,7 +11331,7 @@ void clif_parse_ChangeCart(int fd, struct map_session_data *sd)
if (sd->npc_id || sd->state.workinprogress & 1) {
#if PACKETVER >= 20110309
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+ clif->msgtable(sd, MSG_BUSY);
#else
clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
#endif
@@ -11542,7 +11542,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
if (sd->npc_id || sd->state.workinprogress & 1) {
#if PACKETVER >= 20110309
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+ clif->msgtable(sd, MSG_BUSY);
#else
clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
#endif
@@ -11641,7 +11641,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski
if (sd->state.workinprogress & 1) {
#if PACKETVER >= 20110309
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+ clif->msgtable(sd, MSG_BUSY);
#else
clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
#endif
@@ -16136,7 +16136,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->msgtable(sd, MSG_EQUIP_NOT_PUBLIC);
+ clif->msgtable(sd, MSG_OPEN_EQUIPEDITEM_REFUSED);
}
void clif_parse_cz_config(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -16661,7 +16661,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->msgtable(sd, MSG_MERCENARY_EXPIRED + message);
+ clif->msgtable(sd, MSG_MER_FINISH + message);
}
/// Notification about the remaining time of a rental item (ZC_CASH_TIME_COUNTER).
diff --git a/src/map/clif.h b/src/map/clif.h
index 68289350e..71dcba231 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -361,34 +361,34 @@ typedef enum useskill_fail_cause { // clif_skill_fail
}useskill_fail_cause;
enum clif_messages {
- 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_PARTY_MEMBER_NOT_SUMMONED = 0x4c5, ///< The party member was not summoned because you are not the party leader.
- MSG_PARTY_NO_MEMBER_IN_MAP = 0x4c6, ///< There is no party member to summon in the current map.
- 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.
- MSG_PARTY_LEADER_SAMEMAP = 0x82e, //< It is only possible to change the party leader while on the same map.
- MSG_ATTENDANCE_UNAVAILABLE = 0xd92, ///< Attendance Check failed. Please try again later.
+ MSG_CANT_GET_ITEM_BECAUSE_WEIGHT = 0x034, ///< You cannot carry more items because you are overweight.
+ MSG_CANT_USE_WHEN_SITDOWN = 0x297, ///< You cannot use this item while sitting.
+ MSG_CANNOT_PARTYCALL = 0x4c5, ///< The party member was not summoned because you are not the party leader.
+ MSG_NO_PARTYMEM_ON_THISMAP = 0x4c6, ///< There is no party member to summon in the current map.
+ MSG_MER_FINISH = 0x4f2, ///< The mercenary contract has expired.
+ MSG_MER_DIE = 0x4f3, ///< The mercenary has died.
+ MSG_MER_RETIRE = 0x4f4, ///< You have released the mercenary.
+ MSG_MER_RUNAWAY = 0x4f5, ///< The mercenary has run away.
+ MSG_IMPOSSIBLE_SKILL_AREA = 0x536, ///< This skill cannot be used within this area
+ MSG_IMPOSSIBLE_USEITEM_AREA = 0x537, ///< This item cannot be used within this area.
+ MSG_OPEN_EQUIPEDITEM_REFUSED = 0x54d, ///< This character's equipment information is not open to the public.
+ MSG_USESKILL_FAIL_MADOGEAR = 0x59b, ///< Item can only be used when Mado Gear is mounted.
+ MSG_USESKILL_FAIL_CART = 0x5ef, ///< Usable only when cart is put on
+ MSG_RUNESTONE_MAKEERROR_OVERCOUNT = 0x61b, ///< Cannot create Rune stone more than the maximum amount.
+ MSG_UPGRADESKILLERROR_MORE_FIRSTJOBSKILL = 0x61e, ///< You must consume all '%d' remaining points in your 1st Job tab.
+ MSG_UPGRADESKILLERROR_MORE_SECONDJOBSKILL = 0x61f, ///< You must consume all '%d' remaining points in your 2nd Job tab. 1st Tab is already done.
+ MSG_SKILL_RECIPE_NOTEXIST = 0x622, ///< Inconvertible combination.
+ MSG_SKILL_MATERIAL_FAIL = 0x625, ///< Material doesn't exist
+ MSG_SKILL_SUCCESS = 0x626, ///< Successful
+ MSG_SKILL_FAIL = 0x627, ///< Failed
+ MSG_SKILL_FAIL_MATERIAL_IDENTITY = 0x62d, ///< Unable to use unchecked items as materials.
+ MSG_CANNOT_EQUIP_ITEM_LEVEL = 0x6ed, ///< You are unable to have item in this level.
+ MSG_CANNOT_USE_ITEM_LEVEL = 0x6ee, ///< You are unable to use item in this level
+ MSG_ITEM_REUSE_LIMIT_SECOND = 0x746, ///< %d seconds left until you can use
+ MSG_BUSY = 0x783, ///< any work in progress (NPC dialog, manufacturing...)quit and try again.
+ MSG_FAIELD_RIDING_OVERLAPPED = 0x78b, ///< The reins of the status board items that are not available.
+ MSG_PARTY_MASTER_CHANGE_SAME_MAP = 0x82e, ///< It is only possible to change the party leader while on the same map.
+ MSG_ATTENDANCE_UNAVAILABLE = 0xd92, ///< Attendance Check failed. Please try again later.
};
/**
diff --git a/src/map/party.c b/src/map/party.c
index a4a7e6dca..a82ff427f 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -732,7 +732,7 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
}
if (battle_config.party_change_leader_same_map && sd->bl.m != tsd->bl.m) {
- clif->msgtable(sd, MSG_PARTY_LEADER_SAMEMAP); // It is only possible to change the party leader while on the same map.
+ clif->msgtable(sd, MSG_PARTY_MASTER_CHANGE_SAME_MAP); // It is only possible to change the party leader while on the same map.
return false;
}
diff --git a/src/map/pc.c b/src/map/pc.c
index 8dd216f55..146099e5f 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1073,11 +1073,11 @@ int pc_isequip(struct map_session_data *sd,int n)
return 1;
if (item->elv && sd->status.base_level < item->elv) {
- clif->msgtable(sd, MSG_ITEM_CANT_EQUIP_LVL);
+ clif->msgtable(sd, MSG_CANNOT_EQUIP_ITEM_LEVEL);
return 0;
}
if (item->elvmax && sd->status.base_level > item->elvmax) {
- clif->msgtable(sd, MSG_ITEM_CANT_EQUIP_LVL);
+ clif->msgtable(sd, MSG_CANNOT_EQUIP_ITEM_LEVEL);
return 0;
}
if(item->sex != 2 && sd->status.sex != item->sex)
@@ -1085,11 +1085,11 @@ int pc_isequip(struct map_session_data *sd,int n)
if ( item->equip & EQP_AMMO ) {
if (sd->state.active && !pc_iscarton(sd) && (sd->job & MAPID_THIRDMASK) == MAPID_GENETIC) { // check if sc data is already loaded.
- clif->msgtable(sd, MSG_ITEM_NEED_CART);
+ clif->msgtable(sd, MSG_USESKILL_FAIL_CART);
return 0;
}
if (!pc_ismadogear(sd) && (sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) {
- clif->msgtable(sd, MSG_ITEM_NEED_MADO);
+ clif->msgtable(sd, MSG_USESKILL_FAIL_MADOGEAR);
return 0;
}
}
@@ -4932,7 +4932,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
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, MSG_ITEM_NEED_STANDING);
+ clif->msgtable(sd, MSG_CANT_USE_WHEN_SITDOWN);
//clif->messagecolor_self(sd->fd, COLOR_WHITE, msg_txt(1474));
return 0; // You cannot use this item while sitting.
}
@@ -4953,7 +4953,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
struct party_data *p;
if (!sd->status.party_id) {
- clif->msgtable(sd, MSG_PARTY_MEMBER_NOT_SUMMONED);
+ clif->msgtable(sd, MSG_CANNOT_PARTYCALL);
break;
}
@@ -4964,7 +4964,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
ARR_FIND(0, MAX_PARTY, i, p->data[i].sd == sd);
if (i == MAX_PARTY || !p->party.member[i].leader) {
- clif->msgtable(sd, MSG_PARTY_MEMBER_NOT_SUMMONED);
+ clif->msgtable(sd, MSG_CANNOT_PARTYCALL);
break;
}
@@ -4973,7 +4973,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
ARR_FIND(0, MAX_PARTY, i, p->data[i].sd && p->data[i].sd != sd && p->data[i].sd->bl.m == m);
if (i == MAX_PARTY || pc_isdead(p->data[i].sd)) {
- clif->msgtable(sd, MSG_PARTY_NO_MEMBER_IN_MAP);
+ clif->msgtable(sd, MSG_NO_PARTYMEM_ON_THISMAP);
break;
}
}
@@ -5060,7 +5060,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
if( item->package || item->group ) {
if (pc_is90overweight(sd)) {
- clif->msgtable(sd, MSG_ITEM_CANT_OBTAIN_WEIGHT);
+ clif->msgtable(sd, MSG_CANT_GET_ITEM_BECAUSE_WEIGHT);
return 0;
}
if (!pc->inventoryblank(sd)) {
@@ -5074,12 +5074,12 @@ int pc_isUseitem(struct map_session_data *sd,int n)
return 0;
//Required level check
if (item->elv && sd->status.base_level < item->elv) {
- clif->msgtable(sd, MSG_ITEM_CANT_USE_LVL);
+ clif->msgtable(sd, MSG_CANNOT_USE_ITEM_LEVEL);
return 0;
}
if (item->elvmax && sd->status.base_level > item->elvmax) {
- clif->msgtable(sd, MSG_ITEM_CANT_USE_LVL);
+ clif->msgtable(sd, MSG_CANNOT_USE_ITEM_LEVEL);
return 0;
}
@@ -5147,7 +5147,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
if (sd->npc_id || sd->state.workinprogress & 1) {
#if PACKETVER >= 20110309
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+ clif->msgtable(sd, MSG_BUSY);
#else
clif->messagecolor_self(sd->fd, COLOR_WHITE, msg_sd(sd, 48));
#endif
@@ -5217,7 +5217,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
if (DIFF_TICK(sd->item_delay[i].tick, tick) > 0) {
int delay_tick = (int)(DIFF_TICK(sd->item_delay[i].tick, tick) / 1000);
#if PACKETVER >= 20101123
- clif->msgtable_num(sd, MSG_SECONDS_UNTIL_USE, delay_tick + 1); // [%d] seconds left until you can use
+ clif->msgtable_num(sd, MSG_ITEM_REUSE_LIMIT_SECOND, delay_tick + 1); // [%d] seconds left until you can use
#else
char delay_msg[100];
sprintf(delay_msg, msg_sd(sd, 26), delay_tick + 1);
@@ -7369,9 +7369,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 != 0)
- clif->msgtable_num(sd, MSG_SKILL_POINTS_LEFT_JOB1, sd->sktree.second);
+ clif->msgtable_num(sd, MSG_UPGRADESKILLERROR_MORE_FIRSTJOBSKILL, sd->sktree.second);
else if (sd->sktree.third != 0)
- clif->msgtable_num(sd, MSG_SKILL_POINTS_LEFT_JOB2, sd->sktree.third);
+ clif->msgtable_num(sd, MSG_UPGRADESKILLERROR_MORE_SECONDJOBSKILL, sd->sktree.third);
else if (pc->calc_skillpoint(sd) < 9) /* TODO: official response? */
clif->messagecolor_self(sd->fd, COLOR_RED, "You need the basic skills");
}
diff --git a/src/map/script.c b/src/map/script.c
index d4554227e..688818cb1 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -21837,7 +21837,7 @@ BUILDIN(setcashmount)
return true;
if (pc_hasmount(sd)) {
- clif->msgtable(sd, MSG_REINS_CANT_USE_MOUNTED);
+ clif->msgtable(sd, MSG_FAIELD_RIDING_OVERLAPPED);
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 1ab8ce871..118279e7b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -18006,7 +18006,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, MSG_RUNE_STONE_MAX_AMOUNT);
+ clif->msgtable(sd, MSG_RUNESTONE_MAKEERROR_OVERCOUNT);
return 0;
} else {
/**
@@ -18534,13 +18534,13 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
clif->additem(sd,0,0,flag);
map->addflooritem(&sd->bl, &tmp_item, tmp_item.amount, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0, false);
}
- clif->msgtable_skill(sd, skill_id, MSG_SKILL_FAILURE);
+ clif->msgtable_skill(sd, skill_id, MSG_SKILL_FAIL);
}
break;
case GN_MAKEBOMB:
case GN_S_PHARMACY:
case GN_CHANGEMATERIAL:
- clif->msgtable_skill(sd, skill_id, MSG_SKILL_FAILURE);
+ clif->msgtable_skill(sd, skill_id, MSG_SKILL_FAIL);
break;
default:
if( skill->dbs->produce_db[idx].itemlv > 10 && skill->dbs->produce_db[idx].itemlv <= 20 )
@@ -18876,7 +18876,7 @@ int skill_changematerial(struct map_session_data *sd, const struct itemlist *ite
amount = entry->amount;
nameid = sd->status.inventory[idx].nameid;
if (nameid > 0 && sd->status.inventory[idx].identify == 0) {
- clif->msgtable_skill(sd, GN_CHANGEMATERIAL, MSG_SKILL_ITEM_NEED_IDENTIFY);
+ clif->msgtable_skill(sd, GN_CHANGEMATERIAL, MSG_SKILL_FAIL_MATERIAL_IDENTITY);
return 0;
}
if( nameid == skill->dbs->produce_db[i].mat_id[j] && (amount-p*skill->dbs->produce_db[i].mat_amount[j]) >= skill->dbs->produce_db[i].mat_amount[j]
@@ -18898,7 +18898,7 @@ int skill_changematerial(struct map_session_data *sd, const struct itemlist *ite
}
if( p == 0)
- clif->msgtable_skill(sd, GN_CHANGEMATERIAL, MSG_SKILL_ITEM_NOT_FOUND);
+ clif->msgtable_skill(sd, GN_CHANGEMATERIAL, MSG_SKILL_RECIPE_NOTEXIST);
return 0;
}