Skip to content

Commit

Permalink
Merge pull request #1380 from EPuncker/messagesconf-update
Browse files Browse the repository at this point in the history
Added a missing entry into messages.conf and added some comments wher…
  • Loading branch information
MishimaHaruna committed Jul 25, 2016
2 parents fee640a + 03ce9e5 commit bc46ac9
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 69 deletions.
3 changes: 2 additions & 1 deletion conf/messages.conf
Expand Up @@ -97,7 +97,8 @@
79: %d results found.
80: Please specify a display name or monster name/id.
81: Your GM level doesn't authorize you to perform this action on the specified player.
//82-83 FREE
82: Roulette is disabled
//83 FREE
84: All stats changed!
85: Invalid time for ban command.
//86-87 FREE
Expand Down
12 changes: 6 additions & 6 deletions src/map/atcommand.c
Expand Up @@ -466,11 +466,11 @@ ACMD(mapmove) {
x = y = 0; //Invalid cell, use random spot.
}
if (map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_fd(fd,247));
clif->message(fd, msg_fd(fd,247)); // You are not authorized to warp to this map.
return false;
}
if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_fd(fd,248));
clif->message(fd, msg_fd(fd,248)); // You are not authorized to warp from your current map.
return false;
}
if (pc->setpos(sd, map_index, x, y, CLR_TELEPORT) != 0) {
Expand Down Expand Up @@ -854,7 +854,7 @@ ACMD(storage)
return false;

if (storage->open(sd) == 1) { //Already open.
clif->message(fd, msg_fd(fd,250));
clif->message(fd, msg_fd(fd,250)); // You have already opened your storage. Close it first.
return false;
}

Expand All @@ -869,20 +869,20 @@ ACMD(storage)
ACMD(guildstorage)
{
if (!sd->status.guild_id) {
clif->message(fd, msg_fd(fd,252));
clif->message(fd, msg_fd(fd,252)); // You are not in a guild.
return false;
}

if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading)
return false;

if (sd->state.storage_flag == STORAGE_FLAG_NORMAL) {
clif->message(fd, msg_fd(fd,250));
clif->message(fd, msg_fd(fd,250)); // You have already opened your storage. Close it first.
return false;
}

if (sd->state.storage_flag == STORAGE_FLAG_GUILD) {
clif->message(fd, msg_fd(fd,251));
clif->message(fd, msg_fd(fd,251)); // You have already opened your guild storage. Close it first.
return false;
}

Expand Down
6 changes: 3 additions & 3 deletions src/map/buyingstore.c
Expand Up @@ -100,7 +100,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha
if( !pc_can_give_items(sd) )
{// custom: GM is not allowed to buy (give zeny)
sd->buyingstore.slots = 0;
clif->message(sd->fd, msg_sd(sd,246));
clif->message(sd->fd, msg_sd(sd,246)); // Your GM level doesn't authorize you to perform this action.
clif->buyingstore_open_failed(sd, BUYINGSTORE_CREATE, 0);
return;
}
Expand Down Expand Up @@ -222,7 +222,7 @@ void buyingstore_open(struct map_session_data* sd, int account_id)

if( !pc_can_give_items(sd) )
{// custom: GM is not allowed to sell
clif->message(sd->fd, msg_sd(sd,246));
clif->message(sd->fd, msg_sd(sd,246)); // Your GM level doesn't authorize you to perform this action.
return;
}

Expand Down Expand Up @@ -261,7 +261,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int

if( !pc_can_give_items(sd) )
{// custom: GM is not allowed to sell
clif->message(sd->fd, msg_sd(sd,246));
clif->message(sd->fd, msg_sd(sd,246)); // Your GM level doesn't authorize you to perform this action.
clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, 0);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/map/chat.c
Expand Up @@ -106,8 +106,8 @@ bool chat_createpcchat(struct map_session_data* sd, const char* title, const cha
}

if( map->list[sd->bl.m].flag.nochat ) {
clif->message(sd->fd, msg_sd(sd,281));
return false; //Can't create chatrooms on this map.
clif->message(sd->fd, msg_sd(sd,281)); // You can't create chat rooms in this map
return false;
}

if (map->getcell(sd->bl.m, &sd->bl, sd->bl.x, sd->bl.y, CELL_CHKNOCHAT) ) {
Expand Down
4 changes: 2 additions & 2 deletions src/map/chrif.c
Expand Up @@ -999,9 +999,9 @@ void chrif_idbanned(int fd) {
if(0<ret_status && ret_status<=9)
clif->message(sd->fd, msg_sd(sd,411+ret_status)); // Message IDs (for search convenience): 412, 413, 414, 415, 416, 417, 418, 419, 420
else if(ret_status==100)
clif->message(sd->fd, msg_sd(sd,421));
clif->message(sd->fd, msg_sd(sd,421)); // Your account has been totally erased.
else
clif->message(sd->fd, msg_sd(sd,420)); //"Your account has not more authorized."
clif->message(sd->fd, msg_sd(sd,420)); //"Your account is not longer authorized."
} else if (RFIFOB(fd,6) == 1) { // 1: ban
time_t timestamp;
char tmpstr[2048];
Expand Down
56 changes: 24 additions & 32 deletions src/map/clif.c
Expand Up @@ -6567,7 +6567,7 @@ void clif_party_inviteack(struct map_session_data* sd, const char* nick, int res

#if PACKETVER < 20070904
if( result == 7 ) {
clif->message(fd, msg_sd(sd,3));
clif->message(fd, msg_sd(sd,3)); // Character not found.
return;
}
#endif
Expand Down Expand Up @@ -10261,7 +10261,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
if (k < sd->channel_count || channel->join(chan, sd, "", true) == HCS_STATUS_OK) {
channel->send(chan,sd,message);
} else {
clif->message(fd, msg_fd(fd,1402));
clif->message(fd, msg_fd(fd,1402)); //You're not in that channel, type '@join <#channel_name>'
}
return;
} else if (strcmpi(&chname[1], channel->config->ally_name) == 0) {
Expand Down Expand Up @@ -11856,7 +11856,7 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd)

if( map->list[sd->bl.m].flag.partylock ) {
// Party locked.
clif->message(fd, msg_fd(fd,227));
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
return;
}
if( battle_config.basic_skill_check && pc->checkskill(sd,NV_BASIC) < 7 ) {
Expand All @@ -11878,7 +11878,7 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd)

if( map->list[sd->bl.m].flag.partylock ) {
// Party locked.
clif->message(fd, msg_fd(fd,227));
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
return;
}
if( battle_config.basic_skill_check && pc->checkskill(sd,NV_BASIC) < 7 ) {
Expand All @@ -11898,7 +11898,7 @@ void clif_parse_PartyInvite(int fd, struct map_session_data *sd) {

if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_fd(fd,227));
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
return;
}

Expand All @@ -11922,7 +11922,7 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd)

if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_fd(fd,227));
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
return;
}

