summaryrefslogtreecommitdiff
path: root/src/map/atcommand.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-14 11:02:47 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-14 11:32:36 -0700
commit56e149a51562b9d2620bc9037a81735c29ea95af (patch)
tree3a4bd218f69c5cbfec0dd8dcada34413c0ddc715 /src/map/atcommand.cpp
parent1a1bfc8fd8a3613bf7d3c320dcaff29a9402f50c (diff)
downloadtmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.gz
tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.bz2
tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.xz
tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.zip
Ditch gcc 4.6 support
Diffstat (limited to 'src/map/atcommand.cpp')
-rw-r--r--src/map/atcommand.cpp1397
1 files changed, 698 insertions, 699 deletions
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
index 240df8b..f721aaa 100644
--- a/src/map/atcommand.cpp
+++ b/src/map/atcommand.cpp
@@ -121,11 +121,11 @@ void atcommand_config_write(ZString cfgName)
if (!out.is_open())
{
- FPRINTF(stderr, "Failed to write atcommand config: %s\n", cfgName);
+ FPRINTF(stderr, "Failed to write atcommand config: %s\n"_fmt, cfgName);
return;
}
- FPRINTF(out, "// Generated by %s\n", CURRENT_VERSION_STRING);
+ FPRINTF(out, "// Generated by %s\n"_fmt, CURRENT_VERSION_STRING);
for (const auto& pair : atcommand_info)
{
// This XString is really a ZString, but not declared as one
@@ -137,7 +137,7 @@ void atcommand_config_write(ZString cfgName)
"\n"
"// %s\n"
"// Usage: @%s %s\n"
- "%s: %d\n",
+ "%s: %d\n"_fmt,
info.help,
cmd, info.args,
cmd, info.level);
@@ -198,8 +198,8 @@ void log_atcommand(dumb_ptr<map_session_data> sd, ZString cmd)
stamp_time(tmpstr);
MapName map = (sd->bl_m
? sd->bl_m->name_
- : stringish<MapName>("undefined.gat"));
- FPRINTF(*fp, "[%s] %s(%d,%d) %s(%d) : %s\n",
+ : stringish<MapName>("undefined.gat"_s));
+ FPRINTF(*fp, "[%s] %s(%d,%d) %s(%d) : %s\n"_fmt,
tmpstr,
map, sd->bl_x, sd->bl_y,
sd->status_key.name, sd->status_key.account_id,
@@ -225,7 +225,7 @@ io::AppendFile *get_gm_log()
return gm_logfile.get();
last_logfile_nr = logfile_nr;
- AString fullname = STRPRINTF("%s.%04d-%02d",
+ AString fullname = STRPRINTF("%s.%04d-%02d"_fmt,
gm_log, year, month);
if (gm_logfile)
@@ -259,14 +259,14 @@ bool is_atcommand(Session *s, dumb_ptr<map_session_data> sd,
gmlvl = pc_isGM(sd);
if (battle_config.atcommand_gm_only != 0 && !gmlvl)
{
- AString output = STRPRINTF("GM command is level 0, but this server disables level 0 commands: %s",
+ AString output = STRPRINTF("GM command is level 0, but this server disables level 0 commands: %s"_fmt,
AString(command));
clif_displaymessage(s, output);
return true;
}
if (!info)
{
- AString output = STRPRINTF("GM command not found: %s",
+ AString output = STRPRINTF("GM command not found: %s"_fmt,
AString(command));
clif_displaymessage(s, output);
return true;
@@ -274,7 +274,7 @@ bool is_atcommand(Session *s, dumb_ptr<map_session_data> sd,
}
if (info->level > gmlvl)
{
- AString output = STRPRINTF("GM command is level %d, but you are level %d: %s",
+ AString output = STRPRINTF("GM command is level %d, but you are level %d: %s"_fmt,
info->level, gmlvl,
AString(command));
clif_displaymessage(s, output);
@@ -292,17 +292,17 @@ bool is_atcommand(Session *s, dumb_ptr<map_session_data> sd,
log_atcommand(sd, message);
break;
case ATCE::USAGE:
- clif_displaymessage(s, "Command failed: usage error");
- clif_displaymessage(s, STRPRINTF("Usage: %s %s", AString(command), info->args));
+ clif_displaymessage(s, "Command failed: usage error"_s);
+ clif_displaymessage(s, STRPRINTF("Usage: %s %s"_fmt, AString(command), info->args));
break;
case ATCE::EXIST:
- clif_displaymessage(s, "Command failed: something does not exist (or already exists)");
+ clif_displaymessage(s, "Command failed: something does not exist (or already exists)"_s);
break;
case ATCE::RANGE:
- clif_displaymessage(s, "Command failed: value out of range");
+ clif_displaymessage(s, "Command failed: value out of range"_s);
break;
case ATCE::PERM:
- clif_displaymessage(s, "Command failed: permission denied");
+ clif_displaymessage(s, "Command failed: permission denied"_s);
break;
default:
abort();
@@ -347,7 +347,7 @@ bool atcommand_config_read(ZString cfgName)
io::ReadFile in(cfgName);
if (!in.is_open())
{
- PRINTF("At commands configuration file not found: %s\n", cfgName);
+ PRINTF("At commands configuration file not found: %s\n"_fmt, cfgName);
return false;
}
@@ -361,7 +361,7 @@ bool atcommand_config_read(ZString cfgName)
ZString w2;
if (!config_split(line, &w1, &w2))
{
- PRINTF("Bad config line: %s\n", line);
+ PRINTF("Bad config line: %s\n"_fmt, line);
rv = false;
continue;
}
@@ -374,11 +374,11 @@ bool atcommand_config_read(ZString cfgName)
else if (p->level < 0)
p->level = 0;
}
- else if (w1 == "import")
+ else if (w1 == "import"_s)
rv &= atcommand_config_read(w2);
else
{
- PRINTF("%s: bad line: %s\n", cfgName, line);
+ PRINTF("%s: bad line: %s\n"_fmt, cfgName, line);
rv = false;
}
}
@@ -391,7 +391,7 @@ bool atcommand_config_read(ZString cfgName)
static
void atc_do_help(Session *s, const char *cmd, const AtCommandInfo& info)
{
- auto msg = STRPRINTF("\u2007\u2007%d: @%s %s", info.level, cmd, info.args);
+ auto msg = STRPRINTF("\u2007\u2007%d: @%s %s"_fmt, info.level, cmd, info.args);
// manually padding because *space*
size_t ll = 1;
if (info.level >= 10)
@@ -407,9 +407,9 @@ ATCE atcommand_help(Session *s, dumb_ptr<map_session_data>,
{
if (!message)
{
- clif_displaymessage(s, "There is too much help to display it all at once");
- clif_displaymessage(s, "Try @help <@command> or @help <category> or @help <level[-level]>");
- clif_displaymessage(s, "Right now the only category is 'all'");
+ clif_displaymessage(s, "There is too much help to display it all at once"_s);
+ clif_displaymessage(s, "Try @help <@command> or @help <category> or @help <level[-level]>"_s);
+ clif_displaymessage(s, "Right now the only category is 'all'"_s);
return ATCE::OKAY;
}
@@ -419,14 +419,14 @@ ATCE atcommand_help(Session *s, dumb_ptr<map_session_data>,
const AtCommandInfo *info = atcommand_info.search(cmd);
if (!info)
return ATCE::EXIST;
- clif_displaymessage(s, STRPRINTF("Usage: @%s %s", cmd, info->args));
+ clif_displaymessage(s, STRPRINTF("Usage: @%s %s"_fmt, cmd, info->args));
clif_displaymessage(s, info->help);
return ATCE::OKAY;
}
- if (message == "all")
+ if (message == "all"_s)
{
- clif_displaymessage(s, "Synopses of GM commands in category 'all':");
+ clif_displaymessage(s, "Synopses of GM commands in category 'all':"_s);
for (const auto& pair : atcommand_info)
{
const char *cmd = &*pair.first.begin();
@@ -444,7 +444,7 @@ ATCE atcommand_help(Session *s, dumb_ptr<map_session_data>,
if (low < 0 || high > 100 || low >= high)
return ATCE::RANGE;
- clif_displaymessage(s, STRPRINTF("Synopses of GM commands in level [%d, %d):", low, high));
+ clif_displaymessage(s, STRPRINTF("Synopses of GM commands in level [%d, %d):"_fmt, low, high));
for (const auto& pair : atcommand_info)
{
const char *cmd = &*pair.first.begin();
@@ -467,25 +467,25 @@ ATCE atcommand_setup(Session *s, dumb_ptr<map_session_data> sd,
level--;
AString buf;
- buf = STRPRINTF("-255 %s", character);
+ buf = STRPRINTF("-255 %s"_fmt, character);
atcommand_character_baselevel(s, sd, buf);
- buf = STRPRINTF("%d %s", level, character);
+ buf = STRPRINTF("%d %s"_fmt, level, character);
atcommand_character_baselevel(s, sd, buf);
// Emote skill
- buf = STRPRINTF("1 1 %s", character);
+ buf = STRPRINTF("1 1 %s"_fmt, character);
atcommand_skill_learn(s, sd, buf);
// Trade skill
- buf = STRPRINTF("2 1 %s", character);
+ buf = STRPRINTF("2 1 %s"_fmt, character);
atcommand_skill_learn(s, sd, buf);
// Party skill
- STRPRINTF("2 2 %s", character);
+ STRPRINTF("2 2 %s"_fmt, character);
atcommand_skill_learn(s, sd, buf);
- STRPRINTF("018-1.gat 24 98 %s", character);
+ STRPRINTF("018-1.gat 24 98 %s"_fmt, character);
atcommand_charwarp(s, sd, buf);
return ATCE::OKAY;
@@ -520,42 +520,42 @@ ATCE atcommand_charwarp(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp someone to this map.");
+ "You are not authorised to warp someone to this map."_s);
return ATCE::PERM;
}
if (pl_sd->bl_m && pl_sd->bl_m->flag.get(MapFlag::NOWARP)
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp this player from its actual map.");
+ "You are not authorised to warp this player from its actual map."_s);
return ATCE::PERM;
}
if (pc_setpos(pl_sd, map_name, x, y, BeingRemoveWhy::WARPED) == 0)
{
- clif_displaymessage(pl_sd->sess, "Warped.");
- clif_displaymessage(s, "Player warped (message sends to player too).");
+ clif_displaymessage(pl_sd->sess, "Warped."_s);
+ clif_displaymessage(s, "Player warped (message sends to player too)."_s);
}
else
{
- clif_displaymessage(s, "Map not found.");
+ clif_displaymessage(s, "Map not found."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "Coordinates out of range.");
+ clif_displaymessage(s, "Coordinates out of range."_s);
return ATCE::RANGE;
}
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -573,7 +573,7 @@ ATCE atcommand_warp(Session *s, dumb_ptr<map_session_data> sd,
|| !extract(message, record<' ', 1>(&map_name, &x, &y)))
{
clif_displaymessage(s,
- "Please, enter a map (usage: @warp <mapname> <x> <y>).");
+ "Please, enter a map (usage: @warp <mapname> <x> <y>)."_s);
return ATCE::USAGE;
}
@@ -589,27 +589,27 @@ ATCE atcommand_warp(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you to this map.");
+ "You are not authorised to warp you to this map."_s);
return ATCE::PERM;
}
if (sd->bl_m && sd->bl_m->flag.get(MapFlag::NOWARP)
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you from your actual map.");
+ "You are not authorised to warp you from your actual map."_s);
return ATCE::PERM;
}
if (pc_setpos(sd, map_name, x, y, BeingRemoveWhy::WARPED) == 0)
- clif_displaymessage(s, "Warped.");
+ clif_displaymessage(s, "Warped."_s);
else
{
- clif_displaymessage(s, "Map not found.");
+ clif_displaymessage(s, "Map not found."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "Coordinates out of range.");
+ clif_displaymessage(s, "Coordinates out of range."_s);
return ATCE::RANGE;
}
@@ -630,14 +630,14 @@ ATCE atcommand_where(Session *s, dumb_ptr<map_session_data> sd,
&& (pc_isGM(pl_sd) > pc_isGM(sd))))
{
// you can look only lower or same level
- AString output = STRPRINTF("%s: %s (%d,%d)",
+ AString output = STRPRINTF("%s: %s (%d,%d)"_fmt,
pl_sd->status_key.name,
pl_sd->mapname_, pl_sd->bl_x, pl_sd->bl_y);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -653,7 +653,7 @@ ATCE atcommand_goto(Session *s, dumb_ptr<map_session_data> sd,
if (!asplit(message, &character))
{
clif_displaymessage(s,
- "Please, enter a player name (usage: @jumpto/@warpto/@goto <char name>).");
+ "Please, enter a player name (usage: @jumpto/@warpto/@goto <char name>)."_s);
return ATCE::USAGE;
}
@@ -664,23 +664,23 @@ ATCE atcommand_goto(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you to the map of this player.");
+ "You are not authorised to warp you to the map of this player."_s);
return ATCE::PERM;
}
if (sd->bl_m && sd->bl_m->flag.get(MapFlag::NOWARP)
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you from your actual map.");
+ "You are not authorised to warp you from your actual map."_s);
return ATCE::PERM;
}
pc_setpos(sd, pl_sd->mapname_, pl_sd->bl_x, pl_sd->bl_y, BeingRemoveWhy::WARPED);
- AString output = STRPRINTF("Jump to %s", character);
+ AString output = STRPRINTF("Jump to %s"_fmt, character);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -705,23 +705,23 @@ ATCE atcommand_jump(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you to your actual map.");
+ "You are not authorised to warp you to your actual map."_s);
return ATCE::PERM;
}
if (sd->bl_m && sd->bl_m->flag.get(MapFlag::NOWARP)
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you from your actual map.");
+ "You are not authorised to warp you from your actual map."_s);
return ATCE::PERM;
}
pc_setpos(sd, sd->mapname_, x, y, BeingRemoveWhy::WARPED);
- AString output = STRPRINTF("Jump to %d %d", x, y);
+ AString output = STRPRINTF("Jump to %d %d"_fmt, x, y);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Coordinates out of range.");
+ clif_displaymessage(s, "Coordinates out of range."_s);
return ATCE::RANGE;
}
@@ -761,12 +761,12 @@ ATCE atcommand_who(Session *s, dumb_ptr<map_session_data> sd,
AString output;
if (pl_GM_level > 0)
output = STRPRINTF(
- "Name: %s (GM:%d) | Location: %s %d %d",
+ "Name: %s (GM:%d) | Location: %s %d %d"_fmt,
pl_sd->status_key.name, pl_GM_level,
pl_sd->mapname_, pl_sd->bl_x, pl_sd->bl_y);
else
output = STRPRINTF(
- "Name: %s | Location: %s %d %d",
+ "Name: %s | Location: %s %d %d"_fmt,
pl_sd->status_key.name, pl_sd->mapname_,
pl_sd->bl_x, pl_sd->bl_y);
clif_displaymessage(s, output);
@@ -777,12 +777,12 @@ ATCE atcommand_who(Session *s, dumb_ptr<map_session_data> sd,
}
if (count == 0)
- clif_displaymessage(s, "No player found.");
+ clif_displaymessage(s, "No player found."_s);
else if (count == 1)
- clif_displaymessage(s, "1 player found.");
+ clif_displaymessage(s, "1 player found."_s);
else
{
- AString output = STRPRINTF("%d players found.", count);
+ AString output = STRPRINTF("%d players found."_fmt, count);
clif_displaymessage(s, output);
}
@@ -822,11 +822,11 @@ ATCE atcommand_whogroup(Session *s, dumb_ptr<map_session_data> sd,
{
// search with no case sensitive
p = party_search(pl_sd->status.party_id);
- PartyName temp0 = p ? p->name : stringish<PartyName>("None");
+ PartyName temp0 = p ? p->name : stringish<PartyName>("None"_s);
AString output;
if (pl_GM_level > 0)
output = STRPRINTF(
- "Name: %s (GM:%d) | Party: '%s'",
+ "Name: %s (GM:%d) | Party: '%s'"_fmt,
pl_sd->status_key.name, pl_GM_level, temp0);
clif_displaymessage(s, output);
count++;
@@ -836,12 +836,12 @@ ATCE atcommand_whogroup(Session *s, dumb_ptr<map_session_data> sd,
}
if (count == 0)
- clif_displaymessage(s, "No player found.");
+ clif_displaymessage(s, "No player found."_s);
else if (count == 1)
- clif_displaymessage(s, "1 player found.");
+ clif_displaymessage(s, "1 player found."_s);
else
{
- AString output = STRPRINTF("%d players found.", count);
+ AString output = STRPRINTF("%d players found."_fmt, count);
clif_displaymessage(s, output);
}
@@ -886,12 +886,12 @@ ATCE atcommand_whomap(Session *s, dumb_ptr<map_session_data> sd,
AString output;
if (pl_GM_level > 0)
output = STRPRINTF(
- "Name: %s (GM:%d) | Location: %s %d %d",
+ "Name: %s (GM:%d) | Location: %s %d %d"_fmt,
pl_sd->status_key.name, pl_GM_level,
pl_sd->mapname_, pl_sd->bl_x, pl_sd->bl_y);
else
output = STRPRINTF(
- "Name: %s | Location: %s %d %d",
+ "Name: %s | Location: %s %d %d"_fmt,
pl_sd->status_key.name, pl_sd->mapname_,
pl_sd->bl_x, pl_sd->bl_y);
clif_displaymessage(s, output);
@@ -901,7 +901,7 @@ ATCE atcommand_whomap(Session *s, dumb_ptr<map_session_data> sd,
}
}
- AString output = STRPRINTF("%d players found in map '%s'.",
+ AString output = STRPRINTF("%d players found in map '%s'."_fmt,
count, map_id->name_);
clif_displaymessage(s, output);
@@ -945,13 +945,13 @@ ATCE atcommand_whomapgroup(Session *s, dumb_ptr<map_session_data> sd,
if (pl_sd->bl_m == map_id)
{
p = party_search(pl_sd->status.party_id);
- PartyName temp0 = p ? p->name : stringish<PartyName>("None");
+ PartyName temp0 = p ? p->name : stringish<PartyName>("None"_s);
AString output;
if (pl_GM_level > 0)
- output = STRPRINTF("Name: %s (GM:%d) | Party: '%s'",
+ output = STRPRINTF("Name: %s (GM:%d) | Party: '%s'"_fmt,
pl_sd->status_key.name, pl_GM_level, temp0);
else
- output = STRPRINTF("Name: %s | Party: '%s'",
+ output = STRPRINTF("Name: %s | Party: '%s'"_fmt,
pl_sd->status_key.name, temp0);
clif_displaymessage(s, output);
count++;
@@ -962,12 +962,12 @@ ATCE atcommand_whomapgroup(Session *s, dumb_ptr<map_session_data> sd,
AString output;
if (count == 0)
- output = STRPRINTF("No player found in map '%s'.", map_id->name_);
+ output = STRPRINTF("No player found in map '%s'."_fmt, map_id->name_);
else if (count == 1)
- output = STRPRINTF("1 player found in map '%s'.", map_id->name_);
+ output = STRPRINTF("1 player found in map '%s'."_fmt, map_id->name_);
else
{
- output = STRPRINTF("%d players found in map '%s'.", count, map_id->name_);
+ output = STRPRINTF("%d players found in map '%s'."_fmt, count, map_id->name_);
}
clif_displaymessage(s, output);
@@ -1010,20 +1010,20 @@ ATCE atcommand_whogm(Session *s, dumb_ptr<map_session_data> sd,
// search with no case sensitive
AString output;
output = STRPRINTF(
- "Name: %s (GM:%d) | Location: %s %d %d",
+ "Name: %s (GM:%d) | Location: %s %d %d"_fmt,
pl_sd->status_key.name, pl_GM_level,
pl_sd->mapname_, pl_sd->bl_x, pl_sd->bl_y);
clif_displaymessage(s, output);
output = STRPRINTF(
- " BLvl: %d | Job: %s (Lvl: %d)",
+ " BLvl: %d | Job: %s (Lvl: %d)"_fmt,
pl_sd->status.base_level,
- "Novice/Human",
+ "Novice/Human"_s,
pl_sd->status.job_level);
clif_displaymessage(s, output);
p = party_search(pl_sd->status.party_id);
- PartyName temp0 = p ? p->name : stringish<PartyName>("None");
+ PartyName temp0 = p ? p->name : stringish<PartyName>("None"_s);
output = STRPRINTF(
- " Party: '%s'",
+ " Party: '%s'"_fmt,
temp0);
clif_displaymessage(s, output);
count++;
@@ -1034,12 +1034,12 @@ ATCE atcommand_whogm(Session *s, dumb_ptr<map_session_data> sd,
}
if (count == 0)
- clif_displaymessage(s, "No GM found.");
+ clif_displaymessage(s, "No GM found."_s);
else if (count == 1)
- clif_displaymessage(s, "1 GM found.");
+ clif_displaymessage(s, "1 GM found."_s);
else
{
- AString output = STRPRINTF("%d GMs found.", count);
+ AString output = STRPRINTF("%d GMs found."_fmt, count);
clif_displaymessage(s, output);
}
@@ -1053,7 +1053,7 @@ ATCE atcommand_save(Session *s, dumb_ptr<map_session_data> sd,
pc_setsavepoint(sd, sd->mapname_, sd->bl_x, sd->bl_y);
pc_makesavestatus(sd);
chrif_save(sd);
- clif_displaymessage(s, "Character data respawn point saved.");
+ clif_displaymessage(s, "Character data respawn point saved."_s);
return ATCE::OKAY;
}
@@ -1067,14 +1067,14 @@ ATCE atcommand_load(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you to your save map.");
+ "You are not authorised to warp you to your save map."_s);
return ATCE::PERM;
}
if (sd->bl_m && sd->bl_m->flag.get(MapFlag::NOWARP)
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you from your actual map.");
+ "You are not authorised to warp you from your actual map."_s);
return ATCE::PERM;
}
@@ -1089,7 +1089,7 @@ ATCE atcommand_load(Session *s, dumb_ptr<map_session_data> sd,
pc_setpos(sd, sd->status.save_point.map_, sd->status.save_point.x,
sd->status.save_point.y, BeingRemoveWhy::GONE);
}
- clif_displaymessage(s, "Warping to respawn point.");
+ clif_displaymessage(s, "Warping to respawn point."_s);
return ATCE::OKAY;
}
@@ -1101,7 +1101,7 @@ ATCE atcommand_speed(Session *s, dumb_ptr<map_session_data> sd,
if (!message)
{
AString output = STRPRINTF(
- "Please, enter a speed value (usage: @speed <%d-%d>).",
+ "Please, enter a speed value (usage: @speed <%d-%d>)."_fmt,
static_cast<uint32_t>(MIN_WALK_SPEED.count()),
static_cast<uint32_t>(MAX_WALK_SPEED.count()));
clif_displaymessage(s, output);
@@ -1115,12 +1115,12 @@ ATCE atcommand_speed(Session *s, dumb_ptr<map_session_data> sd,
//sd->walktimer = x;
//この文を追加 by れ
clif_updatestatus(sd, SP::SPEED);
- clif_displaymessage(s, "Speed changed.");
+ clif_displaymessage(s, "Speed changed."_s);
}
else
{
AString output = STRPRINTF(
- "Please, enter a valid speed value (usage: @speed <%d-%d>).",
+ "Please, enter a valid speed value (usage: @speed <%d-%d>)."_fmt,
static_cast<uint32_t>(MIN_WALK_SPEED.count()),
static_cast<uint32_t>(MAX_WALK_SPEED.count()));
clif_displaymessage(s, output);
@@ -1138,14 +1138,14 @@ ATCE atcommand_storage(Session *s, dumb_ptr<map_session_data> sd,
if (sd->state.storage_open)
{
- clif_displaymessage(s, "msg_table[250]");
+ clif_displaymessage(s, "msg_table[250]"_s);
return ATCE::EXIST;
}
if ((stor = account2storage2(sd->status_key.account_id)) != NULL
&& stor->storage_status == 1)
{
- clif_displaymessage(s, "msg_table[250]");
+ clif_displaymessage(s, "msg_table[250]"_s);
return ATCE::EXIST;
}
@@ -1171,7 +1171,7 @@ ATCE atcommand_option(Session *s, dumb_ptr<map_session_data> sd,
clif_changeoption(sd);
pc_calcstatus(sd, 0);
- clif_displaymessage(s, "Options changed.");
+ clif_displaymessage(s, "Options changed."_s);
return ATCE::OKAY;
}
@@ -1183,12 +1183,12 @@ ATCE atcommand_hide(Session *s, dumb_ptr<map_session_data> sd,
if (bool(sd->status.option & Option::HIDE))
{
sd->status.option &= ~Option::HIDE;
- clif_displaymessage(s, "Invisible: Off.");
+ clif_displaymessage(s, "Invisible: Off."_s);
}
else
{
sd->status.option |= Option::HIDE;
- clif_displaymessage(s, "Invisible: On.");
+ clif_displaymessage(s, "Invisible: On."_s);
}
clif_changeoption(sd);
@@ -1200,7 +1200,7 @@ ATCE atcommand_die(Session *s, dumb_ptr<map_session_data> sd,
ZString)
{
pc_damage(NULL, sd, sd->status.hp + 1);
- clif_displaymessage(s, "A pity! You've died.");
+ clif_displaymessage(s, "A pity! You've died."_s);
return ATCE::OKAY;
}
@@ -1221,17 +1221,17 @@ ATCE atcommand_kill(Session *s, dumb_ptr<map_session_data> sd,
{
// you can kill only lower or same level
pc_damage(NULL, pl_sd, pl_sd->status.hp + 1);
- clif_displaymessage(s, "Character killed.");
+ clif_displaymessage(s, "Character killed."_s);
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -1250,7 +1250,7 @@ ATCE atcommand_alive(Session *s, dumb_ptr<map_session_data> sd,
clif_updatestatus(sd, SP::HP);
clif_updatestatus(sd, SP::SP);
clif_resurrection(sd, 1);
- clif_displaymessage(s, "You've been revived! It's a miracle!");
+ clif_displaymessage(s, "You've been revived! It's a miracle!"_s);
return ATCE::OKAY;
}
@@ -1304,13 +1304,13 @@ ATCE atcommand_heal(Session *s, dumb_ptr<map_session_data> sd,
{
pc_heal(sd, hp, sp);
if (hp >= 0 && sp >= 0)
- clif_displaymessage(s, "HP, SP recovered.");
+ clif_displaymessage(s, "HP, SP recovered."_s);
else
- clif_displaymessage(s, "HP or/and SP modified.");
+ clif_displaymessage(s, "HP or/and SP modified."_s);
}
else
{
- clif_displaymessage(s, "HP and SP are already with the good value.");
+ clif_displaymessage(s, "HP and SP are already with the good value."_s);
return ATCE::RANGE;
}
@@ -1329,7 +1329,7 @@ ATCE atcommand_item(Session *s, dumb_ptr<map_session_data> sd,
if (!extract(message, record<' ', 1>(&item_name, &number)))
{
clif_displaymessage(s,
- "Please, enter an item name/id (usage: @item <item name or ID> [quantity]).");
+ "Please, enter an item name/id (usage: @item <item name or ID> [quantity])."_s);
return ATCE::USAGE;
}
@@ -1363,11 +1363,11 @@ ATCE atcommand_item(Session *s, dumb_ptr<map_session_data> sd,
!= PickupFail::OKAY)
clif_additem(sd, 0, 0, flag);
}
- clif_displaymessage(s, "Item created.");
+ clif_displaymessage(s, "Item created."_s);
}
else
{
- clif_displaymessage(s, "Invalid item ID or name.");
+ clif_displaymessage(s, "Invalid item ID or name."_s);
return ATCE::EXIST;
}
@@ -1386,7 +1386,7 @@ ATCE atcommand_itemreset(Session *s, dumb_ptr<map_session_data> sd,
&& sd->status.inventory[i].equip == EPOS::ZERO)
pc_delitem(sd, i, sd->status.inventory[i].amount, 0);
}
- clif_displaymessage(s, "All of your items have been removed.");
+ clif_displaymessage(s, "All of your items have been removed."_s);
return ATCE::OKAY;
}
@@ -1409,7 +1409,7 @@ ATCE atcommand_baselevelup(Session *s, dumb_ptr<map_session_data> sd,
if (!extract(message, &level) || !level)
{
clif_displaymessage(s,
- "Please, enter a level adjustement (usage: @blvl <number of levels>).");
+ "Please, enter a level adjustement (usage: @blvl <number of levels>)."_s);
return ATCE::USAGE;
}
@@ -1417,7 +1417,7 @@ ATCE atcommand_baselevelup(Session *s, dumb_ptr<map_session_data> sd,
{
if (sd->status.base_level == battle_config.maximum_level)
{
- clif_displaymessage(s, "Base level can't go any higher.");
+ clif_displaymessage(s, "Base level can't go any higher."_s);
return ATCE::RANGE;
}
if (level > battle_config.maximum_level || level > (battle_config.maximum_level - sd->status.base_level))
@@ -1432,13 +1432,13 @@ ATCE atcommand_baselevelup(Session *s, dumb_ptr<map_session_data> sd,
pc_calcstatus(sd, 0);
pc_heal(sd, sd->status.max_hp, sd->status.max_sp);
clif_misceffect(sd, 0);
- clif_displaymessage(s, "Base level raised.");
+ clif_displaymessage(s, "Base level raised."_s);
}
else
{
if (sd->status.base_level == 1)
{
- clif_displaymessage(s, "Base level can't go any lower.");
+ clif_displaymessage(s, "Base level can't go any lower."_s);
return ATCE::USAGE;
}
if (level < -battle_config.maximum_level || level < (1 - sd->status.base_level))
@@ -1458,7 +1458,7 @@ ATCE atcommand_baselevelup(Session *s, dumb_ptr<map_session_data> sd,
clif_updatestatus(sd, SP::BASELEVEL);
clif_updatestatus(sd, SP::NEXTBASEEXP);
pc_calcstatus(sd, 0);
- clif_displaymessage(s, "Base level lowered.");
+ clif_displaymessage(s, "Base level lowered."_s);
}
return ATCE::OKAY;
@@ -1481,7 +1481,7 @@ ATCE atcommand_joblevelup(Session *s, dumb_ptr<map_session_data> sd,
{
if (sd->status.job_level == up_level)
{
- clif_displaymessage(s, "Job level can't go any higher.");
+ clif_displaymessage(s, "Job level can't go any higher."_s);
return ATCE::RANGE;
}
if (level > up_level || level > (up_level - sd->status.job_level))
@@ -1494,13 +1494,13 @@ ATCE atcommand_joblevelup(Session *s, dumb_ptr<map_session_data> sd,
clif_updatestatus(sd, SP::SKILLPOINT);
pc_calcstatus(sd, 0);
clif_misceffect(sd, 1);
- clif_displaymessage(s, "Job level raised.");
+ clif_displaymessage(s, "Job level raised."_s);
}
else
{
if (sd->status.job_level == 1)
{
- clif_displaymessage(s, "Job level can't go any lower.");
+ clif_displaymessage(s, "Job level can't go any lower."_s);
return ATCE::RANGE;
}
if (level < -up_level || level < (1 - sd->status.job_level))
@@ -1518,7 +1518,7 @@ ATCE atcommand_joblevelup(Session *s, dumb_ptr<map_session_data> sd,
}
// to add: remove status points from skills
pc_calcstatus(sd, 0);
- clif_displaymessage(s, "Job level lowered.");
+ clif_displaymessage(s, "Job level lowered."_s);
}
return ATCE::OKAY;
@@ -1534,7 +1534,7 @@ ATCE atcommand_gm(Session *s, dumb_ptr<map_session_data> sd,
if (pc_isGM(sd))
{
// a GM can not use this function. only a normal player (become gm is not for gm!)
- clif_displaymessage(s, "You already have some GM powers.");
+ clif_displaymessage(s, "You already have some GM powers."_s);
return ATCE::PERM;
}
else
@@ -1550,7 +1550,7 @@ ATCE atcommand_pvpoff(Session *s, dumb_ptr<map_session_data> sd,
if (battle_config.pk_mode)
{
//disable command if server is in PK mode [Valaris]
- clif_displaymessage(s, "This option cannot be used in PK Mode.");
+ clif_displaymessage(s, "This option cannot be used in PK Mode."_s);
return ATCE::EXIST;
}
@@ -1571,11 +1571,11 @@ ATCE atcommand_pvpoff(Session *s, dumb_ptr<map_session_data> sd,
}
}
}
- clif_displaymessage(s, "PvP: Off.");
+ clif_displaymessage(s, "PvP: Off."_s);
}
else
{
- clif_displaymessage(s, "PvP is already Off.");
+ clif_displaymessage(s, "PvP is already Off."_s);
return ATCE::EXIST;
}
@@ -1589,7 +1589,7 @@ ATCE atcommand_pvpon(Session *s, dumb_ptr<map_session_data> sd,
if (battle_config.pk_mode)
{
//disable command if server is in PK mode [Valaris]
- clif_displaymessage(s, "This option cannot be used in PK Mode.");
+ clif_displaymessage(s, "This option cannot be used in PK Mode."_s);
return ATCE::EXIST;
}
@@ -1614,11 +1614,11 @@ ATCE atcommand_pvpon(Session *s, dumb_ptr<map_session_data> sd,
}
}
}
- clif_displaymessage(s, "PvP: On.");
+ clif_displaymessage(s, "PvP: On."_s);
}
else
{
- clif_displaymessage(s, "PvP is already On.");
+ clif_displaymessage(s, "PvP is already On."_s);
return ATCE::EXIST;
}
@@ -1642,7 +1642,7 @@ ATCE atcommand_model(Session *s, dumb_ptr<map_session_data> sd,
pc_changelook(sd, LOOK::HAIR, hair_style);
pc_changelook(sd, LOOK::HAIR_COLOR, hair_color);
pc_changelook(sd, LOOK::CLOTHES_COLOR, cloth_color);
- clif_displaymessage(s, "Appearence changed.");
+ clif_displaymessage(s, "Appearence changed."_s);
}
}
else
@@ -1664,7 +1664,7 @@ ATCE atcommand_dye(Session *s, dumb_ptr<map_session_data> sd,
{
{
pc_changelook(sd, LOOK::CLOTHES_COLOR, cloth_color);
- clif_displaymessage(s, "Appearence changed.");
+ clif_displaymessage(s, "Appearence changed."_s);
}
}
else
@@ -1686,7 +1686,7 @@ ATCE atcommand_hair_style(Session *s, dumb_ptr<map_session_data> sd,
{
{
pc_changelook(sd, LOOK::HAIR, hair_style);
- clif_displaymessage(s, "Appearence changed.");
+ clif_displaymessage(s, "Appearence changed."_s);
}
}
else
@@ -1708,7 +1708,7 @@ ATCE atcommand_hair_color(Session *s, dumb_ptr<map_session_data> sd,
{
{
pc_changelook(sd, LOOK::HAIR_COLOR, hair_color);
- clif_displaymessage(s, "Appearence changed.");
+ clif_displaymessage(s, "Appearence changed."_s);
}
}
else
@@ -1749,7 +1749,7 @@ ATCE atcommand_spawn(Session *s, dumb_ptr<map_session_data> sd,
number = battle_config.atcommand_spawn_quantity_limit;
if (battle_config.etc_log)
- PRINTF("@spawn monster='%s' id=%d count=%d (%d,%d)\n",
+ PRINTF("@spawn monster='%s' id=%d count=%d (%d,%d)\n"_fmt,
monster, mob_id, number, x, y);
count = 0;
@@ -1778,16 +1778,16 @@ ATCE atcommand_spawn(Session *s, dumb_ptr<map_session_data> sd,
if (count != 0)
if (number == count)
- clif_displaymessage(s, "All monster summoned!");
+ clif_displaymessage(s, "All monster summoned!"_s);
else
{
- AString output = STRPRINTF("%d monster(s) summoned!",
+ AString output = STRPRINTF("%d monster(s) summoned!"_fmt,
count);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Invalid monster ID or name.");
+ clif_displaymessage(s, "Invalid monster ID or name."_s);
return ATCE::EXIST;
}
@@ -1813,7 +1813,7 @@ void atcommand_killmonster_sub(Session *s, dumb_ptr<map_session_data> sd,
map_id->xs, map_id->ys,
BL::MOB);
- clif_displaymessage(s, "All monsters killed!");
+ clif_displaymessage(s, "All monsters killed!"_s);
}
static
@@ -1830,7 +1830,7 @@ void atlist_nearby_sub(dumb_ptr<block_list> bl, Session *s)
{
nullpo_retv(bl);
- AString buf = STRPRINTF(" - \"%s\"",
+ AString buf = STRPRINTF(" - \"%s\""_fmt,
bl->is_player()->status_key.name);
clif_displaymessage(s, buf);
}
@@ -1839,7 +1839,7 @@ static
ATCE atcommand_list_nearby(Session *s, dumb_ptr<map_session_data> sd,
ZString)
{
- clif_displaymessage(s, "Nearby players:");
+ clif_displaymessage(s, "Nearby players:"_s);
map_foreachinarea(std::bind(atlist_nearby_sub, ph::_1, s),
sd->bl_m,
sd->bl_x - 1, sd->bl_y - 1,
@@ -1867,7 +1867,7 @@ ATCE atcommand_gat(Session *s, dumb_ptr<map_session_data> sd,
for (y = 2; y >= -2; y--)
{
AString output = STRPRINTF(
- "%s (x= %d, y= %d) %02X %02X %02X %02X %02X",
+ "%s (x= %d, y= %d) %02X %02X %02X %02X %02X"_fmt,
sd->bl_m->name_, sd->bl_x - 2, sd->bl_y + y,
map_getcell(sd->bl_m, sd->bl_x - 2, sd->bl_y + y),
map_getcell(sd->bl_m, sd->bl_x - 1, sd->bl_y + y),
@@ -1916,7 +1916,7 @@ ATCE atcommand_statuspoint(Session *s, dumb_ptr<map_session_data> sd,
{
sd->status.status_point = new_status_point;
clif_updatestatus(sd, SP::STATUSPOINT);
- clif_displaymessage(s, "Number of status points changed!");
+ clif_displaymessage(s, "Number of status points changed!"_s);
}
else
return ATCE::RANGE;
@@ -1945,7 +1945,7 @@ ATCE atcommand_skillpoint(Session *s, dumb_ptr<map_session_data> sd,
{
sd->status.skill_point = new_skill_point;
clif_updatestatus(sd, SP::SKILLPOINT);
- clif_displaymessage(s, "Number of skill points changed!");
+ clif_displaymessage(s, "Number of skill points changed!"_s);
}
else
return ATCE::RANGE;
@@ -1974,7 +1974,7 @@ ATCE atcommand_zeny(Session *s, dumb_ptr<map_session_data> sd,
{
sd->status.zeny = new_zeny;
clif_updatestatus(sd, SP::ZENY);
- clif_displaymessage(s, "Number of zenys changed!");
+ clif_displaymessage(s, "Number of zenys changed!"_s);
}
else
return ATCE::RANGE;
@@ -2006,7 +2006,7 @@ ATCE atcommand_param(Session *s, dumb_ptr<map_session_data> sd,
clif_updatestatus(sd, attr_to_sp(attr));
clif_updatestatus(sd, attr_to_usp(attr));
pc_calcstatus(sd, 0);
- clif_displaymessage(s, "Stat changed.");
+ clif_displaymessage(s, "Stat changed."_s);
}
else
return ATCE::RANGE;
@@ -2047,7 +2047,7 @@ ATCE atcommand_all_stats(Session *s, dumb_ptr<map_session_data> sd,
if (count > 0)
// if at least 1 stat modified
- clif_displaymessage(s, "All stats changed!");
+ clif_displaymessage(s, "All stats changed!"_s);
else
return ATCE::RANGE;
@@ -2073,29 +2073,29 @@ ATCE atcommand_recall(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp somenone to your actual map.");
+ "You are not authorised to warp somenone to your actual map."_s);
return ATCE::PERM;
}
if (pl_sd->bl_m && pl_sd->bl_m->flag.get(MapFlag::NOWARP)
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp this player from its actual map.");
+ "You are not authorised to warp this player from its actual map."_s);
return ATCE::PERM;
}
pc_setpos(pl_sd, sd->mapname_, sd->bl_x, sd->bl_y, BeingRemoveWhy::QUIT);
- AString output = STRPRINTF("%s recalled!", character);
+ AString output = STRPRINTF("%s recalled!"_fmt, character);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -2121,11 +2121,11 @@ ATCE atcommand_revive(Session *s, dumb_ptr<map_session_data> sd,
clif_updatestatus(pl_sd, SP::HP);
clif_updatestatus(pl_sd, SP::SP);
clif_resurrection(pl_sd, 1);
- clif_displaymessage(s, "Character revived.");
+ clif_displaymessage(s, "Character revived."_s);
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -2145,38 +2145,38 @@ ATCE atcommand_character_stats(Session *s, dumb_ptr<map_session_data>,
if (pl_sd != NULL)
{
AString output;
- output = STRPRINTF("'%s' stats:", pl_sd->status_key.name);
+ output = STRPRINTF("'%s' stats:"_fmt, pl_sd->status_key.name);
clif_displaymessage(s, output);
- output = STRPRINTF("Base Level - %d", pl_sd->status.base_level),
+ output = STRPRINTF("Base Level - %d"_fmt, pl_sd->status.base_level),
clif_displaymessage(s, output);
- output = STRPRINTF("Job - Novice/Human (level %d)", pl_sd->status.job_level);
+ output = STRPRINTF("Job - Novice/Human (level %d)"_fmt, pl_sd->status.job_level);
clif_displaymessage(s, output);
- output = STRPRINTF("Hp - %d", pl_sd->status.hp);
+ output = STRPRINTF("Hp - %d"_fmt, pl_sd->status.hp);
clif_displaymessage(s, output);
- output = STRPRINTF("MaxHp - %d", pl_sd->status.max_hp);
+ output = STRPRINTF("MaxHp - %d"_fmt, pl_sd->status.max_hp);
clif_displaymessage(s, output);
- output = STRPRINTF("Sp - %d", pl_sd->status.sp);
+ output = STRPRINTF("Sp - %d"_fmt, pl_sd->status.sp);
clif_displaymessage(s, output);
- output = STRPRINTF("MaxSp - %d", pl_sd->status.max_sp);
+ output = STRPRINTF("MaxSp - %d"_fmt, pl_sd->status.max_sp);
clif_displaymessage(s, output);
- output = STRPRINTF("Str - %3d", pl_sd->status.attrs[ATTR::STR]);
+ output = STRPRINTF("Str - %3d"_fmt, pl_sd->status.attrs[ATTR::STR]);
clif_displaymessage(s, output);
- output = STRPRINTF("Agi - %3d", pl_sd->status.attrs[ATTR::AGI]);
+ output = STRPRINTF("Agi - %3d"_fmt, pl_sd->status.attrs[ATTR::AGI]);
clif_displaymessage(s, output);
- output = STRPRINTF("Vit - %3d", pl_sd->status.attrs[ATTR::VIT]);
+ output = STRPRINTF("Vit - %3d"_fmt, pl_sd->status.attrs[ATTR::VIT]);
clif_displaymessage(s, output);
- output = STRPRINTF("Int - %3d", pl_sd->status.attrs[ATTR::INT]);
+ output = STRPRINTF("Int - %3d"_fmt, pl_sd->status.attrs[ATTR::INT]);
clif_displaymessage(s, output);
- output = STRPRINTF("Dex - %3d", pl_sd->status.attrs[ATTR::DEX]);
+ output = STRPRINTF("Dex - %3d"_fmt, pl_sd->status.attrs[ATTR::DEX]);
clif_displaymessage(s, output);
- output = STRPRINTF("Luk - %3d", pl_sd->status.attrs[ATTR::LUK]);
+ output = STRPRINTF("Luk - %3d"_fmt, pl_sd->status.attrs[ATTR::LUK]);
clif_displaymessage(s, output);
- output = STRPRINTF("Zeny - %d", pl_sd->status.zeny);
+ output = STRPRINTF("Zeny - %d"_fmt, pl_sd->status.zeny);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -2200,19 +2200,19 @@ ATCE atcommand_character_stats_all(Session *s, dumb_ptr<map_session_data>,
{
AString gmlevel;
if (pc_isGM(pl_sd) > 0)
- gmlevel = STRPRINTF("| GM Lvl: %d", pc_isGM(pl_sd));
+ gmlevel = STRPRINTF("| GM Lvl: %d"_fmt, pc_isGM(pl_sd));
else
- gmlevel = " ";
+ gmlevel = " "_s;
AString output;
output = STRPRINTF(
- "Name: %s | BLvl: %d | Job: Novice/Human (Lvl: %d) | HP: %d/%d | SP: %d/%d",
+ "Name: %s | BLvl: %d | Job: Novice/Human (Lvl: %d) | HP: %d/%d | SP: %d/%d"_fmt,
pl_sd->status_key.name, pl_sd->status.base_level,
pl_sd->status.job_level,
pl_sd->status.hp, pl_sd->status.max_hp,
pl_sd->status.sp, pl_sd->status.max_sp);
clif_displaymessage(s, output);
- output = STRPRINTF("STR: %d | AGI: %d | VIT: %d | INT: %d | DEX: %d | LUK: %d | Zeny: %d %s",
+ output = STRPRINTF("STR: %d | AGI: %d | VIT: %d | INT: %d | DEX: %d | LUK: %d | Zeny: %d %s"_fmt,
pl_sd->status.attrs[ATTR::STR],
pl_sd->status.attrs[ATTR::AGI],
pl_sd->status.attrs[ATTR::VIT],
@@ -2222,18 +2222,18 @@ ATCE atcommand_character_stats_all(Session *s, dumb_ptr<map_session_data>,
pl_sd->status.zeny,
gmlevel);
clif_displaymessage(s, output);
- clif_displaymessage(s, "--------");
+ clif_displaymessage(s, "--------"_s);
count++;
}
}
if (count == 0)
- clif_displaymessage(s, "No player found.");
+ clif_displaymessage(s, "No player found."_s);
else if (count == 1)
- clif_displaymessage(s, "1 player found.");
+ clif_displaymessage(s, "1 player found."_s);
else
{
- AString output = STRPRINTF("%d players found.", count);
+ AString output = STRPRINTF("%d players found."_fmt, count);
clif_displaymessage(s, output);
}
@@ -2263,17 +2263,17 @@ ATCE atcommand_character_option(Session *s, dumb_ptr<map_session_data> sd,
clif_changeoption(pl_sd);
pc_calcstatus(pl_sd, 0);
- clif_displaymessage(s, "Character's options changed.");
+ clif_displaymessage(s, "Character's options changed."_s);
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -2292,7 +2292,7 @@ ATCE atcommand_char_change_sex(Session *s, dumb_ptr<map_session_data> sd,
{
chrif_char_ask_name(sd->status_key.account_id, character, 5, HumanTimeDiff());
// type: 5 - changesex
- clif_displaymessage(s, "Character name sends to char-server to ask it.");
+ clif_displaymessage(s, "Character name sends to char-server to ask it."_s);
}
return ATCE::OKAY;
@@ -2310,7 +2310,7 @@ ATCE atcommand_char_block(Session *s, dumb_ptr<map_session_data> sd,
{
chrif_char_ask_name(sd->status_key.account_id, character, 1, HumanTimeDiff());
// type: 1 - block
- clif_displaymessage(s, "Character name sends to char-server to ask it.");
+ clif_displaymessage(s, "Character name sends to char-server to ask it."_s);
}
return ATCE::OKAY;
@@ -2330,7 +2330,7 @@ ATCE atcommand_char_ban(Session *s, dumb_ptr<map_session_data> sd,
{
chrif_char_ask_name(sd->status_key.account_id, character, 2, modif);
// type: 2 - ban
- clif_displaymessage(s, "Character name sends to char-server to ask it.");
+ clif_displaymessage(s, "Character name sends to char-server to ask it."_s);
}
return ATCE::OKAY;
@@ -2349,7 +2349,7 @@ ATCE atcommand_char_unblock(Session *s, dumb_ptr<map_session_data> sd,
// send answer to login server via char-server
chrif_char_ask_name(sd->status_key.account_id, character, 3, HumanTimeDiff());
// type: 3 - unblock
- clif_displaymessage(s, "Character name sends to char-server to ask it.");
+ clif_displaymessage(s, "Character name sends to char-server to ask it."_s);
}
return ATCE::OKAY;
@@ -2368,7 +2368,7 @@ ATCE atcommand_char_unban(Session *s, dumb_ptr<map_session_data> sd,
// send answer to login server via char-server
chrif_char_ask_name(sd->status_key.account_id, character, 4, HumanTimeDiff());
// type: 4 - unban
- clif_displaymessage(s, "Character name sends to char-server to ask it.");
+ clif_displaymessage(s, "Character name sends to char-server to ask it."_s);
}
return ATCE::OKAY;
@@ -2395,7 +2395,7 @@ ATCE atcommand_character_save(Session *s, dumb_ptr<map_session_data> sd,
map_local *m = map_mapname2mapid(map_name);
if (m == nullptr)
{
- clif_displaymessage(s, "Map not found.");
+ clif_displaymessage(s, "Map not found."_s);
return ATCE::EXIST;
}
else
@@ -2404,22 +2404,22 @@ ATCE atcommand_character_save(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to set this map as a save map.");
+ "You are not authorised to set this map as a save map."_s);
return ATCE::PERM;
}
pc_setsavepoint(pl_sd, map_name, x, y);
- clif_displaymessage(s, "Character's respawn point changed.");
+ clif_displaymessage(s, "Character's respawn point changed."_s);
}
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -2442,10 +2442,10 @@ ATCE atcommand_doom(Session *s, dumb_ptr<map_session_data> sd,
{
// you can doom only lower or same gm level
pc_damage(NULL, pl_sd, pl_sd->status.hp + 1);
- clif_displaymessage(pl_sd->sess, "The holy messenger has given judgement.");
+ clif_displaymessage(pl_sd->sess, "The holy messenger has given judgement."_s);
}
}
- clif_displaymessage(s, "Judgement was made.");
+ clif_displaymessage(s, "Judgement was made."_s);
return ATCE::OKAY;
}
@@ -2466,10 +2466,10 @@ ATCE atcommand_doommap(Session *s, dumb_ptr<map_session_data> sd,
{
// you can doom only lower or same gm level
pc_damage(NULL, pl_sd, pl_sd->status.hp + 1);
- clif_displaymessage(pl_sd->sess, "The holy messenger has given judgement.");
+ clif_displaymessage(pl_sd->sess, "The holy messenger has given judgement."_s);
}
}
- clif_displaymessage(s, "Judgement was made.");
+ clif_displaymessage(s, "Judgement was made."_s);
return ATCE::OKAY;
}
@@ -2485,7 +2485,7 @@ void atcommand_raise_sub(dumb_ptr<map_session_data> sd)
clif_updatestatus(sd, SP::HP);
clif_updatestatus(sd, SP::SP);
clif_resurrection(sd, 1);
- clif_displaymessage(sd->sess, "Mercy has been shown.");
+ clif_displaymessage(sd->sess, "Mercy has been shown."_s);
}
}
@@ -2501,7 +2501,7 @@ ATCE atcommand_raise(Session *s, dumb_ptr<map_session_data>,
dumb_ptr<map_session_data> pl_sd = dumb_ptr<map_session_data>(static_cast<map_session_data *>(s2->session_data.get()));
atcommand_raise_sub(pl_sd);
}
- clif_displaymessage(s, "Mercy has been granted.");
+ clif_displaymessage(s, "Mercy has been granted."_s);
return ATCE::OKAY;
}
@@ -2520,7 +2520,7 @@ ATCE atcommand_raisemap(Session *s, dumb_ptr<map_session_data> sd,
&& pl_sd->state.auth && sd->bl_m == pl_sd->bl_m)
atcommand_raise_sub(pl_sd);
}
- clif_displaymessage(s, "Mercy has been granted.");
+ clif_displaymessage(s, "Mercy has been granted."_s);
return ATCE::OKAY;
}
@@ -2546,7 +2546,7 @@ ATCE atcommand_character_baselevel(Session *s, dumb_ptr<map_session_data> sd,
{
if (pl_sd->status.base_level == battle_config.maximum_level)
{
- clif_displaymessage(s, "Character's base level can't go any higher.");
+ clif_displaymessage(s, "Character's base level can't go any higher."_s);
return ATCE::RANGE;
}
if (level > battle_config.maximum_level || level > (battle_config.maximum_level - pl_sd->status.base_level))
@@ -2564,13 +2564,13 @@ ATCE atcommand_character_baselevel(Session *s, dumb_ptr<map_session_data> sd,
pc_calcstatus(pl_sd, 0);
pc_heal(pl_sd, pl_sd->status.max_hp, pl_sd->status.max_sp);
clif_misceffect(pl_sd, 0);
- clif_displaymessage(s, "Character's base level raised.");
+ clif_displaymessage(s, "Character's base level raised."_s);
}
else
{
if (pl_sd->status.base_level == 1)
{
- clif_displaymessage(s, "Character's base level can't go any lower.");
+ clif_displaymessage(s, "Character's base level can't go any lower."_s);
return ATCE::RANGE;
}
if (level < -battle_config.maximum_level || level < (1 - pl_sd->status.base_level))
@@ -2592,20 +2592,20 @@ ATCE atcommand_character_baselevel(Session *s, dumb_ptr<map_session_data> sd,
clif_updatestatus(pl_sd, SP::NEXTBASEEXP);
clif_updatestatus(pl_sd, SP::BASEEXP);
pc_calcstatus(pl_sd, 0);
- clif_displaymessage(s, "Character's base level lowered.");
+ clif_displaymessage(s, "Character's base level lowered."_s);
}
// Reset their stat points to prevent extra points from stacking
atcommand_charstreset(s, sd, character.to__actual());
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -2635,7 +2635,7 @@ ATCE atcommand_character_joblevel(Session *s, dumb_ptr<map_session_data> sd,
{
if (pl_sd->status.job_level == max_level)
{
- clif_displaymessage(s, "Character's job level can't go any higher.");
+ clif_displaymessage(s, "Character's job level can't go any higher."_s);
return ATCE::RANGE;
}
if (pl_sd->status.job_level + level > max_level)
@@ -2647,13 +2647,13 @@ ATCE atcommand_character_joblevel(Session *s, dumb_ptr<map_session_data> sd,
clif_updatestatus(pl_sd, SP::SKILLPOINT);
pc_calcstatus(pl_sd, 0);
clif_misceffect(pl_sd, 1);
- clif_displaymessage(s, "character's job level raised.");
+ clif_displaymessage(s, "character's job level raised."_s);
}
else
{
if (pl_sd->status.job_level == 1)
{
- clif_displaymessage(s, "Character's job level can't go any lower.");
+ clif_displaymessage(s, "Character's job level can't go any lower."_s);
return ATCE::RANGE;
}
if (pl_sd->status.job_level + level < 1)
@@ -2670,18 +2670,18 @@ ATCE atcommand_character_joblevel(Session *s, dumb_ptr<map_session_data> sd,
}
// to add: remove status points from skills
pc_calcstatus(pl_sd, 0);
- clif_displaymessage(s, "Character's job level lowered.");
+ clif_displaymessage(s, "Character's job level lowered."_s);
}
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -2705,13 +2705,13 @@ ATCE atcommand_kick(Session *s, dumb_ptr<map_session_data> sd,
clif_GM_kick(sd, pl_sd, 1);
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -2737,7 +2737,7 @@ ATCE atcommand_kickall(Session *s, dumb_ptr<map_session_data> sd,
}
}
- clif_displaymessage(s, "All players have been kicked!");
+ clif_displaymessage(s, "All players have been kicked!"_s);
return ATCE::OKAY;
}
@@ -2758,23 +2758,23 @@ ATCE atcommand_questskill(Session *s, dumb_ptr<map_session_data> sd,
if (pc_checkskill(sd, skill_id) == 0)
{
pc_skill(sd, skill_id, 1, 0);
- clif_displaymessage(s, "You have learned the skill.");
+ clif_displaymessage(s, "You have learned the skill."_s);
}
else
{
- clif_displaymessage(s, "You already have this quest skill.");
+ clif_displaymessage(s, "You already have this quest skill."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "This skill number doesn't exist or isn't a quest skill.");
+ clif_displaymessage(s, "This skill number doesn't exist or isn't a quest skill."_s);
return ATCE::RANGE;
}
}
else
{
- clif_displaymessage(s, "This skill number doesn't exist.");
+ clif_displaymessage(s, "This skill number doesn't exist."_s);
return ATCE::RANGE;
}
@@ -2801,29 +2801,29 @@ ATCE atcommand_charquestskill(Session *s, dumb_ptr<map_session_data>,
if (pc_checkskill(pl_sd, skill_id) == 0)
{
pc_skill(pl_sd, skill_id, 1, 0);
- clif_displaymessage(s, "This player has learned the skill.");
+ clif_displaymessage(s, "This player has learned the skill."_s);
}
else
{
- clif_displaymessage(s, "This player already has this quest skill.");
+ clif_displaymessage(s, "This player already has this quest skill."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "This skill number doesn't exist or isn't a quest skill.");
+ clif_displaymessage(s, "This skill number doesn't exist or isn't a quest skill."_s);
return ATCE::RANGE;
}
}
else
{
- clif_displaymessage(s, "This skill number doesn't exist.");
+ clif_displaymessage(s, "This skill number doesn't exist."_s);
return ATCE::RANGE;
}
@@ -2848,23 +2848,23 @@ ATCE atcommand_lostskill(Session *s, dumb_ptr<map_session_data> sd,
sd->status.skill[skill_id].lv = 0;
sd->status.skill[skill_id].flags = SkillFlags::ZERO;
clif_skillinfoblock(sd);
- clif_displaymessage(s, "You have forgotten the skill.");
+ clif_displaymessage(s, "You have forgotten the skill."_s);
}
else
{
- clif_displaymessage(s, "You don't have this quest skill.");
+ clif_displaymessage(s, "You don't have this quest skill."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "This skill number doesn't exist or isn't a quest skill.");
+ clif_displaymessage(s, "This skill number doesn't exist or isn't a quest skill."_s);
return ATCE::RANGE;
}
}
else
{
- clif_displaymessage(s, "This skill number doesn't exist.");
+ clif_displaymessage(s, "This skill number doesn't exist."_s);
return ATCE::RANGE;
}
@@ -2893,29 +2893,29 @@ ATCE atcommand_charlostskill(Session *s, dumb_ptr<map_session_data>,
pl_sd->status.skill[skill_id].lv = 0;
pl_sd->status.skill[skill_id].flags = SkillFlags::ZERO;
clif_skillinfoblock(pl_sd);
- clif_displaymessage(s, "This player has forgotten the skill.");
+ clif_displaymessage(s, "This player has forgotten the skill."_s);
}
else
{
- clif_displaymessage(s, "This player doesn't have this quest skill.");
+ clif_displaymessage(s, "This player doesn't have this quest skill."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "This skill number doesn't exist or isn't a quest skill.");
+ clif_displaymessage(s, "This skill number doesn't exist or isn't a quest skill."_s);
return ATCE::RANGE;
}
}
else
{
- clif_displaymessage(s, "This skill number doesn't exist.");
+ clif_displaymessage(s, "This skill number doesn't exist."_s);
return ATCE::RANGE;
}
@@ -2970,7 +2970,7 @@ ATCE atcommand_idsearch(Session *s, dumb_ptr<map_session_data>,
if (!extract(message, &item_name) || !item_name)
return ATCE::USAGE;
- AString output = STRPRINTF("The reference result of '%s' (name: id):", item_name);
+ AString output = STRPRINTF("The reference result of '%s' (name: id):"_fmt, item_name);
clif_displaymessage(s, output);
match = 0;
for (i = 0; i < 20000; i++)
@@ -2979,11 +2979,11 @@ ATCE atcommand_idsearch(Session *s, dumb_ptr<map_session_data>,
&& item->jname.contains_seq(item_name))
{
match++;
- output = STRPRINTF("%s: %d", item->jname, item->nameid);
+ output = STRPRINTF("%s: %d"_fmt, item->jname, item->nameid);
clif_displaymessage(s, output);
}
}
- output = STRPRINTF("It is %d affair above.", match);
+ output = STRPRINTF("It is %d affair above."_fmt, match);
clif_displaymessage(s, output);
return ATCE::OKAY;
@@ -3006,18 +3006,18 @@ ATCE atcommand_charskreset(Session *s, dumb_ptr<map_session_data> sd,
// you can reset skill points only lower or same gm level
pc_resetskill(pl_sd);
AString output = STRPRINTF(
- "'%s' skill points reseted!", character);
+ "'%s' skill points reseted!"_fmt, character);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -3041,19 +3041,19 @@ ATCE atcommand_charstreset(Session *s, dumb_ptr<map_session_data> sd,
// you can reset stats points only lower or same gm level
pc_resetstate(pl_sd);
AString output = STRPRINTF(
- "'%s' stats points reseted!",
+ "'%s' stats points reseted!"_fmt,
character);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -3077,23 +3077,23 @@ ATCE atcommand_charreset(Session *s, dumb_ptr<map_session_data> sd,
// you can reset a character only for lower or same GM level
pc_resetstate(pl_sd);
pc_resetskill(pl_sd);
- pc_setglobalreg(pl_sd, stringish<VarName>("MAGIC_FLAGS"), 0);
+ pc_setglobalreg(pl_sd, stringish<VarName>("MAGIC_FLAGS"_s), 0);
// [Fate] Reset magic quest variables
- pc_setglobalreg(pl_sd, stringish<VarName>("MAGIC_EXP"), 0);
+ pc_setglobalreg(pl_sd, stringish<VarName>("MAGIC_EXP"_s), 0);
// [Fate] Reset magic experience
AString output = STRPRINTF(
- "'%s' skill and stats points reseted!", character);
+ "'%s' skill and stats points reseted!"_fmt, character);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -3157,23 +3157,23 @@ ATCE atcommand_char_wipe(Session *s, dumb_ptr<map_session_data> sd,
pc_calcstatus(pl_sd, 0);
pc_resetstate(pl_sd);
pc_resetskill(pl_sd);
- pc_setglobalreg(pl_sd, stringish<VarName>("MAGIC_FLAGS"), 0);
+ pc_setglobalreg(pl_sd, stringish<VarName>("MAGIC_FLAGS"_s), 0);
// [Fate] Reset magic quest variables
- pc_setglobalreg(pl_sd, stringish<VarName>("MAGIC_EXP"), 0);
+ pc_setglobalreg(pl_sd, stringish<VarName>("MAGIC_EXP"_s), 0);
// [Fate] Reset magic experience
- AString output = STRPRINTF("%s: wiped.", character);
+ AString output = STRPRINTF("%s: wiped."_fmt, character);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -3201,7 +3201,7 @@ ATCE atcommand_charmodel(Session *s, dumb_ptr<map_session_data>,
pc_changelook(pl_sd, LOOK::HAIR, hair_style);
pc_changelook(pl_sd, LOOK::HAIR_COLOR, hair_color);
pc_changelook(pl_sd, LOOK::CLOTHES_COLOR, cloth_color);
- clif_displaymessage(s, "Appearence changed.");
+ clif_displaymessage(s, "Appearence changed."_s);
}
}
else
@@ -3209,7 +3209,7 @@ ATCE atcommand_charmodel(Session *s, dumb_ptr<map_session_data>,
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -3242,14 +3242,14 @@ ATCE atcommand_charskpoint(Session *s, dumb_ptr<map_session_data>,
{
pl_sd->status.skill_point = new_skill_point;
clif_updatestatus(pl_sd, SP::SKILLPOINT);
- clif_displaymessage(s, "Character's number of skill points changed!");
+ clif_displaymessage(s, "Character's number of skill points changed!"_s);
}
else
return ATCE::RANGE;
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -3282,14 +3282,14 @@ ATCE atcommand_charstpoint(Session *s, dumb_ptr<map_session_data>,
{
pl_sd->status.status_point = new_status_point;
clif_updatestatus(pl_sd, SP::STATUSPOINT);
- clif_displaymessage(s, "Character's number of status points changed!");
+ clif_displaymessage(s, "Character's number of status points changed!"_s);
}
else
return ATCE::RANGE;
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -3320,14 +3320,14 @@ ATCE atcommand_charzeny(Session *s, dumb_ptr<map_session_data>,
{
pl_sd->status.zeny = new_zeny;
clif_updatestatus(pl_sd, SP::ZENY);
- clif_displaymessage(s, "Character's number of zenys changed!");
+ clif_displaymessage(s, "Character's number of zenys changed!"_s);
}
else
return ATCE::RANGE;
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -3344,7 +3344,7 @@ ATCE atcommand_recallall(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp somenone to your actual map.");
+ "You are not authorised to warp somenone to your actual map."_s);
return ATCE::PERM;
}
@@ -3369,11 +3369,11 @@ ATCE atcommand_recallall(Session *s, dumb_ptr<map_session_data> sd,
}
}
- clif_displaymessage(s, "All characters recalled!");
+ clif_displaymessage(s, "All characters recalled!"_s);
if (count)
{
AString output = STRPRINTF(
- "Because you are not authorised to warp from some maps, %d player(s) have not been recalled.",
+ "Because you are not authorised to warp from some maps, %d player(s) have not been recalled."_fmt,
count);
clif_displaymessage(s, output);
}
@@ -3396,7 +3396,7 @@ ATCE atcommand_partyrecall(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp somenone to your actual map.");
+ "You are not authorised to warp somenone to your actual map."_s);
return ATCE::PERM;
}
@@ -3422,19 +3422,19 @@ ATCE atcommand_partyrecall(Session *s, dumb_ptr<map_session_data> sd,
pc_setpos(pl_sd, sd->mapname_, sd->bl_x, sd->bl_y, BeingRemoveWhy::QUIT);
}
}
- AString output = STRPRINTF("All online characters of the %s party are near you.", p->name);
+ AString output = STRPRINTF("All online characters of the %s party are near you."_fmt, p->name);
clif_displaymessage(s, output);
if (count)
{
output = STRPRINTF(
- "Because you are not authorised to warp from some maps, %d player(s) have not been recalled.",
+ "Because you are not authorised to warp from some maps, %d player(s) have not been recalled."_fmt,
count);
clif_displaymessage(s, output);
}
}
else
{
- clif_displaymessage(s, "Incorrect name or ID, or no one from the party is online.");
+ clif_displaymessage(s, "Incorrect name or ID, or no one from the party is online."_s);
return ATCE::EXIST;
}
@@ -3447,7 +3447,7 @@ ATCE atcommand_mapinfo(Session *s, dumb_ptr<map_session_data> sd,
{
dumb_ptr<npc_data> nd = NULL;
MapName map_name;
- const char *direction = NULL;
+ LString direction = ""_s;
int list = 0;
extract(message, record<' '>(&list, &map_name));
@@ -3462,35 +3462,35 @@ ATCE atcommand_mapinfo(Session *s, dumb_ptr<map_session_data> sd,
if (m_id != nullptr)
return ATCE::EXIST;
- clif_displaymessage(s, "------ Map Info ------");
- AString output = STRPRINTF("Map Name: %s", map_name);
+ clif_displaymessage(s, "------ Map Info ------"_s);
+ AString output = STRPRINTF("Map Name: %s"_fmt, map_name);
clif_displaymessage(s, output);
- output = STRPRINTF("Players In Map: %d", m_id->users);
+ output = STRPRINTF("Players In Map: %d"_fmt, m_id->users);
clif_displaymessage(s, output);
- output = STRPRINTF("NPCs In Map: %d", m_id->npc_num);
+ output = STRPRINTF("NPCs In Map: %d"_fmt, m_id->npc_num);
clif_displaymessage(s, output);
- clif_displaymessage(s, "------ Map Flags ------");
- output = STRPRINTF("Player vs Player: %s | No Party: %s",
- (m_id->flag.get(MapFlag::PVP)) ? "True" : "False",
- (m_id->flag.get(MapFlag::PVP_NOPARTY)) ? "True" : "False");
+ clif_displaymessage(s, "------ Map Flags ------"_s);
+ output = STRPRINTF("Player vs Player: %s | No Party: %s"_fmt,
+ (m_id->flag.get(MapFlag::PVP)) ? "True"_s : "False"_s,
+ (m_id->flag.get(MapFlag::PVP_NOPARTY)) ? "True"_s : "False"_s);
clif_displaymessage(s, output);
- output = STRPRINTF("No Penalty: %s",
- (m_id->flag.get(MapFlag::NOPENALTY)) ? "True" : "False");
+ output = STRPRINTF("No Penalty: %s"_fmt,
+ (m_id->flag.get(MapFlag::NOPENALTY)) ? "True"_s : "False"_s);
clif_displaymessage(s, output);
- output = STRPRINTF("No Return: %s",
- (m_id->flag.get(MapFlag::NORETURN)) ? "True" : "False");
+ output = STRPRINTF("No Return: %s"_fmt,
+ (m_id->flag.get(MapFlag::NORETURN)) ? "True"_s : "False"_s);
clif_displaymessage(s, output);
- output = STRPRINTF("No Save: %s",
- (m_id->flag.get(MapFlag::NOSAVE)) ? "True" : "False");
+ output = STRPRINTF("No Save: %s"_fmt,
+ (m_id->flag.get(MapFlag::NOSAVE)) ? "True"_s : "False"_s);
clif_displaymessage(s, output);
- output = STRPRINTF("Re Save: %s",
- (m_id->flag.get(MapFlag::RESAVE)) ? "True" : "False");
+ output = STRPRINTF("Re Save: %s"_fmt,
+ (m_id->flag.get(MapFlag::RESAVE)) ? "True"_s : "False"_s);
clif_displaymessage(s, output);
- output = STRPRINTF("No Teleport: %s",
- (m_id->flag.get(MapFlag::NOTELEPORT)) ? "True" : "False");
+ output = STRPRINTF("No Teleport: %s"_fmt,
+ (m_id->flag.get(MapFlag::NOTELEPORT)) ? "True"_s : "False"_s);
clif_displaymessage(s, output);
- output = STRPRINTF("No Monster Teleport: %s",
- (m_id->flag.get(MapFlag::MONSTER_NOTELEPORT)) ? "True" : "False");
+ output = STRPRINTF("No Monster Teleport: %s"_fmt,
+ (m_id->flag.get(MapFlag::MONSTER_NOTELEPORT)) ? "True"_s : "False"_s);
clif_displaymessage(s, output);
switch (list)
@@ -3499,7 +3499,7 @@ ATCE atcommand_mapinfo(Session *s, dumb_ptr<map_session_data> sd,
// Do nothing. It's list 0, no additional display.
break;
case 1:
- clif_displaymessage(s, "----- Players in Map -----");
+ clif_displaymessage(s, "----- Players in Map -----"_s);
for (io::FD i : iter_fds())
{
Session *s2 = get_session(i);
@@ -3510,54 +3510,54 @@ ATCE atcommand_mapinfo(Session *s, dumb_ptr<map_session_data> sd,
&& pl_sd->mapname_ == map_name)
{
output = STRPRINTF(
- "Player '%s' (session #%d) | Location: %d,%d",
+ "Player '%s' (session #%d) | Location: %d,%d"_fmt,
pl_sd->status_key.name, s2, pl_sd->bl_x, pl_sd->bl_y);
clif_displaymessage(s, output);
}
}
break;
case 2:
- clif_displaymessage(s, "----- NPCs in Map -----");
+ clif_displaymessage(s, "----- NPCs in Map -----"_s);
for (int i = 0; i < m_id->npc_num;)
{
nd = m_id->npc[i];
switch (nd->dir)
{
case DIR::S:
- direction = "North";
+ direction = "North"_s;
break;
case DIR::SW:
- direction = "North West";
+ direction = "North West"_s;
break;
case DIR::W:
- direction = "West";
+ direction = "West"_s;
break;
case DIR::NW:
- direction = "South West";
+ direction = "South West"_s;
break;
case DIR::N:
- direction = "South";
+ direction = "South"_s;
break;
case DIR::NE:
- direction = "South East";
+ direction = "South East"_s;
break;
case DIR::E:
- direction = "East";
+ direction = "East"_s;
break;
case DIR::SE:
- direction = "North East";
+ direction = "North East"_s;
break;
#if 0
case 9:
- direction = "North";
+ direction = "North"_s;
break;
#endif
default:
- direction = "Unknown";
+ direction = "Unknown"_s;
break;
}
output = STRPRINTF(
- "NPC %d: %s | Direction: %s | Sprite: %d | Location: %d %d",
+ "NPC %d: %s | Direction: %s | Sprite: %d | Location: %d %d"_fmt,
++i, nd->name, direction, nd->npc_class, nd->bl_x,
nd->bl_y);
clif_displaymessage(s, output);
@@ -3566,7 +3566,7 @@ ATCE atcommand_mapinfo(Session *s, dumb_ptr<map_session_data> sd,
default:
// normally impossible to arrive here
clif_displaymessage(s,
- "Please, enter at least a valid list number (usage: @mapinfo <0-2> [map]).");
+ "Please, enter at least a valid list number (usage: @mapinfo <0-2> [map])."_s);
return ATCE::USAGE;
}
@@ -3590,19 +3590,19 @@ ATCE atcommand_partyspy(Session *s, dumb_ptr<map_session_data> sd,
if (sd->partyspy == p->party_id)
{
sd->partyspy = 0;
- AString output = STRPRINTF("No longer spying on the %s party.", p->name);
+ AString output = STRPRINTF("No longer spying on the %s party."_fmt, p->name);
clif_displaymessage(s, output);
}
else
{
sd->partyspy = p->party_id;
- AString output = STRPRINTF("Spying on the %s party.", p->name);
+ AString output = STRPRINTF("Spying on the %s party."_fmt, p->name);
clif_displaymessage(s, output);
}
}
else
{
- clif_displaymessage(s, "Incorrect name or ID, or no one from the party is online.");
+ clif_displaymessage(s, "Incorrect name or ID, or no one from the party is online."_s);
return ATCE::EXIST;
}
@@ -3621,11 +3621,11 @@ ATCE atcommand_enablenpc(Session *s, dumb_ptr<map_session_data>,
if (npc_name2id(NPCname) != NULL)
{
npc_enable(NPCname, 1);
- clif_displaymessage(s, "Npc Enabled.");
+ clif_displaymessage(s, "Npc Enabled."_s);
}
else
{
- clif_displaymessage(s, "This NPC doesn't exist.");
+ clif_displaymessage(s, "This NPC doesn't exist."_s);
return ATCE::EXIST;
}
@@ -3644,11 +3644,11 @@ ATCE atcommand_disablenpc(Session *s, dumb_ptr<map_session_data>,
if (npc_name2id(NPCname) != NULL)
{
npc_enable(NPCname, 0);
- clif_displaymessage(s, "Npc Disabled.");
+ clif_displaymessage(s, "Npc Disabled."_s);
}
else
{
- clif_displaymessage(s, "This NPC doesn't exist.");
+ clif_displaymessage(s, "This NPC doesn't exist."_s);
return ATCE::EXIST;
}
@@ -3661,7 +3661,7 @@ ATCE atcommand_servertime(Session *s, dumb_ptr<map_session_data>,
{
timestamp_seconds_buffer tsbuf;
stamp_time(tsbuf);
- AString temp = STRPRINTF("Server time: %s", tsbuf);
+ AString temp = STRPRINTF("Server time: %s"_fmt, tsbuf);
clif_displaymessage(s, temp);
return ATCE::OKAY;
@@ -3707,37 +3707,37 @@ ATCE atcommand_chardelitem(Session *s, dumb_ptr<map_session_data> sd,
// for next loop
}
AString output = STRPRINTF(
- "%d item(s) removed by a GM.",
+ "%d item(s) removed by a GM."_fmt,
count);
clif_displaymessage(pl_sd->sess, output);
if (number == count)
- output = STRPRINTF("%d item(s) removed from the player.", count);
+ output = STRPRINTF("%d item(s) removed from the player."_fmt, count);
else
- output = STRPRINTF("%d item(s) removed. Player had only %d on %d items.", count, count, number);
+ output = STRPRINTF("%d item(s) removed. Player had only %d on %d items."_fmt, count, count, number);
clif_displaymessage(s, output);
}
else
{
- clif_displaymessage(s, "Character does not have the item.");
+ clif_displaymessage(s, "Character does not have the item."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
}
else
{
- clif_displaymessage(s, "Invalid item ID or name.");
+ clif_displaymessage(s, "Invalid item ID or name."_s);
return ATCE::RANGE;
}
@@ -3751,7 +3751,7 @@ ATCE atcommand_broadcast(Session *, dumb_ptr<map_session_data> sd,
if (!message)
return ATCE::USAGE;
- AString output = STRPRINTF("%s : %s", sd->status_key.name, message);
+ AString output = STRPRINTF("%s : %s"_fmt, sd->status_key.name, message);
intif_GMmessage(output);
return ATCE::OKAY;
@@ -3764,7 +3764,7 @@ ATCE atcommand_localbroadcast(Session *, dumb_ptr<map_session_data> sd,
if (!message)
return ATCE::USAGE;
- AString output = STRPRINTF("%s : %s", sd->status_key.name, message);
+ AString output = STRPRINTF("%s : %s"_fmt, sd->status_key.name, message);
clif_GMmessage(sd, output, 1);
@@ -3783,28 +3783,28 @@ ATCE atcommand_email(Session *s, dumb_ptr<map_session_data> sd,
if (!e_mail_check(actual_email))
{
- clif_displaymessage(s, "Invalid actual email. If you have default e-mail, type a@a.com.");
+ clif_displaymessage(s, "Invalid actual email. If you have default e-mail, type a@a.com."_s);
return ATCE::RANGE;
}
else if (!e_mail_check(new_email))
{
- clif_displaymessage(s, "Invalid new email. Please enter a real e-mail.");
+ clif_displaymessage(s, "Invalid new email. Please enter a real e-mail."_s);
return ATCE::RANGE;
}
else if (new_email == DEFAULT_EMAIL)
{
- clif_displaymessage(s, "New email must be a real e-mail.");
+ clif_displaymessage(s, "New email must be a real e-mail."_s);
return ATCE::RANGE;
}
else if (actual_email == new_email)
{
- clif_displaymessage(s, "New email must be different of the actual e-mail.");
+ clif_displaymessage(s, "New email must be different of the actual e-mail."_s);
return ATCE::RANGE;
}
else
{
chrif_changeemail(sd->status_key.account_id, actual_email, new_email);
- clif_displaymessage(s, "Information sended to login-server via char-server.");
+ clif_displaymessage(s, "Information sended to login-server via char-server."_s);
}
return ATCE::OKAY;
@@ -3821,7 +3821,7 @@ ATCE atcommand_effect(Session *s, dumb_ptr<map_session_data> sd,
if (flag <= 0)
{
clif_specialeffect(sd, type, flag);
- clif_displaymessage(s, "Your Effect Has Changed.");
+ clif_displaymessage(s, "Your Effect Has Changed."_s);
}
else
{
@@ -3834,7 +3834,7 @@ ATCE atcommand_effect(Session *s, dumb_ptr<map_session_data> sd,
if (pl_sd && pl_sd->state.auth)
{
clif_specialeffect(pl_sd, type, flag);
- clif_displaymessage(pl_sd->sess, "Your Effect Has Changed.");
+ clif_displaymessage(pl_sd->sess, "Your Effect Has Changed."_s);
}
}
}
@@ -3873,7 +3873,7 @@ ATCE atcommand_character_item_list(Session *s, dumb_ptr<map_session_data> sd,
if (count == 1)
{
AString output = STRPRINTF(
- "------ Items list of '%s' ------",
+ "------ Items list of '%s' ------"_fmt,
pl_sd->status_key.name);
clif_displaymessage(s, output);
}
@@ -3881,35 +3881,35 @@ ATCE atcommand_character_item_list(Session *s, dumb_ptr<map_session_data> sd,
MString equipstr;
if (bool(equip))
{
- equipstr += "| equiped: ";
+ equipstr += "| equiped: "_s;
if (bool(equip & EPOS::GLOVES))
- equipstr += "robe/gargment, ";
+ equipstr += "robe/gargment, "_s;
if (bool(equip & EPOS::CAPE))
- equipstr += "left accessory, ";
+ equipstr += "left accessory, "_s;
if (bool(equip & EPOS::MISC1))
- equipstr += "body/armor, ";
+ equipstr += "body/armor, "_s;
if ((equip & (EPOS::WEAPON | EPOS::SHIELD)) == EPOS::WEAPON)
- equipstr += "right hand, ";
+ equipstr += "right hand, "_s;
if ((equip & (EPOS::WEAPON | EPOS::SHIELD)) == EPOS::SHIELD)
- equipstr += "left hand, ";
+ equipstr += "left hand, "_s;
if ((equip & (EPOS::WEAPON | EPOS::SHIELD)) == (EPOS::WEAPON | EPOS::SHIELD))
- equipstr += "both hands, ";
+ equipstr += "both hands, "_s;
if (bool(equip & EPOS::SHOES))
- equipstr += "feet, ";
+ equipstr += "feet, "_s;
if (bool(equip & EPOS::MISC2))
- equipstr += "right accessory, ";
+ equipstr += "right accessory, "_s;
if ((equip & (EPOS::TORSO | EPOS::HAT | EPOS::LEGS)) == EPOS::LEGS)
- equipstr += "lower head, ";
+ equipstr += "lower head, "_s;
if ((equip & (EPOS::TORSO | EPOS::HAT | EPOS::LEGS)) == EPOS::HAT)
- equipstr += "top head, ";
+ equipstr += "top head, "_s;
if ((equip & (EPOS::TORSO | EPOS::HAT | EPOS::LEGS)) == (EPOS::HAT | EPOS::LEGS))
- equipstr += "lower/top head, ";
+ equipstr += "lower/top head, "_s;
if ((equip & (EPOS::TORSO | EPOS::HAT | EPOS::LEGS)) == EPOS::TORSO)
- equipstr += "mid head, ";
+ equipstr += "mid head, "_s;
if ((equip & (EPOS::TORSO | EPOS::HAT | EPOS::LEGS)) == (EPOS::TORSO | EPOS::LEGS))
- equipstr += "lower/mid head, ";
+ equipstr += "lower/mid head, "_s;
if ((equip & (EPOS::TORSO | EPOS::HAT | EPOS::LEGS)) == (EPOS::TORSO | EPOS::HAT | EPOS::LEGS))
- equipstr += "lower/mid/top head, ";
+ equipstr += "lower/mid/top head, "_s;
// remove final ', '
equipstr.pop_back(2);
}
@@ -3918,7 +3918,7 @@ ATCE atcommand_character_item_list(Session *s, dumb_ptr<map_session_data> sd,
AString output;
if (true)
- output = STRPRINTF("%d %s (%s, id: %d) %s",
+ output = STRPRINTF("%d %s (%s, id: %d) %s"_fmt,
pl_sd->status.inventory[i].amount,
item_data->name, item_data->jname,
pl_sd->status.inventory[i].nameid,
@@ -3929,24 +3929,24 @@ ATCE atcommand_character_item_list(Session *s, dumb_ptr<map_session_data> sd,
}
}
if (count == 0)
- clif_displaymessage(s, "No item found on this player.");
+ clif_displaymessage(s, "No item found on this player."_s);
else
{
AString output = STRPRINTF(
- "%d item(s) found in %d kind(s) of items.",
+ "%d item(s) found in %d kind(s) of items."_fmt,
counter, count);
clif_displaymessage(s, output);
}
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -3986,13 +3986,13 @@ ATCE atcommand_character_storage_list(Session *s, dumb_ptr<map_session_data> sd,
if (count == 1)
{
AString output = STRPRINTF(
- "------ Storage items list of '%s' ------",
+ "------ Storage items list of '%s' ------"_fmt,
pl_sd->status_key.name);
clif_displaymessage(s, output);
}
AString output;
if (true)
- output = STRPRINTF("%d %s (%s, id: %d)",
+ output = STRPRINTF("%d %s (%s, id: %d)"_fmt,
stor->storage_[i].amount,
item_data->name, item_data->jname,
stor->storage_[i].nameid);
@@ -4001,30 +4001,30 @@ ATCE atcommand_character_storage_list(Session *s, dumb_ptr<map_session_data> sd,
}
if (count == 0)
clif_displaymessage(s,
- "No item found in the storage of this player.");
+ "No item found in the storage of this player."_s);
else
{
AString output = STRPRINTF(
- "%d item(s) found in %d kind(s) of items.",
+ "%d item(s) found in %d kind(s) of items."_fmt,
counter, count);
clif_displaymessage(s, output);
}
}
else
{
- clif_displaymessage(s, "This player has no storage.");
+ clif_displaymessage(s, "This player has no storage."_s);
return ATCE::OKAY;
}
}
else
{
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
+ clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player."_s);
return ATCE::PERM;
}
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -4038,9 +4038,9 @@ ATCE atcommand_killer(Session *s, dumb_ptr<map_session_data> sd,
sd->special_state.killer = !sd->special_state.killer;
if (sd->special_state.killer)
- clif_displaymessage(s, "You be a killa...");
+ clif_displaymessage(s, "You be a killa..."_s);
else
- clif_displaymessage(s, "You gonna be own3d...");
+ clif_displaymessage(s, "You gonna be own3d..."_s);
return ATCE::OKAY;
}
@@ -4062,13 +4062,13 @@ ATCE atcommand_charkiller(Session *s, dumb_ptr<map_session_data>,
if (pl_sd->special_state.killer)
{
- clif_displaymessage(s, "The player is now a killer");
- clif_displaymessage(pl_sd->sess, "You are now a killer");
+ clif_displaymessage(s, "The player is now a killer"_s);
+ clif_displaymessage(pl_sd->sess, "You are now a killer"_s);
}
else
{
- clif_displaymessage(s, "The player is no longer a killer");
- clif_displaymessage(pl_sd->sess, "You are no longer a killer");
+ clif_displaymessage(s, "The player is no longer a killer"_s);
+ clif_displaymessage(pl_sd->sess, "You are no longer a killer"_s);
}
return ATCE::OKAY;
@@ -4081,9 +4081,9 @@ ATCE atcommand_killable(Session *s, dumb_ptr<map_session_data> sd,
sd->special_state.killable = !sd->special_state.killable;
if (sd->special_state.killable)
- clif_displaymessage(s, "You gonna be own3d...");
+ clif_displaymessage(s, "You gonna be own3d..."_s);
else
- clif_displaymessage(s, "You be a killa...");
+ clif_displaymessage(s, "You be a killa..."_s);
return ATCE::OKAY;
}
@@ -4104,9 +4104,9 @@ ATCE atcommand_charkillable(Session *s, dumb_ptr<map_session_data>,
pl_sd->special_state.killable = !pl_sd->special_state.killable;
if (pl_sd->special_state.killable)
- clif_displaymessage(s, "The player is now killable");
+ clif_displaymessage(s, "The player is now killable"_s);
else
- clif_displaymessage(s, "The player is no longer killable");
+ clif_displaymessage(s, "The player is no longer killable"_s);
return ATCE::OKAY;
}
@@ -4146,17 +4146,17 @@ ATCE atcommand_addwarp(Session *s, dumb_ptr<map_session_data> sd,
if (!extract(message, record<' '>(&mapname, &x, &y)))
return ATCE::USAGE;
- AString w1 = STRPRINTF("%s,%d,%d", sd->mapname_, sd->bl_x, sd->bl_y);
- AString w3 = STRPRINTF("%s%d%d%d%d", mapname, sd->bl_x, sd->bl_y, x, y);
- AString w4 = STRPRINTF("1,1,%s.gat,%d,%d", mapname, x, y);
+ AString w1 = STRPRINTF("%s,%d,%d"_fmt, sd->mapname_, sd->bl_x, sd->bl_y);
+ AString w3 = STRPRINTF("%s%d%d%d%d"_fmt, mapname, sd->bl_x, sd->bl_y, x, y);
+ AString w4 = STRPRINTF("1,1,%s.gat,%d,%d"_fmt, mapname, x, y);
NpcName w3name = stringish<NpcName>(w3);
- int ret = npc_parse_warp(w1, ZString("warp"), w3name, w4);
+ int ret = npc_parse_warp(w1, "warp"_s, w3name, w4);
if (ret)
// warp failed
return ATCE::RANGE;
- AString output = STRPRINTF("New warp NPC => %s", w3);
+ AString output = STRPRINTF("New warp NPC => %s"_fmt, w3);
clif_displaymessage(s, output);
return ATCE::OKAY;
@@ -4177,7 +4177,7 @@ ATCE atcommand_chareffect(Session *s, dumb_ptr<map_session_data>,
return ATCE::EXIST;
clif_specialeffect(pl_sd, type, 0);
- clif_displaymessage(s, "Your Effect Has Changed.");
+ clif_displaymessage(s, "Your Effect Has Changed."_s);
return ATCE::OKAY;
}
@@ -4220,9 +4220,8 @@ ATCE atcommand_chardropall(Session *s, dumb_ptr<map_session_data>,
}
}
- clif_displaymessage(pl_sd->sess, "Ever play 52 card pickup?");
- clif_displaymessage(s, "It is done");
- //clif_displaymessage(s, "It is offical.. your a jerk");
+ clif_displaymessage(pl_sd->sess, "Ever play 52 card pickup?"_s);
+ clif_displaymessage(s, "It is official.. you're a jerk."_s);
return ATCE::OKAY;
}
@@ -4240,12 +4239,12 @@ ATCE atcommand_storeall(Session *s, dumb_ptr<map_session_data> sd,
{
case 2:
//Try again
- clif_displaymessage(s, "run this command again..");
+ clif_displaymessage(s, "run this command again.."_s);
return ATCE::OKAY;
case 1:
//Failure
clif_displaymessage(s,
- "You can't open the storage currently.");
+ "You can't open the storage currently."_s);
return ATCE::EXIST;
}
}
@@ -4260,7 +4259,7 @@ ATCE atcommand_storeall(Session *s, dumb_ptr<map_session_data> sd,
}
storage_storageclose(sd);
- clif_displaymessage(s, "It is done");
+ clif_displaymessage(s, "It is done"_s);
return ATCE::OKAY;
}
@@ -4281,8 +4280,8 @@ ATCE atcommand_charstoreall(Session *s, dumb_ptr<map_session_data> sd,
// TODO figure out what the hell this is talking about,
// and especially why it's different from the other one.
clif_displaymessage(s,
- "Had to open the characters storage window...");
- clif_displaymessage(s, "run this command again..");
+ "Had to open the characters storage window..."_s);
+ clif_displaymessage(s, "run this command again.."_s);
return ATCE::OKAY;
}
for (int i = 0; i < MAX_INVENTORY; i++)
@@ -4297,12 +4296,12 @@ ATCE atcommand_charstoreall(Session *s, dumb_ptr<map_session_data> sd,
storage_storageclose(pl_sd);
clif_displaymessage(pl_sd->sess,
- "Everything you own has been put away for safe keeping.");
+ "Everything you own has been put away for safe keeping."_s);
clif_displaymessage(pl_sd->sess,
- "go to the nearest kafka to retrieve it..");
- clif_displaymessage(pl_sd->sess, " -- the management");
+ "go to the nearest kafka to retrieve it.."_s);
+ clif_displaymessage(pl_sd->sess, " -- the management"_s);
- clif_displaymessage(s, "It is done");
+ clif_displaymessage(s, "It is done"_s);
return ATCE::OKAY;
}
@@ -4425,7 +4424,7 @@ ATCE atcommand_adjcmdlvl(Session *s, dumb_ptr<map_session_data>,
if (!extract(message, record<' '>(&newlev, &cmd)))
{
- clif_displaymessage(s, "usage: @adjcmdlvl <lvl> <command>.");
+ clif_displaymessage(s, "usage: @adjcmdlvl <lvl> <command>."_s);
return ATCE::USAGE;
}
@@ -4434,12 +4433,12 @@ ATCE atcommand_adjcmdlvl(Session *s, dumb_ptr<map_session_data>,
if (it)
{
it->level = newlev;
- clif_displaymessage(s, "@command level changed.");
+ clif_displaymessage(s, "@command level changed."_s);
return ATCE::OKAY;
}
}
- clif_displaymessage(s, "@command not found.");
+ clif_displaymessage(s, "@command not found."_s);
return ATCE::EXIST;
}
@@ -4453,7 +4452,7 @@ ATCE atcommand_adjgmlvl(Session *s, dumb_ptr<map_session_data>,
if (!asplit(message, &newlev, &user)
|| newlev < 0 || newlev > 99)
{
- clif_displaymessage(s, "usage: @adjgmlvl <lvl> <user>.");
+ clif_displaymessage(s, "usage: @adjgmlvl <lvl> <user>."_s);
return ATCE::USAGE;
}
@@ -4501,14 +4500,14 @@ constexpr
size_t magic_skills_nr = sizeof(magic_skills) / sizeof(magic_skills[0]);
static
-ZString magic_skill_names[magic_skills_nr] =
+LString magic_skill_names[magic_skills_nr] =
{
- {"magic"},
- {"life"},
- {"war"},
- {"transmute"},
- {"nature"},
- {"astral"},
+ "magic"_s,
+ "life"_s,
+ "war"_s,
+ "transmute"_s,
+ "nature"_s,
+ "astral"_s,
};
static
@@ -4524,7 +4523,7 @@ ATCE atcommand_magic_info(Session *s, dumb_ptr<map_session_data>,
if (pl_sd)
{
AString buf = STRPRINTF(
- "`%s' has the following magic skills:",
+ "`%s' has the following magic skills:"_fmt,
character);
clif_displaymessage(s, buf);
@@ -4532,7 +4531,7 @@ ATCE atcommand_magic_info(Session *s, dumb_ptr<map_session_data>,
{
SkillID sk = magic_skills[i];
buf = STRPRINTF(
- "%d in %s",
+ "%d in %s"_fmt,
pl_sd->status.skill[sk].lv,
magic_skill_names[i]);
if (pl_sd->status.skill[sk].lv)
@@ -4542,7 +4541,7 @@ ATCE atcommand_magic_info(Session *s, dumb_ptr<map_session_data>,
return ATCE::OKAY;
}
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -4563,12 +4562,12 @@ ATCE atcommand_set_magic(Session *s, dumb_ptr<map_session_data>,
if (!asplit(message, &magic_type, &value, &character))
{
clif_displaymessage(s,
- "Usage: @setmagic <school> <value> <char-name>, where <school> is either `magic', one of the school names, or `all'.");
+ "Usage: @setmagic <school> <value> <char-name>, where <school> is either `magic', one of the school names, or `all'."_s);
return ATCE::USAGE;
}
SkillID skill_index = SkillID::NEGATIVE;
- if ("all" == magic_type)
+ if ("all"_s == magic_type)
skill_index = SkillID::ZERO;
else
{
@@ -4585,7 +4584,7 @@ ATCE atcommand_set_magic(Session *s, dumb_ptr<map_session_data>,
if (skill_index == SkillID::NEGATIVE)
{
clif_displaymessage(s,
- "Incorrect school of magic. Use `magic', `nature', `life', `war', `transmute', `ether', or `all'.");
+ "Incorrect school of magic. Use `magic', `nature', `life', `war', `transmute', `ether', or `all'."_s);
return ATCE::RANGE;
}
@@ -4602,7 +4601,7 @@ ATCE atcommand_set_magic(Session *s, dumb_ptr<map_session_data>,
return ATCE::OKAY;
}
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -4664,18 +4663,18 @@ ATCE atcommand_jump_iterate(Session *s, dumb_ptr<map_session_data> sd,
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you to the map of this player.");
+ "You are not authorised to warp you to the map of this player."_s);
return ATCE::PERM;
}
if (sd->bl_m && sd->bl_m->flag.get(MapFlag::NOWARP)
&& battle_config.any_warp_GM_min_level > pc_isGM(sd))
{
clif_displaymessage(s,
- "You are not authorised to warp you from your actual map.");
+ "You are not authorised to warp you from your actual map."_s);
return ATCE::PERM;
}
pc_setpos(sd, pl_sd->bl_m->name_, pl_sd->bl_x, pl_sd->bl_y, BeingRemoveWhy::WARPED);
- AString output = STRPRINTF("Jump to %s", pl_sd->status_key.name);
+ AString output = STRPRINTF("Jump to %s"_fmt, pl_sd->status_key.name);
clif_displaymessage(s, output);
sd->followtarget = pl_sd->bl_id;
@@ -4702,9 +4701,9 @@ ATCE atcommand_wgm(Session *s, dumb_ptr<map_session_data> sd,
if (tmw_CheckChatSpam(sd, message))
return ATCE::OKAY;
- tmw_GmHackMsg(STRPRINTF("[GM] %s: %s", sd->status_key.name, message));
+ tmw_GmHackMsg(STRPRINTF("[GM] %s: %s"_fmt, sd->status_key.name, message));
if (!pc_isGM(sd))
- clif_displaymessage(s, "Message sent.");
+ clif_displaymessage(s, "Message sent."_s);
return ATCE::OKAY;
}
@@ -4727,19 +4726,19 @@ ATCE atcommand_skillpool_info(Session *s, dumb_ptr<map_session_data>,
int i;
AString buf = STRPRINTF(
- "Active skills %d out of %d for %s:",
+ "Active skills %d out of %d for %s:"_fmt,
pool_skills_nr, skill_pool_max(pl_sd), character);
clif_displaymessage(s, buf);
for (i = 0; i < pool_skills_nr; ++i)
{
- buf = STRPRINTF(" - %s [%d]: power %d",
+ buf = STRPRINTF(" - %s [%d]: power %d"_fmt,
skill_name(pool_skills[i]),
pool_skills[i],
skill_power(pl_sd, pool_skills[i]));
clif_displaymessage(s, buf);
}
- buf = STRPRINTF("Learned skills out of %d for %s:",
+ buf = STRPRINTF("Learned skills out of %d for %s:"_fmt,
skill_pool_skills_size, character);
clif_displaymessage(s, buf);
@@ -4750,7 +4749,7 @@ ATCE atcommand_skillpool_info(Session *s, dumb_ptr<map_session_data>,
if (lvl)
{
- buf = STRPRINTF(" - %s [%d]: lvl %d",
+ buf = STRPRINTF(" - %s [%d]: lvl %d"_fmt,
name, skill_pool_skills[i], lvl);
clif_displaymessage(s, buf);
}
@@ -4759,7 +4758,7 @@ ATCE atcommand_skillpool_info(Session *s, dumb_ptr<map_session_data>,
}
else
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -4775,7 +4774,7 @@ ATCE atcommand_skillpool_focus(Session *s, dumb_ptr<map_session_data>,
if (!asplit(message, &skill, &character))
{
- clif_displaymessage(s, "Usage: @sp-focus <skill-nr> <char_name>");
+ clif_displaymessage(s, "Usage: @sp-focus <skill-nr> <char_name>"_s);
return ATCE::USAGE;
}
@@ -4783,12 +4782,12 @@ ATCE atcommand_skillpool_focus(Session *s, dumb_ptr<map_session_data>,
if (pl_sd != NULL)
{
if (skill_pool_activate(pl_sd, skill))
- clif_displaymessage(s, "Activation failed.");
+ clif_displaymessage(s, "Activation failed."_s);
else
- clif_displaymessage(s, "Activation successful.");
+ clif_displaymessage(s, "Activation successful."_s);
}
else
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::OKAY;
}
@@ -4807,12 +4806,12 @@ ATCE atcommand_skillpool_unfocus(Session *s, dumb_ptr<map_session_data>,
if (pl_sd != NULL)
{
if (skill_pool_deactivate(pl_sd, skill))
- clif_displaymessage(s, "Deactivation failed.");
+ clif_displaymessage(s, "Deactivation failed."_s);
else
- clif_displaymessage(s, "Deactivation successful.");
+ clif_displaymessage(s, "Deactivation successful."_s);
}
else
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::OKAY;
}
@@ -4835,7 +4834,7 @@ ATCE atcommand_skill_learn(Session *s, dumb_ptr<map_session_data>,
clif_skillinfoblock(pl_sd);
}
else
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::OKAY;
}
@@ -4852,7 +4851,7 @@ ATCE atcommand_ipcheck(Session *s, dumb_ptr<map_session_data>,
dumb_ptr<map_session_data> pl_sd = map_nick2sd(character);
if (pl_sd == NULL)
{
- clif_displaymessage(s, "Character not found.");
+ clif_displaymessage(s, "Character not found."_s);
return ATCE::EXIST;
}
@@ -4873,7 +4872,7 @@ ATCE atcommand_ipcheck(Session *s, dumb_ptr<map_session_data>,
if (ip == pl_sd->get_ip())
{
AString output = STRPRINTF(
- "Name: %s | Location: %s %d %d",
+ "Name: %s | Location: %s %d %d"_fmt,
pl_sd->status_key.name, pl_sd->mapname_,
pl_sd->bl_x, pl_sd->bl_y);
clif_displaymessage(s, output);
@@ -4881,7 +4880,7 @@ ATCE atcommand_ipcheck(Session *s, dumb_ptr<map_session_data>,
}
}
- clif_displaymessage(s, "End of list");
+ clif_displaymessage(s, "End of list"_s);
return ATCE::OKAY;
}
@@ -4902,10 +4901,10 @@ ATCE atcommand_doomspot(Session *s, dumb_ptr<map_session_data> sd,
{
// you can doom only lower or same gm level
pc_damage(NULL, pl_sd, pl_sd->status.hp + 1);
- clif_displaymessage(pl_sd->sess, "The holy messenger has given judgement.");
+ clif_displaymessage(pl_sd->sess, "The holy messenger has given judgement."_s);
}
}
- clif_displaymessage(s, "Judgement was made.");
+ clif_displaymessage(s, "Judgement was made."_s);
return ATCE::OKAY;
}
@@ -4915,13 +4914,13 @@ ATCE atcommand_source(Session *s, dumb_ptr<map_session_data>,
ZString)
{
clif_displaymessage(s,
- "This server code consists of Free Software under GPL3&AGPL3");
+ "This server code consists of Free Software under GPL3&AGPL3"_s);
clif_displaymessage(s,
- "This is commit " VERSION_HASH ", also known as " VERSION_FULL);
+ "This is commit " VERSION_HASH ", also known as " VERSION_FULL ""_s);
clif_displaymessage(s,
- "The version is " VERSION_STRING);
+ "The version is " VERSION_STRING ""_s);
clif_displaymessage(s,
- "For source, see " VENDOR_SOURCE);
+ "For source, see " VENDOR_SOURCE ""_s);
return ATCE::OKAY;
}
@@ -4931,424 +4930,424 @@ ATCE atcommand_source(Session *s, dumb_ptr<map_session_data>,
// declared extern above
Map<XString, AtCommandInfo> atcommand_info =
{
- {"help", {"[level[-level]|category|@command]",
+ {"help"_s, {"[level[-level]|category|@command]"_s,
0, atcommand_help,
- "Show help"}},
- {"setup", {"<level> <charname>",
+ "Show help"_s}},
+ {"setup"_s, {"<level> <charname>"_s,
40, atcommand_setup,
- "Safely set a chars levels and warp them to a special place (for TAW)"}},
- {"charwarp", {"<mapname> <x> <y> <charname>",
+ "Safely set a chars levels and warp them to a special place (for TAW)"_s}},
+ {"charwarp"_s, {"<mapname> <x> <y> <charname>"_s,
60, atcommand_charwarp,
- "Warp a character to a point on another map"}},
- {"warp", {"<mapname> [x] [y]",
+ "Warp a character to a point on another map"_s}},
+ {"warp"_s, {"<mapname> [x] [y]"_s,
40, atcommand_warp,
- "Warp yourself to another map"}},
- {"where", {"[charname]",
+ "Warp yourself to another map"_s}},
+ {"where"_s, {"[charname]"_s,
40, atcommand_where,
- "Show location of a character or yourself"}},
- {"goto", {"<charname>",
+ "Show location of a character or yourself"_s}},
+ {"goto"_s, {"<charname>"_s,
40, atcommand_goto,
- "Warp yourself to another character"}},
- {"jump", {"[x] [y]",
+ "Warp yourself to another character"_s}},
+ {"jump"_s, {"[x] [y]"_s,
40, atcommand_jump,
- "Warp yourself within a map"}},
- {"who", {"[subsequence]",
+ "Warp yourself within a map"_s}},
+ {"who"_s, {"[subsequence]"_s,
40, atcommand_who,
- "List matching players online, with location info"}},
- {"whogroup", {"[subsequence]",
+ "List matching players online, with location info"_s}},
+ {"whogroup"_s, {"[subsequence]"_s,
40, atcommand_whogroup,
- "List matching players online, with party info"}},
- {"whomap", {"[mapname]",
+ "List matching players online, with party info"_s}},
+ {"whomap"_s, {"[mapname]"_s,
40, atcommand_whomap,
- "List all players on the map, with location info"}},
- {"whomapgroup", {"[mapname]",
+ "List all players on the map, with location info"_s}},
+ {"whomapgroup"_s, {"[mapname]"_s,
40, atcommand_whomapgroup,
- "List all players on the map, with party info"}},
- {"whogm", {"[subsequence]",
+ "List all players on the map, with party info"_s}},
+ {"whogm"_s, {"[subsequence]"_s,
40, atcommand_whogm,
- "List matching GM players, with location, level, and party info"}},
- {"save", {"",
+ "List matching GM players, with location, level, and party info"_s}},
+ {"save"_s, {""_s,
40, atcommand_save,
- "Set your respawn point to your current location"}},
- {"return", {"",
+ "Set your respawn point to your current location"_s}},
+ {"return"_s, {""_s,
40, atcommand_load,
- "Return to your respawn point"}},
- {"load", {"",
+ "Return to your respawn point"_s}},
+ {"load"_s, {""_s,
40, atcommand_load,
- "Return to your respawn point"}},
- {"speed", {"<rate>",
+ "Return to your respawn point"_s}},
+ {"speed"_s, {"<rate>"_s,
60, atcommand_speed,
- "Set walk rate"}},
- {"storage", {"",
+ "Set walk rate"_s}},
+ {"storage"_s, {""_s,
99, atcommand_storage,
- "Open your storage"}},
- {"option", {"<opt1> [opt2] [option]",
+ "Open your storage"_s}},
+ {"option"_s, {"<opt1> [opt2] [option]"_s,
80, atcommand_option,
- "Set your 'option' status flags"}},
- {"hide", {"",
+ "Set your 'option' status flags"_s}},
+ {"hide"_s, {""_s,
40, atcommand_hide,
- "Toggle invisibility from monsters and certain commands"}},
- {"die", {"",
+ "Toggle invisibility from monsters and certain commands"_s}},
+ {"die"_s, {""_s,
40, atcommand_die,
- "Cause fatal damage to yourself"}},
- {"kill", {"<charname>",
+ "Cause fatal damage to yourself"_s}},
+ {"kill"_s, {"<charname>"_s,
60, atcommand_kill,
- "Cause fatal damage to another player"}},
- {"alive", {"",
+ "Cause fatal damage to another player"_s}},
+ {"alive"_s, {""_s,
60, atcommand_alive,
- "Restore life to yourself"}},
- {"kami", {"<message ...>",
+ "Restore life to yourself"_s}},
+ {"kami"_s, {"<message ...>"_s,
99, atcommand_kami,
- "Send an anonymous broadcast"}},
- {"heal", {"[hp] [sp]",
+ "Send an anonymous broadcast"_s}},
+ {"heal"_s, {"[hp] [sp]"_s,
40, atcommand_heal,
- "Restore or destroy your health"}},
- {"item", {"<item-name-or-id> [count]",
+ "Restore or destroy your health"_s}},
+ {"item"_s, {"<item-name-or-id> [count]"_s,
80, atcommand_item,
- "Summon items out of the void"}},
- {"itemreset", {"",
+ "Summon items out of the void"_s}},
+ {"itemreset"_s, {""_s,
40, atcommand_itemreset,
- "Cast all of your itens into the void (why would you ever want this?)"}},
- {"itemcheck", {"",
+ "Cast all of your itens into the void (why would you ever want this?)"_s}},
+ {"itemcheck"_s, {""_s,
80, atcommand_itemcheck,
- "Perform an internal integrity check on your items"}},
- {"blvl", {"<delta>",
+ "Perform an internal integrity check on your items"_s}},
+ {"blvl"_s, {"<delta>"_s,
60, atcommand_baselevelup,
- "Adjust your level"}},
- {"jlvl", {"<delta>",
+ "Adjust your level"_s}},
+ {"jlvl"_s, {"<delta>"_s,
60, atcommand_joblevelup,
- "Adjust your job level"}},
- {"gm", {"<password>",
+ "Adjust your job level"_s}},
+ {"gm"_s, {"<password>"_s,
100, atcommand_gm,
- "Receive GM powers"}},
- {"pvpoff", {"",
+ "Receive GM powers"_s}},
+ {"pvpoff"_s, {""_s,
60, atcommand_pvpoff,
- "Enable PvP on your map"}},
- {"pvpon", {"",
+ "Enable PvP on your map"_s}},
+ {"pvpon"_s, {""_s,
60, atcommand_pvpon,
- "Disable PvP on your map"}},
- {"model", {"<style> [color] [dye]",
+ "Disable PvP on your map"_s}},
+ {"model"_s, {"<style> [color] [dye]"_s,
99, atcommand_model,
- "Change your hairstyle and hair color"}},
- {"spawn", {"<mob-name-or-id> [count] [x] [y]",
+ "Change your hairstyle and hair color"_s}},
+ {"spawn"_s, {"<mob-name-or-id> [count] [x] [y]"_s,
50, atcommand_spawn,
- "Spawn normal monsters at location."}},
- {"killmonster", {"[map]",
+ "Spawn normal monsters at location."_s}},
+ {"killmonster"_s, {"[map]"_s,
60, atcommand_killmonster,
- "Kill all monsters (with drops)"}},
- {"killmonster2", {"[map]",
+ "Kill all monsters (with drops)"_s}},
+ {"killmonster2"_s, {"[map]"_s,
60, atcommand_killmonster2,
- "Kill all monsters (no drops)"}},
- {"gat", {"",
+ "Kill all monsters (no drops)"_s}},
+ {"gat"_s, {""_s,
99, atcommand_gat,
- "Dump the local walkmap"}},
- {"packet", {"<type> <flag>",
+ "Dump the local walkmap"_s}},
+ {"packet"_s, {"<type> <flag>"_s,
99, atcommand_packet,
- "Force a status change"}},
- {"stpoint", {"<amount>",
+ "Force a status change"_s}},
+ {"stpoint"_s, {"<amount>"_s,
60, atcommand_statuspoint,
- "Increase your stat points"}},
- {"skpoint", {"<amount>",
+ "Increase your stat points"_s}},
+ {"skpoint"_s, {"<amount>"_s,
60, atcommand_skillpoint,
- "Increase your skill points"}},
- {"zeny", {"<amount>",
+ "Increase your skill points"_s}},
+ {"zeny"_s, {"<amount>"_s,
80, atcommand_zeny,
- "Change how much money you have"}},
- {"str", {"<delta>",
+ "Change how much money you have"_s}},
+ {"str"_s, {"<delta>"_s,
60, atcommand_param<ATTR::STR>,
- "Adjust your strength"}},
- {"agi", {"<delta>",
+ "Adjust your strength"_s}},
+ {"agi"_s, {"<delta>"_s,
60, atcommand_param<ATTR::AGI>,
- "Adjust your agility"}},
- {"vit", {"<delta>",
+ "Adjust your agility"_s}},
+ {"vit"_s, {"<delta>"_s,
60, atcommand_param<ATTR::VIT>,
- "Adjust your vitality"}},
- {"int", {"<delta>",
+ "Adjust your vitality"_s}},
+ {"int"_s, {"<delta>"_s,
60, atcommand_param<ATTR::INT>,
- "Adjust your intelligence\0(TODO make this work in real life, I'm lonely)"}},
- {"dex", {"<delta>",
+ "Adjust your intelligence\0(TODO make this work in real life, I'm lonely)"_s}},
+ {"dex"_s, {"<delta>"_s,
60, atcommand_param<ATTR::DEX>,
- "Adjust your dexterity"}},
- {"luk", {"<delta>",
+ "Adjust your dexterity"_s}},
+ {"luk"_s, {"<delta>"_s,
60, atcommand_param<ATTR::LUK>,
- "Adjust your luck"}},
- {"recall", {"<charname>",
+ "Adjust your luck"_s}},
+ {"recall"_s, {"<charname>"_s,
60, atcommand_recall,
- "Warp a player to you"}},
- {"revive", {"<charname>",
+ "Warp a player to you"_s}},
+ {"revive"_s, {"<charname>"_s,
60, atcommand_revive,
- "Restore a player to full health"}},
- {"charstats", {"<charname>",
+ "Restore a player to full health"_s}},
+ {"charstats"_s, {"<charname>"_s,
40, atcommand_character_stats,
- "Show a bunch of stats about a single user"}},
- {"charstatsall", {"",
+ "Show a bunch of stats about a single user"_s}},
+ {"charstatsall"_s, {""_s,
60, atcommand_character_stats_all,
- "Show a bunch of stats about all online users"}},
- {"charoption", {"<opt1> <opt2> <opt3> <charname>",
+ "Show a bunch of stats about all online users"_s}},
+ {"charoption"_s, {"<opt1> <opt2> <opt3> <charname>"_s,
80, atcommand_character_option,
- "Set option flags on another character"}},
- {"charsave", {"<map> <x> <y> <charname>",
+ "Set option flags on another character"_s}},
+ {"charsave"_s, {"<map> <x> <y> <charname>"_s,
60, atcommand_character_save,
- "Set another character's save point"}},
- {"doom", {"",
+ "Set another character's save point"_s}},
+ {"doom"_s, {""_s,
80, atcommand_doom,
- "Kill everyone on the server"}},
- {"doommap", {"",
+ "Kill everyone on the server"_s}},
+ {"doommap"_s, {""_s,
80, atcommand_doommap,
- "Kill everyone on your map"}},
- {"raise", {"",
+ "Kill everyone on your map"_s}},
+ {"raise"_s, {""_s,
80, atcommand_raise,
- "Resurrect all players on the server"}},
- {"raisemap", {"",
+ "Resurrect all players on the server"_s}},
+ {"raisemap"_s, {""_s,
80, atcommand_raisemap,
- "Resurrect all players on your map"}},
- {"charbaselvl", {"<delta> <charname>",
+ "Resurrect all players on your map"_s}},
+ {"charbaselvl"_s, {"<delta> <charname>"_s,
60, atcommand_character_baselevel,
- "Adjust another character's level"}},
- {"charjlvl", {"<delta> <charname>",
+ "Adjust another character's level"_s}},
+ {"charjlvl"_s, {"<delta> <charname>"_s,
60, atcommand_character_joblevel,
- "Adjust another character's job level"}},
- {"kick", {"<charname>",
+ "Adjust another character's job level"_s}},
+ {"kick"_s, {"<charname>"_s,
40, atcommand_kick,
- "Transiently kick a player off the server"}},
- {"kickall", {"",
+ "Transiently kick a player off the server"_s}},
+ {"kickall"_s, {""_s,
99, atcommand_kickall,
- "Transiently kick all players off the server"}},
- {"questskill", {"<skill-id>",
+ "Transiently kick all players off the server"_s}},
+ {"questskill"_s, {"<skill-id>"_s,
99, atcommand_questskill,
- "Give yourself a quest (?) skill"}},
- {"charquestskill", {"<skill-id> <charname>",
+ "Give yourself a quest (?) skill"_s}},
+ {"charquestskill"_s, {"<skill-id> <charname>"_s,
99, atcommand_charquestskill,
- "Give another player a quest (?) skill"}},
- {"lostskill", {"<skill-id>",
+ "Give another player a quest (?) skill"_s}},
+ {"lostskill"_s, {"<skill-id>"_s,
80, atcommand_lostskill,
- "Take away one of your quest (?) skills"}},
- {"charlostskill", {"<skill-id> <charname>",
+ "Take away one of your quest (?) skills"_s}},
+ {"charlostskill"_s, {"<skill-id> <charname>"_s,
99, atcommand_charlostskill,
- "Take away one of another player's quest (?) skills"}},
- {"party", {"<name>",
+ "Take away one of another player's quest (?) skills"_s}},
+ {"party"_s, {"<name>"_s,
99, atcommand_party,
- "Create a new party"}},
- {"mapexit", {"",
+ "Create a new party"_s}},
+ {"mapexit"_s, {""_s,
99, atcommand_mapexit,
- "Try to kill the server kindly"}},
- {"idsearch", {"<item-subseq>",
+ "Try to kill the server kindly"_s}},
+ {"idsearch"_s, {"<item-subseq>"_s,
80, atcommand_idsearch,
- "Search for some items that might match"}},
- {"mapmove", {"<mapname> [x] [y]",
+ "Search for some items that might match"_s}},
+ {"mapmove"_s, {"<mapname> [x] [y]"_s,
40, atcommand_warp,
- "Warp to a different map"}},
- {"broadcast", {"<message ...>",
+ "Warp to a different map"_s}},
+ {"broadcast"_s, {"<message ...>"_s,
40, atcommand_broadcast,
- "Broadcast a message from you"}},
- {"localbroadcast", {"<message ...>",
+ "Broadcast a message from you"_s}},
+ {"localbroadcast"_s, {"<message ...>"_s,
40, atcommand_localbroadcast,
- "Broadcast a message from you locally"}},
- {"recallall", {"",
+ "Broadcast a message from you locally"_s}},
+ {"recallall"_s, {""_s,
80, atcommand_recallall,
- "Warp every online player to your current map"}},
- {"charskreset", {"<charname>",
+ "Warp every online player to your current map"_s}},
+ {"charskreset"_s, {"<charname>"_s,
60, atcommand_charskreset,
- "Reset a player's skill points"}},
- {"charstreset", {"<charname>",
+ "Reset a player's skill points"_s}},
+ {"charstreset"_s, {"<charname>"_s,
60, atcommand_charstreset,
- "Reset a player's stat points"}},
- {"charreset", {"<charname>",
+ "Reset a player's stat points"_s}},
+ {"charreset"_s, {"<charname>"_s,
60, atcommand_charreset,
- "Reset a player's skills, stats, and magic"}},
- {"charmodel", {"<hairstyle> <hair-color> <dye> <charname>",
+ "Reset a player's skills, stats, and magic"_s}},
+ {"charmodel"_s, {"<hairstyle> <hair-color> <dye> <charname>"_s,
99, atcommand_charmodel,
- "Change another character's appearance"}},
- {"charskpoint", {"<amount> <charname>",
+ "Change another character's appearance"_s}},
+ {"charskpoint"_s, {"<amount> <charname>"_s,
60, atcommand_charskpoint,
- "Adjust another player's skill points"}},
- {"charstpoint", {"<amount> <charname>",
+ "Adjust another player's skill points"_s}},
+ {"charstpoint"_s, {"<amount> <charname>"_s,
60, atcommand_charstpoint,
- "Adjust another player's stat points"}},
- {"charzeny", {"<delta> <charname>",
+ "Adjust another player's stat points"_s}},
+ {"charzeny"_s, {"<delta> <charname>"_s,
80, atcommand_charzeny,
- "Adjust another player's money"}},
- {"mapinfo", {"<0-2> [map]",
+ "Adjust another player's money"_s}},
+ {"mapinfo"_s, {"<0-2> [map]"_s,
99, atcommand_mapinfo,
- "Show some stats for the map. 1 also shows players, 2 also shows NPCs"}},
- {"dye", {"<dye>",
+ "Show some stats for the map. 1 also shows players, 2 also shows NPCs"_s}},
+ {"dye"_s, {"<dye>"_s,
40, atcommand_dye,
- "Don't use"}},
- {"ccolor", {"<dye>",
+ "Don't use"_s}},
+ {"ccolor"_s, {"<dye>"_s,
40, atcommand_dye,
- "Don't use"}},
- {"hairstyle", {"<style>",
+ "Don't use"_s}},
+ {"hairstyle"_s, {"<style>"_s,
40, atcommand_hair_style,
- "Change your hairstyle"}},
- {"haircolor", {"<color>",
+ "Change your hairstyle"_s}},
+ {"haircolor"_s, {"<color>"_s,
40, atcommand_hair_color,
- "Change your hair color"}},
- {"allstats", {"[value]",
+ "Change your hair color"_s}},
+ {"allstats"_s, {"[value]"_s,
60, atcommand_all_stats,
- "Adjust all stats by value (or maximum)"}},
- {"charchangesex", {"<charname>",
+ "Adjust all stats by value (or maximum)"_s}},
+ {"charchangesex"_s, {"<charname>"_s,
60, atcommand_char_change_sex,
- "Flip a characters sex and disconnect them"}},
- {"block", {"<charname>",
+ "Flip a characters sex and disconnect them"_s}},
+ {"block"_s, {"<charname>"_s,
60, atcommand_char_block,
- "Permanently block a player's account from the server"}},
- {"unblock", {"<charname>",
+ "Permanently block a player's account from the server"_s}},
+ {"unblock"_s, {"<charname>"_s,
60, atcommand_char_unblock,
- "Remove a permanent block from a player's account"}},
- {"ban", {"<timedelta> <charname>",
+ "Remove a permanent block from a player's account"_s}},
+ {"ban"_s, {"<timedelta> <charname>"_s,
60, atcommand_char_ban,
- "Ban a player's account from the server for a limited time"}},
- {"unban", {"<timedelta> <charname>",
+ "Ban a player's account from the server for a limited time"_s}},
+ {"unban"_s, {"<timedelta> <charname>"_s,
60, atcommand_char_unban,
- "Remove a limited ban from a player's account"}},
- {"partyspy", {"<party-name-or-id>",
+ "Remove a limited ban from a player's account"_s}},
+ {"partyspy"_s, {"<party-name-or-id>"_s,
99, atcommand_partyspy,
- "Listen to all chat within a party"}},
- {"partyrecall", {"<party-name-or-id>",
+ "Listen to all chat within a party"_s}},
+ {"partyrecall"_s, {"<party-name-or-id>"_s,
99, atcommand_partyrecall,
- "Warp all members of a party to you"}},
- {"enablenpc", {"<npc-name>",
+ "Warp all members of a party to you"_s}},
+ {"enablenpc"_s, {"<npc-name>"_s,
80, atcommand_enablenpc,
- "Enable an NPC for visibility"}},
- {"disablenpc", {"<npc-name>",
+ "Enable an NPC for visibility"_s}},
+ {"disablenpc"_s, {"<npc-name>"_s,
80, atcommand_disablenpc,
- "Disable an NPC for visibility"}},
- {"servertime", {"",
+ "Disable an NPC for visibility"_s}},
+ {"servertime"_s, {""_s,
0, atcommand_servertime,
- "Print the server's idea of the current time"}},
- {"chardelitem", {"<item-name-or-id> <count> <charname>",
+ "Print the server's idea of the current time"_s}},
+ {"chardelitem"_s, {"<item-name-or-id> <count> <charname>"_s,
60, atcommand_chardelitem,
- "Delete items from a player's inventory"}},
- {"listnearby", {"",
+ "Delete items from a player's inventory"_s}},
+ {"listnearby"_s, {""_s,
40, atcommand_list_nearby,
- "Print name of all nearby players"}},
- {"email", {"<actual@email> <new@email>",
+ "Print name of all nearby players"_s}},
+ {"email"_s, {"<actual@email> <new@email>"_s,
0, atcommand_email,
- "Changed your account's email"}},
- {"effect", {"<type> <flag>",
+ "Changed your account's email"_s}},
+ {"effect"_s, {"<type> <flag>"_s,
99, atcommand_effect,
- "Apply a special effect to yourself (or everyone! wtf?)"}},
- {"charitemlist", {"<charname>",
+ "Apply a special effect to yourself (or everyone! wtf?)"_s}},
+ {"charitemlist"_s, {"<charname>"_s,
99, atcommand_character_item_list,
- "List a player's items"}},
- {"charstoragelist", {"<charname>",
+ "List a player's items"_s}},
+ {"charstoragelist"_s, {"<charname>"_s,
99, atcommand_character_storage_list,
- "List a player's storage"}},
- {"addwarp", {"<mapname> <x> <y>",
+ "List a player's storage"_s}},
+ {"addwarp"_s, {"<mapname> <x> <y>"_s,
80, atcommand_addwarp,
- "Create a new permanent warp"}},
- {"killer", {"",
+ "Create a new permanent warp"_s}},
+ {"killer"_s, {""_s,
60, atcommand_killer,
- "Toggle whether you are a killer"}},
- {"charkiller", {"<charname>",
+ "Toggle whether you are a killer"_s}},
+ {"charkiller"_s, {"<charname>"_s,
60, atcommand_charkiller,
- "Toggle whether a player is a killer"}},
- {"npcmove", {"<x> <y> <npc-name>",
+ "Toggle whether a player is a killer"_s}},
+ {"npcmove"_s, {"<x> <y> <npc-name>"_s,
80, atcommand_npcmove,
- "Force an NPC to move on the map"}},
- {"killable", {"",
+ "Force an NPC to move on the map"_s}},
+ {"killable"_s, {""_s,
60, atcommand_killable,
- "Toggle whether you are killable"}},
- {"charkillable", {"<charname>",
+ "Toggle whether you are killable"_s}},
+ {"charkillable"_s, {"<charname>"_s,
60, atcommand_charkillable,
- "Toggle whether a player is killable"}},
- {"chareffect", {"<type> <target>",
+ "Toggle whether a player is killable"_s}},
+ {"chareffect"_s, {"<type> <target>"_s,
40, atcommand_chareffect,
- "Apply effect type with arg 0 to a player"}},
- {"dropall", {"",
+ "Apply effect type with arg 0 to a player"_s}},
+ {"dropall"_s, {""_s,
99, atcommand_dropall,
- "Drop all of your items"}},
- {"chardropall", {"<charname>",
+ "Drop all of your items"_s}},
+ {"chardropall"_s, {"<charname>"_s,
60, atcommand_chardropall,
- "Force a player to drop all of their items"}},
- {"storeall", {"",
+ "Force a player to drop all of their items"_s}},
+ {"storeall"_s, {""_s,
60, atcommand_storeall,
- "Store all of your items"}},
- {"charstoreall", {"<charname>",
+ "Store all of your items"_s}},
+ {"charstoreall"_s, {"<charname>"_s,
60, atcommand_charstoreall,
- "Store all of a player's items"}},
- {"rain", {"",
+ "Store all of a player's items"_s}},
+ {"rain"_s, {""_s,
99, atcommand_rain,
- "Enable the rain mapflag"}},
- {"snow", {"",
+ "Enable the rain mapflag"_s}},
+ {"snow"_s, {""_s,
99, atcommand_snow,
- "Enable the snow mapflag"}},
- {"sakura", {"",
+ "Enable the snow mapflag"_s}},
+ {"sakura"_s, {""_s,
99, atcommand_sakura,
- "Enable the sakura mapflag"}},
- {"fog", {"",
+ "Enable the sakura mapflag"_s}},
+ {"fog"_s, {""_s,
99, atcommand_fog,
- "Enable the fog mapflag"}},
- {"leaves", {"",
+ "Enable the fog mapflag"_s}},
+ {"leaves"_s, {""_s,
99, atcommand_leaves,
- "Enable the leaves mapflag"}},
- {"summon", {"<mob-id-or-name>",
+ "Enable the leaves mapflag"_s}},
+ {"summon"_s, {"<mob-id-or-name>"_s,
50, atcommand_summon,
- "Summon a slave monster temporarily"}},
- {"adjgmlvl", {"<level> <cmd>",
+ "Summon a slave monster temporarily"_s}},
+ {"adjgmlvl"_s, {"<level> <cmd>"_s,
99, atcommand_adjgmlvl,
- "Temporarily adjust the GM level of a command"}},
- {"adjcmdlvl", {"<level> <charname>",
+ "Temporarily adjust the GM level of a command"_s}},
+ {"adjcmdlvl"_s, {"<level> <charname>"_s,
99, atcommand_adjcmdlvl,
- "Temporarily adjust the GM level of a player"}},
- {"trade", {"<charname>",
+ "Temporarily adjust the GM level of a player"_s}},
+ {"trade"_s, {"<charname>"_s,
60, atcommand_trade,
- "Initiate trade with a player anywhere"}},
- {"charwipe", {"<charname>",
+ "Initiate trade with a player anywhere"_s}},
+ {"charwipe"_s, {"<charname>"_s,
60, atcommand_char_wipe,
- "Reset a character almost completely"}},
- {"setmagic", {"<school> <value> <charname>",
+ "Reset a character almost completely"_s}},
+ {"setmagic"_s, {"<school> <value> <charname>"_s,
80, atcommand_set_magic,
- "Force magic skill level"}},
- {"magicinfo", {"<charname>",
+ "Force magic skill level"_s}},
+ {"magicinfo"_s, {"<charname>"_s,
80, atcommand_magic_info,
- "Show magic skills of a palyer"}},
- {"log", {"<message ...>",
+ "Show magic skills of a palyer"_s}},
+ {"log"_s, {"<message ...>"_s,
40, atcommand_log,
- "Write something directly to the log"}},
- {"l", {"<message ...>",
+ "Write something directly to the log"_s}},
+ {"l"_s, {"<message ...>"_s,
40, atcommand_log,
- "Write something directly to the log"}},
- {"tee", {"<message ...>",
+ "Write something directly to the log"_s}},
+ {"tee"_s, {"<message ...>"_s,
40, atcommand_tee,
- "Duplicate a message to the log and public chat"}},
- {"t", {"<message ...>",
+ "Duplicate a message to the log and public chat"_s}},
+ {"t"_s, {"<message ...>"_s,
40, atcommand_tee,
- "Duplicate a message to the log and public chat"}},
- {"invisible", {"",
+ "Duplicate a message to the log and public chat"_s}},
+ {"invisible"_s, {""_s,
50, atcommand_invisible,
- "Make yourself invisible to players"}},
- {"visible", {"",
+ "Make yourself invisible to players"_s}},
+ {"visible"_s, {""_s,
50, atcommand_visible,
- "Make yourself visible to players"}},
- {"hugo", {"",
+ "Make yourself visible to players"_s}},
+ {"hugo"_s, {""_s,
60, atcommand_iterate_forward_over_players,
- "Jump to the next player"}},
- {"linus", {"",
+ "Jump to the next player"_s}},
+ {"linus"_s, {""_s,
60, atcommand_iterate_backwards_over_players,
- "Jump to the previous player"}},
- {"sp-info", {"<charname>",
+ "Jump to the previous player"_s}},
+ {"sp-info"_s, {"<charname>"_s,
40, atcommand_skillpool_info,
- "Show info about pool skills"}},
- {"sp-focus", {"<skill-id> <charname>",
+ "Show info about pool skills"_s}},
+ {"sp-focus"_s, {"<skill-id> <charname>"_s,
80, atcommand_skillpool_focus,
- "Focus on a pool skill"}},
- {"sp-unfocus", {"<skill-id> <charname>",
+ "Focus on a pool skill"_s}},
+ {"sp-unfocus"_s, {"<skill-id> <charname>"_s,
80, atcommand_skillpool_unfocus,
- "Unfocus off of a pool skill"}},
- {"skill-learn", {"<skill-id> <level> <charname>",
+ "Unfocus off of a pool skill"_s}},
+ {"skill-learn"_s, {"<skill-id> <level> <charname>"_s,
80, atcommand_skill_learn,
- "Change a skill level"}},
- {"wgm", {"<message ...>",
+ "Change a skill level"_s}},
+ {"wgm"_s, {"<message ...>"_s,
0, atcommand_wgm,
- "Send a message to online GMs"}},
- {"ipcheck", {"<charname>",
+ "Send a message to online GMs"_s}},
+ {"ipcheck"_s, {"<charname>"_s,
60, atcommand_ipcheck,
- "List players on the same IP address"}},
- {"doomspot", {"",
+ "List players on the same IP address"_s}},
+ {"doomspot"_s, {""_s,
60, atcommand_doomspot,
- "Kill all players on the same tile"}},
- {"source", {"",
+ "Kill all players on the same tile"_s}},
+ {"source"_s, {""_s,
0, atcommand_source,
- "Legal information about source code (must be a level 0 command!)"}},
+ "Legal information about source code (must be a level 0 command!)"_s}},
};