Expand Down Expand Up @@ -11960,7 +11960,7 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd) __attribute__((n
void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_fd(fd,227));
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
return;
}
party->leave(sd);
Expand All @@ -11972,7 +11972,7 @@ void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) __attribu
void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_fd(fd,227));
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
return;
}
party->removemember(sd, RFIFOL(fd,2), RFIFOP(fd,6));
Expand Down Expand Up @@ -12753,8 +12753,7 @@ void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
safestrncpy(name, RFIFOP(fd,6), NAME_LENGTH);

if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_fd(fd,228));
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}

Expand Down Expand Up @@ -13030,8 +13029,7 @@ bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_sessi
nullpo_retr(false, sd);
nullpo_retr(false, t_sd);
if ( map->list[sd->bl.m].flag.guildlock ) {
//Guild locked.
clif->message(fd, msg_fd(fd,228));
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return false;
}

Expand Down Expand Up @@ -13084,8 +13082,7 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd) __attribute__((no
/// 0159 <guild id>.L <account id>.L <char id>.L <reason>.40B
void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_fd(fd,228));
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}
if( sd->bg_id ) {
Expand All @@ -13101,8 +13098,7 @@ void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) __attribute__
/// 015b <guild id>.L <account id>.L <char id>.L <reason>.40B
void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) {
if( map->list[sd->bl.m].flag.guildlock || sd->bg_id ) {
// Guild locked.
clif->message(fd, msg_fd(fd,228));
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}
guild->expulsion(sd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOP(fd,14));
Expand Down Expand Up @@ -13143,8 +13139,7 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) {
return;

if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_fd(fd,228));
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}

Expand Down Expand Up @@ -13181,8 +13176,7 @@ void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) {
return;

if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_fd(fd,228));
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}
guild->delalliance(sd,RFIFOL(fd,2),RFIFOL(fd,6));
Expand All @@ -13198,8 +13192,7 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
return;

if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_fd(fd,228));
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}

Expand All @@ -13222,8 +13215,7 @@ void clif_parse_GuildBreak(int fd, struct map_session_data *sd) __attribute__((n
/// field name and size is same as the one in CH_DELETE_CHAR.
void clif_parse_GuildBreak(int fd, struct map_session_data *sd) {
if( map->list[sd->bl.m].flag.guildlock ) {
//Guild locked.
clif->message(fd, msg_fd(fd,228));
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}
guild->dobreak(sd, RFIFOP(fd,2));
Expand Down Expand Up @@ -13937,7 +13929,7 @@ void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)

// Friend doesn't exist (no player with this name)
if (f_sd == NULL) {
clif->message(fd, msg_fd(fd,3));
clif->message(fd, msg_fd(fd,3)); // "Character not found."
return;
}

Expand Down Expand Up @@ -15282,7 +15274,7 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd)

// Auction checks...
if( sd->status.inventory[sd->auction.index].bound && !pc_can_give_bound_items(sd) ) {
clif->message(sd->fd, msg_sd(sd,293));
clif->message(sd->fd, msg_sd(sd,293)); // This bound item cannot be traded to that character.
clif->auction_message(fd, 2); // The auction has been canceled
return;
}
Expand Down Expand Up @@ -15335,7 +15327,7 @@ void clif_parse_Auction_bid(int fd, struct map_session_data *sd)
int bid = RFIFOL(fd,6);

if( !pc_can_give_items(sd) ) { //They aren't supposed to give zeny [Inkfish]
clif->message(sd->fd, msg_sd(sd,246));
clif->message(sd->fd, msg_sd(sd,246)); // Your GM level doesn't authorize you to perform this action.
return;
}

Expand Down Expand Up @@ -18347,7 +18339,7 @@ void clif_parse_RouletteOpen(int fd, struct map_session_data* sd) {
struct packet_roulette_open_ack p;

if( !battle_config.feature_roulette ) {
clif->message(fd,"Roulette is disabled");
clif->message(fd, msg_fd(fd,82)); // Roulette is disabled
return;
}

Expand All @@ -18370,7 +18362,7 @@ void clif_parse_RouletteInfo(int fd, struct map_session_data* sd) {
unsigned short i, j, count = 0;

if( !battle_config.feature_roulette ) {
clif->message(fd,"Roulette is disabled");
clif->message(fd, msg_fd(fd,82)); // Roulette is disabled
return;
}

Expand All @@ -18394,7 +18386,7 @@ void clif_parse_RouletteInfo(int fd, struct map_session_data* sd) {
void clif_parse_RouletteClose(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
void clif_parse_RouletteClose(int fd, struct map_session_data* sd) {
if( !battle_config.feature_roulette ) {
clif->message(fd,"Roulette is disabled");
clif->message(fd, msg_fd(fd,82)); // Roulette is disabled
return;
}

Expand All @@ -18410,7 +18402,7 @@ void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) {
short stage = sd->roulette.stage;

if( !battle_config.feature_roulette ) {
clif->message(fd,"Roulette is disabled");
clif->message(fd, msg_fd(fd,82)); // Roulette is disabled
return;
}

Expand Down Expand Up @@ -18466,7 +18458,7 @@ void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd) {
struct packet_roulette_itemrecv_ack p;

if( !battle_config.feature_roulette ) {
clif->message(fd,"Roulette is disabled");
clif->message(fd, msg_fd(fd,82)); // Roulette is disabled
return;
}

Expand Down
9 changes: 4 additions & 5 deletions src/map/party.c
Expand Up @@ -362,7 +362,7 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
ARR_FIND(0, MAX_PARTY, i, p->data[i].sd == sd);

if( i == MAX_PARTY || !p->party.member[i].leader ) {
clif->message(sd->fd, msg_sd(sd,282));
clif->message(sd->fd, msg_sd(sd,282)); // You need to be a party leader to use this command.
return 0;
}

Expand Down Expand Up @@ -682,12 +682,12 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
return false;

if (!tsd || tsd->status.party_id != sd->status.party_id) {
clif->message(sd->fd, msg_sd(sd,283));
clif->message(sd->fd, msg_sd(sd,283)); // Target character must be online and in your current party.
return false;
}

if( map->list[sd->bl.m].flag.partylock ) {
clif->message(sd->fd, msg_sd(sd,287));
clif->message(sd->fd, msg_sd(sd,287)); // You cannot change party leaders in this map.
return false;
}

Expand All @@ -699,8 +699,7 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
return false; //Shouldn't happen

if (!p->party.member[mi].leader) {
//Need to be a party leader.
clif->message(sd->fd, msg_sd(sd,282));
clif->message(sd->fd, msg_sd(sd,282)); // You need to be a party leader to use this command.
return false;
}

Expand Down
8 changes: 4 additions & 4 deletions src/map/pc.c
Expand Up @@ -4646,13 +4646,13 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
return 0;

if( map->list[sd->bl.m].flag.nodrop ) {
clif->message (sd->fd, msg_sd(sd,271));
return 0; //Can't drop items in nodrop mapflag maps.
clif->message (sd->fd, msg_sd(sd,271)); // You can't drop items in this map
return 0;
}

if( !pc->candrop(sd,&sd->status.inventory[n]) )
{
clif->message (sd->fd, msg_sd(sd,263));
clif->message (sd->fd, msg_sd(sd,263)); // This item cannot be dropped.
return 0;
}

Expand Down Expand Up @@ -5097,7 +5097,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun

if (!itemdb_cancartstore(item_data, pc_get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc_can_give_bound_items(sd))) {
// Check item trade restrictions
clif->message (sd->fd, msg_sd(sd,264));
clif->message (sd->fd, msg_sd(sd,264)); // This item cannot be stored.
return 1;/* TODO: there is no official response to this? */
}

Expand Down

0 comments on commit bc46ac9

Please sign in to comment.