summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-29 19:40:25 -0300
committershennetsind <ind@henn.et>2013-03-29 19:40:25 -0300
commita89d501fc60b12a997a262429cb4515af9dad69e (patch)
tree39e2a5153a99d46dc40cb461eb3ecdb9ded73275 /src/map/atcommand.c
parentcfd2bdb06048c17decaafd0f5a3c04e3f0ac6a3b (diff)
downloadhercules-a89d501fc60b12a997a262429cb4515af9dad69e.tar.gz
hercules-a89d501fc60b12a997a262429cb4515af9dad69e.tar.bz2
hercules-a89d501fc60b12a997a262429cb4515af9dad69e.tar.xz
hercules-a89d501fc60b12a997a262429cb4515af9dad69e.zip
Hercules Renewal: clif.c
1st Phase Complete. http://hercules.ws/board/topic/237-hercules-renewal/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c1780
1 files changed, 890 insertions, 890 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 096d7a4b9..a585e6cc8 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -219,21 +219,21 @@ ACMD_FUNC(send)
{
int i;
for (i = 900; i <= 903; ++i)
- clif_displaymessage(fd, msg_txt(i));
+ clif->displaymessage(fd, msg_txt(i));
return -1;
}
#define PARSE_ERROR(error,p) \
{\
- clif_displaymessage(fd, (error));\
+ clif->displaymessage(fd, (error));\
sprintf(atcmd_output, ">%s", (p));\
- clif_displaymessage(fd, atcmd_output);\
+ clif->displaymessage(fd, atcmd_output);\
}
//define PARSE_ERROR
#define CHECK_EOS(p) \
if(*(p) == 0){\
- clif_displaymessage(fd, "Unexpected end of string");\
+ clif->displaymessage(fd, "Unexpected end of string");\
return -1;\
}
//define CHECK_EOS
@@ -259,7 +259,7 @@ ACMD_FUNC(send)
if(len)
{// show packet length
sprintf(atcmd_output, msg_txt(904), type, packet_db[sd->packet_ver][type].len); // Packet 0x%x length: %d
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -268,7 +268,7 @@ ACMD_FUNC(send)
if(len == 0)
{// unknown packet - ERROR
sprintf(atcmd_output, msg_txt(905), type); // Unknown packet: 0x%x
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
} else if(len == -1)
{// dynamic packet
@@ -425,11 +425,11 @@ ACMD_FUNC(send)
WFIFOSET(fd,len);
}
} else {
- clif_displaymessage(fd, msg_txt(259)); // Invalid packet
+ clif->displaymessage(fd, msg_txt(259)); // Invalid packet
return -1;
}
sprintf (atcmd_output, msg_txt(258), type, type); // Sent packet 0x%x (%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
#undef PARSE_ERROR
#undef CHECK_EOS
@@ -455,7 +455,7 @@ ACMD_FUNC(mapmove)
(sscanf(message, "%15s %hd %hd", map_name, &x, &y) < 3 &&
sscanf(message, "%15[^,],%hd,%hd", map_name, &x, &y) < 1)) {
- clif_displaymessage(fd, msg_txt(909)); // Please enter a map (usage: @warp/@rura/@mapmove <mapname> <x> <y>).
+ clif->displaymessage(fd, msg_txt(909)); // Please enter a map (usage: @warp/@rura/@mapmove <mapname> <x> <y>).
return -1;
}
@@ -464,30 +464,30 @@ ACMD_FUNC(mapmove)
m = map_mapindex2mapid(mapindex);
if (!mapindex) { // m < 0 means on different server! [Kevin]
- clif_displaymessage(fd, msg_txt(1)); // Map not found.
+ clif->displaymessage(fd, msg_txt(1)); // Map not found.
return -1;
}
if ((x || y) && map_getcell(m, x, y, CELL_CHKNOPASS))
{ //This is to prevent the pc_setpos call from printing an error.
- clif_displaymessage(fd, msg_txt(2));
+ clif->displaymessage(fd, msg_txt(2));
if (!map_search_freecell(NULL, m, &x, &y, 10, 10, 1))
x = y = 0; //Invalid cell, use random spot.
}
if (map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(247));
+ clif->displaymessage(fd, msg_txt(247));
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(248));
+ clif->displaymessage(fd, msg_txt(248));
return -1;
}
if (pc_setpos(sd, mapindex, x, y, CLR_TELEPORT) != 0) {
- clif_displaymessage(fd, msg_txt(1)); // Map not found.
+ clif->displaymessage(fd, msg_txt(1)); // Map not found.
return -1;
}
- clif_displaymessage(fd, msg_txt(0)); // Warped.
+ clif->displaymessage(fd, msg_txt(0)); // Warped.
return 0;
}
@@ -502,7 +502,7 @@ ACMD_FUNC(where)
memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(910)); // Please enter a player name (usage: @where <char name>).
+ clif->displaymessage(fd, msg_txt(910)); // Please enter a player name (usage: @where <char name>).
return -1;
}
@@ -511,12 +511,12 @@ ACMD_FUNC(where)
strncmp(pl_sd->status.name, atcmd_player_name, NAME_LENGTH) != 0 ||
(pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > pc_get_group_level(sd) && !pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID))
) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
snprintf(atcmd_output, sizeof atcmd_output, "%s %s %d %d", pl_sd->status.name, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -531,37 +531,37 @@ ACMD_FUNC(jumpto)
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>).
+ clif->displaymessage(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>).
return -1;
}
if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))
{
- clif_displaymessage(fd, msg_txt(247)); // You are not authorized to warp to this map.
+ clif->displaymessage(fd, msg_txt(247)); // You are not authorized to warp to this map.
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))
{
- clif_displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map.
+ clif->displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map.
return -1;
}
if( pc_isdead(sd) )
{
- clif_displaymessage(fd, msg_txt(664));
+ clif->displaymessage(fd, msg_txt(664));
return -1;
}
pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -580,26 +580,26 @@ ACMD_FUNC(jump)
sscanf(message, "%hd %hd", &x, &y);
if (map[sd->bl.m].flag.noteleport && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map.
+ clif->displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map.
return -1;
}
if( pc_isdead(sd) )
{
- clif_displaymessage(fd, msg_txt(664));
+ clif->displaymessage(fd, msg_txt(664));
return -1;
}
if ((x || y) && map_getcell(sd->bl.m, x, y, CELL_CHKNOPASS))
{ //This is to prevent the pc_setpos call from printing an error.
- clif_displaymessage(fd, msg_txt(2));
+ clif->displaymessage(fd, msg_txt(2));
if (!map_search_freecell(NULL, sd->bl.m, &x, &y, 10, 10, 1))
x = y = 0; //Invalid cell, use random spot.
}
pc_setpos(sd, sd->mapindex, x, y, CLR_TELEPORT);
sprintf(atcmd_output, msg_txt(5), sd->bl.x, sd->bl.y); // Jumped to %d %d
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -679,7 +679,7 @@ ACMD_FUNC(who)
break;
}
}
- clif_displaymessage(fd, StringBuf_Value(&buf));
+ clif->displaymessage(fd, StringBuf_Value(&buf));
StringBuf_Clear(&buf);
count++;
}
@@ -701,7 +701,7 @@ ACMD_FUNC(who)
else
StringBuf_Printf(&buf, msg_txt(56), count, map[map_id].name); // %d players found in map '%s'.
}
- clif_displaymessage(fd, StringBuf_Value(&buf));
+ clif->displaymessage(fd, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
return 0;
}
@@ -754,7 +754,7 @@ ACMD_FUNC(whogm)
if (pl_sd->sc.option & OPTION_INVISIBLE)
continue;
sprintf(atcmd_output, msg_txt(913), pl_sd->status.name); // Name: %s (GM)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
count++;
continue;
}
@@ -762,12 +762,12 @@ ACMD_FUNC(whogm)
sprintf(atcmd_output, msg_txt(914), // Name: %s (GM:%d) | Location: %s %d %d
pl_sd->status.name, pl_level,
mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(915), // BLvl: %d | Job: %s (Lvl: %d)
pl_sd->status.base_level,
job_name(pl_sd->status.class_), pl_sd->status.job_level);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
p = party_search(pl_sd->status.party_id);
g = guild_search(pl_sd->status.guild_id);
@@ -775,18 +775,18 @@ ACMD_FUNC(whogm)
sprintf(atcmd_output,msg_txt(916), // Party: '%s' | Guild: '%s'
p?p->party.name:msg_txt(917), g?g->name:msg_txt(917)); // None.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
count++;
}
mapit_free(iter);
if (count == 0)
- clif_displaymessage(fd, msg_txt(150)); // No GM found.
+ clif->displaymessage(fd, msg_txt(150)); // No GM found.
else if (count == 1)
- clif_displaymessage(fd, msg_txt(151)); // 1 GM found.
+ clif->displaymessage(fd, msg_txt(151)); // 1 GM found.
else {
sprintf(atcmd_output, msg_txt(152), count); // %d GMs found.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return 0;
@@ -805,7 +805,7 @@ ACMD_FUNC(save)
chrif_save(sd,0);
- clif_displaymessage(fd, msg_txt(6)); // Your save point has been changed.
+ clif->displaymessage(fd, msg_txt(6)); // Your save point has been changed.
return 0;
}
@@ -821,16 +821,16 @@ ACMD_FUNC(load)
m = map_mapindex2mapid(sd->status.save_point.map);
if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(249)); // You are not authorized to warp to your save map.
+ clif->displaymessage(fd, msg_txt(249)); // You are not authorized to warp to your save map.
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map.
+ clif->displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map.
return -1;
}
pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_OUTSIGHT);
- clif_displaymessage(fd, msg_txt(7)); // Warping to save point..
+ clif->displaymessage(fd, msg_txt(7)); // Warping to save point..
return 0;
}
@@ -848,13 +848,13 @@ ACMD_FUNC(speed)
if (!message || !*message || sscanf(message, "%d", &speed) < 1) {
sprintf(atcmd_output, msg_txt(918), MIN_WALK_SPEED, MAX_WALK_SPEED); // Please enter a speed value (usage: @speed <%d-%d>).
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
sd->base_status.speed = cap_value(speed, MIN_WALK_SPEED, MAX_WALK_SPEED);
status_calc_bl(&sd->bl, SCB_SPEED);
- clif_displaymessage(fd, msg_txt(8)); // Speed changed.
+ clif->displaymessage(fd, msg_txt(8)); // Speed changed.
return 0;
}
@@ -870,11 +870,11 @@ ACMD_FUNC(storage)
if (storage_storageopen(sd) == 1)
{ //Already open.
- clif_displaymessage(fd, msg_txt(250));
+ clif->displaymessage(fd, msg_txt(250));
return -1;
}
- clif_displaymessage(fd, msg_txt(919)); // Storage opened.
+ clif->displaymessage(fd, msg_txt(919)); // Storage opened.
return 0;
}
@@ -888,7 +888,7 @@ ACMD_FUNC(guildstorage)
nullpo_retr(-1, sd);
if (!sd->status.guild_id) {
- clif_displaymessage(fd, msg_txt(252));
+ clif->displaymessage(fd, msg_txt(252));
return -1;
}
@@ -896,17 +896,17 @@ ACMD_FUNC(guildstorage)
return -1;
if (sd->state.storage_flag == 1) {
- clif_displaymessage(fd, msg_txt(250));
+ clif->displaymessage(fd, msg_txt(250));
return -1;
}
if (sd->state.storage_flag == 2) {
- clif_displaymessage(fd, msg_txt(251));
+ clif->displaymessage(fd, msg_txt(251));
return -1;
}
storage_guild_storageopen(sd);
- clif_displaymessage(fd, msg_txt(920)); // Guild storage opened.
+ clif->displaymessage(fd, msg_txt(920)); // Guild storage opened.
return 0;
}
@@ -926,11 +926,11 @@ ACMD_FUNC(option)
text = atcommand_help_string( command );
// notify the user of the requirement to enter an option
- clif_displaymessage(fd, msg_txt(921)); // Please enter at least one option.
+ clif->displaymessage(fd, msg_txt(921)); // Please enter at least one option.
if( text )
{// send the help text associated with this command
- clif_displaymessage( fd, text );
+ clif->displaymessage( fd, text );
}
return -1;
@@ -940,7 +940,7 @@ ACMD_FUNC(option)
sd->sc.opt2 = param2;
pc_setoption(sd, param3);
- clif_displaymessage(fd, msg_txt(9)); // Options changed.
+ clif->displaymessage(fd, msg_txt(9)); // Options changed.
return 0;
}
@@ -957,7 +957,7 @@ ACMD_FUNC(hide)
status_set_viewdata(&sd->bl, sd->disguise);
else
status_set_viewdata(&sd->bl, sd->status.class_);
- clif_displaymessage(fd, msg_txt(10)); // Invisible: Off
+ clif->displaymessage(fd, msg_txt(10)); // Invisible: Off
// increment the number of pvp players on the map
map[sd->bl.m].users_pvp++;
@@ -967,11 +967,11 @@ ACMD_FUNC(hide)
sd->pvp_timer = add_timer( gettick() + 200, pc_calc_pvprank_timer, sd->bl.id, 0 );
}
//bugreport:2266
- map_foreachinmovearea(clif_insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl);
+ map_foreachinmovearea(clif->insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl);
} else {
sd->sc.option |= OPTION_INVISIBLE;
sd->vd.class_ = INVISIBLE_CLASS;
- clif_displaymessage(fd, msg_txt(11)); // Invisible: On
+ clif->displaymessage(fd, msg_txt(11)); // Invisible: On
// decrement the number of pvp players on the map
map[sd->bl.m].users_pvp--;
@@ -982,7 +982,7 @@ ACMD_FUNC(hide)
sd->pvp_timer = INVALID_TIMER;
}
}
- clif_changeoption(&sd->bl);
+ clif->changeoption(&sd->bl);
return 0;
}
@@ -1011,7 +1011,7 @@ ACMD_FUNC(jobchange)
if (!found) {
text = atcommand_help_string(command);
if (text)
- clif_displaymessage(fd, text);
+ clif->displaymessage(fd, text);
return -1;
}
}
@@ -1020,21 +1020,21 @@ ACMD_FUNC(jobchange)
|| job == JOB_LORD_KNIGHT2 || job == JOB_PALADIN2 || job == JOB_BABY_KNIGHT2 || job == JOB_BABY_CRUSADER2 || job == JOB_STAR_GLADIATOR2
|| (job >= JOB_RUNE_KNIGHT2 && job <= JOB_MECHANIC_T2) || (job >= JOB_BABY_RUNE2 && job <= JOB_BABY_MECHANIC2)
) // Deny direct transformation into dummy jobs
- {clif_displaymessage(fd, msg_txt(923)); //"You can not change to this job by command."
+ {clif->displaymessage(fd, msg_txt(923)); //"You can not change to this job by command."
return 0;}
if (pcdb_checkid(job))
{
if (pc_jobchange(sd, job, upper) == 0)
- clif_displaymessage(fd, msg_txt(12)); // Your job has been changed.
+ clif->displaymessage(fd, msg_txt(12)); // Your job has been changed.
else {
- clif_displaymessage(fd, msg_txt(155)); // You are unable to change your job.
+ clif->displaymessage(fd, msg_txt(155)); // You are unable to change your job.
return -1;
}
} else {
text = atcommand_help_string(command);
if (text)
- clif_displaymessage(fd, text);
+ clif->displaymessage(fd, text);
return -1;
}
@@ -1048,9 +1048,9 @@ ACMD_FUNC(kill)
{
nullpo_retr(-1, sd);
status_kill(&sd->bl);
- clif_displaymessage(sd->fd, msg_txt(13)); // A pity! You've died.
+ clif->displaymessage(sd->fd, msg_txt(13)); // A pity! You've died.
if (fd != sd->fd)
- clif_displaymessage(fd, msg_txt(14)); // Character killed.
+ clif->displaymessage(fd, msg_txt(14)); // Character killed.
return 0;
}
@@ -1062,11 +1062,11 @@ ACMD_FUNC(alive)
nullpo_retr(-1, sd);
if (!status_revive(&sd->bl, 100, 100))
{
- clif_displaymessage(fd, msg_txt(667));
+ clif->displaymessage(fd, msg_txt(667));
return -1;
}
- clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
- clif_displaymessage(fd, msg_txt(16)); // You've been revived! It's a miracle!
+ clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
+ clif->displaymessage(fd, msg_txt(16)); // You've been revived! It's a miracle!
return 0;
}
@@ -1082,23 +1082,23 @@ ACMD_FUNC(kami)
if(*(command + 5) != 'c' && *(command + 5) != 'C') {
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(980)); // Please enter a message (usage: @kami <message>).
+ clif->displaymessage(fd, msg_txt(980)); // Please enter a message (usage: @kami <message>).
return -1;
}
sscanf(message, "%199[^\n]", atcmd_output);
if (strstr(command, "l") != NULL)
- clif_broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, ALL_SAMEMAP);
+ clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, ALL_SAMEMAP);
else
intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0);
} else {
if(!message || !*message || (sscanf(message, "%lx %199[^\n]", &color, atcmd_output) < 2)) {
- clif_displaymessage(fd, msg_txt(981)); // Please enter color and message (usage: @kamic <color> <message>).
+ clif->displaymessage(fd, msg_txt(981)); // Please enter color and message (usage: @kamic <color> <message>).
return -1;
}
if(color > 0xFFFFFF) {
- clif_displaymessage(fd, msg_txt(982)); // Invalid color.
+ clif->displaymessage(fd, msg_txt(982)); // Invalid color.
return -1;
}
intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0);
@@ -1122,24 +1122,24 @@ ACMD_FUNC(heal)
if ( hp == 0 && sp == 0 ) {
if (!status_percent_heal(&sd->bl, 100, 100))
- clif_displaymessage(fd, msg_txt(157)); // HP and SP have already been recovered.
+ clif->displaymessage(fd, msg_txt(157)); // HP and SP have already been recovered.
else
- clif_displaymessage(fd, msg_txt(17)); // HP, SP recovered.
+ clif->displaymessage(fd, msg_txt(17)); // HP, SP recovered.
return 0;
}
if ( hp > 0 && sp >= 0 ) {
if(!status_heal(&sd->bl, hp, sp, 0))
- clif_displaymessage(fd, msg_txt(157)); // HP and SP are already with the good value.
+ clif->displaymessage(fd, msg_txt(157)); // HP and SP are already with the good value.
else
- clif_displaymessage(fd, msg_txt(17)); // HP, SP recovered.
+ clif->displaymessage(fd, msg_txt(17)); // HP, SP recovered.
return 0;
}
if ( hp < 0 && sp <= 0 ) {
status_damage(NULL, &sd->bl, -hp, -sp, 0, 0);
- clif_damage(&sd->bl,&sd->bl, gettick(), 0, 0, -hp, 0, 4, 0);
- clif_displaymessage(fd, msg_txt(156)); // HP or/and SP modified.
+ clif->damage(&sd->bl,&sd->bl, gettick(), 0, 0, -hp, 0, 4, 0);
+ clif->displaymessage(fd, msg_txt(156)); // HP or/and SP modified.
return 0;
}
@@ -1149,7 +1149,7 @@ ACMD_FUNC(heal)
status_heal(&sd->bl, hp, 0, 0);
else {
status_damage(NULL, &sd->bl, -hp, 0, 0, 0);
- clif_damage(&sd->bl,&sd->bl, gettick(), 0, 0, -hp, 0, 4, 0);
+ clif->damage(&sd->bl,&sd->bl, gettick(), 0, 0, -hp, 0, 4, 0);
}
}
@@ -1160,7 +1160,7 @@ ACMD_FUNC(heal)
status_damage(NULL, &sd->bl, 0, -sp, 0, 0);
}
- clif_displaymessage(fd, msg_txt(156)); // HP or/and SP modified.
+ clif->displaymessage(fd, msg_txt(156)); // HP or/and SP modified.
return 0;
}
@@ -1182,7 +1182,7 @@ ACMD_FUNC(item)
sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 &&
sscanf(message, "%99s %d", item_name, &number) < 1
)) {
- clif_displaymessage(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>).
+ clif->displaymessage(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>).
return -1;
}
@@ -1192,7 +1192,7 @@ ACMD_FUNC(item)
if ((item_data = itemdb_searchname(item_name)) == NULL &&
(item_data = itemdb_exists(atoi(item_name))) == NULL)
{
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
+ clif->displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
return -1;
}
@@ -1210,12 +1210,12 @@ ACMD_FUNC(item)
item_tmp.identify = 1;
if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND)))
- clif_additem(sd, 0, 0, flag);
+ clif->additem(sd, 0, 0, flag);
}
}
if (flag == 0)
- clif_displaymessage(fd, msg_txt(18)); // Item created.
+ clif->displaymessage(fd, msg_txt(18)); // Item created.
return 0;
}
@@ -1238,8 +1238,8 @@ ACMD_FUNC(item2)
sscanf(message, "\"%99[^\"]\" %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 &&
sscanf(message, "%99s %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9
)) {
- clif_displaymessage(fd, msg_txt(984)); // Please enter all parameters (usage: @item2 <item name/ID> <quantity>
- clif_displaymessage(fd, msg_txt(985)); // <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4>).
+ clif->displaymessage(fd, msg_txt(984)); // Please enter all parameters (usage: @item2 <item name/ID> <quantity>
+ clif->displaymessage(fd, msg_txt(985)); // <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4>).
return -1;
}
@@ -1283,13 +1283,13 @@ ACMD_FUNC(item2)
item_tmp.card[2] = c3;
item_tmp.card[3] = c4;
if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND)))
- clif_additem(sd, 0, 0, flag);
+ clif->additem(sd, 0, 0, flag);
}
if (flag == 0)
- clif_displaymessage(fd, msg_txt(18)); // Item created.
+ clif->displaymessage(fd, msg_txt(18)); // Item created.
} else {
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
+ clif->displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
return -1;
}
@@ -1309,7 +1309,7 @@ ACMD_FUNC(itemreset)
pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_COMMAND);
}
}
- clif_displaymessage(fd, msg_txt(20)); // All of your items have been removed.
+ clif->displaymessage(fd, msg_txt(20)); // All of your items have been removed.
return 0;
}
@@ -1324,13 +1324,13 @@ ACMD_FUNC(baselevelup)
level = atoi(message);
if (!message || !*message || !level) {
- clif_displaymessage(fd, msg_txt(986)); // Please enter a level adjustment (usage: @lvup/@blevel/@baselvlup <number of levels>).
+ clif->displaymessage(fd, msg_txt(986)); // Please enter a level adjustment (usage: @lvup/@blevel/@baselvlup <number of levels>).
return -1;
}
if (level > 0) {
if (sd->status.base_level >= pc_maxbaselv(sd)) { // check for max level by Valaris
- clif_displaymessage(fd, msg_txt(47)); // Base level can't go any higher.
+ clif->displaymessage(fd, msg_txt(47)); // Base level can't go any higher.
return -1;
} // End Addition
if ((unsigned int)level > pc_maxbaselv(sd) || (unsigned int)level > pc_maxbaselv(sd) - sd->status.base_level) // fix positiv overflow
@@ -1341,11 +1341,11 @@ ACMD_FUNC(baselevelup)
sd->status.status_point += status_point;
sd->status.base_level += (unsigned int)level;
status_percent_heal(&sd->bl, 100, 100);
- clif_misceffect(&sd->bl, 0);
- clif_displaymessage(fd, msg_txt(21)); // Base level raised.
+ clif->misceffect(&sd->bl, 0);
+ clif->displaymessage(fd, msg_txt(21)); // Base level raised.
} else {
if (sd->status.base_level == 1) {
- clif_displaymessage(fd, msg_txt(158)); // Base level can't go any lower.
+ clif->displaymessage(fd, msg_txt(158)); // Base level can't go any lower.
return -1;
}
level*=-1;
@@ -1360,13 +1360,13 @@ ACMD_FUNC(baselevelup)
else
sd->status.status_point -= status_point;
sd->status.base_level -= (unsigned int)level;
- clif_displaymessage(fd, msg_txt(22)); // Base level lowered.
+ clif->displaymessage(fd, msg_txt(22)); // Base level lowered.
}
sd->status.base_exp = 0;
- clif_updatestatus(sd, SP_STATUSPOINT);
- clif_updatestatus(sd, SP_BASELEVEL);
- clif_updatestatus(sd, SP_BASEEXP);
- clif_updatestatus(sd, SP_NEXTBASEEXP);
+ clif->updatestatus(sd, SP_STATUSPOINT);
+ clif->updatestatus(sd, SP_BASELEVEL);
+ clif->updatestatus(sd, SP_BASEEXP);
+ clif->updatestatus(sd, SP_NEXTBASEEXP);
status_calc_pc(sd, 0);
pc_baselevelchanged(sd);
if(sd->status.party_id)
@@ -1385,23 +1385,23 @@ ACMD_FUNC(joblevelup)
level = atoi(message);
if (!message || !*message || !level) {
- clif_displaymessage(fd, msg_txt(987)); // Please enter a level adjustment (usage: @joblvup/@jlevel/@joblvlup <number of levels>).
+ clif->displaymessage(fd, msg_txt(987)); // Please enter a level adjustment (usage: @joblvup/@jlevel/@joblvlup <number of levels>).
return -1;
}
if (level > 0) {
if (sd->status.job_level >= pc_maxjoblv(sd)) {
- clif_displaymessage(fd, msg_txt(23)); // Job level can't go any higher.
+ clif->displaymessage(fd, msg_txt(23)); // Job level can't go any higher.
return -1;
}
if ((unsigned int)level > pc_maxjoblv(sd) || (unsigned int)level > pc_maxjoblv(sd) - sd->status.job_level) // fix positiv overflow
level = pc_maxjoblv(sd) - sd->status.job_level;
sd->status.job_level += (unsigned int)level;
sd->status.skill_point += level;
- clif_misceffect(&sd->bl, 1);
- clif_displaymessage(fd, msg_txt(24)); // Job level raised.
+ clif->misceffect(&sd->bl, 1);
+ clif->displaymessage(fd, msg_txt(24)); // Job level raised.
} else {
if (sd->status.job_level == 1) {
- clif_displaymessage(fd, msg_txt(159)); // Job level can't go any lower.
+ clif->displaymessage(fd, msg_txt(159)); // Job level can't go any lower.
return -1;
}
level *=-1;
@@ -1414,13 +1414,13 @@ ACMD_FUNC(joblevelup)
sd->status.skill_point = 0;
else
sd->status.skill_point -= level;
- clif_displaymessage(fd, msg_txt(25)); // Job level lowered.
+ clif->displaymessage(fd, msg_txt(25)); // Job level lowered.
}
sd->status.job_exp = 0;
- clif_updatestatus(sd, SP_JOBLEVEL);
- clif_updatestatus(sd, SP_JOBEXP);
- clif_updatestatus(sd, SP_NEXTJOBEXP);
- clif_updatestatus(sd, SP_SKILLPOINT);
+ clif->updatestatus(sd, SP_JOBLEVEL);
+ clif->updatestatus(sd, SP_JOBEXP);
+ clif->updatestatus(sd, SP_NEXTJOBEXP);
+ clif->updatestatus(sd, SP_SKILLPOINT);
status_calc_pc(sd, 0);
return 0;
@@ -1440,7 +1440,7 @@ ACMD_FUNC(help)
help = config_lookup(&atcommand_config, "help");
if (help == NULL) {
- clif_displaymessage(fd, msg_txt(27)); // "Commands help is not available."
+ clif->displaymessage(fd, msg_txt(27)); // "Commands help is not available."
return -1;
}
@@ -1454,20 +1454,20 @@ ACMD_FUNC(help)
if (!pc_can_use_command(sd, command_name, COMMAND_ATCOMMAND)) {
sprintf(atcmd_output, msg_txt(153), message); // "%s is Unknown Command"
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
atcommand_get_suggestions(sd, command_name, true);
return -1;
}
if (!config_setting_lookup_string(help, command_name, &text)) {
sprintf(atcmd_output, msg_txt(988), atcommand_symbol, command_name); // There is no help for %c%s.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
atcommand_get_suggestions(sd, command_name, true);
return -1;
}
sprintf(atcmd_output, msg_txt(989), atcommand_symbol, command_name); // Help for command %c%s:
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
{ // Display aliases
DBIterator* iter;
@@ -1488,12 +1488,12 @@ ACMD_FUNC(help)
}
dbi_destroy(iter);
if (has_aliases)
- clif_displaymessage(fd, StringBuf_Value(&buf));
+ clif->displaymessage(fd, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
}
// Display help contents
- clif_displaymessage(fd, text);
+ clif->displaymessage(fd, text);
return 0;
}
@@ -1516,7 +1516,7 @@ static int atcommand_stopattack(struct block_list *bl,va_list ap)
static int atcommand_pvpoff_sub(struct block_list *bl,va_list ap)
{
TBL_PC* sd = (TBL_PC*)bl;
- clif_pvpset(sd, 0, 0, 2);
+ clif->pvpset(sd, 0, 0, 2);
if (sd->pvp_timer != INVALID_TIMER) {
delete_timer(sd->pvp_timer, pc_calc_pvprank_timer);
sd->pvp_timer = INVALID_TIMER;
@@ -1529,17 +1529,17 @@ ACMD_FUNC(pvpoff)
nullpo_retr(-1, sd);
if (!map[sd->bl.m].flag.pvp) {
- clif_displaymessage(fd, msg_txt(160)); // PvP is already Off.
+ clif->displaymessage(fd, msg_txt(160)); // PvP is already Off.
return -1;
}
map[sd->bl.m].flag.pvp = 0;
if (!battle_config.pk_mode)
- clif_map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
+ clif->map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
map_foreachinmap(atcommand_pvpoff_sub,sd->bl.m, BL_PC);
map_foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0);
- clif_displaymessage(fd, msg_txt(31)); // PvP: Off.
+ clif->displaymessage(fd, msg_txt(31)); // PvP: Off.
return 0;
}
@@ -1565,7 +1565,7 @@ ACMD_FUNC(pvpon)
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.pvp) {
- clif_displaymessage(fd, msg_txt(161)); // PvP is already On.
+ clif->displaymessage(fd, msg_txt(161)); // PvP is already On.
return -1;
}
@@ -1573,11 +1573,11 @@ ACMD_FUNC(pvpon)
if (!battle_config.pk_mode)
{// display pvp circle and rank
- clif_map_property_mapall(sd->bl.m, MAPPROPERTY_FREEPVPZONE);
+ clif->map_property_mapall(sd->bl.m, MAPPROPERTY_FREEPVPZONE);
map_foreachinmap(atcommand_pvpon_sub,sd->bl.m, BL_PC);
}
- clif_displaymessage(fd, msg_txt(32)); // PvP: On.
+ clif->displaymessage(fd, msg_txt(32)); // PvP: On.
return 0;
}
@@ -1590,14 +1590,14 @@ ACMD_FUNC(gvgoff)
nullpo_retr(-1, sd);
if (!map[sd->bl.m].flag.gvg) {
- clif_displaymessage(fd, msg_txt(162)); // GvG is already Off.
+ clif->displaymessage(fd, msg_txt(162)); // GvG is already Off.
return -1;
}
map[sd->bl.m].flag.gvg = 0;
- clif_map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
+ clif->map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
map_foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0);
- clif_displaymessage(fd, msg_txt(33)); // GvG: Off.
+ clif->displaymessage(fd, msg_txt(33)); // GvG: Off.
return 0;
}
@@ -1610,13 +1610,13 @@ ACMD_FUNC(gvgon)
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.gvg) {
- clif_displaymessage(fd, msg_txt(163)); // GvG is already On.
+ clif->displaymessage(fd, msg_txt(163)); // GvG is already On.
return -1;
}
map[sd->bl.m].flag.gvg = 1;
- clif_map_property_mapall(sd->bl.m, MAPPROPERTY_AGITZONE);
- clif_displaymessage(fd, msg_txt(34)); // GvG: On.
+ clif->map_property_mapall(sd->bl.m, MAPPROPERTY_AGITZONE);
+ clif->displaymessage(fd, msg_txt(34)); // GvG: On.
return 0;
}
@@ -1634,7 +1634,7 @@ ACMD_FUNC(model)
if (!message || !*message || sscanf(message, "%d %d %d", &hair_style, &hair_color, &cloth_color) < 1) {
sprintf(atcmd_output, msg_txt(991), // Please enter at least one value (usage: @model <hair ID: %d-%d> <hair color: %d-%d> <clothes color: %d-%d>).
MIN_HAIR_STYLE, MAX_HAIR_STYLE, MIN_HAIR_COLOR, MAX_HAIR_COLOR, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
@@ -1644,9 +1644,9 @@ ACMD_FUNC(model)
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(fd, msg_txt(36)); // Appearence changed.
+ clif->displaymessage(fd, msg_txt(36)); // Appearence changed.
} else {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif->displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
}
@@ -1665,15 +1665,15 @@ ACMD_FUNC(dye)
if (!message || !*message || sscanf(message, "%d", &cloth_color) < 1) {
sprintf(atcmd_output, msg_txt(992), MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); // Please enter a clothes color (usage: @dye/@ccolor <clothes color: %d-%d>).
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
if (cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) {
pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color);
- clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
+ clif->displaymessage(fd, msg_txt(36)); // Appearence changed.
} else {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif->displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
}
@@ -1692,15 +1692,15 @@ ACMD_FUNC(hair_style)
if (!message || !*message || sscanf(message, "%d", &hair_style) < 1) {
sprintf(atcmd_output, msg_txt(993), MIN_HAIR_STYLE, MAX_HAIR_STYLE); // Please enter a hair style (usage: @hairstyle/@hstyle <hair ID: %d-%d>).
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) {
pc_changelook(sd, LOOK_HAIR, hair_style);
- clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
+ clif->displaymessage(fd, msg_txt(36)); // Appearence changed.
} else {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif->displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
}
@@ -1719,15 +1719,15 @@ ACMD_FUNC(hair_color)
if (!message || !*message || sscanf(message, "%d", &hair_color) < 1) {
sprintf(atcmd_output, msg_txt(994), MIN_HAIR_COLOR, MAX_HAIR_COLOR); // Please enter a hair color (usage: @haircolor/@hcolor <hair color: %d-%d>).
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) {
pc_changelook(sd, LOOK_HAIR_COLOR, hair_color);
- clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
+ clif->displaymessage(fd, msg_txt(36)); // Appearence changed.
} else {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif->displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
}
@@ -1793,7 +1793,7 @@ ACMD_FUNC(go)
nullpo_retr(-1, sd);
if( map[sd->bl.m].flag.nogo && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE) ) {
- clif_displaymessage(sd->fd,msg_txt(995)); // You cannot use @go on this map.
+ clif->displaymessage(sd->fd,msg_txt(995)); // You cannot use @go on this map.
return 0;
}
@@ -1810,11 +1810,11 @@ ACMD_FUNC(go)
// attempt to find the text help string
text = atcommand_help_string( command );
- clif_displaymessage(fd, msg_txt(38)); // Invalid location number, or name.
+ clif->displaymessage(fd, msg_txt(38)); // Invalid location number, or name.
if( text )
{// send the text to the client
- clif_displaymessage( fd, text );
+ clif->displaymessage( fd, text );
}
return -1;
@@ -1913,21 +1913,21 @@ ACMD_FUNC(go)
{
m = map_mapname2mapid(data[town].map);
if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(247));
+ clif->displaymessage(fd, msg_txt(247));
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(248));
+ clif->displaymessage(fd, msg_txt(248));
return -1;
}
if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
- clif_displaymessage(fd, msg_txt(0)); // Warped.
+ clif->displaymessage(fd, msg_txt(0)); // Warped.
} else {
- clif_displaymessage(fd, msg_txt(1)); // Map not found.
+ clif->displaymessage(fd, msg_txt(1)); // Map not found.
return -1;
}
} else { // if you arrive here, you have an error in town variable when reading of names
- clif_displaymessage(fd, msg_txt(38)); // Invalid location number or name.
+ clif->displaymessage(fd, msg_txt(38)); // Invalid location number or name.
return -1;
}
@@ -1955,7 +1955,7 @@ ACMD_FUNC(monster)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(80)); // Give the display name or monster name/id please.
+ clif->displaymessage(fd, msg_txt(80)); // Give the display name or monster name/id please.
return -1;
}
if (sscanf(message, "\"%23[^\"]\" %23s %d", name, monster, &number) > 1 ||
@@ -1971,7 +1971,7 @@ ACMD_FUNC(monster)
//As before, name may be already filled.
name[0] = '\0';
} else {
- clif_displaymessage(fd, msg_txt(80)); // Give a display name and monster name/id please.
+ clif->displaymessage(fd, msg_txt(80)); // Give a display name and monster name/id please.
return -1;
}
@@ -1979,12 +1979,12 @@ ACMD_FUNC(monster)
mob_id = mobdb_checkid(atoi(monster));
if (mob_id == 0) {
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif->displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
return -1;
}
if (mob_id == MOBID_EMPERIUM) {
- clif_displaymessage(fd, msg_txt(83)); // Monster 'Emperium' cannot be spawned.
+ clif->displaymessage(fd, msg_txt(83)); // Monster 'Emperium' cannot be spawned.
return -1;
}
@@ -2018,13 +2018,13 @@ ACMD_FUNC(monster)
if (count != 0)
if (number == count)
- clif_displaymessage(fd, msg_txt(39)); // All monster summoned!
+ clif->displaymessage(fd, msg_txt(39)); // All monster summoned!
else {
sprintf(atcmd_output, msg_txt(240), count); // %d monster(s) summoned!
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
else {
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif->displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
return -1;
}
@@ -2071,7 +2071,7 @@ ACMD_FUNC(killmonster)
map_foreachinmap(atkillmonster_sub, map_id, BL_MOB, -drop_flag);
- clif_displaymessage(fd, msg_txt(165)); // All monsters killed!
+ clif->displaymessage(fd, msg_txt(165)); // All monsters killed!
return 0;
}
@@ -2088,27 +2088,27 @@ ACMD_FUNC(refine)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d %d", &position, &refine) < 2) {
- clif_displaymessage(fd, msg_txt(996)); // Please enter a position and an amount (usage: @refine <equip position> <+/- amount>).
+ clif->displaymessage(fd, msg_txt(996)); // Please enter a position and an amount (usage: @refine <equip position> <+/- amount>).
sprintf(atcmd_output, msg_txt(997), EQP_HEAD_LOW); // %d: Lower Headgear
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(998), EQP_HAND_R); // %d: Right Hand
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(999), EQP_GARMENT); // %d: Garment
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1000), EQP_ACC_L); // %d: Left Accessory
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1001), EQP_ARMOR); // %d: Body Armor
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1002), EQP_HAND_L); // %d: Left Hand
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1003), EQP_SHOES); // %d: Shoes
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1004), EQP_ACC_R); // %d: Right Accessory
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1005), EQP_HEAD_TOP); // %d: Top Headgear
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1006), EQP_HEAD_MID); // %d: Mid Headgear
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
@@ -2133,22 +2133,22 @@ ACMD_FUNC(refine)
sd->status.inventory[i].refine = final_refine;
current_position = sd->status.inventory[i].equip;
pc_unequipitem(sd, i, 3);
- clif_refine(fd, 0, i, sd->status.inventory[i].refine);
- clif_delitem(sd, i, 1, 3);
- clif_additem(sd, i, 1, 0);
+ clif->refine(fd, 0, i, sd->status.inventory[i].refine);
+ clif->delitem(sd, i, 1, 3);
+ clif->additem(sd, i, 1, 0);
pc_equipitem(sd, i, current_position);
- clif_misceffect(&sd->bl, 3);
+ clif->misceffect(&sd->bl, 3);
count++;
}
}
if (count == 0)
- clif_displaymessage(fd, msg_txt(166)); // No item has been refined.
+ clif->displaymessage(fd, msg_txt(166)); // No item has been refined.
else if (count == 1)
- clif_displaymessage(fd, msg_txt(167)); // 1 item has been refined.
+ clif->displaymessage(fd, msg_txt(167)); // 1 item has been refined.
else {
sprintf(atcmd_output, msg_txt(168), count); // %d items have been refined.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return 0;
@@ -2172,13 +2172,13 @@ ACMD_FUNC(produce)
sscanf(message, "\"%99[^\"]\" %d %d", item_name, &attribute, &star) < 1 &&
sscanf(message, "%99s %d %d", item_name, &attribute, &star) < 1
)) {
- clif_displaymessage(fd, msg_txt(1007)); // Please enter at least one item name/ID (usage: @produce <equip name/ID> <element> <# of very's>).
+ clif->displaymessage(fd, msg_txt(1007)); // Please enter at least one item name/ID (usage: @produce <equip name/ID> <element> <# of very's>).
return -1;
}
if ( (item_data = itemdb_searchname(item_name)) == NULL &&
(item_data = itemdb_exists(atoi(item_name))) == NULL ) {
- clif_displaymessage(fd, msg_txt(170)); //This item is not an equipment.
+ clif->displaymessage(fd, msg_txt(170)); //This item is not an equipment.
return -1;
}
@@ -2199,14 +2199,14 @@ ACMD_FUNC(produce)
((star*5) << 8) + attribute:0;
tmp_item.card[2] = GetWord(sd->status.char_id, 0);
tmp_item.card[3] = GetWord(sd->status.char_id, 1);
- clif_produceeffect(sd, 0, item_id);
- clif_misceffect(&sd->bl, 3);
+ clif->produce_effect(sd, 0, item_id);
+ clif->misceffect(&sd->bl, 3);
if ((flag = pc_additem(sd, &tmp_item, 1, LOG_TYPE_COMMAND)))
- clif_additem(sd, 0, 0, flag);
+ clif->additem(sd, 0, 0, flag);
} else {
sprintf(atcmd_output, msg_txt(169), item_id, item_data->name); // The item (%d: '%s') is not equipable.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
@@ -2226,14 +2226,14 @@ ACMD_FUNC(memo)
if( !message || !*message || sscanf(message, "%d", &position) < 1 )
{
int i;
- clif_displaymessage(sd->fd, msg_txt(668));
+ clif->displaymessage(sd->fd, msg_txt(668));
for( i = 0; i < MAX_MEMOPOINTS; i++ )
{
if( sd->status.memo_point[i].map )
sprintf(atcmd_output, "%d - %s (%d,%d)", i, mapindex_id2name(sd->status.memo_point[i].map), sd->status.memo_point[i].x, sd->status.memo_point[i].y);
else
sprintf(atcmd_output, msg_txt(171), i); // %d - void
- clif_displaymessage(sd->fd, atcmd_output);
+ clif->displaymessage(sd->fd, atcmd_output);
}
return 0;
}
@@ -2241,7 +2241,7 @@ ACMD_FUNC(memo)
if( position < 0 || position >= MAX_MEMOPOINTS )
{
sprintf(atcmd_output, msg_txt(1008), 0, MAX_MEMOPOINTS-1); // Please enter a valid position (usage: @memo <memo_position:%d-%d>).
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
@@ -2268,7 +2268,7 @@ ACMD_FUNC(gat)
map_getcell(sd->bl.m, sd->bl.x + 1, sd->bl.y + y, CELL_GETTYPE),
map_getcell(sd->bl.m, sd->bl.x + 2, sd->bl.y + y, CELL_GETTYPE));
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return 0;
@@ -2283,13 +2283,13 @@ ACMD_FUNC(displaystatus)
nullpo_retr(-1, sd);
if (!message || !*message || (i = sscanf(message, "%d %d %d %d %d %d", &type, &flag, &tick, &val1, &val2, &val3)) < 1) {
- clif_displaymessage(fd, msg_txt(1009)); // Please enter a status type/flag (usage: @displaystatus <status type> <flag> <tick> {<val1> {<val2> {<val3>}}}).
+ clif->displaymessage(fd, msg_txt(1009)); // Please enter a status type/flag (usage: @displaystatus <status type> <flag> <tick> {<val1> {<val2> {<val3>}}}).
return -1;
}
if (i < 2) flag = 1;
if (i < 3) tick = 0;
- clif_status_change(&sd->bl, type, flag, tick, val1, val2, val3);
+ clif->status_change(&sd->bl, type, flag, tick, val1, val2, val3);
return 0;
}
@@ -2303,7 +2303,7 @@ ACMD_FUNC(statuspoint)
unsigned int new_status_point;
if (!message || !*message || (point = atoi(message)) == 0) {
- clif_displaymessage(fd, msg_txt(1010)); // Please enter a number (usage: @stpoint <number of points>).
+ clif->displaymessage(fd, msg_txt(1010)); // Please enter a number (usage: @stpoint <number of points>).
return -1;
}
@@ -2329,13 +2329,13 @@ ACMD_FUNC(statuspoint)
if (new_status_point != sd->status.status_point) {
sd->status.status_point = new_status_point;
- clif_updatestatus(sd, SP_STATUSPOINT);
- clif_displaymessage(fd, msg_txt(174)); // Number of status points changed.
+ clif->updatestatus(sd, SP_STATUSPOINT);
+ clif->displaymessage(fd, msg_txt(174)); // Number of status points changed.
} else {
if (point < 0)
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ clif->displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
else
- clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
+ clif->displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
return -1;
}
@@ -2352,7 +2352,7 @@ ACMD_FUNC(skillpoint)
nullpo_retr(-1, sd);
if (!message || !*message || (point = atoi(message)) == 0) {
- clif_displaymessage(fd, msg_txt(1011)); // Please enter a number (usage: @skpoint <number of points>).
+ clif->displaymessage(fd, msg_txt(1011)); // Please enter a number (usage: @skpoint <number of points>).
return -1;
}
@@ -2378,13 +2378,13 @@ ACMD_FUNC(skillpoint)
if (new_skill_point != sd->status.skill_point) {
sd->status.skill_point = new_skill_point;
- clif_updatestatus(sd, SP_SKILLPOINT);
- clif_displaymessage(fd, msg_txt(175)); // Number of skill points changed.
+ clif->updatestatus(sd, SP_SKILLPOINT);
+ clif->displaymessage(fd, msg_txt(175)); // Number of skill points changed.
} else {
if (point < 0)
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ clif->displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
else
- clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
+ clif->displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
return -1;
}
@@ -2400,20 +2400,20 @@ ACMD_FUNC(zeny)
nullpo_retr(-1, sd);
if (!message || !*message || (zeny = atoi(message)) == 0) {
- clif_displaymessage(fd, msg_txt(1012)); // Please enter an amount (usage: @zeny <amount>).
+ clif->displaymessage(fd, msg_txt(1012)); // Please enter an amount (usage: @zeny <amount>).
return -1;
}
if(zeny > 0){
if((ret=pc_getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL)) == 1)
- clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
+ clif->displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
}
else {
if( sd->status.zeny < -zeny ) zeny = -sd->status.zeny;
if((ret=pc_payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL)) == 1)
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ clif->displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
}
- if(!ret) clif_displaymessage(fd, msg_txt(176)); //ret=0 mean cmd success
+ if(!ret) clif->displaymessage(fd, msg_txt(176)); //ret=0 mean cmd success
return 0;
}
@@ -2431,14 +2431,14 @@ ACMD_FUNC(param)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0) {
- clif_displaymessage(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>).
+ clif->displaymessage(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>).
return -1;
}
ARR_FIND( 0, ARRAYLENGTH(param), i, strcmpi(command+1, param[i]) == 0 );
if( i == ARRAYLENGTH(param) || i > MAX_STATUS_TYPE) { // normally impossible...
- clif_displaymessage(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>).
+ clif->displaymessage(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>).
return -1;
}
@@ -2464,15 +2464,15 @@ ACMD_FUNC(param)
if (new_value != *status[i]) {
*status[i] = new_value;
- clif_updatestatus(sd, SP_STR + i);
- clif_updatestatus(sd, SP_USTR + i);
+ clif->updatestatus(sd, SP_STR + i);
+ clif->updatestatus(sd, SP_USTR + i);
status_calc_pc(sd, 0);
- clif_displaymessage(fd, msg_txt(42)); // Stat changed.
+ clif->displaymessage(fd, msg_txt(42)); // Stat changed.
} else {
if (value < 0)
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ clif->displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
else
- clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
+ clif->displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
return -1;
}
@@ -2518,20 +2518,20 @@ ACMD_FUNC(stat_all)
if (new_value != (int)*status[index]) {
*status[index] = new_value;
- clif_updatestatus(sd, SP_STR + index);
- clif_updatestatus(sd, SP_USTR + index);
+ clif->updatestatus(sd, SP_STR + index);
+ clif->updatestatus(sd, SP_USTR + index);
count++;
}
}
if (count > 0) { // if at least 1 stat modified
status_calc_pc(sd, 0);
- clif_displaymessage(fd, msg_txt(84)); // All stats changed!
+ clif->displaymessage(fd, msg_txt(84)); // All stats changed!
} else {
if (value < 0)
- clif_displaymessage(fd, msg_txt(177)); // You cannot decrease that stat anymore.
+ clif->displaymessage(fd, msg_txt(177)); // You cannot decrease that stat anymore.
else
- clif_displaymessage(fd, msg_txt(178)); // You cannot increase that stat anymore.
+ clif->displaymessage(fd, msg_txt(178)); // You cannot increase that stat anymore.
return -1;
}
@@ -2549,16 +2549,16 @@ ACMD_FUNC(guildlevelup)
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d", &level) < 1 || level == 0) {
- clif_displaymessage(fd, msg_txt(1014)); // Please enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>).
+ clif->displaymessage(fd, msg_txt(1014)); // Please enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>).
return -1;
}
if (sd->status.guild_id <= 0 || (guild_info = guild_search(sd->status.guild_id)) == NULL) {
- clif_displaymessage(fd, msg_txt(43)); // You're not in a guild.
+ clif->displaymessage(fd, msg_txt(43)); // You're not in a guild.
return -1;
}
//if (strcmp(sd->status.name, guild_info->master) != 0) {
- // clif_displaymessage(fd, msg_txt(44)); // You're not the master of your guild.
+ // clif->displaymessage(fd, msg_txt(44)); // You're not the master of your guild.
// return -1;
//}
@@ -2570,9 +2570,9 @@ ACMD_FUNC(guildlevelup)
if (added_level != 0) {
intif_guild_change_basicinfo(guild_info->guild_id, GBI_GUILDLV, &added_level, sizeof(added_level));
- clif_displaymessage(fd, msg_txt(179)); // Guild level changed.
+ clif->displaymessage(fd, msg_txt(179)); // Guild level changed.
} else {
- clif_displaymessage(fd, msg_txt(45)); // Guild level change failed.
+ clif->displaymessage(fd, msg_txt(45)); // Guild level change failed.
return -1;
}
@@ -2589,7 +2589,7 @@ ACMD_FUNC(makeegg)
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1015)); // Please enter a monster/egg name/ID (usage: @makeegg <pet>).
+ clif->displaymessage(fd, msg_txt(1015)); // Please enter a monster/egg name/ID (usage: @makeegg <pet>).
return -1;
}
@@ -2612,7 +2612,7 @@ ACMD_FUNC(makeegg)
(short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate,
100, 0, 1, pet_db[pet_id].jname);
} else {
- clif_displaymessage(fd, msg_txt(180)); // The monster/egg name/id doesn't exist.
+ clif->displaymessage(fd, msg_txt(180)); // The monster/egg name/id doesn't exist.
return -1;
}
@@ -2626,9 +2626,9 @@ ACMD_FUNC(hatch)
{
nullpo_retr(-1, sd);
if (sd->status.pet_id <= 0)
- clif_sendegg(sd);
+ clif->sendegg(sd);
else {
- clif_displaymessage(fd, msg_txt(181)); // You already have a pet.
+ clif->displaymessage(fd, msg_txt(181)); // You already have a pet.
return -1;
}
@@ -2645,30 +2645,30 @@ ACMD_FUNC(petfriendly)
nullpo_retr(-1, sd);
if (!message || !*message || (friendly = atoi(message)) < 0) {
- clif_displaymessage(fd, msg_txt(1016)); // Please enter a valid value (usage: @petfriendly <0-1000>).
+ clif->displaymessage(fd, msg_txt(1016)); // Please enter a valid value (usage: @petfriendly <0-1000>).
return -1;
}
pd = sd->pd;
if (!pd) {
- clif_displaymessage(fd, msg_txt(184)); // Sorry, but you have no pet.
+ clif->displaymessage(fd, msg_txt(184)); // Sorry, but you have no pet.
return -1;
}
if (friendly < 0 || friendly > 1000)
{
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif->displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
}
if (friendly == pd->pet.intimate) {
- clif_displaymessage(fd, msg_txt(183)); // Pet intimacy is already at maximum.
+ clif->displaymessage(fd, msg_txt(183)); // Pet intimacy is already at maximum.
return -1;
}
pet_set_intimate(pd, friendly);
- clif_send_petstatus(sd);
- clif_displaymessage(fd, msg_txt(182)); // Pet intimacy changed.
+ clif->send_petstatus(sd);
+ clif->displaymessage(fd, msg_txt(182)); // Pet intimacy changed.
return 0;
}
@@ -2682,27 +2682,27 @@ ACMD_FUNC(pethungry)
nullpo_retr(-1, sd);
if (!message || !*message || (hungry = atoi(message)) < 0) {
- clif_displaymessage(fd, msg_txt(1017)); // Please enter a valid number (usage: @pethungry <0-100>).
+ clif->displaymessage(fd, msg_txt(1017)); // Please enter a valid number (usage: @pethungry <0-100>).
return -1;
}
pd = sd->pd;
if (!sd->status.pet_id || !pd) {
- clif_displaymessage(fd, msg_txt(184)); // Sorry, but you have no pet.
+ clif->displaymessage(fd, msg_txt(184)); // Sorry, but you have no pet.
return -1;
}
if (hungry < 0 || hungry > 100) {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif->displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
}
if (hungry == pd->pet.hungry) {
- clif_displaymessage(fd, msg_txt(186)); // Pet hunger is already at maximum.
+ clif->displaymessage(fd, msg_txt(186)); // Pet hunger is already at maximum.
return -1;
}
pd->pet.hungry = hungry;
- clif_send_petstatus(sd);
- clif_displaymessage(fd, msg_txt(185)); // Pet hunger changed.
+ clif->send_petstatus(sd);
+ clif->displaymessage(fd, msg_txt(185)); // Pet hunger changed.
return 0;
}
@@ -2715,19 +2715,19 @@ ACMD_FUNC(petrename)
struct pet_data *pd;
nullpo_retr(-1, sd);
if (!sd->status.pet_id || !sd->pd) {
- clif_displaymessage(fd, msg_txt(184)); // Sorry, but you have no pet.
+ clif->displaymessage(fd, msg_txt(184)); // Sorry, but you have no pet.
return -1;
}
pd = sd->pd;
if (!pd->pet.rename_flag) {
- clif_displaymessage(fd, msg_txt(188)); // You can already rename your pet.
+ clif->displaymessage(fd, msg_txt(188)); // You can already rename your pet.
return -1;
}
pd->pet.rename_flag = 0;
intif_save_petdata(sd->status.account_id, &pd->pet);
- clif_send_petstatus(sd);
- clif_displaymessage(fd, msg_txt(187)); // You can now rename your pet.
+ clif->send_petstatus(sd);
+ clif->displaymessage(fd, msg_txt(187)); // You can now rename your pet.
return 0;
}
@@ -2741,28 +2741,28 @@ ACMD_FUNC(recall) {
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1018)); // Please enter a player name (usage: @recall <char name/ID>).
+ clif->displaymessage(fd, msg_txt(1018)); // Please enter a player name (usage: @recall <char name/ID>).
return -1;
}
if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif_displaymessage(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player.
+ clif->displaymessage(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player.
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1019)); // You are not authorized to warp someone to this map.
+ clif->displaymessage(fd, msg_txt(1019)); // You are not authorized to warp someone to this map.
return -1;
}
if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1020)); // You are not authorized to warp this player from their map.
+ clif->displaymessage(fd, msg_txt(1020)); // You are not authorized to warp this player from their map.
return -1;
}
if (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y) {
@@ -2770,7 +2770,7 @@ ACMD_FUNC(recall) {
}
pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
sprintf(atcmd_output, msg_txt(46), pl_sd->status.name); // %s recalled!
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -2786,12 +2786,12 @@ ACMD_FUNC(char_block)
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1021)); // Please enter a player name (usage: @charblock/@block <char name>).
+ clif->displaymessage(fd, msg_txt(1021)); // Please enter a player name (usage: @charblock/@block <char name>).
return -1;
}
chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
- clif_displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
+ clif->displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
return 0;
}
@@ -2823,7 +2823,7 @@ ACMD_FUNC(char_ban)
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%255s %23[^\n]", atcmd_output, atcmd_player_name) < 2) {
- clif_displaymessage(fd, msg_txt(1022)); // Please enter ban time and a player name (usage: @charban/@ban/@banish/@charbanish <time> <char name>).
+ clif->displaymessage(fd, msg_txt(1022)); // Please enter ban time and a player name (usage: @charban/@ban/@banish/@charbanish <time> <char name>).
return -1;
}
@@ -2867,7 +2867,7 @@ ACMD_FUNC(char_ban)
}
}
if (year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0 && second == 0) {
- clif_displaymessage(fd, msg_txt(85)); // Invalid time for ban command.
+ clif->displaymessage(fd, msg_txt(85)); // Invalid time for ban command.
return -1;
}
/**
@@ -2883,12 +2883,12 @@ ACMD_FUNC(char_ban)
tmtime->tm_sec = tmtime->tm_sec + second;
timestamp = mktime(tmtime);
if( timestamp <= time(NULL) && !pc_can_use_command(sd, "unban", COMMAND_ATCOMMAND) ) {
- clif_displaymessage(fd,msg_txt(1023)); // You are not allowed to reduce the length of a ban.
+ clif->displaymessage(fd,msg_txt(1023)); // You are not allowed to reduce the length of a ban.
return -1;
}
chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 2, year, month, day, hour, minute, second); // type: 2 - ban
- clif_displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
+ clif->displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
return 0;
}
@@ -2903,13 +2903,13 @@ ACMD_FUNC(char_unblock)
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1024)); // Please enter a player name (usage: @charunblock <char name>).
+ clif->displaymessage(fd, msg_txt(1024)); // Please enter a player name (usage: @charunblock <char name>).
return -1;
}
// send answer to login server via char-server
chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 3, 0, 0, 0, 0, 0, 0); // type: 3 - unblock
- clif_displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
+ clif->displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
return 0;
}
@@ -2924,13 +2924,13 @@ ACMD_FUNC(char_unban)
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1025)); // Please enter a player name (usage: @charunban <char name>).
+ clif->displaymessage(fd, msg_txt(1025)); // Please enter a player name (usage: @charunban <char name>).
return -1;
}
// send answer to login server via char-server
chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 4, 0, 0, 0, 0, 0, 0); // type: 4 - unban
- clif_displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
+ clif->displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
return 0;
}
@@ -2945,7 +2945,7 @@ ACMD_FUNC(night)
if (night_flag != 1) {
map_night_timer(night_timer_tid, 0, 0, 1);
} else {
- clif_displaymessage(fd, msg_txt(89)); // Night mode is already enabled.
+ clif->displaymessage(fd, msg_txt(89)); // Night mode is already enabled.
return -1;
}
@@ -2962,7 +2962,7 @@ ACMD_FUNC(day)
if (night_flag != 0) {
map_day_timer(day_timer_tid, 0, 0, 1);
} else {
- clif_displaymessage(fd, msg_txt(90)); // Day mode is already enabled.
+ clif->displaymessage(fd, msg_txt(90)); // Day mode is already enabled.
return -1;
}
@@ -2985,13 +2985,13 @@ ACMD_FUNC(doom)
if (pl_sd->fd != fd && pc_get_group_level(sd) >= pc_get_group_level(pl_sd))
{
status_kill(&pl_sd->bl);
- clif_specialeffect(&pl_sd->bl,450,AREA);
- clif_displaymessage(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement.
+ clif->specialeffect(&pl_sd->bl,450,AREA);
+ clif->displaymessage(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement.
}
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(62)); // Judgement was made.
+ clif->displaymessage(fd, msg_txt(62)); // Judgement was made.
return 0;
}
@@ -3012,13 +3012,13 @@ ACMD_FUNC(doommap)
if (pl_sd->fd != fd && sd->bl.m == pl_sd->bl.m && pc_get_group_level(sd) >= pc_get_group_level(pl_sd))
{
status_kill(&pl_sd->bl);
- clif_specialeffect(&pl_sd->bl,450,AREA);
- clif_displaymessage(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement.
+ clif->specialeffect(&pl_sd->bl,450,AREA);
+ clif->displaymessage(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement.
}
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(62)); // Judgement was made.
+ clif->displaymessage(fd, msg_txt(62)); // Judgement was made.
return 0;
}
@@ -3030,8 +3030,8 @@ static void atcommand_raise_sub(struct map_session_data* sd) {
status_revive(&sd->bl, 100, 100);
- clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
- clif_displaymessage(sd->fd, msg_txt(63)); // Mercy has been shown.
+ clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
+ clif->displaymessage(sd->fd, msg_txt(63)); // Mercy has been shown.
}
/*==========================================
@@ -3050,7 +3050,7 @@ ACMD_FUNC(raise)
atcommand_raise_sub(pl_sd);
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(64)); // Mercy has been granted.
+ clif->displaymessage(fd, msg_txt(64)); // Mercy has been granted.
return 0;
}
@@ -3071,7 +3071,7 @@ ACMD_FUNC(raisemap)
atcommand_raise_sub(pl_sd);
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(64)); // Mercy has been granted.
+ clif->displaymessage(fd, msg_txt(64)); // Mercy has been granted.
return 0;
}
@@ -3087,23 +3087,23 @@ ACMD_FUNC(kick)
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1026)); // Please enter a player name (usage: @kick <char name/ID>).
+ clif->displaymessage(fd, msg_txt(1026)); // Please enter a player name (usage: @kick <char name/ID>).
return -1;
}
if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
- clif_GM_kick(sd, pl_sd);
+ clif->GM_kick(sd, pl_sd);
return 0;
}
@@ -3122,12 +3122,12 @@ ACMD_FUNC(kickall)
{
if (pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { // you can kick only lower or same gm level
if (sd->status.account_id != pl_sd->status.account_id)
- clif_GM_kick(NULL, pl_sd);
+ clif->GM_kick(NULL, pl_sd);
}
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(195)); // All players have been kicked!
+ clif->displaymessage(fd, msg_txt(195)); // All players have been kicked!
return 0;
}
@@ -3140,8 +3140,8 @@ ACMD_FUNC(allskill)
nullpo_retr(-1, sd);
pc_allskillup(sd); // all skills
sd->status.skill_point = 0; // 0 skill points
- clif_updatestatus(sd, SP_SKILLPOINT); // update
- clif_displaymessage(fd, msg_txt(76)); // All skills have been added to your skill tree.
+ clif->updatestatus(sd, SP_SKILLPOINT); // update
+ clif->displaymessage(fd, msg_txt(76)); // All skills have been added to your skill tree.
return 0;
}
@@ -3162,30 +3162,30 @@ ACMD_FUNC(questskill)
text = atcommand_help_string( command );
// send the error message as always
- clif_displaymessage(fd, msg_txt(1027)); // Please enter a quest skill number.
+ clif->displaymessage(fd, msg_txt(1027)); // Please enter a quest skill number.
if( text )
{// send the skill ID list associated with this command
- clif_displaymessage( fd, text );
+ clif->displaymessage( fd, text );
}
return -1;
}
if (skill_id >= MAX_SKILL_DB) {
- clif_displaymessage(fd, msg_txt(198)); // This skill number doesn't exist.
+ clif->displaymessage(fd, msg_txt(198)); // This skill number doesn't exist.
return -1;
}
if (!(skill->get_inf2(skill_id) & INF2_QUEST_SKILL)) {
- clif_displaymessage(fd, msg_txt(197)); // This skill number doesn't exist or isn't a quest skill.
+ clif->displaymessage(fd, msg_txt(197)); // This skill number doesn't exist or isn't a quest skill.
return -1;
}
if (pc_checkskill(sd, skill_id) > 0) {
- clif_displaymessage(fd, msg_txt(196)); // You already have this quest skill.
+ clif->displaymessage(fd, msg_txt(196)); // You already have this quest skill.
return -1;
}
pc_skill(sd, skill_id, 1, 0);
- clif_displaymessage(fd, msg_txt(70)); // You have learned the skill.
+ clif->displaymessage(fd, msg_txt(70)); // You have learned the skill.
return 0;
}
@@ -3206,32 +3206,32 @@ ACMD_FUNC(lostskill)
text = atcommand_help_string( command );
// send the error message as always
- clif_displaymessage(fd, msg_txt(1027)); // Please enter a quest skill number.
+ clif->displaymessage(fd, msg_txt(1027)); // Please enter a quest skill number.
if( text )
{// send the skill ID list associated with this command
- clif_displaymessage( fd, text );
+ clif->displaymessage( fd, text );
}
return -1;
}
if (skill_id >= MAX_SKILL) {
- clif_displaymessage(fd, msg_txt(198)); // This skill number doesn't exist.
+ clif->displaymessage(fd, msg_txt(198)); // This skill number doesn't exist.
return -1;
}
if (!(skill->get_inf2(skill_id) & INF2_QUEST_SKILL)) {
- clif_displaymessage(fd, msg_txt(197)); // This skill number doesn't exist or isn't a quest skill.
+ clif->displaymessage(fd, msg_txt(197)); // This skill number doesn't exist or isn't a quest skill.
return -1;
}
if (pc_checkskill(sd, skill_id) == 0) {
- clif_displaymessage(fd, msg_txt(201)); // You don't have this quest skill.
+ clif->displaymessage(fd, msg_txt(201)); // You don't have this quest skill.
return -1;
}
sd->status.skill[skill_id].lv = 0;
sd->status.skill[skill_id].flag = 0;
- clif_deleteskill(sd,skill_id);
- clif_displaymessage(fd, msg_txt(71)); // You have forgotten the skill.
+ clif->deleteskill(sd,skill_id);
+ clif->displaymessage(fd, msg_txt(71)); // You have forgotten the skill.
return 0;
}
@@ -3251,14 +3251,14 @@ ACMD_FUNC(spiritball)
{
char msg[CHAT_SIZE_MAX];
safesnprintf(msg, sizeof(msg), msg_txt(1028), max_spiritballs); // Please enter a party name (usage: @party <party_name>).
- clif_displaymessage(fd, msg);
+ clif->displaymessage(fd, msg);
return -1;
}
if( sd->spiritball > 0 )
pc_delspiritball(sd, sd->spiritball, 1);
sd->spiritball = number;
- clif_spiritball(&sd->bl);
+ clif->spiritball(&sd->bl);
// no message, player can look the difference
return 0;
@@ -3275,7 +3275,7 @@ ACMD_FUNC(party)
memset(party, '\0', sizeof(party));
if (!message || !*message || sscanf(message, "%23[^\n]", party) < 1) {
- clif_displaymessage(fd, msg_txt(1029)); // Please enter a party name (usage: @party <party_name>).
+ clif->displaymessage(fd, msg_txt(1029)); // Please enter a party name (usage: @party <party_name>).
return -1;
}
@@ -3296,7 +3296,7 @@ ACMD_FUNC(guild)
memset(guild, '\0', sizeof(guild));
if (!message || !*message || sscanf(message, "%23[^\n]", guild) < 1) {
- clif_displaymessage(fd, msg_txt(1030)); // Please enter a guild name (usage: @guild <guild_name>).
+ clif->displaymessage(fd, msg_txt(1030)); // Please enter a guild name (usage: @guild <guild_name>).
return -1;
}
@@ -3325,15 +3325,15 @@ ACMD_FUNC(breakguild)
return -1; // Something went wrong
}
} else { // Not guild master
- clif_displaymessage(fd, msg_txt(1181)); // You need to be a Guild Master to use this command.
+ clif->displaymessage(fd, msg_txt(1181)); // You need to be a Guild Master to use this command.
return -1;
}
} else { // Guild was not found. HOW?
- clif_displaymessage(fd, msg_txt(252)); // You are not in a guild.
+ clif->displaymessage(fd, msg_txt(252)); // You are not in a guild.
return -1;
}
} else { // Player does not have a guild
- clif_displaymessage(fd, msg_txt(252)); // You are not in a guild.
+ clif->displaymessage(fd, msg_txt(252)); // You are not in a guild.
return -1;
}
return 0;
@@ -3346,13 +3346,13 @@ ACMD_FUNC(agitstart)
{
nullpo_retr(-1, sd);
if (agit_flag == 1) {
- clif_displaymessage(fd, msg_txt(73)); // War of Emperium is currently in progress.
+ clif->displaymessage(fd, msg_txt(73)); // War of Emperium is currently in progress.
return -1;
}
agit_flag = 1;
guild_agit_start();
- clif_displaymessage(fd, msg_txt(72)); // War of Emperium has been initiated.
+ clif->displaymessage(fd, msg_txt(72)); // War of Emperium has been initiated.
return 0;
}
@@ -3364,13 +3364,13 @@ ACMD_FUNC(agitstart2)
{
nullpo_retr(-1, sd);
if (agit2_flag == 1) {
- clif_displaymessage(fd, msg_txt(404)); // "War of Emperium SE is currently in progress."
+ clif->displaymessage(fd, msg_txt(404)); // "War of Emperium SE is currently in progress."
return -1;
}
agit2_flag = 1;
guild_agit2_start();
- clif_displaymessage(fd, msg_txt(403)); // "War of Emperium SE has been initiated."
+ clif->displaymessage(fd, msg_txt(403)); // "War of Emperium SE has been initiated."
return 0;
}
@@ -3382,13 +3382,13 @@ ACMD_FUNC(agitend)
{
nullpo_retr(-1, sd);
if (agit_flag == 0) {
- clif_displaymessage(fd, msg_txt(75)); // War of Emperium is currently not in progress.
+ clif->displaymessage(fd, msg_txt(75)); // War of Emperium is currently not in progress.
return -1;
}
agit_flag = 0;
guild_agit_end();
- clif_displaymessage(fd, msg_txt(74)); // War of Emperium has been ended.
+ clif->displaymessage(fd, msg_txt(74)); // War of Emperium has been ended.
return 0;
}
@@ -3400,13 +3400,13 @@ ACMD_FUNC(agitend2)
{
nullpo_retr(-1, sd);
if (agit2_flag == 0) {
- clif_displaymessage(fd, msg_txt(406)); // "War of Emperium SE is currently not in progress."
+ clif->displaymessage(fd, msg_txt(406)); // "War of Emperium SE is currently not in progress."
return -1;
}
agit2_flag = 0;
guild_agit2_end();
- clif_displaymessage(fd, msg_txt(405)); // "War of Emperium SE has been ended."
+ clif->displaymessage(fd, msg_txt(405)); // "War of Emperium SE has been ended."
return 0;
}
@@ -3436,24 +3436,24 @@ ACMD_FUNC(idsearch)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%99s", item_name) < 0) {
- clif_displaymessage(fd, msg_txt(1031)); // Please enter part of an item name (usage: @idsearch <part_of_item_name>).
+ clif->displaymessage(fd, msg_txt(1031)); // Please enter part of an item name (usage: @idsearch <part_of_item_name>).
return -1;
}
sprintf(atcmd_output, msg_txt(77), item_name); // The reference result of '%s' (name: id):
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
match = itemdb_searchname_array(item_array, MAX_SEARCH, item_name);
if (match > MAX_SEARCH) {
sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, match);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
match = MAX_SEARCH;
}
for(i = 0; i < match; i++) {
sprintf(atcmd_output, msg_txt(78), item_array[i]->jname, item_array[i]->nameid); // %s: %d
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
sprintf(atcmd_output, msg_txt(79), match); // It is %d affair above.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -3471,7 +3471,7 @@ ACMD_FUNC(recallall)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
+ clif->displaymessage(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
return -1;
}
@@ -3496,10 +3496,10 @@ ACMD_FUNC(recallall)
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(92)); // All characters recalled!
+ clif->displaymessage(fd, msg_txt(92)); // All characters recalled!
if (count) {
sprintf(atcmd_output, msg_txt(1033), count); // Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return 0;
@@ -3521,19 +3521,19 @@ ACMD_FUNC(guildrecall)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%23[^\n]", guild_name) < 1) {
- clif_displaymessage(fd, msg_txt(1034)); // Please enter a guild name/ID (usage: @guildrecall <guild_name/ID>).
+ clif->displaymessage(fd, msg_txt(1034)); // Please enter a guild name/ID (usage: @guildrecall <guild_name/ID>).
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
+ clif->displaymessage(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
return -1;
}
if ((g = guild_searchname(guild_name)) == NULL && // name first to avoid error when name begin with a number
(g = guild_search(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
+ clif->displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
return -1;
}
@@ -3555,10 +3555,10 @@ ACMD_FUNC(guildrecall)
mapit_free(iter);
sprintf(atcmd_output, msg_txt(93), g->name); // All online characters of the %s guild have been recalled to your position.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
if (count) {
sprintf(atcmd_output, msg_txt(1033), count); // Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return 0;
@@ -3580,19 +3580,19 @@ ACMD_FUNC(partyrecall)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%23[^\n]", party_name) < 1) {
- clif_displaymessage(fd, msg_txt(1035)); // Please enter a party name/ID (usage: @partyrecall <party_name/ID>).
+ clif->displaymessage(fd, msg_txt(1035)); // Please enter a party name/ID (usage: @partyrecall <party_name/ID>).
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
+ clif->displaymessage(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
return -1;
}
if ((p = party_searchname(party_name)) == NULL && // name first to avoid error when name begin with a number
(p = party_search(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(96)); // Incorrect name or ID, or no one from the party is online.
+ clif->displaymessage(fd, msg_txt(96)); // Incorrect name or ID, or no one from the party is online.
return -1;
}
@@ -3614,10 +3614,10 @@ ACMD_FUNC(partyrecall)
mapit_free(iter);
sprintf(atcmd_output, msg_txt(95), p->party.name); // All online characters of the %s party have been recalled to your position.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
if (count) {
sprintf(atcmd_output, msg_txt(1033), count); // Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return 0;
@@ -3630,7 +3630,7 @@ ACMD_FUNC(reloaditemdb)
{
nullpo_retr(-1, sd);
itemdb_reload();
- clif_displaymessage(fd, msg_txt(97)); // Item database has been reloaded.
+ clif->displaymessage(fd, msg_txt(97)); // Item database has been reloaded.
return 0;
}
@@ -3647,7 +3647,7 @@ ACMD_FUNC(reloadmobdb)
read_mercenarydb();
read_mercenary_skilldb();
reload_elementaldb();
- clif_displaymessage(fd, msg_txt(98)); // Monster database has been reloaded.
+ clif->displaymessage(fd, msg_txt(98)); // Monster database has been reloaded.
return 0;
}
@@ -3662,7 +3662,7 @@ ACMD_FUNC(reloadskilldb)
merc_skill_reload();
reload_elemental_skilldb();
read_mercenary_skilldb();
- clif_displaymessage(fd, msg_txt(99)); // Skill database has been reloaded.
+ clif->displaymessage(fd, msg_txt(99)); // Skill database has been reloaded.
return 0;
}
@@ -3675,14 +3675,14 @@ ACMD_FUNC(reloadatcommand) {
config_t run_test;
if (conf_read_file(&run_test, "conf/groups.conf")) {
- clif_displaymessage(fd, msg_txt(1036)); // Error reading groups.conf, reload failed.
+ clif->displaymessage(fd, msg_txt(1036)); // Error reading groups.conf, reload failed.
return -1;
}
config_destroy(&run_test);
if (conf_read_file(&run_test, ATCOMMAND_CONF_FILENAME)) {
- clif_displaymessage(fd, msg_txt(1037)); // Error reading atcommand.conf, reload failed.
+ clif->displaymessage(fd, msg_txt(1037)); // Error reading atcommand.conf, reload failed.
return -1;
}
@@ -3690,7 +3690,7 @@ ACMD_FUNC(reloadatcommand) {
atcommand_doload();
pc_groups_reload();
- clif_displaymessage(fd, msg_txt(254));
+ clif->displaymessage(fd, msg_txt(254));
return 0;
}
/*==========================================
@@ -3738,7 +3738,7 @@ ACMD_FUNC(reloadbattleconf)
mob_reload(); //Needed as well so rate changes take effect.
chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common);
}
- clif_displaymessage(fd, msg_txt(255));
+ clif->displaymessage(fd, msg_txt(255));
return 0;
}
/*==========================================
@@ -3747,7 +3747,7 @@ ACMD_FUNC(reloadbattleconf)
ACMD_FUNC(reloadstatusdb)
{
status_readdb();
- clif_displaymessage(fd, msg_txt(256));
+ clif->displaymessage(fd, msg_txt(256));
return 0;
}
/*==========================================
@@ -3756,7 +3756,7 @@ ACMD_FUNC(reloadstatusdb)
ACMD_FUNC(reloadpcdb)
{
pc_readdb();
- clif_displaymessage(fd, msg_txt(257));
+ clif->displaymessage(fd, msg_txt(257));
return 0;
}
@@ -3766,7 +3766,7 @@ ACMD_FUNC(reloadpcdb)
ACMD_FUNC(reloadmotd)
{
pc_read_motd();
- clif_displaymessage(fd, msg_txt(268));
+ clif->displaymessage(fd, msg_txt(268));
return 0;
}
@@ -3784,7 +3784,7 @@ ACMD_FUNC(reloadscript)
script_reload();
npc_reload();
- clif_displaymessage(fd, msg_txt(100)); // Scripts have been reloaded.
+ clif->displaymessage(fd, msg_txt(100)); // Scripts have been reloaded.
return 0;
}
@@ -3817,7 +3817,7 @@ ACMD_FUNC(mapinfo) {
sscanf(message, "%d %23[^\n]", &list, mapname);
if (list < 0 || list > 3) {
- clif_displaymessage(fd, msg_txt(1038)); // Please enter at least one valid list number (usage: @mapinfo <0-3> <map>).
+ clif->displaymessage(fd, msg_txt(1038)); // Please enter at least one valid list number (usage: @mapinfo <0-3> <map>).
return -1;
}
@@ -3829,12 +3829,12 @@ ACMD_FUNC(mapinfo) {
}
if (m_id < 0) {
- clif_displaymessage(fd, msg_txt(1)); // Map not found.
+ clif->displaymessage(fd, msg_txt(1)); // Map not found.
return -1;
}
m_index = mapindex_name2id(mapname); //This one shouldn't fail since the previous seek did not.
- clif_displaymessage(fd, msg_txt(1039)); // ------ Map Info ------
+ clif->displaymessage(fd, msg_txt(1039)); // ------ Map Info ------
// count chats (for initial message)
chat_num = 0;
@@ -3850,18 +3850,18 @@ ACMD_FUNC(mapinfo) {
mapit_free(iter);
sprintf(atcmd_output, msg_txt(1040), mapname, map[m_id].zone->name, map[m_id].users, map[m_id].npc_num, chat_num, vend_num); // Map: %s (Zone:%s) | Players: %d | NPCs: %d | Chats: %d | Vendings: %d
- clif_displaymessage(fd, atcmd_output);
- clif_displaymessage(fd, msg_txt(1041)); // ------ Map Flags ------
+ clif->displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, msg_txt(1041)); // ------ Map Flags ------
if (map[m_id].flag.town)
- clif_displaymessage(fd, msg_txt(1042)); // Town Map
+ clif->displaymessage(fd, msg_txt(1042)); // Town Map
if (battle_config.autotrade_mapflag == map[m_id].flag.autotrade)
- clif_displaymessage(fd, msg_txt(1043)); // Autotrade Enabled
+ clif->displaymessage(fd, msg_txt(1043)); // Autotrade Enabled
else
- clif_displaymessage(fd, msg_txt(1044)); // Autotrade Disabled
+ clif->displaymessage(fd, msg_txt(1044)); // Autotrade Disabled
if (map[m_id].flag.battleground)
- clif_displaymessage(fd, msg_txt(1045)); // Battlegrounds ON
+ clif->displaymessage(fd, msg_txt(1045)); // Battlegrounds ON
strcpy(atcmd_output,msg_txt(1046)); // PvP Flags:
if (map[m_id].flag.pvp)
@@ -3874,7 +3874,7 @@ ACMD_FUNC(mapinfo) {
strcat(atcmd_output, msg_txt(1050)); // NightmareDrop |
if (map[m_id].flag.pvp_nocalcrank)
strcat(atcmd_output, msg_txt(1051)); // NoCalcRank |
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
strcpy(atcmd_output,msg_txt(1052)); // GvG Flags:
if (map[m_id].flag.gvg)
@@ -3885,7 +3885,7 @@ ACMD_FUNC(mapinfo) {
strcat(atcmd_output, msg_txt(1055)); // GvG Castle |
if (map[m_id].flag.gvg_noparty)
strcat(atcmd_output, msg_txt(1056)); // NoParty |
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
strcpy(atcmd_output,msg_txt(1057)); // Teleport Flags:
if (map[m_id].flag.noteleport)
@@ -3902,23 +3902,23 @@ ACMD_FUNC(mapinfo) {
strcat(atcmd_output, msg_txt(1063)); // NoGo |
if (map[m_id].flag.nomemo)
strcat(atcmd_output, msg_txt(1064)); // NoMemo |
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1065), // No Exp Penalty: %s | No Zeny Penalty: %s
(map[m_id].flag.noexppenalty) ? msg_txt(1066) : msg_txt(1067), (map[m_id].flag.nozenypenalty) ? msg_txt(1066) : msg_txt(1067)); // On / Off
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
if (map[m_id].flag.nosave) {
if (!map[m_id].save.map)
- clif_displaymessage(fd, msg_txt(1068)); // No Save (Return to last Save Point)
+ clif->displaymessage(fd, msg_txt(1068)); // No Save (Return to last Save Point)
else if (map[m_id].save.x == -1 || map[m_id].save.y == -1 ) {
sprintf(atcmd_output, msg_txt(1069), mapindex_id2name(map[m_id].save.map)); // No Save, Save Point: %s,Random
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
else {
sprintf(atcmd_output, msg_txt(1070), // No Save, Save Point: %s,%d,%d
mapindex_id2name(map[m_id].save.map),map[m_id].save.x,map[m_id].save.y);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
}
@@ -3939,7 +3939,7 @@ ACMD_FUNC(mapinfo) {
strcat(atcmd_output, msg_txt(1078)); // Leaves |
if (map[m_id].flag.nightenabled)
strcat(atcmd_output, msg_txt(1080)); // Displays Night |
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
strcpy(atcmd_output,msg_txt(1081)); // Other Flags:
if (map[m_id].flag.nobranch)
@@ -3958,7 +3958,7 @@ ACMD_FUNC(mapinfo) {
strcat(atcmd_output, msg_txt(1088)); // AllowKS |
if (map[m_id].flag.reset)
strcat(atcmd_output, msg_txt(1089)); // Reset |
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
strcpy(atcmd_output,msg_txt(1090)); // Other Flags:
if (map[m_id].nocommand)
@@ -3975,27 +3975,27 @@ ACMD_FUNC(mapinfo) {
strcat(atcmd_output, msg_txt(1096)); // PartyLock |
if (map[m_id].flag.guildlock)
strcat(atcmd_output, msg_txt(1097)); // GuildLock |
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
switch (list) {
case 0:
// Do nothing. It's list 0, no additional display.
break;
case 1:
- clif_displaymessage(fd, msg_txt(1098)); // ----- Players in Map -----
+ clif->displaymessage(fd, msg_txt(1098)); // ----- Players in Map -----
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
if (pl_sd->mapindex == m_index) {
sprintf(atcmd_output, msg_txt(1099), // Player '%s' (session #%d) | Location: %d,%d
pl_sd->status.name, pl_sd->fd, pl_sd->bl.x, pl_sd->bl.y);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
}
mapit_free(iter);
break;
case 2:
- clif_displaymessage(fd, msg_txt(1100)); // ----- NPCs in Map -----
+ clif->displaymessage(fd, msg_txt(1100)); // ----- NPCs in Map -----
for (i = 0; i < map[m_id].npc_num;)
{
nd = map[m_id].npc[i];
@@ -4017,11 +4017,11 @@ ACMD_FUNC(mapinfo) {
else
sprintf(atcmd_output, msg_txt(1112), // NPC %d: %s::%s | Direction: %s | Sprite: %d | Location: %d %d
++i, nd->name, nd->exname, direction, nd->class_, nd->bl.x, nd->bl.y);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
break;
case 3:
- clif_displaymessage(fd, msg_txt(1113)); // ----- Chats in Map -----
+ clif->displaymessage(fd, msg_txt(1113)); // ----- Chats in Map -----
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
@@ -4031,16 +4031,16 @@ ACMD_FUNC(mapinfo) {
{
sprintf(atcmd_output, msg_txt(1114), // Chat: %s | Player: %s | Location: %d %d
cd->title, pl_sd->status.name, cd->bl.x, cd->bl.y);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1115), // Users: %d/%d | Password: %s | Public: %s
cd->users, cd->limit, cd->pass, (cd->pub) ? msg_txt(1116) : msg_txt(1117)); // Yes / No
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
}
mapit_free(iter);
break;
default: // normally impossible to arrive here
- clif_displaymessage(fd, msg_txt(1118)); // Please enter at least one valid list number (usage: @mapinfo <0-3> <map>).
+ clif->displaymessage(fd, msg_txt(1118)); // Please enter at least one valid list number (usage: @mapinfo <0-3> <map>).
return -1;
break;
}
@@ -4056,36 +4056,36 @@ ACMD_FUNC(mount_peco)
nullpo_retr(-1, sd);
if (sd->disguise) {
- clif_displaymessage(fd, msg_txt(212)); // Cannot mount while in disguise.
+ clif->displaymessage(fd, msg_txt(212)); // Cannot mount while in disguise.
return -1;
}
if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT && pc_checkskill(sd,RK_DRAGONTRAINING) > 0 ) {
if( !(sd->sc.option&OPTION_DRAGON1) ) {
- clif_displaymessage(sd->fd,msg_txt(1119)); // You have mounted your Dragon.
+ clif->displaymessage(sd->fd,msg_txt(1119)); // You have mounted your Dragon.
pc_setoption(sd, sd->sc.option|OPTION_DRAGON1);
} else {
- clif_displaymessage(sd->fd,msg_txt(1120)); // You have released your Dragon.
+ clif->displaymessage(sd->fd,msg_txt(1120)); // You have released your Dragon.
pc_setoption(sd, sd->sc.option&~OPTION_DRAGON1);
}
return 0;
}
if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER && pc_checkskill(sd,RA_WUGRIDER) > 0 ) {
if( !pc_isridingwug(sd) ) {
- clif_displaymessage(sd->fd,msg_txt(1121)); // You have mounted your Warg.
+ clif->displaymessage(sd->fd,msg_txt(1121)); // You have mounted your Warg.
pc_setoption(sd, sd->sc.option|OPTION_WUGRIDER);
} else {
- clif_displaymessage(sd->fd,msg_txt(1122)); // You have released your Warg.
+ clif->displaymessage(sd->fd,msg_txt(1122)); // You have released your Warg.
pc_setoption(sd, sd->sc.option&~OPTION_WUGRIDER);
}
return 0;
}
if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC ) {
if( !pc_ismadogear(sd) ) {
- clif_displaymessage(sd->fd,msg_txt(1123)); // You have mounted your Mado Gear.
+ clif->displaymessage(sd->fd,msg_txt(1123)); // You have mounted your Mado Gear.
pc_setoption(sd, sd->sc.option|OPTION_MADOGEAR);
} else {
- clif_displaymessage(sd->fd,msg_txt(1124)); // You have released your Mado Gear.
+ clif->displaymessage(sd->fd,msg_txt(1124)); // You have released your Mado Gear.
pc_setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
}
return 0;
@@ -4093,15 +4093,15 @@ ACMD_FUNC(mount_peco)
if (!pc_isriding(sd)) { // if actually no peco
if (!pc_checkskill(sd, KN_RIDING)) {
- clif_displaymessage(fd, msg_txt(213)); // You can not mount a Peco Peco with your current job.
+ clif->displaymessage(fd, msg_txt(213)); // You can not mount a Peco Peco with your current job.
return -1;
}
pc_setoption(sd, sd->sc.option | OPTION_RIDING);
- clif_displaymessage(fd, msg_txt(102)); // You have mounted a Peco Peco.
+ clif->displaymessage(fd, msg_txt(102)); // You have mounted a Peco Peco.
} else {//Dismount
pc_setoption(sd, sd->sc.option & ~OPTION_RIDING);
- clif_displaymessage(fd, msg_txt(214)); // You have released your Peco Peco.
+ clif->displaymessage(fd, msg_txt(214)); // You have released your Peco Peco.
}
return 0;
@@ -4121,11 +4121,11 @@ ACMD_FUNC(guildspy)
if (!enable_spy)
{
- clif_displaymessage(fd, msg_txt(1125)); // The mapserver has spy command support disabled.
+ clif->displaymessage(fd, msg_txt(1125)); // The mapserver has spy command support disabled.
return -1;
}
if (!message || !*message || sscanf(message, "%23[^\n]", guild_name) < 1) {
- clif_displaymessage(fd, msg_txt(1126)); // Please enter a guild name/ID (usage: @guildspy <guild_name/ID>).
+ clif->displaymessage(fd, msg_txt(1126)); // Please enter a guild name/ID (usage: @guildspy <guild_name/ID>).
return -1;
}
@@ -4134,14 +4134,14 @@ ACMD_FUNC(guildspy)
if (sd->guildspy == g->guild_id) {
sd->guildspy = 0;
sprintf(atcmd_output, msg_txt(103), g->name); // No longer spying on the %s guild.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
} else {
sd->guildspy = g->guild_id;
sprintf(atcmd_output, msg_txt(104), g->name); // Spying on the %s guild.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
} else {
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the specified guild is online.
+ clif->displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the specified guild is online.
return -1;
}
@@ -4162,12 +4162,12 @@ ACMD_FUNC(partyspy)
if (!enable_spy)
{
- clif_displaymessage(fd, msg_txt(1125)); // The mapserver has spy command support disabled.
+ clif->displaymessage(fd, msg_txt(1125)); // The mapserver has spy command support disabled.
return -1;
}
if (!message || !*message || sscanf(message, "%23[^\n]", party_name) < 1) {
- clif_displaymessage(fd, msg_txt(1127)); // Please enter a party name/ID (usage: @partyspy <party_name/ID>).
+ clif->displaymessage(fd, msg_txt(1127)); // Please enter a party name/ID (usage: @partyspy <party_name/ID>).
return -1;
}
@@ -4176,14 +4176,14 @@ ACMD_FUNC(partyspy)
if (sd->partyspy == p->party.party_id) {
sd->partyspy = 0;
sprintf(atcmd_output, msg_txt(105), p->party.name); // No longer spying on the %s party.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
} else {
sd->partyspy = p->party.party_id;
sprintf(atcmd_output, msg_txt(106), p->party.name); // Spying on the %s party.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
} else {
- clif_displaymessage(fd, msg_txt(96)); // Incorrect name/ID, or no one from the specified party is online.
+ clif->displaymessage(fd, msg_txt(96)); // Incorrect name/ID, or no one from the specified party is online.
return -1;
}
@@ -4202,17 +4202,17 @@ ACMD_FUNC(repairall)
for (i = 0; i < MAX_INVENTORY; i++) {
if (sd->status.inventory[i].nameid && sd->status.inventory[i].attribute == 1) {
sd->status.inventory[i].attribute = 0;
- clif_produceeffect(sd, 0, sd->status.inventory[i].nameid);
+ clif->produce_effect(sd, 0, sd->status.inventory[i].nameid);
count++;
}
}
if (count > 0) {
- clif_misceffect(&sd->bl, 3);
- clif_equiplist(sd);
- clif_displaymessage(fd, msg_txt(107)); // All items have been repaired.
+ clif->misceffect(&sd->bl, 3);
+ clif->equiplist(sd);
+ clif->displaymessage(fd, msg_txt(107)); // All items have been repaired.
} else {
- clif_displaymessage(fd, msg_txt(108)); // No item need to be repaired.
+ clif->displaymessage(fd, msg_txt(108)); // No item need to be repaired.
return -1;
}
@@ -4230,20 +4230,20 @@ ACMD_FUNC(nuke)
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1128)); // Please enter a player name (usage: @nuke <char name>).
+ clif->displaymessage(fd, msg_txt(1128)); // Please enter a player name (usage: @nuke <char name>).
return -1;
}
if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
if (pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { // you can kill only lower or same GM level
skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, gettick(), 0);
- clif_displaymessage(fd, msg_txt(109)); // Player has been nuked!
+ clif->displaymessage(fd, msg_txt(109)); // Player has been nuked!
} else {
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
} else {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
@@ -4263,17 +4263,17 @@ ACMD_FUNC(tonpc)
memset(npcname, 0, sizeof(npcname));
if (!message || !*message || sscanf(message, "%23[^\n]", npcname) < 1) {
- clif_displaymessage(fd, msg_txt(1129)); // Please enter a NPC name (usage: @tonpc <NPC_name>).
+ clif->displaymessage(fd, msg_txt(1129)); // Please enter a NPC name (usage: @tonpc <NPC_name>).
return -1;
}
if ((nd = npc_name2id(npcname)) != NULL) {
if (pc_setpos(sd, map_id2index(nd->bl.m), nd->bl.x, nd->bl.y, CLR_TELEPORT) == 0)
- clif_displaymessage(fd, msg_txt(0)); // Warped.
+ clif->displaymessage(fd, msg_txt(0)); // Warped.
else
return -1;
} else {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif->displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
return -1;
}
@@ -4291,15 +4291,15 @@ ACMD_FUNC(shownpc)
memset(NPCname, '\0', sizeof(NPCname));
if (!message || !*message || sscanf(message, "%23[^\n]", NPCname) < 1) {
- clif_displaymessage(fd, msg_txt(1130)); // Please enter a NPC name (usage: @enablenpc <NPC_name>).
+ clif->displaymessage(fd, msg_txt(1130)); // Please enter a NPC name (usage: @enablenpc <NPC_name>).
return -1;
}
if (npc_name2id(NPCname) != NULL) {
npc_enable(NPCname, 1);
- clif_displaymessage(fd, msg_txt(110)); // Npc Enabled.
+ clif->displaymessage(fd, msg_txt(110)); // Npc Enabled.
} else {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif->displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
return -1;
}
@@ -4317,17 +4317,17 @@ ACMD_FUNC(hidenpc)
memset(NPCname, '\0', sizeof(NPCname));
if (!message || !*message || sscanf(message, "%23[^\n]", NPCname) < 1) {
- clif_displaymessage(fd, msg_txt(1131)); // Please enter a NPC name (usage: @hidenpc <NPC_name>).
+ clif->displaymessage(fd, msg_txt(1131)); // Please enter a NPC name (usage: @hidenpc <NPC_name>).
return -1;
}
if (npc_name2id(NPCname) == NULL) {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif->displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
return -1;
}
npc_enable(NPCname, 0);
- clif_displaymessage(fd, msg_txt(112)); // Npc Disabled.
+ clif->displaymessage(fd, msg_txt(112)); // Npc Disabled.
return 0;
}
@@ -4336,13 +4336,13 @@ ACMD_FUNC(loadnpc)
FILE *fp;
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1132)); // Please enter a script file name (usage: @loadnpc <file name>).
+ clif->displaymessage(fd, msg_txt(1132)); // Please enter a script file name (usage: @loadnpc <file name>).
return -1;
}
// check if script file exists
if ((fp = fopen(message, "r")) == NULL) {
- clif_displaymessage(fd, msg_txt(261));
+ clif->displaymessage(fd, msg_txt(261));
return -1;
}
fclose(fp);
@@ -4352,7 +4352,7 @@ ACMD_FUNC(loadnpc)
npc_parsesrcfile(message,true);
npc_read_event_script();
- clif_displaymessage(fd, msg_txt(262));
+ clif->displaymessage(fd, msg_txt(262));
return 0;
}
@@ -4366,19 +4366,19 @@ ACMD_FUNC(unloadnpc)
memset(NPCname, '\0', sizeof(NPCname));
if (!message || !*message || sscanf(message, "%24[^\n]", NPCname) < 1) {
- clif_displaymessage(fd, msg_txt(1133)); // Please enter a NPC name (usage: @npcoff <NPC_name>).
+ clif->displaymessage(fd, msg_txt(1133)); // Please enter a NPC name (usage: @npcoff <NPC_name>).
return -1;
}
if ((nd = npc_name2id(NPCname)) == NULL) {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif->displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
return -1;
}
npc_unload_duplicates(nd);
npc_unload(nd,true);
npc_read_event_script();
- clif_displaymessage(fd, msg_txt(112)); // Npc Disabled.
+ clif->displaymessage(fd, msg_txt(112)); // Npc Disabled.
return 0;
}
@@ -4440,54 +4440,54 @@ ACMD_FUNC(servertime)
datetime = localtime(&time_server); // convert seconds in structure
// like sprintf, but only for date/time (Sunday, November 02 2003 15:12:52)
strftime(temp, sizeof(temp)-1, msg_txt(230), datetime); // Server time (normal time): %A, %B %d %Y %X.
- clif_displaymessage(fd, temp);
+ clif->displaymessage(fd, temp);
if (battle_config.night_duration == 0 && battle_config.day_duration == 0) {
if (night_flag == 0)
- clif_displaymessage(fd, msg_txt(231)); // Game time: The game is in permanent daylight.
+ clif->displaymessage(fd, msg_txt(231)); // Game time: The game is in permanent daylight.
else
- clif_displaymessage(fd, msg_txt(232)); // Game time: The game is in permanent night.
+ clif->displaymessage(fd, msg_txt(232)); // Game time: The game is in permanent night.
} else if (battle_config.night_duration == 0)
if (night_flag == 1) { // we start with night
timer_data = get_timer(day_timer_tid);
sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in night for %s.
- clif_displaymessage(fd, temp);
- clif_displaymessage(fd, msg_txt(234)); // Game time: After, the game will be in permanent daylight.
+ clif->displaymessage(fd, temp);
+ clif->displaymessage(fd, msg_txt(234)); // Game time: After, the game will be in permanent daylight.
} else
- clif_displaymessage(fd, msg_txt(231)); // Game time: The game is in permanent daylight.
+ clif->displaymessage(fd, msg_txt(231)); // Game time: The game is in permanent daylight.
else if (battle_config.day_duration == 0)
if (night_flag == 0) { // we start with day
timer_data = get_timer(night_timer_tid);
sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in daylight for %s.
- clif_displaymessage(fd, temp);
- clif_displaymessage(fd, msg_txt(236)); // Game time: After, the game will be in permanent night.
+ clif->displaymessage(fd, temp);
+ clif->displaymessage(fd, msg_txt(236)); // Game time: After, the game will be in permanent night.
} else
- clif_displaymessage(fd, msg_txt(232)); // Game time: The game is in permanent night.
+ clif->displaymessage(fd, msg_txt(232)); // Game time: The game is in permanent night.
else {
if (night_flag == 0) {
timer_data = get_timer(night_timer_tid);
timer_data2 = get_timer(day_timer_tid);
sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in daylight for %s.
- clif_displaymessage(fd, temp);
+ clif->displaymessage(fd, temp);
if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0)
sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s.
else
sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)); // Game time: After, the game will be in night for %s.
- clif_displaymessage(fd, temp);
+ clif->displaymessage(fd, temp);
sprintf(temp, msg_txt(238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
- clif_displaymessage(fd, temp);
+ clif->displaymessage(fd, temp);
} else {
timer_data = get_timer(day_timer_tid);
timer_data2 = get_timer(night_timer_tid);
sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,gettick()) / 1000)); // Game time: The game is actualy in night for %s.
- clif_displaymessage(fd, temp);
+ clif->displaymessage(fd, temp);
if (DIFF_TICK(timer_data->tick,timer_data2->tick) > 0)
sprintf(temp, msg_txt(239), txt_time((timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s.
else
sprintf(temp, msg_txt(239), txt_time(DIFF_TICK(timer_data2->tick, timer_data->tick) / 1000)); // Game time: After, the game will be in daylight for %s.
- clif_displaymessage(fd, temp);
+ clif->displaymessage(fd, temp);
sprintf(temp, msg_txt(238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
- clif_displaymessage(fd, temp);
+ clif->displaymessage(fd, temp);
}
}
@@ -4536,24 +4536,24 @@ ACMD_FUNC(jail)
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1134)); // Please enter a player name (usage: @jail <char_name>).
+ clif->displaymessage(fd, msg_txt(1134)); // Please enter a player name (usage: @jail <char_name>).
return -1;
}
if ((pl_sd = map_nick2sd(atcmd_player_name)) == NULL) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if (pc_get_group_level(sd) < pc_get_group_level(pl_sd))
{ // you can jail only lower or same GM
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
if (pl_sd->sc.data[SC_JAILED])
{
- clif_displaymessage(fd, msg_txt(118)); // Player warped in jails.
+ clif->displaymessage(fd, msg_txt(118)); // Player warped in jails.
return -1;
}
@@ -4572,8 +4572,8 @@ ACMD_FUNC(jail)
//Duration of INT_MAX to specify infinity.
sc_start4(&pl_sd->bl,SC_JAILED,100,INT_MAX,m_index,x,y,1000);
- clif_displaymessage(pl_sd->fd, msg_txt(117)); // GM has send you in jails.
- clif_displaymessage(fd, msg_txt(118)); // Player warped in jails.
+ clif->displaymessage(pl_sd->fd, msg_txt(117)); // GM has send you in jails.
+ clif->displaymessage(fd, msg_txt(118)); // Player warped in jails.
return 0;
}
@@ -4588,31 +4588,31 @@ ACMD_FUNC(unjail)
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1135)); // Please enter a player name (usage: @unjail/@discharge <char_name>).
+ clif->displaymessage(fd, msg_txt(1135)); // Please enter a player name (usage: @unjail/@discharge <char_name>).
return -1;
}
if ((pl_sd = map_nick2sd(atcmd_player_name)) == NULL) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
if (!pl_sd->sc.data[SC_JAILED])
{
- clif_displaymessage(fd, msg_txt(119)); // This player is not in jails.
+ clif->displaymessage(fd, msg_txt(119)); // This player is not in jails.
return -1;
}
//Reset jail time to 1 sec.
sc_start(&pl_sd->bl,SC_JAILED,100,1,1000);
- clif_displaymessage(pl_sd->fd, msg_txt(120)); // A GM has discharged you from jail.
- clif_displaymessage(fd, msg_txt(121)); // Player unjailed.
+ clif->displaymessage(pl_sd->fd, msg_txt(120)); // A GM has discharged you from jail.
+ clif->displaymessage(fd, msg_txt(121)); // Player unjailed.
return 0;
}
@@ -4626,7 +4626,7 @@ ACMD_FUNC(jailfor)
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%255s %23[^\n]",atcmd_output,atcmd_player_name) < 2) {
- clif_displaymessage(fd, msg_txt(400)); //Usage: @jailfor <time> <character name>
+ clif->displaymessage(fd, msg_txt(400)); //Usage: @jailfor <time> <character name>
return -1;
}
@@ -4668,24 +4668,24 @@ ACMD_FUNC(jailfor)
}
if (year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0) {
- clif_displaymessage(fd, msg_txt(1136)); // Invalid time for jail command.
+ clif->displaymessage(fd, msg_txt(1136)); // Invalid time for jail command.
return -1;
}
if ((pl_sd = map_nick2sd(atcmd_player_name)) == NULL) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if (pc_get_group_level(pl_sd) > pc_get_group_level(sd)) {
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
jailtime = year*12*30*24*60 + month*30*24*60 + day*24*60 + hour*60 + minute; //In minutes
if(jailtime==0) {
- clif_displaymessage(fd, msg_txt(1136)); // Invalid time for jail command.
+ clif->displaymessage(fd, msg_txt(1136)); // Invalid time for jail command.
return -1;
}
@@ -4696,17 +4696,17 @@ ACMD_FUNC(jailfor)
jailtime += pl_sd->sc.data[SC_JAILED]->val1;
if (jailtime <= 0) {
jailtime = 0;
- clif_displaymessage(pl_sd->fd, msg_txt(120)); // GM has discharge you.
- clif_displaymessage(fd, msg_txt(121)); // Player unjailed
+ clif->displaymessage(pl_sd->fd, msg_txt(120)); // GM has discharge you.
+ clif->displaymessage(fd, msg_txt(121)); // Player unjailed
} else {
get_jail_time(jailtime,&year,&month,&day,&hour,&minute);
sprintf(atcmd_output,msg_txt(402),msg_txt(1137),year,month,day,hour,minute); //%s in jail for %d years, %d months, %d days, %d hours and %d minutes
- clif_displaymessage(pl_sd->fd, atcmd_output);
+ clif->displaymessage(pl_sd->fd, atcmd_output);
sprintf(atcmd_output,msg_txt(402),msg_txt(1138),year,month,day,hour,minute); //This player is now in jail for %d years, %d months, %d days, %d hours and %d minutes
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
} else if (jailtime < 0) {
- clif_displaymessage(fd, msg_txt(1136));
+ clif->displaymessage(fd, msg_txt(1136));
return -1;
}
@@ -4736,17 +4736,17 @@ ACMD_FUNC(jailtime)
nullpo_retr(-1, sd);
if (!sd->sc.data[SC_JAILED]) {
- clif_displaymessage(fd, msg_txt(1139)); // You are not in jail.
+ clif->displaymessage(fd, msg_txt(1139)); // You are not in jail.
return -1;
}
if (sd->sc.data[SC_JAILED]->val1 == INT_MAX) {
- clif_displaymessage(fd, msg_txt(1140)); // You have been jailed indefinitely.
+ clif->displaymessage(fd, msg_txt(1140)); // You have been jailed indefinitely.
return 0;
}
if (sd->sc.data[SC_JAILED]->val1 <= 0) { // Was not jailed with @jailfor (maybe @jail? or warped there? or got recalled?)
- clif_displaymessage(fd, msg_txt(1141)); // You have been jailed for an unknown amount of time.
+ clif->displaymessage(fd, msg_txt(1141)); // You have been jailed for an unknown amount of time.
return -1;
}
@@ -4754,7 +4754,7 @@ ACMD_FUNC(jailtime)
get_jail_time(sd->sc.data[SC_JAILED]->val1,&year,&month,&day,&hour,&minute);
sprintf(atcmd_output,msg_txt(402),msg_txt(1142),year,month,day,hour,minute); // You will remain in jail for %d years, %d months, %d days, %d hours and %d minutes
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -4768,7 +4768,7 @@ ACMD_FUNC(disguise)
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1143)); // Please enter a Monster/NPC name/ID (usage: @disguise <name/ID>).
+ clif->displaymessage(fd, msg_txt(1143)); // Please enter a Monster/NPC name/ID (usage: @disguise <name/ID>).
return -1;
}
@@ -4787,18 +4787,18 @@ ACMD_FUNC(disguise)
if (id == 0)
{
- clif_displaymessage(fd, msg_txt(123)); // Invalid Monster/NPC name/ID specified.
+ clif->displaymessage(fd, msg_txt(123)); // Invalid Monster/NPC name/ID specified.
return -1;
}
if(pc_isriding(sd))
{
- clif_displaymessage(fd, msg_txt(1144)); // Character cannot be disguised while mounted.
+ clif->displaymessage(fd, msg_txt(1144)); // Character cannot be disguised while mounted.
return -1;
}
pc_disguise(sd, id);
- clif_displaymessage(fd, msg_txt(122)); // Disguise applied.
+ clif->displaymessage(fd, msg_txt(122)); // Disguise applied.
return 0;
}
@@ -4814,7 +4814,7 @@ ACMD_FUNC(disguiseall)
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1145)); // Please enter a Monster/NPC name/ID (usage: @disguiseall <name/ID>).
+ clif->displaymessage(fd, msg_txt(1145)); // Please enter a Monster/NPC name/ID (usage: @disguiseall <name/ID>).
return -1;
}
@@ -4822,7 +4822,7 @@ ACMD_FUNC(disguiseall)
mob_id = atoi(message);
if (!mobdb_checkid(mob_id) && !npcdb_checkid(mob_id)) { //if mob or npc...
- clif_displaymessage(fd, msg_txt(123)); // Monster/NPC name/id not found.
+ clif->displaymessage(fd, msg_txt(123)); // Monster/NPC name/id not found.
return -1;
}
@@ -4831,7 +4831,7 @@ ACMD_FUNC(disguiseall)
pc_disguise(pl_sd, mob_id);
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(122)); // Disguise applied.
+ clif->displaymessage(fd, msg_txt(122)); // Disguise applied.
return 0;
}
@@ -4849,7 +4849,7 @@ ACMD_FUNC(disguiseguild)
memset(guild, '\0', sizeof(guild));
if( !message || !*message || sscanf(message, "%23[^,], %23[^\r\n]", monster, guild) < 2 ) {
- clif_displaymessage(fd, msg_txt(1146)); // Please enter a mob name/ID and guild name/ID (usage: @disguiseguild <mob name/ID>, <guild name/ID>).
+ clif->displaymessage(fd, msg_txt(1146)); // Please enter a mob name/ID and guild name/ID (usage: @disguiseguild <mob name/ID>, <guild name/ID>).
return -1;
}
@@ -4865,12 +4865,12 @@ ACMD_FUNC(disguiseguild)
}
if( id == 0 ) {
- clif_displaymessage(fd, msg_txt(123)); // Monster/NPC name/id hasn't been found.
+ clif->displaymessage(fd, msg_txt(123)); // Monster/NPC name/id hasn't been found.
return -1;
}
if( (g = guild_searchname(guild)) == NULL && (g = guild_search(atoi(guild))) == NULL ) {
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
+ clif->displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
return -1;
}
@@ -4878,7 +4878,7 @@ ACMD_FUNC(disguiseguild)
if( (pl_sd = g->member[i].sd) && !pc_isriding(pl_sd) )
pc_disguise(pl_sd, id);
- clif_displaymessage(fd, msg_txt(122)); // Disguise applied.
+ clif->displaymessage(fd, msg_txt(122)); // Disguise applied.
return 0;
}
@@ -4891,9 +4891,9 @@ ACMD_FUNC(undisguise)
nullpo_retr(-1, sd);
if (sd->disguise) {
pc_disguise(sd, 0);
- clif_displaymessage(fd, msg_txt(124)); // Undisguise applied.
+ clif->displaymessage(fd, msg_txt(124)); // Undisguise applied.
} else {
- clif_displaymessage(fd, msg_txt(125)); // You're not disguised.
+ clif->displaymessage(fd, msg_txt(125)); // You're not disguised.
return -1;
}
@@ -4915,7 +4915,7 @@ ACMD_FUNC(undisguiseall)
pc_disguise(pl_sd, 0);
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(124)); // Undisguise applied.
+ clif->displaymessage(fd, msg_txt(124)); // Undisguise applied.
return 0;
}
@@ -4934,12 +4934,12 @@ ACMD_FUNC(undisguiseguild)
memset(guild_name, '\0', sizeof(guild_name));
if(!message || !*message || sscanf(message, "%23[^\n]", guild_name) < 1) {
- clif_displaymessage(fd, msg_txt(1147)); // Please enter guild name/ID (usage: @undisguiseguild <guild name/ID>).
+ clif->displaymessage(fd, msg_txt(1147)); // Please enter guild name/ID (usage: @undisguiseguild <guild name/ID>).
return -1;
}
if( (g = guild_searchname(guild_name)) == NULL && (g = guild_search(atoi(message))) == NULL ) {
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
+ clif->displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
return -1;
}
@@ -4947,7 +4947,7 @@ ACMD_FUNC(undisguiseguild)
if( (pl_sd = g->member[i].sd) && pl_sd->disguise )
pc_disguise(pl_sd, 0);
- clif_displaymessage(fd, msg_txt(124)); // Undisguise applied.
+ clif->displaymessage(fd, msg_txt(124)); // Undisguise applied.
return 0;
}
@@ -4971,7 +4971,7 @@ ACMD_FUNC(exp)
nextj = sd->status.job_exp*100.0/nextj;
sprintf(output, msg_txt(1148), sd->status.base_level, nextb, sd->status.job_level, nextj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%)
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
return 0;
}
@@ -4986,7 +4986,7 @@ ACMD_FUNC(broadcast)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1149)); // Please enter a message (usage: @broadcast <message>).
+ clif->displaymessage(fd, msg_txt(1149)); // Please enter a message (usage: @broadcast <message>).
return -1;
}
@@ -5006,13 +5006,13 @@ ACMD_FUNC(localbroadcast)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1150)); // Please enter a message (usage: @localbroadcast <message>).
+ clif->displaymessage(fd, msg_txt(1150)); // Please enter a message (usage: @localbroadcast <message>).
return -1;
}
sprintf(atcmd_output, "%s: %s", sd->status.name, message);
- clif_broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, ALL_SAMEMAP);
+ clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, ALL_SAMEMAP);
return 0;
}
@@ -5030,26 +5030,26 @@ ACMD_FUNC(email)
memset(new_email, '\0', sizeof(new_email));
if (!message || !*message || sscanf(message, "%99s %99s", actual_email, new_email) < 2) {
- clif_displaymessage(fd, msg_txt(1151)); // Please enter 2 emails (usage: @email <actual@email> <new@email>).
+ clif->displaymessage(fd, msg_txt(1151)); // Please enter 2 emails (usage: @email <actual@email> <new@email>).
return -1;
}
if (e_mail_check(actual_email) == 0) {
- clif_displaymessage(fd, msg_txt(144)); // Invalid actual email. If you have default e-mail, give a@a.com.
+ clif->displaymessage(fd, msg_txt(144)); // Invalid actual email. If you have default e-mail, give a@a.com.
return -1;
} else if (e_mail_check(new_email) == 0) {
- clif_displaymessage(fd, msg_txt(145)); // Invalid new email. Please enter a real e-mail.
+ clif->displaymessage(fd, msg_txt(145)); // Invalid new email. Please enter a real e-mail.
return -1;
} else if (strcmpi(new_email, "a@a.com") == 0) {
- clif_displaymessage(fd, msg_txt(146)); // New email must be a real e-mail.
+ clif->displaymessage(fd, msg_txt(146)); // New email must be a real e-mail.
return -1;
} else if (strcmpi(actual_email, new_email) == 0) {
- clif_displaymessage(fd, msg_txt(147)); // New email must be different of the actual e-mail.
+ clif->displaymessage(fd, msg_txt(147)); // New email must be different of the actual e-mail.
return -1;
}
chrif_changeemail(sd->status.account_id, actual_email, new_email);
- clif_displaymessage(fd, msg_txt(148)); // Information sended to login-server via char-server.
+ clif->displaymessage(fd, msg_txt(148)); // Information sended to login-server via char-server.
return 0;
}
@@ -5062,12 +5062,12 @@ ACMD_FUNC(effect)
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d", &type) < 1) {
- clif_displaymessage(fd, msg_txt(1152)); // Please enter an effect number (usage: @effect <effect number>).
+ clif->displaymessage(fd, msg_txt(1152)); // Please enter an effect number (usage: @effect <effect number>).
return -1;
}
- clif_specialeffect(&sd->bl, type, (send_target)flag);
- clif_displaymessage(fd, msg_txt(229)); // Your effect has changed.
+ clif->specialeffect(&sd->bl, type, (send_target)flag);
+ clif->displaymessage(fd, msg_txt(229)); // Your effect has changed.
return 0;
}
@@ -5081,9 +5081,9 @@ ACMD_FUNC(killer)
sd->state.killer = !sd->state.killer;
if(sd->state.killer)
- clif_displaymessage(fd, msg_txt(241));
+ clif->displaymessage(fd, msg_txt(241));
else {
- clif_displaymessage(fd, msg_txt(292));
+ clif->displaymessage(fd, msg_txt(292));
pc_stop_attack(sd);
}
return 0;
@@ -5099,9 +5099,9 @@ ACMD_FUNC(killable)
sd->state.killable = !sd->state.killable;
if(sd->state.killable)
- clif_displaymessage(fd, msg_txt(242));
+ clif->displaymessage(fd, msg_txt(242));
else {
- clif_displaymessage(fd, msg_txt(288));
+ clif->displaymessage(fd, msg_txt(288));
map_foreachinrange(atcommand_stopattack,&sd->bl, AREA_SIZE, BL_CHAR, sd->bl.id);
}
return 0;
@@ -5115,7 +5115,7 @@ ACMD_FUNC(skillon)
{
nullpo_retr(-1, sd);
map[sd->bl.m].flag.noskill = 0;
- clif_displaymessage(fd, msg_txt(244));
+ clif->displaymessage(fd, msg_txt(244));
return 0;
}
@@ -5127,7 +5127,7 @@ ACMD_FUNC(skilloff)
{
nullpo_retr(-1, sd);
map[sd->bl.m].flag.noskill = 1;
- clif_displaymessage(fd, msg_txt(243));
+ clif->displaymessage(fd, msg_txt(243));
return 0;
}
@@ -5143,28 +5143,28 @@ ACMD_FUNC(npcmove)
memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
if (!message || !*message || sscanf(message, "%d %d %23[^\n]", &x, &y, atcmd_player_name) < 3) {
- clif_displaymessage(fd, msg_txt(1153)); // Usage: @npcmove <X> <Y> <npc_name>
+ clif->displaymessage(fd, msg_txt(1153)); // Usage: @npcmove <X> <Y> <npc_name>
return -1;
}
if ((nd = npc_name2id(atcmd_player_name)) == NULL)
{
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif->displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
return -1;
}
if ((m=nd->bl.m) < 0 || nd->bl.prev == NULL)
{
- clif_displaymessage(fd, msg_txt(1154)); // NPC is not on this map.
+ clif->displaymessage(fd, msg_txt(1154)); // NPC is not on this map.
return -1; //Not on a map.
}
x = cap_value(x, 0, map[m].xs-1);
y = cap_value(y, 0, map[m].ys-1);
- map_foreachinrange(clif_outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
+ map_foreachinrange(clif->outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
map_moveblock(&nd->bl, x, y, gettick());
- map_foreachinrange(clif_insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
- clif_displaymessage(fd, msg_txt(1155)); // NPC moved.
+ map_foreachinrange(clif->insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
+ clif->displaymessage(fd, msg_txt(1155)); // NPC moved.
return 0;
}
@@ -5184,7 +5184,7 @@ ACMD_FUNC(addwarp)
memset(warpname, '\0', sizeof(warpname));
if (!message || !*message || sscanf(message, "%31s %d %d %23[^\n]", mapname, &x, &y, warpname) < 4) {
- clif_displaymessage(fd, msg_txt(1156)); // Usage: @addwarp <mapname> <X> <Y> <npc name>
+ clif->displaymessage(fd, msg_txt(1156)); // Usage: @addwarp <mapname> <X> <Y> <npc name>
return -1;
}
@@ -5192,7 +5192,7 @@ ACMD_FUNC(addwarp)
if( m == 0 )
{
sprintf(atcmd_output, msg_txt(1157), mapname); // Unknown map '%s'.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
@@ -5201,7 +5201,7 @@ ACMD_FUNC(addwarp)
return -1;
sprintf(atcmd_output, msg_txt(1158), nd->exname); // New warp NPC '%s' created.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -5219,22 +5219,22 @@ ACMD_FUNC(follow)
return -1;
pc_stop_following (sd);
- clif_displaymessage(fd, msg_txt(1159)); // Follow mode OFF.
+ clif->displaymessage(fd, msg_txt(1159)); // Follow mode OFF.
return 0;
}
if ( (pl_sd = map_nick2sd((char *)message)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if (sd->followtarget == pl_sd->bl.id) {
pc_stop_following (sd);
- clif_displaymessage(fd, msg_txt(1159)); // Follow mode OFF.
+ clif->displaymessage(fd, msg_txt(1159)); // Follow mode OFF.
} else {
pc_follow(sd, pl_sd->bl.id);
- clif_displaymessage(fd, msg_txt(1160)); // Follow mode ON.
+ clif->displaymessage(fd, msg_txt(1160)); // Follow mode ON.
}
return 0;
@@ -5271,7 +5271,7 @@ ACMD_FUNC(storeall)
if (sd->state.storage_flag != 1)
{ //Open storage.
if( storage_storageopen(sd) == 1 ) {
- clif_displaymessage(fd, msg_txt(1161)); // You currently cannot open your storage.
+ clif->displaymessage(fd, msg_txt(1161)); // You currently cannot open your storage.
return -1;
}
}
@@ -5285,7 +5285,7 @@ ACMD_FUNC(storeall)
}
storage_storageclose(sd);
- clif_displaymessage(fd, msg_txt(1162)); // All items stored.
+ clif->displaymessage(fd, msg_txt(1162)); // All items stored.
return 0;
}
@@ -5295,7 +5295,7 @@ ACMD_FUNC(clearstorage)
nullpo_retr(-1, sd);
if (sd->state.storage_flag == 1) {
- clif_displaymessage(fd, msg_txt(250));
+ clif->displaymessage(fd, msg_txt(250));
return -1;
}
@@ -5305,7 +5305,7 @@ ACMD_FUNC(clearstorage)
}
storage_storageclose(sd);
- clif_displaymessage(fd, msg_txt(1394)); // Your storage was cleaned.
+ clif->displaymessage(fd, msg_txt(1394)); // Your storage was cleaned.
return 0;
}
@@ -5319,17 +5319,17 @@ ACMD_FUNC(cleargstorage)
g = guild_search(sd->status.guild_id);
if (g == NULL) {
- clif_displaymessage(fd, msg_txt(43));
+ clif->displaymessage(fd, msg_txt(43));
return -1;
}
if (sd->state.storage_flag == 1) {
- clif_displaymessage(fd, msg_txt(250));
+ clif->displaymessage(fd, msg_txt(250));
return -1;
}
if (sd->state.storage_flag == 2) {
- clif_displaymessage(fd, msg_txt(251));
+ clif->displaymessage(fd, msg_txt(251));
return -1;
}
@@ -5346,7 +5346,7 @@ ACMD_FUNC(cleargstorage)
storage_guild_storageclose(sd);
gstorage->lock = 0; // Cleaning done, release lock
- clif_displaymessage(fd, msg_txt(1395)); // Your guild storage was cleaned.
+ clif->displaymessage(fd, msg_txt(1395)); // Your guild storage was cleaned.
return 0;
}
@@ -5356,7 +5356,7 @@ ACMD_FUNC(clearcart)
nullpo_retr(-1, sd);
if (pc_iscarton(sd) == 0) {
- clif_displaymessage(fd, msg_txt(1396)); // You do not have a cart to be cleaned.
+ clif->displaymessage(fd, msg_txt(1396)); // You do not have a cart to be cleaned.
return -1;
}
@@ -5368,10 +5368,10 @@ ACMD_FUNC(clearcart)
if(sd->status.cart[i].nameid > 0)
pc_cart_delitem(sd, i, sd->status.cart[i].amount, 1, LOG_TYPE_OTHER);
- clif_clearcart(fd);
- clif_updatestatus(sd,SP_CARTINFO);
+ clif->clearcart(fd);
+ clif->updatestatus(sd,SP_CARTINFO);
- clif_displaymessage(fd, msg_txt(1397)); // Your cart was cleaned.
+ clif->displaymessage(fd, msg_txt(1397)); // Your cart was cleaned.
return 0;
}
@@ -5391,7 +5391,7 @@ ACMD_FUNC(skillid) {
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1163)); // Please enter a skill name to look up (usage: @skillid <skill name>).
+ clif->displaymessage(fd, msg_txt(1163)); // Please enter a skill name to look up (usage: @skillid <skill name>).
return -1;
}
@@ -5403,7 +5403,7 @@ ACMD_FUNC(skillid) {
idx = skill->get_index(db_data2i(data));
if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill_db[idx].desc, message, skillen) == 0) {
sprintf(atcmd_output, msg_txt(1164), db_data2i(data), skill_db[idx].desc, key.str); // skill %d: %s (%s)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
} else if ( found < MAX_SKILLID_PARTIAL_RESULTS && ( stristr(key.str,message) || stristr(skill_db[idx].desc,message) ) ) {
snprintf(partials[found++], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_txt(1164), db_data2i(data), skill_db[idx].desc, key.str);
}
@@ -5413,11 +5413,11 @@ ACMD_FUNC(skillid) {
if( found ) {
sprintf(atcmd_output, msg_txt(1398), found); // -- Displaying first %d partial matches
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
for(i = 0; i < found; i++) { /* partials */
- clif_displaymessage(fd, partials[i]);
+ clif->displaymessage(fd, partials[i]);
}
return 0;
@@ -5437,19 +5437,19 @@ ACMD_FUNC(useskill)
nullpo_retr(-1, sd);
if(!message || !*message || sscanf(message, "%hu %hu %23[^\n]", &skill_id, &skill_lv, target) != 3) {
- clif_displaymessage(fd, msg_txt(1165)); // Usage: @useskill <skill ID> <skill level> <target>
+ clif->displaymessage(fd, msg_txt(1165)); // Usage: @useskill <skill ID> <skill level> <target>
return -1;
}
if(!strcmp(target,"self")) pl_sd = sd; //quick keyword
else if ( (pl_sd = map_nick2sd(target)) == NULL ){
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
@@ -5482,14 +5482,14 @@ ACMD_FUNC(displayskill)
if (!message || !*message || sscanf(message, "%hu %hu", &skill_id, &skill_lv) < 1)
{
- clif_displaymessage(fd, msg_txt(1166)); // Usage: @displayskill <skill ID> {<skill level>}
+ clif->displaymessage(fd, msg_txt(1166)); // Usage: @displayskill <skill ID> {<skill level>}
return -1;
}
status = status_get_status_data(&sd->bl);
tick = gettick();
- clif_skill_damage(&sd->bl,&sd->bl, tick, status->amotion, status->dmotion, 1, 1, skill_id, skill_lv, 5);
- clif_skill_nodamage(&sd->bl, &sd->bl, skill_id, skill_lv, 1);
- clif_skill_poseffect(&sd->bl, skill_id, skill_lv, sd->bl.x, sd->bl.y, tick);
+ clif->skill_damage(&sd->bl,&sd->bl, tick, status->amotion, status->dmotion, 1, 1, skill_id, skill_lv, 5);
+ clif->skill_nodamage(&sd->bl, &sd->bl, skill_id, skill_lv, 1);
+ clif->skill_poseffect(&sd->bl, skill_id, skill_lv, sd->bl.x, sd->bl.y, tick);
return 0;
}
@@ -5507,13 +5507,13 @@ ACMD_FUNC(skilltree)
nullpo_retr(-1, sd);
if(!message || !*message || sscanf(message, "%hu %23[^\r\n]", &skill_id, target) != 2) {
- clif_displaymessage(fd, msg_txt(1167)); // Usage: @skilltree <skill ID> <target>
+ clif->displaymessage(fd, msg_txt(1167)); // Usage: @skilltree <skill ID> <target>
return -1;
}
if ( (pl_sd = map_nick2sd(target)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
@@ -5521,12 +5521,12 @@ ACMD_FUNC(skilltree)
c = pc_mapid2jobid(c, pl_sd->status.sex);
sprintf(atcmd_output, msg_txt(1168), job_name(c), pc_checkskill(pl_sd, NV_BASIC)); // Player is using %s skill tree (%d basic points).
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
ARR_FIND( 0, MAX_SKILL_TREE, j, skill_tree[c][j].id == 0 || skill_tree[c][j].id == skill_id );
if( j == MAX_SKILL_TREE || skill_tree[c][j].id == 0 )
{
- clif_displaymessage(fd, msg_txt(1169)); // The player cannot use that skill.
+ clif->displaymessage(fd, msg_txt(1169)); // The player cannot use that skill.
return 0;
}
@@ -5538,12 +5538,12 @@ ACMD_FUNC(skilltree)
if( ent->need[j].id && pc_checkskill(sd,ent->need[j].id) < ent->need[j].lv)
{
sprintf(atcmd_output, msg_txt(1170), ent->need[j].lv, skill_db[ent->need[j].id].desc); // Player requires level %d of skill %s.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
meets = 0;
}
}
if (meets == 1) {
- clif_displaymessage(fd, msg_txt(1171)); // The player meets all the requirements for that skill.
+ clif->displaymessage(fd, msg_txt(1171)); // The player meets all the requirements for that skill.
}
return 0;
@@ -5564,7 +5564,7 @@ void getring (struct map_session_data* sd)
item_tmp.card[3] = sd->status.partner_id >> 16;
if((flag = pc_additem(sd,&item_tmp,1,LOG_TYPE_COMMAND))) {
- clif_additem(sd,0,0,flag);
+ clif->additem(sd,0,0,flag);
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
}
@@ -5581,24 +5581,24 @@ ACMD_FUNC(marry)
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%23s", player_name) != 1) {
- clif_displaymessage(fd, msg_txt(1172)); // Usage: @marry <char name>
+ clif->displaymessage(fd, msg_txt(1172)); // Usage: @marry <char name>
return -1;
}
if ((pl_sd = map_nick2sd(player_name)) == NULL) {
- clif_displaymessage(fd, msg_txt(3));
+ clif->displaymessage(fd, msg_txt(3));
return -1;
}
if (pc_marriage(sd, pl_sd) == 0) {
- clif_displaymessage(fd, msg_txt(1173)); // They are married... wish them well.
- clif_wedding_effect(&pl_sd->bl); //wedding effect and music [Lupus]
+ clif->displaymessage(fd, msg_txt(1173)); // They are married... wish them well.
+ clif->wedding_effect(&pl_sd->bl); //wedding effect and music [Lupus]
getring(sd); // Auto-give named rings (Aru)
getring(pl_sd);
return 0;
}
- clif_displaymessage(fd, msg_txt(1174)); // The two cannot wed because one is either a baby or already married.
+ clif->displaymessage(fd, msg_txt(1174)); // The two cannot wed because one is either a baby or already married.
return -1;
}
@@ -5612,12 +5612,12 @@ ACMD_FUNC(divorce)
if (pc_divorce(sd) != 0) {
sprintf(atcmd_output, msg_txt(1175), sd->status.name); // '%s' is not married.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
sprintf(atcmd_output, msg_txt(1176), sd->status.name); // '%s' and his/her partner are now divorced.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -5630,8 +5630,8 @@ ACMD_FUNC(changelook)
int pos[7] = { LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HEAD_BOTTOM,LOOK_WEAPON,LOOK_SHIELD,LOOK_SHOES,LOOK_ROBE };
if((i = sscanf(message, "%d %d", &j, &k)) < 1) {
- clif_displaymessage(fd, msg_txt(1177)); // Usage: @changelook {<position>} <view id>
- clif_displaymessage(fd, msg_txt(1178)); // Position: 1-Top 2-Middle 3-Bottom 4-Weapon 5-Shield 6-Shoes 7-Robe
+ clif->displaymessage(fd, msg_txt(1177)); // Usage: @changelook {<position>} <view id>
+ clif->displaymessage(fd, msg_txt(1178)); // Position: 1-Top 2-Middle 3-Bottom 4-Weapon 5-Shield 6-Shoes 7-Robe
return -1;
} else if ( i == 2 ) {
if (j < 1 || j > 7)
@@ -5642,7 +5642,7 @@ ACMD_FUNC(changelook)
j = LOOK_HEAD_TOP;
}
- clif_changelook(&sd->bl,j,k);
+ clif->changelook(&sd->bl,j,k);
return 0;
}
@@ -5656,17 +5656,17 @@ ACMD_FUNC(autotrade)
nullpo_retr(-1, sd);
if( map[sd->bl.m].flag.autotrade != battle_config.autotrade_mapflag ) {
- clif_displaymessage(fd, msg_txt(1179)); // Autotrade is not allowed on this map.
+ clif->displaymessage(fd, msg_txt(1179)); // Autotrade is not allowed on this map.
return -1;
}
if( pc_isdead(sd) ) {
- clif_displaymessage(fd, msg_txt(1180)); // You cannot autotrade when dead.
+ clif->displaymessage(fd, msg_txt(1180)); // You cannot autotrade when dead.
return -1;
}
if( !sd->state.vending && !sd->state.buyingstore ) { //check if player is vending or buying
- clif_displaymessage(fd, msg_txt(549)); // "You should have a shop open to use @autotrade."
+ clif->displaymessage(fd, msg_txt(549)); // "You should have a shop open to use @autotrade."
return -1;
}
@@ -5675,7 +5675,7 @@ ACMD_FUNC(autotrade)
int timeout = atoi(message);
status_change_start(&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0);
}
- clif_authfail_fd(sd->fd, 15);
+ clif->authfail_fd(sd->fd, 15);
return 0;
}
@@ -5691,22 +5691,22 @@ ACMD_FUNC(changegm)
nullpo_retr(-1, sd);
if (sd->status.guild_id == 0 || (g = guild_search(sd->status.guild_id)) == NULL || strcmp(g->master,sd->status.name)) {
- clif_displaymessage(fd, msg_txt(1181)); // You need to be a Guild Master to use this command.
+ clif->displaymessage(fd, msg_txt(1181)); // You need to be a Guild Master to use this command.
return -1;
}
if( map[sd->bl.m].flag.guildlock || map[sd->bl.m].flag.gvg_castle ) {
- clif_displaymessage(fd, msg_txt(1182)); // You cannot change guild leaders on this map.
+ clif->displaymessage(fd, msg_txt(1182)); // You cannot change guild leaders on this map.
return -1;
}
if( !message[0] ) {
- clif_displaymessage(fd, msg_txt(1183)); // Usage: @changegm <guild_member_name>
+ clif->displaymessage(fd, msg_txt(1183)); // Usage: @changegm <guild_member_name>
return -1;
}
if((pl_sd=map_nick2sd((char *) message)) == NULL || pl_sd->status.guild_id != sd->status.guild_id) {
- clif_displaymessage(fd, msg_txt(1184)); // Target character must be online and be a guild member.
+ clif->displaymessage(fd, msg_txt(1184)); // Target character must be online and be a guild member.
return -1;
}
@@ -5724,7 +5724,7 @@ ACMD_FUNC(changeleader)
if( !message[0] )
{
- clif_displaymessage(fd, msg_txt(1185)); // Usage: @changeleader <party_member_name>
+ clif->displaymessage(fd, msg_txt(1185)); // Usage: @changeleader <party_member_name>
return -1;
}
@@ -5746,7 +5746,7 @@ ACMD_FUNC(partyoption)
if (sd->status.party_id == 0 || (p = party_search(sd->status.party_id)) == NULL)
{
- clif_displaymessage(fd, msg_txt(282));
+ clif->displaymessage(fd, msg_txt(282));
return -1;
}
@@ -5756,13 +5756,13 @@ ACMD_FUNC(partyoption)
if (!p->party.member[mi].leader)
{
- clif_displaymessage(fd, msg_txt(282));
+ clif->displaymessage(fd, msg_txt(282));
return -1;
}
if(!message || !*message || sscanf(message, "%15s %15s", w1, w2) < 2)
{
- clif_displaymessage(fd, msg_txt(1186)); // Usage: @partyoption <pickup share: yes/no> <item distribution: yes/no>
+ clif->displaymessage(fd, msg_txt(1186)); // Usage: @partyoption <pickup share: yes/no> <item distribution: yes/no>
return -1;
}
@@ -5772,7 +5772,7 @@ ACMD_FUNC(partyoption)
if (option != p->party.item)
party_changeoption(sd, p->party.exp, option);
else
- clif_displaymessage(fd, msg_txt(286));
+ clif->displaymessage(fd, msg_txt(286));
return 0;
}
@@ -5803,9 +5803,9 @@ ACMD_FUNC(autoloot)
sd->state.autoloot = rate;
if (sd->state.autoloot) {
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1187),((double)sd->state.autoloot)/100.); // Autolooting items with drop rates of %0.02f%% and below.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}else
- clif_displaymessage(fd, msg_txt(1188)); // Autoloot is now off.
+ clif->displaymessage(fd, msg_txt(1188)); // Autoloot is now off.
return 0;
}
@@ -5838,7 +5838,7 @@ ACMD_FUNC(autolootitem)
item_data = itemdb_searchname(message);
if (!item_data) {
// No items founds in the DB with Id or Name
- clif_displaymessage(fd, msg_txt(1189)); // Item not found.
+ clif->displaymessage(fd, msg_txt(1189)); // Item not found.
return -1;
}
}
@@ -5847,28 +5847,28 @@ ACMD_FUNC(autolootitem)
case 1:
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == item_data->nameid);
if (i != AUTOLOOTITEM_SIZE) {
- clif_displaymessage(fd, msg_txt(1190)); // You're already autolooting this item.
+ clif->displaymessage(fd, msg_txt(1190)); // You're already autolooting this item.
return -1;
}
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == 0);
if (i == AUTOLOOTITEM_SIZE) {
- clif_displaymessage(fd, msg_txt(1191)); // Your autolootitem list is full. Remove some items first with @autolootid -<item name or ID>.
+ clif->displaymessage(fd, msg_txt(1191)); // Your autolootitem list is full. Remove some items first with @autolootid -<item name or ID>.
return -1;
}
sd->state.autolootid[i] = item_data->nameid; // Autoloot Activated
sprintf(atcmd_output, msg_txt(1192), item_data->name, item_data->jname, item_data->nameid); // Autolooting item: '%s'/'%s' {%d}
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sd->state.autolooting = 1;
break;
case 2:
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == item_data->nameid);
if (i == AUTOLOOTITEM_SIZE) {
- clif_displaymessage(fd, msg_txt(1193)); // You're currently not autolooting this item.
+ clif->displaymessage(fd, msg_txt(1193)); // You're currently not autolooting this item.
return -1;
}
sd->state.autolootid[i] = 0;
sprintf(atcmd_output, msg_txt(1194), item_data->name, item_data->jname, item_data->nameid); // Removed item: '%s'/'%s' {%d} from your autolootitem list.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] != 0);
if (i == AUTOLOOTITEM_SIZE) {
sd->state.autolooting = 0;
@@ -5876,14 +5876,14 @@ ACMD_FUNC(autolootitem)
break;
case 3:
sprintf(atcmd_output, msg_txt(1195), AUTOLOOTITEM_SIZE); // You can have %d items on your autolootitem list.
- clif_displaymessage(fd, atcmd_output);
- clif_displaymessage(fd, msg_txt(1196)); // To add an item to the list, use "@alootid +<item name or ID>". To remove an item, use "@alootid -<item name or ID>".
- clif_displaymessage(fd, msg_txt(1197)); // "@alootid reset" will clear your autolootitem list.
+ clif->displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, msg_txt(1196)); // To add an item to the list, use "@alootid +<item name or ID>". To remove an item, use "@alootid -<item name or ID>".
+ clif->displaymessage(fd, msg_txt(1197)); // "@alootid reset" will clear your autolootitem list.
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] != 0);
if (i == AUTOLOOTITEM_SIZE) {
- clif_displaymessage(fd, msg_txt(1198)); // Your autolootitem list is empty.
+ clif->displaymessage(fd, msg_txt(1198)); // Your autolootitem list is empty.
} else {
- clif_displaymessage(fd, msg_txt(1199)); // Items on your autolootitem list:
+ clif->displaymessage(fd, msg_txt(1199)); // Items on your autolootitem list:
for(i = 0; i < AUTOLOOTITEM_SIZE; i++)
{
if (sd->state.autolootid[i] == 0)
@@ -5893,13 +5893,13 @@ ACMD_FUNC(autolootitem)
continue;
}
sprintf(atcmd_output, "'%s'/'%s' {%d}", item_data->name, item_data->jname, item_data->nameid);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
}
break;
case 4:
memset(sd->state.autolootid, 0, sizeof(sd->state.autolootid));
- clif_displaymessage(fd, msg_txt(1200)); // Your autolootitem list has been reset.
+ clif->displaymessage(fd, msg_txt(1200)); // Your autolootitem list has been reset.
sd->state.autolooting = 0;
break;
}
@@ -5916,12 +5916,12 @@ ACMD_FUNC(autolootitem)
// nullpo_retr(-1, sd);
// if (map[sd->bl.m].flag.rain) {
// map[sd->bl.m].flag.rain=0;
-// clif_weather(sd->bl.m);
-// clif_displaymessage(fd, msg_txt(1201)); // The rain has stopped.
+// clif->weather(sd->bl.m);
+// clif->displaymessage(fd, msg_txt(1201)); // The rain has stopped.
// } else {
// map[sd->bl.m].flag.rain=1;
-// clif_weather(sd->bl.m);
-// clif_displaymessage(fd, msg_txt(1202)); // It has started to rain.
+// clif->weather(sd->bl.m);
+// clif->displaymessage(fd, msg_txt(1202)); // It has started to rain.
// }
// return 0;
//}
@@ -5934,12 +5934,12 @@ ACMD_FUNC(snow)
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.snow) {
map[sd->bl.m].flag.snow=0;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1203)); // Snow has stopped falling.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1203)); // Snow has stopped falling.
} else {
map[sd->bl.m].flag.snow=1;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1204)); // It has started to snow.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1204)); // It has started to snow.
}
return 0;
@@ -5953,12 +5953,12 @@ ACMD_FUNC(sakura)
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.sakura) {
map[sd->bl.m].flag.sakura=0;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1205)); // Cherry tree leaves no longer fall.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1205)); // Cherry tree leaves no longer fall.
} else {
map[sd->bl.m].flag.sakura=1;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1206)); // Cherry tree leaves have begun to fall.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1206)); // Cherry tree leaves have begun to fall.
}
return 0;
}
@@ -5971,12 +5971,12 @@ ACMD_FUNC(clouds)
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.clouds) {
map[sd->bl.m].flag.clouds=0;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1207)); // The clouds has disappear.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1207)); // The clouds has disappear.
} else {
map[sd->bl.m].flag.clouds=1;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1208)); // Clouds appear.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1208)); // Clouds appear.
}
return 0;
@@ -5990,12 +5990,12 @@ ACMD_FUNC(clouds2)
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.clouds2) {
map[sd->bl.m].flag.clouds2=0;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1209)); // The alternative clouds disappear.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1209)); // The alternative clouds disappear.
} else {
map[sd->bl.m].flag.clouds2=1;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1210)); // Alternative clouds appear.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1210)); // Alternative clouds appear.
}
return 0;
@@ -6009,12 +6009,12 @@ ACMD_FUNC(fog)
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.fog) {
map[sd->bl.m].flag.fog=0;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1211)); // The fog has gone.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1211)); // The fog has gone.
} else {
map[sd->bl.m].flag.fog=1;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1212)); // Fog hangs over.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1212)); // Fog hangs over.
}
return 0;
}
@@ -6027,12 +6027,12 @@ ACMD_FUNC(leaves)
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.leaves) {
map[sd->bl.m].flag.leaves=0;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1213)); // Leaves no longer fall.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1213)); // Leaves no longer fall.
} else {
map[sd->bl.m].flag.leaves=1;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1214)); // Fallen leaves fall.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1214)); // Fallen leaves fall.
}
return 0;
@@ -6046,12 +6046,12 @@ ACMD_FUNC(fireworks)
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.fireworks) {
map[sd->bl.m].flag.fireworks=0;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1215)); // Fireworks have ended.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1215)); // Fireworks have ended.
} else {
map[sd->bl.m].flag.fireworks=1;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1216)); // Fireworks have launched.
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(1216)); // Fireworks have launched.
}
return 0;
@@ -6074,8 +6074,8 @@ ACMD_FUNC(clearweather)
map[sd->bl.m].flag.fog=0;
map[sd->bl.m].flag.fireworks=0;
map[sd->bl.m].flag.leaves=0;
- clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(291));
+ clif->weather(sd->bl.m);
+ clif->displaymessage(fd, msg_txt(291));
return 0;
}
@@ -6090,14 +6090,14 @@ ACMD_FUNC(sound)
memset(sound_file, '\0', sizeof(sound_file));
if(!message || !*message || sscanf(message, "%99[^\n]", sound_file) < 1) {
- clif_displaymessage(fd, msg_txt(1217)); // Please enter a sound filename (usage: @sound <filename>).
+ clif->displaymessage(fd, msg_txt(1217)); // Please enter a sound filename (usage: @sound <filename>).
return -1;
}
if(strstr(sound_file, ".wav") == NULL)
strcat(sound_file, ".wav");
- clif_soundeffectall(&sd->bl, sound_file, 0, AREA);
+ clif->soundeffectall(&sd->bl, sound_file, 0, AREA);
return 0;
}
@@ -6115,7 +6115,7 @@ ACMD_FUNC(mobsearch)
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%99[^\n]", mob_name) < 1) {
- clif_displaymessage(fd, msg_txt(1218)); // Please enter a monster name (usage: @mobsearch <monster name>).
+ clif->displaymessage(fd, msg_txt(1218)); // Please enter a monster name (usage: @mobsearch <monster name>).
return -1;
}
@@ -6123,7 +6123,7 @@ ACMD_FUNC(mobsearch)
mob_id = mobdb_searchname(mob_name);
if(mob_id > 0 && mobdb_checkid(mob_id) == 0){
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1219),mob_name); // Invalid mob ID %s!
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
if(mob_id == atoi(mob_name) && mob_db(mob_id)->jname)
@@ -6131,7 +6131,7 @@ ACMD_FUNC(mobsearch)
// strcpy(mob_name,mob_db(mob_id)->name); // --en--
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1220), mob_name, mapindex_id2name(sd->mapindex)); // Mob Search... %s %s
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
it = mapit_geteachmob();
for(;;)
@@ -6150,7 +6150,7 @@ ACMD_FUNC(mobsearch)
snprintf(atcmd_output, sizeof(atcmd_output), "%2d[%3d:%3d] %s", number, md->bl.x, md->bl.y, md->name);
else
snprintf(atcmd_output, sizeof(atcmd_output), "%2d[%s] %s", number, "dead", md->name);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
mapit_free(it);
@@ -6172,7 +6172,7 @@ static int atcommand_cleanfloor_sub(struct block_list *bl, va_list ap)
ACMD_FUNC(cleanmap)
{
map_foreachinmap(atcommand_cleanfloor_sub, sd->bl.m, BL_ITEM);
- clif_displaymessage(fd, msg_txt(1221)); // All dropped items have been cleaned up.
+ clif->displaymessage(fd, msg_txt(1221)); // All dropped items have been cleaned up.
return 0;
}
@@ -6190,7 +6190,7 @@ ACMD_FUNC(cleanarea)
map_foreachinarea(atcommand_cleanfloor_sub, sd->bl.m, x0, y0, x1, y1, BL_ITEM);
}
- clif_displaymessage(fd, msg_txt(1221)); // All dropped items have been cleaned up.
+ clif->displaymessage(fd, msg_txt(1221)); // All dropped items have been cleaned up.
return 0;
}
@@ -6212,27 +6212,27 @@ ACMD_FUNC(npctalk)
if(!ifcolor) {
if (!message || !*message || sscanf(message, "%23[^,], %99[^\n]", name, mes) < 2) {
- clif_displaymessage(fd, msg_txt(1222)); // Please enter the correct parameters (usage: @npctalk <npc name>, <message>).
+ clif->displaymessage(fd, msg_txt(1222)); // Please enter the correct parameters (usage: @npctalk <npc name>, <message>).
return -1;
}
}
else {
if (!message || !*message || sscanf(message, "%lx %23[^,], %99[^\n]", &color, name, mes) < 3) {
- clif_displaymessage(fd, msg_txt(1223)); // Please enter the correct parameters (usage: @npctalkc <color> <npc name>, <message>).
+ clif->displaymessage(fd, msg_txt(1223)); // Please enter the correct parameters (usage: @npctalkc <color> <npc name>, <message>).
return -1;
}
}
if (!(nd = npc_name2id(name))) {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist
+ clif->displaymessage(fd, msg_txt(111)); // This NPC doesn't exist
return -1;
}
strtok(name, "#"); // discard extra name identifier if present
snprintf(temp, sizeof(temp), "%s : %s", name, mes);
- if(ifcolor) clif_messagecolor(&nd->bl,color,temp);
- else clif_message(&nd->bl, temp);
+ if(ifcolor) clif->messagecolor(&nd->bl,color,temp);
+ else clif->message(&nd->bl, temp);
return 0;
}
@@ -6252,7 +6252,7 @@ ACMD_FUNC(pettalk)
if(!sd->status.pet_id || !(pd=sd->pd))
{
- clif_displaymessage(fd, msg_txt(184));
+ clif->displaymessage(fd, msg_txt(184));
return -1;
}
@@ -6262,7 +6262,7 @@ ACMD_FUNC(pettalk)
return -1;
if (!message || !*message || sscanf(message, "%99[^\n]", mes) < 1) {
- clif_displaymessage(fd, msg_txt(1224)); // Please enter a message (usage: @pettalk <message>).
+ clif->displaymessage(fd, msg_txt(1224)); // Please enter a message (usage: @pettalk <message>).
return -1;
}
@@ -6290,13 +6290,13 @@ ACMD_FUNC(pettalk)
}
sd->emotionlasttime = time(NULL);
- clif_emotion(&pd->bl, i);
+ clif->emotion(&pd->bl, i);
return 0;
}
}
snprintf(temp, sizeof temp ,"%s : %s", pd->pet.name, mes);
- clif_message(&pd->bl, temp);
+ clif->message(&pd->bl, temp);
return 0;
}
@@ -6337,12 +6337,12 @@ ACMD_FUNC(users)
continue;// empty
safesnprintf(buf, sizeof(buf), "%s: %d (%.2f%%)", mapindex_id2name(i), users[i], (float)(100.0f*users[i]/users_all));
- clif_displaymessage(sd->fd, buf);
+ clif->displaymessage(sd->fd, buf);
}
// display overall count
safesnprintf(buf, sizeof(buf), "all: %d", users_all);
- clif_displaymessage(sd->fd, buf);
+ clif->displaymessage(sd->fd, buf);
return 0;
}
@@ -6355,7 +6355,7 @@ ACMD_FUNC(reset)
pc_resetstate(sd);
pc_resetskill(sd,1);
sprintf(atcmd_output, msg_txt(208), sd->status.name); // '%s' skill and stats points reseted!
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -6374,7 +6374,7 @@ ACMD_FUNC(summon)
if (!message || !*message || sscanf(message, "%23s %d", name, &duration) < 1)
{
- clif_displaymessage(fd, msg_txt(1225)); // Please enter a monster name (usage: @summon <monster name> {duration}).
+ clif->displaymessage(fd, msg_txt(1225)); // Please enter a monster name (usage: @summon <monster name> {duration}).
return -1;
}
@@ -6387,7 +6387,7 @@ ACMD_FUNC(summon)
mob_id = mobdb_searchname(name);
if(mob_id == 0 || mobdb_checkid(mob_id) == 0)
{
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif->displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
return -1;
}
@@ -6399,11 +6399,11 @@ ACMD_FUNC(summon)
md->master_id=sd->bl.id;
md->special_state.ai=1;
md->deletetimer=add_timer(tick+(duration*60000),mob_timer_delete,md->bl.id,0);
- clif_specialeffect(&md->bl,344,AREA);
+ clif->specialeffect(&md->bl,344,AREA);
mob_spawn(md);
sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000);
- clif_skill_poseffect(&sd->bl,AM_CALLHOMUN,1,md->bl.x,md->bl.y,tick);
- clif_displaymessage(fd, msg_txt(39)); // All monster summoned!
+ clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,md->bl.x,md->bl.y,tick);
+ clif->displaymessage(fd, msg_txt(39)); // All monster summoned!
return 0;
}
@@ -6419,19 +6419,19 @@ ACMD_FUNC(adjgroup)
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d", &new_group) != 1) {
- clif_displaymessage(fd, msg_txt(1226)); // Usage: @adjgroup <group_id>
+ clif->displaymessage(fd, msg_txt(1226)); // Usage: @adjgroup <group_id>
return -1;
}
if (!pc_group_exists(new_group)) {
- clif_displaymessage(fd, msg_txt(1227)); // Specified group does not exist.
+ clif->displaymessage(fd, msg_txt(1227)); // Specified group does not exist.
return -1;
}
sd->group_id = new_group;
pc_group_pc_load(sd);/* update cache */
- clif_displaymessage(fd, msg_txt(1228)); // Group changed successfully.
- clif_displaymessage(sd->fd, msg_txt(1229)); // Your group has changed.
+ clif->displaymessage(fd, msg_txt(1228)); // Group changed successfully.
+ clif->displaymessage(sd->fd, msg_txt(1229)); // Your group has changed.
return 0;
}
@@ -6445,13 +6445,13 @@ ACMD_FUNC(trade)
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1230)); // Please enter a player name (usage: @trade <char name>).
+ clif->displaymessage(fd, msg_txt(1230)); // Please enter a player name (usage: @trade <char name>).
return -1;
}
if ( (pl_sd = map_nick2sd((char *)message)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
@@ -6469,16 +6469,16 @@ ACMD_FUNC(setbattleflag)
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%127s %127s", flag, value) != 2) {
- clif_displaymessage(fd, msg_txt(1231)); // Usage: @setbattleflag <flag> <value>
+ clif->displaymessage(fd, msg_txt(1231)); // Usage: @setbattleflag <flag> <value>
return -1;
}
if (battle->config_set_value(flag, value) == 0) {
- clif_displaymessage(fd, msg_txt(1232)); // Unknown battle_config flag.
+ clif->displaymessage(fd, msg_txt(1232)); // Unknown battle_config flag.
return -1;
}
- clif_displaymessage(fd, msg_txt(1233)); // Set battle_config as requested.
+ clif->displaymessage(fd, msg_txt(1233)); // Set battle_config as requested.
return 0;
}
@@ -6492,24 +6492,24 @@ ACMD_FUNC(unmute)
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1234)); // Please enter a player name (usage: @unmute <char name>).
+ clif->displaymessage(fd, msg_txt(1234)); // Please enter a player name (usage: @unmute <char name>).
return -1;
}
if ( (pl_sd = map_nick2sd((char *)message)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if(!pl_sd->sc.data[SC_NOCHAT]) {
- clif_displaymessage(sd->fd,msg_txt(1235)); // Player is not muted.
+ clif->displaymessage(sd->fd,msg_txt(1235)); // Player is not muted.
return -1;
}
pl_sd->status.manner = 0;
status_change_end(&pl_sd->bl, SC_NOCHAT, INVALID_TIMER);
- clif_displaymessage(sd->fd,msg_txt(1236)); // Player unmuted.
+ clif->displaymessage(sd->fd,msg_txt(1236)); // Player unmuted.
return 0;
}
@@ -6532,7 +6532,7 @@ ACMD_FUNC(uptime)
seconds -= (seconds/minute>0)?(seconds/minute)*minute:0;
snprintf(atcmd_output, sizeof(atcmd_output), msg_txt(245), days, hours, minutes, seconds);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -6563,24 +6563,24 @@ ACMD_FUNC(mute)
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %23[^\n]", &manner, atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1237)); // Usage: @mute <time> <char name>
+ clif->displaymessage(fd, msg_txt(1237)); // Usage: @mute <time> <char name>
return -1;
}
if ( (pl_sd = map_nick2sd(atcmd_player_name)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
}
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
- clif_manner_message(sd, 0);
- clif_manner_message(pl_sd, 5);
+ clif->manner_message(sd, 0);
+ clif->manner_message(pl_sd, 5);
if( pl_sd->status.manner < manner ) {
pl_sd->status.manner -= manner;
@@ -6590,7 +6590,7 @@ ACMD_FUNC(mute)
status_change_end(&pl_sd->bl, SC_NOCHAT, INVALID_TIMER);
}
- clif_GM_silence(sd, pl_sd, (manner > 0 ? 1 : 0));
+ clif->GM_silence(sd, pl_sd, (manner > 0 ? 1 : 0));
return 0;
}
@@ -6601,7 +6601,7 @@ ACMD_FUNC(mute)
ACMD_FUNC(refresh)
{
nullpo_retr(-1, sd);
- clif_refresh(sd);
+ clif->refresh(sd);
return 0;
}
@@ -6613,7 +6613,7 @@ ACMD_FUNC(refreshall)
iter = mapit_getallusers();
for (iter_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); iter_sd = (TBL_PC*)mapit_next(iter))
- clif_refresh(iter_sd);
+ clif->refresh(iter_sd);
mapit_free(iter);
return 0;
}
@@ -6634,9 +6634,9 @@ ACMD_FUNC(identify)
}
}
if (num > 0) {
- clif_item_identify_list(sd);
+ clif->item_identify_list(sd);
} else {
- clif_displaymessage(fd,msg_txt(1238)); // There are no items to appraise.
+ clif->displaymessage(fd,msg_txt(1238)); // There are no items to appraise.
}
return 0;
}
@@ -6688,7 +6688,7 @@ ACMD_FUNC(misceffect)
return -1;
if (sscanf(message, "%d", &effect) < 1)
return -1;
- clif_misceffect(&sd->bl,effect);
+ clif->misceffect(&sd->bl,effect);
return 0;
}
@@ -6722,7 +6722,7 @@ ACMD_FUNC(mobinfo)
memset(atcmd_output2, '\0', sizeof(atcmd_output2));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1239)); // Please enter a monster name/ID (usage: @mobinfo <monster_name_or_monster_ID>).
+ clif->displaymessage(fd, msg_txt(1239)); // Please enter a monster name/ID (usage: @mobinfo <monster_name_or_monster_ID>).
return -1;
}
@@ -6735,13 +6735,13 @@ ACMD_FUNC(mobinfo)
count = mobdb_searchname_array(mob_array, MAX_SEARCH, message);
if (!count) {
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif->displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
return -1;
}
if (count > MAX_SEARCH) {
sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, count);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
count = MAX_SEARCH;
}
for (k = 0; k < count; k++) {
@@ -6752,21 +6752,21 @@ ACMD_FUNC(mobinfo)
sprintf(atcmd_output, msg_txt(1240), mob->name, mob->jname, mob->sprite, mob->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d)
else
sprintf(atcmd_output, msg_txt(1241), mob->name, mob->jname, mob->sprite, mob->vd.class_); // Monster: '%s'/'%s'/'%s' (%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1242), mob->lv, mob->status.max_hp, mob->base_exp, mob->job_exp,MOB_HIT(mob), MOB_FLEE(mob)); // Lv:%d HP:%d Base EXP:%u Job EXP:%u HIT:%d FLEE:%d
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1243), // DEF:%d MDEF:%d STR:%d AGI:%d VIT:%d INT:%d DEX:%d LUK:%d
mob->status.def, mob->status.mdef,mob->status.str, mob->status.agi,
mob->status.vit, mob->status.int_, mob->status.dex, mob->status.luk);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1244), // ATK:%d~%d Range:%d~%d~%d Size:%s Race: %s Element: %s (Lv:%d)
mob->status.rhw.atk, mob->status.rhw.atk2, mob->status.rhw.range,
mob->range2 , mob->range3, msize[mob->status.size],
mrace[mob->status.race], melement[mob->status.def_ele], mob->status.ele_lv);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
// drops
- clif_displaymessage(fd, msg_txt(1245)); // Drops:
+ clif->displaymessage(fd, msg_txt(1245)); // Drops:
strcpy(atcmd_output, " ");
j = 0;
for (i = 0; i < MAX_MOB_DROP; i++) {
@@ -6781,18 +6781,18 @@ ACMD_FUNC(mobinfo)
sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, (float)droprate / 100);
strcat(atcmd_output, atcmd_output2);
if (++j % 3 == 0) {
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
strcpy(atcmd_output, " ");
}
}
if (j == 0)
- clif_displaymessage(fd, msg_txt(1246)); // This monster has no drops.
+ clif->displaymessage(fd, msg_txt(1246)); // This monster has no drops.
else if (j % 3 != 0)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
// mvp
if (mob->mexp) {
sprintf(atcmd_output, msg_txt(1247), mob->mexp); // MVP Bonus EXP:%u
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
strcpy(atcmd_output, msg_txt(1248)); // MVP Items:
j = 0;
for (i = 0; i < MAX_MVP_DROP; i++) {
@@ -6808,9 +6808,9 @@ ACMD_FUNC(mobinfo)
}
}
if (j == 0)
- clif_displaymessage(fd, msg_txt(1249)); // This monster has no MVP prizes.
+ clif->displaymessage(fd, msg_txt(1249)); // This monster has no MVP prizes.
else
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
}
return 0;
@@ -6836,12 +6836,12 @@ ACMD_FUNC(showmobs)
mob_id = mobdb_searchname(mob_name);
if(mob_id > 0 && mobdb_checkid(mob_id) == 0){
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1250),mob_name); // Invalid mob id %s!
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
if(mob_db(mob_id)->status.mode&MD_BOSS && !pc_has_permission(sd, PC_PERM_SHOW_BOSS)){ // If player group does not have access to boss mobs.
- clif_displaymessage(fd, msg_txt(1251)); // Can't show boss mobs!
+ clif->displaymessage(fd, msg_txt(1251)); // Can't show boss mobs!
return 0;
}
@@ -6851,7 +6851,7 @@ ACMD_FUNC(showmobs)
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1252), // Mob Search... %s %s
mob_name, mapindex_id2name(sd->mapindex));
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
it = mapit_geteachmob();
for(;;)
@@ -6870,7 +6870,7 @@ ACMD_FUNC(showmobs)
continue; // hide mobs waiting for respawn
++number;
- clif_viewpoint(sd, 1, 0, md->bl.x, md->bl.y, number, 0xFFFFFF);
+ clif->viewpoint(sd, 1, 0, md->bl.x, md->bl.y, number, 0xFFFFFF);
}
mapit_free(it);
@@ -6888,12 +6888,12 @@ ACMD_FUNC(homlevel)
nullpo_retr(-1, sd);
if ( !message || !*message || ( level = atoi(message) ) < 1 ) {
- clif_displaymessage(fd, msg_txt(1253)); // Please enter a level adjustment (usage: @homlevel <number of levels>).
+ clif->displaymessage(fd, msg_txt(1253)); // Please enter a level adjustment (usage: @homlevel <number of levels>).
return -1;
}
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif->displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
return -1;
}
@@ -6908,7 +6908,7 @@ ACMD_FUNC(homlevel)
status_calc_homunculus(hd,0);
status_percent_heal(&hd->bl, 100, 100);
- clif_specialeffect(&hd->bl,568,AREA);
+ clif->specialeffect(&hd->bl,568,AREA);
return 0;
}
@@ -6920,15 +6920,15 @@ ACMD_FUNC(homevolution)
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif->displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
return -1;
}
if ( !merc_hom_evolution(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1255)); // Your homunculus doesn't evolve.
+ clif->displaymessage(fd, msg_txt(1255)); // Your homunculus doesn't evolve.
return -1;
}
- clif_homskillinfoblock(sd);
+ clif->homskillinfoblock(sd);
return 0;
}
@@ -6938,7 +6938,7 @@ ACMD_FUNC(hommutate)
nullpo_retr(-1, sd);
if (!merc_is_hom_active(sd->hd)) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif->displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
return -1;
}
@@ -6954,7 +6954,7 @@ ACMD_FUNC(hommutate)
if (m_class != -1 && m_id != -1 && m_class&HOM_EVO && m_id&HOM_S && sd->hd->homunculus.level >= 99) {
hom_mutate(sd->hd, homun_id);
} else {
- clif_emotion(&sd->hd->bl, E_SWT);
+ clif->emotion(&sd->hd->bl, E_SWT);
}
return 0;
}
@@ -6968,19 +6968,19 @@ ACMD_FUNC(makehomun)
nullpo_retr(-1, sd);
if ( sd->status.hom_id ) {
- clif_displaymessage(fd, msg_txt(450));
+ clif->displaymessage(fd, msg_txt(450));
return -1;
}
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1256)); // Please enter a homunculus ID (usage: @makehomun <homunculus id>).
+ clif->displaymessage(fd, msg_txt(1256)); // Please enter a homunculus ID (usage: @makehomun <homunculus id>).
return -1;
}
homunid = atoi(message);
if( homunid < HM_CLASS_BASE || homunid > HM_CLASS_BASE + MAX_HOMUNCULUS_CLASS - 1 )
{
- clif_displaymessage(fd, msg_txt(1257)); // Invalid Homunculus ID.
+ clif->displaymessage(fd, msg_txt(1257)); // Invalid Homunculus ID.
return -1;
}
@@ -6998,12 +6998,12 @@ ACMD_FUNC(homfriendly)
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif->displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
return -1;
}
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1258)); // Please enter a friendly value (usage: @homfriendly <friendly value [0-1000]>).
+ clif->displaymessage(fd, msg_txt(1258)); // Please enter a friendly value (usage: @homfriendly <friendly value [0-1000]>).
return -1;
}
@@ -7011,7 +7011,7 @@ ACMD_FUNC(homfriendly)
friendly = cap_value(friendly, 0, 1000);
sd->hd->homunculus.intimacy = friendly * 100 ;
- clif_send_homdata(sd,SP_INTIMATE,friendly);
+ clif->send_homdata(sd,SP_INTIMATE,friendly);
return 0;
}
@@ -7025,12 +7025,12 @@ ACMD_FUNC(homhungry)
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif->displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
return -1;
}
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1259)); // Please enter a hunger value (usage: @homhungry <hunger value [0-100]>).
+ clif->displaymessage(fd, msg_txt(1259)); // Please enter a hunger value (usage: @homhungry <hunger value [0-100]>).
return -1;
}
@@ -7038,7 +7038,7 @@ ACMD_FUNC(homhungry)
hungry = cap_value(hungry, 0, 100);
sd->hd->homunculus.hunger = hungry;
- clif_send_homdata(sd,SP_HUNGRY,hungry);
+ clif->send_homdata(sd,SP_HUNGRY,hungry);
return 0;
}
@@ -7063,17 +7063,17 @@ ACMD_FUNC(homtalk)
return -1;
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif->displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
return -1;
}
if (!message || !*message || sscanf(message, "%99[^\n]", mes) < 1) {
- clif_displaymessage(fd, msg_txt(1260)); // Please enter a message (usage: @homtalk <message>).
+ clif->displaymessage(fd, msg_txt(1260)); // Please enter a message (usage: @homtalk <message>).
return -1;
}
snprintf(temp, sizeof temp ,"%s : %s", sd->hd->homunculus.name, mes);
- clif_message(&sd->hd->bl, temp);
+ clif->message(&sd->hd->bl, temp);
return 0;
}
@@ -7088,31 +7088,31 @@ ACMD_FUNC(hominfo)
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif->displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
return -1;
}
hd = sd->hd;
status = status_get_status_data(&hd->bl);
- clif_displaymessage(fd, msg_txt(1261)); // Homunculus stats:
+ clif->displaymessage(fd, msg_txt(1261)); // Homunculus stats:
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1262), // HP: %d/%d - SP: %d/%d
status->hp, status->max_hp, status->sp, status->max_sp);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1263), // ATK: %d - MATK: %d~%d
status->rhw.atk2 +status->batk, status->matk_min, status->matk_max);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1264), // Hungry: %d - Intimacy: %u
hd->homunculus.hunger, hd->homunculus.intimacy/100);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
snprintf(atcmd_output, sizeof(atcmd_output) ,
msg_txt(1265), // Stats: Str %d / Agi %d / Vit %d / Int %d / Dex %d / Luk %d
status->str, status->agi, status->vit,
status->int_, status->dex, status->luk);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -7127,7 +7127,7 @@ ACMD_FUNC(homstats)
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif->displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
return -1;
}
@@ -7139,49 +7139,49 @@ ACMD_FUNC(homstats)
snprintf(atcmd_output, sizeof(atcmd_output) ,
msg_txt(1266), lv, db->name); // Homunculus growth stats (Lv %d %s):
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
lv--; //Since the first increase is at level 2.
evo = (hom->class_ == db->evo_class);
min = db->base.HP +lv*db->gmin.HP +(evo?db->emin.HP:0);
max = db->base.HP +lv*db->gmax.HP +(evo?db->emax.HP:0);;
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1267), hom->max_hp, min, max); // Max HP: %d (%d~%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
min = db->base.SP +lv*db->gmin.SP +(evo?db->emin.SP:0);
max = db->base.SP +lv*db->gmax.SP +(evo?db->emax.SP:0);;
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1268), hom->max_sp, min, max); // Max SP: %d (%d~%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
min = db->base.str +lv*(db->gmin.str/10) +(evo?db->emin.str:0);
max = db->base.str +lv*(db->gmax.str/10) +(evo?db->emax.str:0);;
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1269), hom->str/10, min, max); // Str: %d (%d~%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
min = db->base.agi +lv*(db->gmin.agi/10) +(evo?db->emin.agi:0);
max = db->base.agi +lv*(db->gmax.agi/10) +(evo?db->emax.agi:0);;
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1270), hom->agi/10, min, max); // Agi: %d (%d~%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
min = db->base.vit +lv*(db->gmin.vit/10) +(evo?db->emin.vit:0);
max = db->base.vit +lv*(db->gmax.vit/10) +(evo?db->emax.vit:0);;
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1271), hom->vit/10, min, max); // Vit: %d (%d~%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
min = db->base.int_ +lv*(db->gmin.int_/10) +(evo?db->emin.int_:0);
max = db->base.int_ +lv*(db->gmax.int_/10) +(evo?db->emax.int_:0);;
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1272), hom->int_/10, min, max); // Int: %d (%d~%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
min = db->base.dex +lv*(db->gmin.dex/10) +(evo?db->emin.dex:0);
max = db->base.dex +lv*(db->gmax.dex/10) +(evo?db->emax.dex:0);;
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1273), hom->dex/10, min, max); // Dex: %d (%d~%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
min = db->base.luk +lv*(db->gmin.luk/10) +(evo?db->emin.luk:0);
max = db->base.luk +lv*(db->gmax.luk/10) +(evo?db->emax.luk:0);;
snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1274), hom->luk/10, min, max); // Luk: %d (%d~%d)
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -7196,7 +7196,7 @@ ACMD_FUNC(homshuffle)
if(!merc_hom_shuffle(sd->hd))
return -1;
- clif_displaymessage(sd->fd, msg_txt(1275)); // Homunculus stats altered.
+ clif->displaymessage(sd->fd, msg_txt(1275)); // Homunculus stats altered.
atcommand_homstats(fd, sd, command, message); //Print out the new stats
return 0;
}
@@ -7211,20 +7211,20 @@ ACMD_FUNC(iteminfo)
int i, count = 1;
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1276)); // Please enter an item name/ID (usage: @ii/@iteminfo <item name/ID>).
+ clif->displaymessage(fd, msg_txt(1276)); // Please enter an item name/ID (usage: @ii/@iteminfo <item name/ID>).
return -1;
}
if ((item_array[0] = itemdb_exists(atoi(message))) == NULL)
count = itemdb_searchname_array(item_array, MAX_SEARCH, message);
if (!count) {
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
+ clif->displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
return -1;
}
if (count > MAX_SEARCH) {
sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, count); // Displaying first %d out of %d matches
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
count = MAX_SEARCH;
}
for (i = 0; i < count; i++) {
@@ -7234,10 +7234,10 @@ ACMD_FUNC(iteminfo)
itemdb_typename(item_data->type),
(item_data->script==NULL)? msg_txt(1278) : msg_txt(1279) // None / With script
);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1280), item_data->value_buy, item_data->value_sell, item_data->weight/10. ); // NPC Buy:%dz, Sell:%dz | Weight: %.1f
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
if (item_data->maxchance == -1)
strcpy(atcmd_output, msg_txt(1281)); // - Available in the shops only.
@@ -7245,7 +7245,7 @@ ACMD_FUNC(iteminfo)
sprintf(atcmd_output, msg_txt(1282), (float)item_data->maxchance / 100 ); // - Maximal monsters drop chance: %02.02f%%
else
strcpy(atcmd_output, msg_txt(1283)); // - Monsters don't drop this item.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return 0;
@@ -7260,38 +7260,38 @@ ACMD_FUNC(whodrops)
int i,j, count = 1;
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1284)); // Please enter item name/ID (usage: @whodrops <item name/ID>).
+ clif->displaymessage(fd, msg_txt(1284)); // Please enter item name/ID (usage: @whodrops <item name/ID>).
return -1;
}
if ((item_array[0] = itemdb_exists(atoi(message))) == NULL)
count = itemdb_searchname_array(item_array, MAX_SEARCH, message);
if (!count) {
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
+ clif->displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
return -1;
}
if (count > MAX_SEARCH) {
sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, count); // Displaying first %d out of %d matches
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
count = MAX_SEARCH;
}
for (i = 0; i < count; i++) {
item_data = item_array[i];
sprintf(atcmd_output, msg_txt(1285), item_data->jname,item_data->slot); // Item: '%s'[%d]
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
if (item_data->mob[0].chance == 0) {
strcpy(atcmd_output, msg_txt(1286)); // - Item is not dropped by mobs.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
} else {
sprintf(atcmd_output, msg_txt(1287), MAX_SEARCH); // - Common mobs with highest drop chance (only max %d are listed):
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++)
{
sprintf(atcmd_output, "- %s (%02.02f%%)", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].chance/100.);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
}
}
@@ -7305,7 +7305,7 @@ ACMD_FUNC(whereis)
int i, j, k;
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1288)); // Please enter a monster name/ID (usage: @whereis <monster_name_or_monster_ID>).
+ clif->displaymessage(fd, msg_txt(1288)); // Please enter a monster name/ID (usage: @whereis <monster_name_or_monster_ID>).
return -1;
}
@@ -7318,29 +7318,29 @@ ACMD_FUNC(whereis)
count = mobdb_searchname_array(mob_array, MAX_SEARCH, message);
if (!count) {
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif->displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
return -1;
}
if (count > MAX_SEARCH) {
sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, count);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
count = MAX_SEARCH;
}
for (k = 0; k < count; k++) {
mob = mob_array[k];
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1289), mob->jname); // %s spawns in:
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
for (i = 0; i < ARRAYLENGTH(mob->spawn) && mob->spawn[i].qty; i++)
{
j = map_mapindex2mapid(mob->spawn[i].mapindex);
if (j < 0) continue;
snprintf(atcmd_output, sizeof atcmd_output, "%s (%d)", map[j].name, mob->spawn[i].qty);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
if (i == 0)
- clif_displaymessage(fd, msg_txt(1290)); // This monster does not spawn normally.
+ clif->displaymessage(fd, msg_txt(1290)); // This monster does not spawn normally.
}
return 0;
@@ -7352,9 +7352,9 @@ ACMD_FUNC(version)
if ((revision = get_svn_revision()) != 0) {
sprintf(atcmd_output,msg_txt(1295),revision); // rAthena Version SVN r%s
- clif_displaymessage(fd,atcmd_output);
+ clif->displaymessage(fd,atcmd_output);
} else
- clif_displaymessage(fd,msg_txt(1296)); // Cannot determine SVN revision.
+ clif->displaymessage(fd,msg_txt(1296)); // Cannot determine SVN revision.
return 0;
}
@@ -7389,7 +7389,7 @@ ACMD_FUNC(mutearea)
nullpo_ret(sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1297)); // Please enter a time in minutes (usage: @mutearea/@stfu <time in minutes>).
+ clif->displaymessage(fd, msg_txt(1297)); // Please enter a time in minutes (usage: @mutearea/@stfu <time in minutes>).
return -1;
}
@@ -7412,16 +7412,16 @@ ACMD_FUNC(rates)
snprintf(buf, CHAT_SIZE_MAX, msg_txt(1298), // Experience rates: Base %.2fx / Job %.2fx
battle_config.base_exp_rate/100., battle_config.job_exp_rate/100.);
- clif_displaymessage(fd, buf);
+ clif->displaymessage(fd, buf);
snprintf(buf, CHAT_SIZE_MAX, msg_txt(1299), // Normal Drop Rates: Common %.2fx / Healing %.2fx / Usable %.2fx / Equipment %.2fx / Card %.2fx
battle_config.item_rate_common/100., battle_config.item_rate_heal/100., battle_config.item_rate_use/100., battle_config.item_rate_equip/100., battle_config.item_rate_card/100.);
- clif_displaymessage(fd, buf);
+ clif->displaymessage(fd, buf);
snprintf(buf, CHAT_SIZE_MAX, msg_txt(1300), // Boss Drop Rates: Common %.2fx / Healing %.2fx / Usable %.2fx / Equipment %.2fx / Card %.2fx
battle_config.item_rate_common_boss/100., battle_config.item_rate_heal_boss/100., battle_config.item_rate_use_boss/100., battle_config.item_rate_equip_boss/100., battle_config.item_rate_card_boss/100.);
- clif_displaymessage(fd, buf);
+ clif->displaymessage(fd, buf);
snprintf(buf, CHAT_SIZE_MAX, msg_txt(1301), // Other Drop Rates: MvP %.2fx / Card-Based %.2fx / Treasure %.2fx
battle_config.item_rate_mvp/100., battle_config.item_rate_adddrop/100., battle_config.item_rate_treasure/100.);
- clif_displaymessage(fd, buf);
+ clif->displaymessage(fd, buf);
return 0;
}
@@ -7444,12 +7444,12 @@ ACMD_FUNC(me)
return -1;
if (!message || !*message || sscanf(message, "%199[^\n]", tempmes) < 0) {
- clif_displaymessage(fd, msg_txt(1302)); // Please enter a message (usage: @me <message>).
+ clif->displaymessage(fd, msg_txt(1302)); // Please enter a message (usage: @me <message>).
return -1;
}
sprintf(atcmd_output, msg_txt(270), sd->status.name, tempmes); // *%s %s*
- clif_disp_overhead(sd, atcmd_output);
+ clif->disp_overhead(sd, atcmd_output);
return 0;
@@ -7473,11 +7473,11 @@ ACMD_FUNC(size)
sd->state.size = size;
if( size == SZ_MEDIUM )
- clif_specialeffect(&sd->bl,420,AREA);
+ clif->specialeffect(&sd->bl,420,AREA);
else if( size == SZ_BIG )
- clif_specialeffect(&sd->bl,422,AREA);
+ clif->specialeffect(&sd->bl,422,AREA);
- clif_displaymessage(fd, msg_txt(1303)); // Size change applied.
+ clif->displaymessage(fd, msg_txt(1303)); // Size change applied.
return 0;
}
@@ -7500,14 +7500,14 @@ ACMD_FUNC(sizeall)
pl_sd->state.size = size;
if( size == SZ_MEDIUM )
- clif_specialeffect(&pl_sd->bl,420,AREA);
+ clif->specialeffect(&pl_sd->bl,420,AREA);
else if( size == SZ_BIG )
- clif_specialeffect(&pl_sd->bl,422,AREA);
+ clif->specialeffect(&pl_sd->bl,422,AREA);
}
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(1303)); // Size change applied.
+ clif->displaymessage(fd, msg_txt(1303)); // Size change applied.
return 0;
}
@@ -7522,12 +7522,12 @@ ACMD_FUNC(sizeguild)
memset(guild, '\0', sizeof(guild));
if( !message || !*message || sscanf(message, "%d %23[^\n]", &size, guild) < 2 ) {
- clif_displaymessage(fd, msg_txt(1304)); // Please enter guild name/ID (usage: @sizeguild <size> <guild name/ID>).
+ clif->displaymessage(fd, msg_txt(1304)); // Please enter guild name/ID (usage: @sizeguild <size> <guild name/ID>).
return -1;
}
if( (g = guild_searchname(guild)) == NULL && (g = guild_search(atoi(guild))) == NULL ) {
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
+ clif->displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
return -1;
}
@@ -7542,13 +7542,13 @@ ACMD_FUNC(sizeguild)
pl_sd->state.size = size;
if( size == SZ_MEDIUM )
- clif_specialeffect(&pl_sd->bl,420,AREA);
+ clif->specialeffect(&pl_sd->bl,420,AREA);
else if( size == SZ_BIG )
- clif_specialeffect(&pl_sd->bl,422,AREA);
+ clif->specialeffect(&pl_sd->bl,422,AREA);
}
}
- clif_displaymessage(fd, msg_txt(1303)); // Size change applied.
+ clif->displaymessage(fd, msg_txt(1303)); // Size change applied.
return 0;
}
@@ -7562,10 +7562,10 @@ ACMD_FUNC(monsterignore)
if (!sd->state.monster_ignore) {
sd->state.monster_ignore = 1;
- clif_displaymessage(sd->fd, msg_txt(1305)); // You are now immune to attacks.
+ clif->displaymessage(sd->fd, msg_txt(1305)); // You are now immune to attacks.
} else {
sd->state.monster_ignore = 0;
- clif_displaymessage(sd->fd, msg_txt(1306)); // Returned to normal state.
+ clif->displaymessage(sd->fd, msg_txt(1306)); // Returned to normal state.
}
return 0;
@@ -7583,24 +7583,24 @@ ACMD_FUNC(fakename)
if( sd->fakename[0] )
{
sd->fakename[0] = '\0';
- clif_charnameack(0, &sd->bl);
- clif_displaymessage(sd->fd, msg_txt(1307)); // Returned to real name.
+ clif->charnameack(0, &sd->bl);
+ clif->displaymessage(sd->fd, msg_txt(1307)); // Returned to real name.
return 0;
}
- clif_displaymessage(sd->fd, msg_txt(1308)); // You must enter a name.
+ clif->displaymessage(sd->fd, msg_txt(1308)); // You must enter a name.
return -1;
}
if( strlen(message) < 2 )
{
- clif_displaymessage(sd->fd, msg_txt(1309)); // Fake name must be at least two characters.
+ clif->displaymessage(sd->fd, msg_txt(1309)); // Fake name must be at least two characters.
return -1;
}
safestrncpy(sd->fakename, message, sizeof(sd->fakename));
- clif_charnameack(0, &sd->bl);
- clif_displaymessage(sd->fd, msg_txt(1310)); // Fake name enabled.
+ clif->charnameack(0, &sd->bl);
+ clif->displaymessage(sd->fd, msg_txt(1310)); // Fake name enabled.
return 0;
}
@@ -7609,12 +7609,12 @@ ACMD_FUNC(fakename)
* Ragnarok Resources
*------------------------------------------*/
ACMD_FUNC(mapflag) {
-#define checkflag( cmd ) if ( map[ sd->bl.m ].flag.cmd ) clif_displaymessage(sd->fd,#cmd)
+#define checkflag( cmd ) if ( map[ sd->bl.m ].flag.cmd ) clif->displaymessage(sd->fd,#cmd)
#define setflag( cmd ) \
if ( strcmp( flag_name , #cmd ) == 0 ){\
map[ sd->bl.m ].flag.cmd = flag;\
sprintf(atcmd_output,"[ @mapflag ] %s flag has been set to %s value = %hd",#cmd,flag?"On":"Off",flag);\
- clif_displaymessage(sd->fd,atcmd_output);\
+ clif->displaymessage(sd->fd,atcmd_output);\
return 0;\
}
char flag_name[100];
@@ -7623,8 +7623,8 @@ ACMD_FUNC(mapflag) {
memset(flag_name, '\0', sizeof(flag_name));
if (!message || !*message || (sscanf(message, "%99s %hd", flag_name, &flag) < 1)) {
- clif_displaymessage(sd->fd,msg_txt(1311)); // Enabled Mapflags in this map:
- clif_displaymessage(sd->fd,"----------------------------------");
+ clif->displaymessage(sd->fd,msg_txt(1311)); // Enabled Mapflags in this map:
+ clif->displaymessage(sd->fd,"----------------------------------");
checkflag(autotrade); checkflag(allowks); checkflag(nomemo); checkflag(noteleport);
checkflag(noreturn); checkflag(monster_noteleport); checkflag(nosave); checkflag(nobranch);
checkflag(noexppenalty); checkflag(pvp); checkflag(pvp_noparty); checkflag(pvp_noguild);
@@ -7637,9 +7637,9 @@ ACMD_FUNC(mapflag) {
checkflag(nojobexp); checkflag(nomobloot); checkflag(nomvploot); checkflag(nightenabled);
checkflag(nodrop); checkflag(novending); checkflag(loadevent);
checkflag(nochat); checkflag(partylock); checkflag(guildlock); checkflag(src4instance);
- clif_displaymessage(sd->fd," ");
- clif_displaymessage(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On)
- clif_displaymessage(sd->fd,msg_txt(1313)); // Type "@mapflag available" to list the available mapflags.
+ clif->displaymessage(sd->fd," ");
+ clif->displaymessage(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On)
+ clif->displaymessage(sd->fd,msg_txt(1313)); // Type "@mapflag available" to list the available mapflags.
return 1;
}
for (i = 0; flag_name[i]; i++) flag_name[i] = (char)tolower(flag_name[i]); //lowercase
@@ -7657,17 +7657,17 @@ ACMD_FUNC(mapflag) {
setflag(nodrop); setflag(novending); setflag(loadevent);
setflag(nochat); setflag(partylock); setflag(guildlock); setflag(src4instance);
- clif_displaymessage(sd->fd,msg_txt(1314)); // Invalid flag name or flag.
- clif_displaymessage(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On)
- clif_displaymessage(sd->fd,msg_txt(1315)); // Available Flags:
- clif_displaymessage(sd->fd,"----------------------------------");
- clif_displaymessage(sd->fd,"town, autotrade, allowks, nomemo, noteleport, noreturn, monster_noteleport, nosave,");
- clif_displaymessage(sd->fd,"nobranch, noexppenalty, pvp, pvp_noparty, pvp_noguild, pvp_nightmaredrop,");
- clif_displaymessage(sd->fd,"pvp_nocalcrank, gvg_castle, gvg, gvg_dungeon, gvg_noparty, battleground,");
- clif_displaymessage(sd->fd,"nozenypenalty, notrade, noskill, nowarp, nowarpto, noicewall, snow, clouds, clouds2,");
- clif_displaymessage(sd->fd,"fog, fireworks, sakura, leaves, nogo, nobaseexp, nojobexp, nomobloot,");
- clif_displaymessage(sd->fd,"nomvploot, nightenabled, nodrop, novending, loadevent, nochat, partylock,");
- clif_displaymessage(sd->fd,"guildlock, src4instance");
+ clif->displaymessage(sd->fd,msg_txt(1314)); // Invalid flag name or flag.
+ clif->displaymessage(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On)
+ clif->displaymessage(sd->fd,msg_txt(1315)); // Available Flags:
+ clif->displaymessage(sd->fd,"----------------------------------");
+ clif->displaymessage(sd->fd,"town, autotrade, allowks, nomemo, noteleport, noreturn, monster_noteleport, nosave,");
+ clif->displaymessage(sd->fd,"nobranch, noexppenalty, pvp, pvp_noparty, pvp_noguild, pvp_nightmaredrop,");
+ clif->displaymessage(sd->fd,"pvp_nocalcrank, gvg_castle, gvg, gvg_dungeon, gvg_noparty, battleground,");
+ clif->displaymessage(sd->fd,"nozenypenalty, notrade, noskill, nowarp, nowarpto, noicewall, snow, clouds, clouds2,");
+ clif->displaymessage(sd->fd,"fog, fireworks, sakura, leaves, nogo, nobaseexp, nojobexp, nomobloot,");
+ clif->displaymessage(sd->fd,"nomvploot, nightenabled, nodrop, novending, loadevent, nochat, partylock,");
+ clif->displaymessage(sd->fd,"guildlock, src4instance");
#undef checkflag
#undef setflag
@@ -7682,12 +7682,12 @@ ACMD_FUNC(showexp)
{
if (sd->state.showexp) {
sd->state.showexp = 0;
- clif_displaymessage(fd, msg_txt(1316)); // Gained exp will not be shown.
+ clif->displaymessage(fd, msg_txt(1316)); // Gained exp will not be shown.
return 0;
}
sd->state.showexp = 1;
- clif_displaymessage(fd, msg_txt(1317)); // Gained exp is now shown.
+ clif->displaymessage(fd, msg_txt(1317)); // Gained exp is now shown.
return 0;
}
@@ -7695,12 +7695,12 @@ ACMD_FUNC(showzeny)
{
if (sd->state.showzeny) {
sd->state.showzeny = 0;
- clif_displaymessage(fd, msg_txt(1318)); // Gained zeny will not be shown.
+ clif->displaymessage(fd, msg_txt(1318)); // Gained zeny will not be shown.
return 0;
}
sd->state.showzeny = 1;
- clif_displaymessage(fd, msg_txt(1319)); // Gained zeny is now shown.
+ clif->displaymessage(fd, msg_txt(1319)); // Gained zeny is now shown.
return 0;
}
@@ -7708,12 +7708,12 @@ ACMD_FUNC(showdelay)
{
if (sd->state.showdelay) {
sd->state.showdelay = 0;
- clif_displaymessage(fd, msg_txt(1320)); // Skill delay failures will not be shown.
+ clif->displaymessage(fd, msg_txt(1320)); // Skill delay failures will not be shown.
return 0;
}
sd->state.showdelay = 1;
- clif_displaymessage(fd, msg_txt(1321)); // Skill delay failures are now shown.
+ clif->displaymessage(fd, msg_txt(1321)); // Skill delay failures are now shown.
return 0;
}
@@ -7733,7 +7733,7 @@ ACMD_FUNC(invite)
if(did == 0) {
// "Duel: @invite without @duel."
- clif_displaymessage(fd, msg_txt(350));
+ clif->displaymessage(fd, msg_txt(350));
return 0;
}
@@ -7741,32 +7741,32 @@ ACMD_FUNC(invite)
duel_list[did].members_count >= duel_list[did].max_players_limit) {
// "Duel: Limit of players is reached."
- clif_displaymessage(fd, msg_txt(351));
+ clif->displaymessage(fd, msg_txt(351));
return 0;
}
if(target_sd == NULL) {
// "Duel: Player not found."
- clif_displaymessage(fd, msg_txt(352));
+ clif->displaymessage(fd, msg_txt(352));
return 0;
}
if(target_sd->duel_group > 0 || target_sd->duel_invite > 0) {
// "Duel: Player already in duel."
- clif_displaymessage(fd, msg_txt(353));
+ clif->displaymessage(fd, msg_txt(353));
return 0;
}
if(battle_config.duel_only_on_same_map && target_sd->bl.m != sd->bl.m)
{
sprintf(atcmd_output, msg_txt(364), message);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
duel_invite(did, sd, target_sd);
// "Duel: Invitation has been sent."
- clif_displaymessage(fd, msg_txt(354));
+ clif->displaymessage(fd, msg_txt(354));
return 0;
}
@@ -7781,7 +7781,7 @@ ACMD_FUNC(duel)
if(sd->duel_invite > 0) {
// "Duel: @duel without @reject."
- clif_displaymessage(fd, msg_txt(355));
+ clif->displaymessage(fd, msg_txt(355));
return 0;
}
@@ -7789,14 +7789,14 @@ ACMD_FUNC(duel)
char output[CHAT_SIZE_MAX];
// "Duel: You can take part in duel only one time per %d minutes."
sprintf(output, msg_txt(356), battle_config.duel_time_interval);
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
return 0;
}
if( message[0] ) {
if(sscanf(message, "%d", &maxpl) >= 1) {
if(maxpl < 2 || maxpl > 65535) {
- clif_displaymessage(fd, msg_txt(357)); // "Duel: Invalid value."
+ clif->displaymessage(fd, msg_txt(357)); // "Duel: Invalid value."
return 0;
}
duel_create(sd, maxpl);
@@ -7807,15 +7807,15 @@ ACMD_FUNC(duel)
unsigned int newduel;
if((newduel = duel_create(sd, 2)) != -1) {
if(target_sd->duel_group > 0 || target_sd->duel_invite > 0) {
- clif_displaymessage(fd, msg_txt(353)); // "Duel: Player already in duel."
+ clif->displaymessage(fd, msg_txt(353)); // "Duel: Player already in duel."
return 0;
}
duel_invite(newduel, sd, target_sd);
- clif_displaymessage(fd, msg_txt(354)); // "Duel: Invitation has been sent."
+ clif->displaymessage(fd, msg_txt(354)); // "Duel: Invitation has been sent."
}
} else {
// "Duel: Player not found."
- clif_displaymessage(fd, msg_txt(352));
+ clif->displaymessage(fd, msg_txt(352));
return 0;
}
}
@@ -7830,12 +7830,12 @@ ACMD_FUNC(leave)
{
if(sd->duel_group <= 0) {
// "Duel: @leave without @duel."
- clif_displaymessage(fd, msg_txt(358));
+ clif->displaymessage(fd, msg_txt(358));
return 0;
}
duel_leave(sd->duel_group, sd);
- clif_displaymessage(fd, msg_txt(359)); // "Duel: You left the duel."
+ clif->displaymessage(fd, msg_txt(359)); // "Duel: You left the duel."
return 0;
}
@@ -7845,26 +7845,26 @@ ACMD_FUNC(accept)
char output[CHAT_SIZE_MAX];
// "Duel: You can take part in duel only one time per %d minutes."
sprintf(output, msg_txt(356), battle_config.duel_time_interval);
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
return 0;
}
if(sd->duel_invite <= 0) {
// "Duel: @accept without invititation."
- clif_displaymessage(fd, msg_txt(360));
+ clif->displaymessage(fd, msg_txt(360));
return 0;
}
if( duel_list[sd->duel_invite].max_players_limit > 0 && duel_list[sd->duel_invite].members_count >= duel_list[sd->duel_invite].max_players_limit )
{
// "Duel: Limit of players is reached."
- clif_displaymessage(fd, msg_txt(351));
+ clif->displaymessage(fd, msg_txt(351));
return 0;
}
duel_accept(sd->duel_invite, sd);
// "Duel: Invitation has been accepted."
- clif_displaymessage(fd, msg_txt(361));
+ clif->displaymessage(fd, msg_txt(361));
return 0;
}
@@ -7872,13 +7872,13 @@ ACMD_FUNC(reject)
{
if(sd->duel_invite <= 0) {
// "Duel: @reject without invititation."
- clif_displaymessage(fd, msg_txt(362));
+ clif->displaymessage(fd, msg_txt(362));
return 0;
}
duel_reject(sd->duel_invite, sd);
// "Duel: Invitation has been rejected."
- clif_displaymessage(fd, msg_txt(363));
+ clif->displaymessage(fd, msg_txt(363));
return 0;
}
@@ -7893,7 +7893,7 @@ ACMD_FUNC(cash)
nullpo_retr(-1, sd);
if( !message || !*message || (value = atoi(message)) == 0 ) {
- clif_displaymessage(fd, msg_txt(1322)); // Please enter an amount.
+ clif->displaymessage(fd, msg_txt(1322)); // Please enter an amount.
return -1;
}
@@ -7902,15 +7902,15 @@ ACMD_FUNC(cash)
if( value > 0 ) {
if( (ret=pc_getcash(sd, value, 0)) >= 0){
sprintf(output, msg_txt(505), ret, sd->cashPoints);
- clif_disp_onlyself(sd, output, strlen(output));
+ clif->disp_onlyself(sd, output, strlen(output));
}
- else clif_displaymessage(fd, msg_txt(149)); // Unable to decrease the number/value.
+ else clif->displaymessage(fd, msg_txt(149)); // Unable to decrease the number/value.
} else {
if( (ret=pc_paycash(sd, -value, 0)) >= 0){
sprintf(output, msg_txt(410), ret, sd->cashPoints);
- clif_disp_onlyself(sd, output, strlen(output));
+ clif->disp_onlyself(sd, output, strlen(output));
}
- else clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ else clif->displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
}
}
else
@@ -7918,15 +7918,15 @@ ACMD_FUNC(cash)
if( value > 0 ) {
if( (ret=pc_getcash(sd, 0, value)) >= 0){
sprintf(output, msg_txt(506), ret, sd->kafraPoints);
- clif_disp_onlyself(sd, output, strlen(output));
+ clif->disp_onlyself(sd, output, strlen(output));
}
- else clif_displaymessage(fd, msg_txt(149)); // Unable to decrease the number/value.
+ else clif->displaymessage(fd, msg_txt(149)); // Unable to decrease the number/value.
} else {
if( (ret=pc_paycash(sd, -value, -value)) >= 0){
sprintf(output, msg_txt(411), ret, sd->kafraPoints);
- clif_disp_onlyself(sd, output, strlen(output));
+ clif->disp_onlyself(sd, output, strlen(output));
}
- else clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ else clif->displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
}
}
@@ -7940,17 +7940,17 @@ ACMD_FUNC(clone)
struct map_session_data *pl_sd=NULL;
if (!message || !*message) {
- clif_displaymessage(sd->fd,msg_txt(1323)); // You must enter a player name or ID.
+ clif->displaymessage(sd->fd,msg_txt(1323)); // You must enter a player name or ID.
return 0;
}
if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif->displaymessage(fd, msg_txt(3)); // Character not found.
return 0;
}
if(pc_get_group_level(pl_sd) > pc_get_group_level(sd)) {
- clif_displaymessage(fd, msg_txt(126)); // Cannot clone a player of higher GM level than yourself.
+ clif->displaymessage(fd, msg_txt(126)); // Cannot clone a player of higher GM level than yourself.
return 0;
}
@@ -7959,13 +7959,13 @@ ACMD_FUNC(clone)
else if (strcmpi(command+1, "slaveclone") == 0) {
flag = 2;
if(pc_isdead(sd)){
- clif_displaymessage(fd, msg_txt(129+flag*2));
+ clif->displaymessage(fd, msg_txt(129+flag*2));
return 0;
}
master = sd->bl.id;
if (battle_config.atc_slave_clone_limit
&& mob_countslave(&sd->bl) >= battle_config.atc_slave_clone_limit) {
- clif_displaymessage(fd, msg_txt(127)); // You've reached your slave clones limit.
+ clif->displaymessage(fd, msg_txt(127)); // You've reached your slave clones limit.
return 0;
}
}
@@ -7981,10 +7981,10 @@ ACMD_FUNC(clone)
}
if((x = mob_clone_spawn(pl_sd, sd->bl.m, x, y, "", master, 0, flag?1:0, 0)) > 0) {
- clif_displaymessage(fd, msg_txt(128+flag*2)); // Evil Clone spawned. Clone spawned. Slave clone spawned.
+ clif->displaymessage(fd, msg_txt(128+flag*2)); // Evil Clone spawned. Clone spawned. Slave clone spawned.
return 0;
}
- clif_displaymessage(fd, msg_txt(129+flag*2)); // Unable to spawn evil clone. Unable to spawn clone. Unable to spawn slave clone.
+ clif->displaymessage(fd, msg_txt(129+flag*2)); // Unable to spawn evil clone. Unable to spawn clone. Unable to spawn slave clone.
return 0;
}
@@ -7999,24 +7999,24 @@ ACMD_FUNC(main)
if(strcmpi(message, "on") == 0) {
if(!sd->state.mainchat) {
sd->state.mainchat = 1;
- clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated.
+ clif->displaymessage(fd, msg_txt(380)); // Main chat has been activated.
} else {
- clif_displaymessage(fd, msg_txt(381)); // Main chat already activated.
+ clif->displaymessage(fd, msg_txt(381)); // Main chat already activated.
}
} else if(strcmpi(message, "off") == 0) {
if(sd->state.mainchat) {
sd->state.mainchat = 0;
- clif_displaymessage(fd, msg_txt(382)); // Main chat has been disabled.
+ clif->displaymessage(fd, msg_txt(382)); // Main chat has been disabled.
} else {
- clif_displaymessage(fd, msg_txt(383)); // Main chat already disabled.
+ clif->displaymessage(fd, msg_txt(383)); // Main chat already disabled.
}
} else {
if(!sd->state.mainchat) {
sd->state.mainchat = 1;
- clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated.
+ clif->displaymessage(fd, msg_txt(380)); // Main chat has been activated.
}
if (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) {
- clif_displaymessage(fd, msg_txt(387));
+ clif->displaymessage(fd, msg_txt(387));
return -1;
}
@@ -8033,9 +8033,9 @@ ACMD_FUNC(main)
} else {
if(sd->state.mainchat)
- clif_displaymessage(fd, msg_txt(384)); // Main chat currently enabled. Usage: @main <on|off>, @main <message>.
+ clif->displaymessage(fd, msg_txt(384)); // Main chat currently enabled. Usage: @main <on|off>, @main <message>.
else
- clif_displaymessage(fd, msg_txt(385)); // Main chat currently disabled. Usage: @main <on|off>, @main <message>.
+ clif->displaymessage(fd, msg_txt(385)); // Main chat currently disabled. Usage: @main <on|off>, @main <message>.
}
return 0;
}
@@ -8047,10 +8047,10 @@ ACMD_FUNC(main)
ACMD_FUNC(noask)
{
if(sd->state.noask) {
- clif_displaymessage(fd, msg_txt(391)); // Autorejecting is deactivated.
+ clif->displaymessage(fd, msg_txt(391)); // Autorejecting is deactivated.
sd->state.noask = 0;
} else {
- clif_displaymessage(fd, msg_txt(390)); // Autorejecting is activated.
+ clif->displaymessage(fd, msg_txt(390)); // Autorejecting is activated.
sd->state.noask = 1;
}
@@ -8064,14 +8064,14 @@ ACMD_FUNC(noask)
ACMD_FUNC(request)
{
if (!message || !*message) {
- clif_displaymessage(sd->fd,msg_txt(277)); // Usage: @request <petition/message to online GMs>.
+ clif->displaymessage(sd->fd,msg_txt(277)); // Usage: @request <petition/message to online GMs>.
return -1;
}
sprintf(atcmd_output, msg_txt(278), message); // (@request): %s
intif_wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output);
- clif_disp_onlyself(sd, atcmd_output, strlen(atcmd_output));
- clif_displaymessage(sd->fd,msg_txt(279)); // @request sent.
+ clif->disp_onlyself(sd, atcmd_output, strlen(atcmd_output));
+ clif->displaymessage(sd->fd,msg_txt(279)); // @request sent.
return 0;
}
@@ -8081,7 +8081,7 @@ ACMD_FUNC(request)
ACMD_FUNC(feelreset)
{
pc_resetfeel(sd);
- clif_displaymessage(fd, msg_txt(1324)); // Reset 'Feeling' maps.
+ clif->displaymessage(fd, msg_txt(1324)); // Reset 'Feeling' maps.
return 0;
}
@@ -8093,7 +8093,7 @@ ACMD_FUNC(auction)
{
nullpo_ret(sd);
- clif_Auction_openwindow(sd);
+ clif->auction_openwindow(sd);
return 0;
}
@@ -8107,27 +8107,27 @@ ACMD_FUNC(ksprotection)
if( sd->state.noks ) {
sd->state.noks = 0;
- clif_displaymessage(fd, msg_txt(1325)); // [ K.S Protection Inactive ]
+ clif->displaymessage(fd, msg_txt(1325)); // [ K.S Protection Inactive ]
}
else
{
if( !message || !*message || !strcmpi(message, "party") )
{ // Default is Party
sd->state.noks = 2;
- clif_displaymessage(fd, msg_txt(1326)); // [ K.S Protection Active - Option: Party ]
+ clif->displaymessage(fd, msg_txt(1326)); // [ K.S Protection Active - Option: Party ]
}
else if( !strcmpi(message, "self") )
{
sd->state.noks = 1;
- clif_displaymessage(fd, msg_txt(1327)); // [ K.S Protection Active - Option: Self ]
+ clif->displaymessage(fd, msg_txt(1327)); // [ K.S Protection Active - Option: Self ]
}
else if( !strcmpi(message, "guild") )
{
sd->state.noks = 3;
- clif_displaymessage(fd, msg_txt(1328)); // [ K.S Protection Active - Option: Guild ]
+ clif->displaymessage(fd, msg_txt(1328)); // [ K.S Protection Active - Option: Guild ]
}
else
- clif_displaymessage(fd, msg_txt(1329)); // Usage: @noks <self|party|guild>
+ clif->displaymessage(fd, msg_txt(1329)); // Usage: @noks <self|party|guild>
}
return 0;
}
@@ -8140,10 +8140,10 @@ ACMD_FUNC(allowks)
if( map[sd->bl.m].flag.allowks ) {
map[sd->bl.m].flag.allowks = 0;
- clif_displaymessage(fd, msg_txt(1330)); // [ Map K.S Protection Active ]
+ clif->displaymessage(fd, msg_txt(1330)); // [ Map K.S Protection Active ]
} else {
map[sd->bl.m].flag.allowks = 1;
- clif_displaymessage(fd, msg_txt(1331)); // [ Map K.S Protection Inactive ]
+ clif->displaymessage(fd, msg_txt(1331)); // [ Map K.S Protection Inactive ]
}
return 0;
}
@@ -8154,7 +8154,7 @@ ACMD_FUNC(resetstat)
pc_resetstate(sd);
sprintf(atcmd_output, msg_txt(207), sd->status.name);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -8164,7 +8164,7 @@ ACMD_FUNC(resetskill)
pc_resetskill(sd,1);
sprintf(atcmd_output, msg_txt(206), sd->status.name);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
@@ -8224,7 +8224,7 @@ ACMD_FUNC(itemlist)
if( count == 1 )
{
StringBuf_Printf(&buf, msg_txt(1332), location, sd->status.name); // ------ %s items list of '%s' ------
- clif_displaymessage(fd, StringBuf_Value(&buf));
+ clif->displaymessage(fd, StringBuf_Value(&buf));
StringBuf_Clear(&buf);
}
@@ -8270,7 +8270,7 @@ ACMD_FUNC(itemlist)
StringBuf_AppendStr(&buf, equipstr);
}
- clif_displaymessage(fd, StringBuf_Value(&buf));
+ clif->displaymessage(fd, StringBuf_Value(&buf));
StringBuf_Clear(&buf);
if( it->card[0] == CARD0_PET )
@@ -8317,7 +8317,7 @@ ACMD_FUNC(itemlist)
}
if( StringBuf_Length(&buf) > 0 )
- clif_displaymessage(fd, StringBuf_Value(&buf));
+ clif->displaymessage(fd, StringBuf_Value(&buf));
StringBuf_Clear(&buf);
}
@@ -8327,7 +8327,7 @@ ACMD_FUNC(itemlist)
else
StringBuf_Printf(&buf, msg_txt(1354), counter, count, location); // %d item(s) found in %d %s slots.
- clif_displaymessage(fd, StringBuf_Value(&buf));
+ clif->displaymessage(fd, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
@@ -8387,11 +8387,11 @@ ACMD_FUNC(stats)
sprintf(job_jobname, "Job - %s %s", job_name(sd->status.class_), "(level %d)");
sprintf(output, msg_txt(53), sd->status.name); // '%s' stats:
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
for (i = 0; output_table[i].format != NULL; i++) {
sprintf(output, output_table[i].format, output_table[i].value);
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
}
return 0;
@@ -8407,7 +8407,7 @@ ACMD_FUNC(delitem)
if( !message || !*message || ( sscanf(message, "\"%99[^\"]\" %d", item_name, &amount) < 2 && sscanf(message, "%99s %d", item_name, &amount) < 2 ) || amount < 1 )
{
- clif_displaymessage(fd, msg_txt(1355)); // Please enter an item name/ID, a quantity, and a player name (usage: #delitem <player> <item_name_or_ID> <quantity>).
+ clif->displaymessage(fd, msg_txt(1355)); // Please enter an item name/ID, a quantity, and a player name (usage: #delitem <player> <item_name_or_ID> <quantity>).
return -1;
}
@@ -8417,7 +8417,7 @@ ACMD_FUNC(delitem)
}
else
{
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
+ clif->displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
return -1;
}
@@ -8439,22 +8439,22 @@ ACMD_FUNC(delitem)
// notify target
sprintf(atcmd_output, msg_txt(113), total-amount); // %d item(s) removed by a GM.
- clif_displaymessage(sd->fd, atcmd_output);
+ clif->displaymessage(sd->fd, atcmd_output);
// notify source
if( amount == total )
{
- clif_displaymessage(fd, msg_txt(116)); // Character does not have the item.
+ clif->displaymessage(fd, msg_txt(116)); // Character does not have the item.
}
else if( amount )
{
sprintf(atcmd_output, msg_txt(115), total-amount, total-amount, total); // %d item(s) removed. Player had only %d on %d items.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
else
{
sprintf(atcmd_output, msg_txt(114), total); // %d item(s) removed from the player.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return 0;
@@ -8474,25 +8474,25 @@ ACMD_FUNC(font)
if( sd->user_font )
{
sd->user_font = 0;
- clif_displaymessage(fd, msg_txt(1356)); // Returning to normal font.
- clif_font(sd);
+ clif->displaymessage(fd, msg_txt(1356)); // Returning to normal font.
+ clif->font(sd);
}
else
{
- clif_displaymessage(fd, msg_txt(1357)); // Use @font <1-9> to change your message font.
- clif_displaymessage(fd, msg_txt(1358)); // Use 0 or no parameter to return to normal font.
+ clif->displaymessage(fd, msg_txt(1357)); // Use @font <1-9> to change your message font.
+ clif->displaymessage(fd, msg_txt(1358)); // Use 0 or no parameter to return to normal font.
}
}
else if( font_id < 0 || font_id > 9 )
- clif_displaymessage(fd, msg_txt(1359)); // Invalid font. Use a value from 0 to 9.
+ clif->displaymessage(fd, msg_txt(1359)); // Invalid font. Use a value from 0 to 9.
else if( font_id != sd->user_font )
{
sd->user_font = font_id;
- clif_font(sd);
- clif_displaymessage(fd, msg_txt(1360)); // Font changed.
+ clif->font(sd);
+ clif->displaymessage(fd, msg_txt(1360)); // Font changed.
}
else
- clif_displaymessage(fd, msg_txt(1361)); // Already using this font.
+ clif->displaymessage(fd, msg_txt(1361)); // Already using this font.
return 0;
}
@@ -8511,7 +8511,7 @@ static void atcommand_commands_sub(struct map_session_data* sd, const int fd, At
memset(line_buff,' ',CHATBOX_SIZE);
line_buff[CHATBOX_SIZE-1] = 0;
- clif_displaymessage(fd, msg_txt(273)); // "Commands available:"
+ clif->displaymessage(fd, msg_txt(273)); // "Commands available:"
for (cmd = dbi_first(iter); dbi_exists(iter); cmd = dbi_next(iter)) {
unsigned int slen = 0;
@@ -8535,7 +8535,7 @@ static void atcommand_commands_sub(struct map_session_data* sd, const int fd, At
// flush the text buffer if this command won't fit into it
if ( slen + cur - line_buff >= CHATBOX_SIZE )
{
- clif_displaymessage(fd,line_buff);
+ clif->displaymessage(fd,line_buff);
cur = line_buff;
memset(line_buff,' ',CHATBOX_SIZE);
line_buff[CHATBOX_SIZE-1] = 0;
@@ -8547,10 +8547,10 @@ static void atcommand_commands_sub(struct map_session_data* sd, const int fd, At
count++;
}
dbi_destroy(iter);
- clif_displaymessage(fd,line_buff);
+ clif->displaymessage(fd,line_buff);
sprintf(atcmd_output, msg_txt(274), count); // "%d commands found."
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return;
}
@@ -8575,12 +8575,12 @@ ACMD_FUNC(charcommands)
/* for new mounts */
ACMD_FUNC(mount2) {
- clif_displaymessage(sd->fd,msg_txt(1362)); // NOTICE: If you crash with mount your LUA is outdated.
+ clif->displaymessage(sd->fd,msg_txt(1362)); // NOTICE: If you crash with mount your LUA is outdated.
if( !(sd->sc.option&OPTION_MOUNTING) ) {
- clif_displaymessage(sd->fd,msg_txt(1363)); // You have mounted.
+ clif->displaymessage(sd->fd,msg_txt(1363)); // You have mounted.
pc_setoption(sd, sd->sc.option|OPTION_MOUNTING);
} else {
- clif_displaymessage(sd->fd,msg_txt(1364)); // You have released your mount.
+ clif->displaymessage(sd->fd,msg_txt(1364)); // You have released your mount.
pc_setoption(sd, sd->sc.option&~OPTION_MOUNTING);
}
return 0;
@@ -8590,8 +8590,8 @@ ACMD_FUNC(accinfo) {
char query[NAME_LENGTH];
if (!message || !*message || strlen(message) > NAME_LENGTH ) {
- clif_displaymessage(fd, msg_txt(1365)); // Usage: @accinfo/@accountinfo <account_id/char name>
- clif_displaymessage(fd, msg_txt(1366)); // You may search partial name by making use of '%' in the search, ex. "@accinfo %Mario%" lists all characters whose name contains "Mario".
+ clif->displaymessage(fd, msg_txt(1365)); // Usage: @accinfo/@accountinfo <account_id/char name>
+ clif->displaymessage(fd, msg_txt(1366)); // You may search partial name by making use of '%' in the search, ex. "@accinfo %Mario%" lists all characters whose name contains "Mario".
return -1;
}
@@ -8611,19 +8611,19 @@ ACMD_FUNC(set) {
bool is_str = false;
if( !message || !*message || (toset = sscanf(message, "%31s %128[^\n]s", reg, val)) < 1 ) {
- clif_displaymessage(fd, msg_txt(1367)); // Usage: @set <variable name> <value>
- clif_displaymessage(fd, msg_txt(1368)); // Usage: ex. "@set PoringCharVar 50"
- clif_displaymessage(fd, msg_txt(1369)); // Usage: ex. "@set PoringCharVarSTR$ Super Duper String"
- clif_displaymessage(fd, msg_txt(1370)); // Usage: ex. "@set PoringCharVarSTR$" outputs its value, Super Duper String.
+ clif->displaymessage(fd, msg_txt(1367)); // Usage: @set <variable name> <value>
+ clif->displaymessage(fd, msg_txt(1368)); // Usage: ex. "@set PoringCharVar 50"
+ clif->displaymessage(fd, msg_txt(1369)); // Usage: ex. "@set PoringCharVarSTR$ Super Duper String"
+ clif->displaymessage(fd, msg_txt(1370)); // Usage: ex. "@set PoringCharVarSTR$" outputs its value, Super Duper String.
return -1;
}
/* disabled variable types (they require a proper script state to function, so allowing them would crash the server) */
if( reg[0] == '.' ) {
- clif_displaymessage(fd, msg_txt(1371)); // NPC variables may not be used with @set.
+ clif->displaymessage(fd, msg_txt(1371)); // NPC variables may not be used with @set.
return -1;
} else if( reg[0] == '\'' ) {
- clif_displaymessage(fd, msg_txt(1372)); // Instance variables may not be used with @set.
+ clif->displaymessage(fd, msg_txt(1372)); // Instance variables may not be used with @set.
return -1;
}
@@ -8714,7 +8714,7 @@ ACMD_FUNC(set) {
break;
}
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
aFree(data);
@@ -8722,7 +8722,7 @@ ACMD_FUNC(set) {
}
ACMD_FUNC(reloadquestdb) {
do_reload_quest();
- clif_displaymessage(fd, msg_txt(1377)); // Quest database has been reloaded.
+ clif->displaymessage(fd, msg_txt(1377)); // Quest database has been reloaded.
return 0;
}
ACMD_FUNC(addperm) {
@@ -8732,11 +8732,11 @@ ACMD_FUNC(addperm) {
if( !message || !*message ) {
sprintf(atcmd_output, msg_txt(1378),command); // Usage: %s <permission_name>
- clif_displaymessage(fd, atcmd_output);
- clif_displaymessage(fd, msg_txt(1379)); // -- Permission List
+ clif->displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, msg_txt(1379)); // -- Permission List
for( i = 0; i < perm_size; i++ ) {
sprintf(atcmd_output,"- %s",pc_g_permission_name[i].name);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return -1;
}
@@ -8745,28 +8745,28 @@ ACMD_FUNC(addperm) {
if( i == perm_size ) {
sprintf(atcmd_output,msg_txt(1380),message); // '%s' is not a known permission.
- clif_displaymessage(fd, atcmd_output);
- clif_displaymessage(fd, msg_txt(1379)); // -- Permission List
+ clif->displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, msg_txt(1379)); // -- Permission List
for( i = 0; i < perm_size; i++ ) {
sprintf(atcmd_output,"- %s",pc_g_permission_name[i].name);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
return -1;
}
if( add && (sd->permissions&pc_g_permission_name[i].permission) ) {
sprintf(atcmd_output, msg_txt(1381),sd->status.name,pc_g_permission_name[i].name); // User '%s' already possesses the '%s' permission.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
} else if ( !add && !(sd->permissions&pc_g_permission_name[i].permission) ) {
sprintf(atcmd_output, msg_txt(1382),sd->status.name,pc_g_permission_name[i].name); // User '%s' doesn't possess the '%s' permission.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
sprintf(atcmd_output,msg_txt(1383),sd->status.name); // -- User '%s' Permissions
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
for( i = 0; i < perm_size; i++ ) {
if( sd->permissions&pc_g_permission_name[i].permission ) {
sprintf(atcmd_output,"- %s",pc_g_permission_name[i].name);
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
}
}
@@ -8780,21 +8780,21 @@ ACMD_FUNC(addperm) {
sprintf(atcmd_output, msg_txt(1384),sd->status.name); // User '%s' permissions updated successfully. The changes are temporary.
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return 0;
}
ACMD_FUNC(unloadnpcfile) {
if( !message || !*message ) {
- clif_displaymessage(fd, msg_txt(1385)); // Usage: @unloadnpcfile <file name>
+ clif->displaymessage(fd, msg_txt(1385)); // Usage: @unloadnpcfile <file name>
return -1;
}
if( npc_unloadfile(message) )
- clif_displaymessage(fd, msg_txt(1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
+ clif->displaymessage(fd, msg_txt(1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
else {
- clif_displaymessage(fd, msg_txt(1387)); // File not found.
+ clif->displaymessage(fd, msg_txt(1387)); // File not found.
return -1;
}
return 0;
@@ -8810,12 +8810,12 @@ ACMD_FUNC(cart) {
if( !message || !*message || val < 0 || val > MAX_CARTS ) {
sprintf(atcmd_output, msg_txt(1390),command,MAX_CARTS); // Unknown Cart (usage: %s <0-%d>).
- clif_displaymessage(fd, atcmd_output);
+ clif->displaymessage(fd, atcmd_output);
return -1;
}
if( val == 0 && !pc_iscarton(sd) ) {
- clif_displaymessage(fd, msg_txt(1391)); // You do not possess a cart to be removed
+ clif->displaymessage(fd, msg_txt(1391)); // You do not possess a cart to be removed
return -1;
}
@@ -8834,7 +8834,7 @@ ACMD_FUNC(cart) {
MC_CART_MDFY(0);
}
- clif_displaymessage(fd, msg_txt(1392)); // Cart Added
+ clif->displaymessage(fd, msg_txt(1392)); // Cart Added
return 0;
#undef MC_CART_MDFY
@@ -9206,7 +9206,7 @@ static void atcommand_get_suggestions(struct map_session_data* sd, const char *n
strcat(buffer," ");
}
- clif_displaymessage(sd->fd, buffer);
+ clif->displaymessage(sd->fd, buffer);
}
dbi_destroy(atcommand_iter);
@@ -9250,7 +9250,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
if ( type == 1) {
//Commands are disabled on maps flagged as 'nocommand'
if ( map[sd->bl.m].nocommand && pc_get_group_level(sd) < map[sd->bl.m].nocommand ) {
- clif_displaymessage(fd, msg_txt(143));
+ clif->displaymessage(fd, msg_txt(143));
return false;
}
}
@@ -9294,7 +9294,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
}
sprintf(output, msg_txt(1388), charcommand_symbol); // Charcommand failed (usage: %c<command> <char name> <parameters>).
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
return true;
} while(0);
}
@@ -9321,7 +9321,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
if (*message == charcommand_symbol &&
(ssd = map_nick2sd(charname)) == NULL && (ssd = map_nick2sd(charname2)) == NULL ) {
sprintf(output, msg_txt(1389), command); // %s failed. Player not found.
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
return true;
}
@@ -9345,7 +9345,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
if (info == NULL) {
if( pc_get_group_level(sd) ) { // TODO: remove or replace with proper permission
sprintf(output, msg_txt(153), command); // "%s is Unknown Command."
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
atcommand_get_suggestions(sd, command + 1, *message == atcommand_symbol);
return true;
} else
@@ -9359,7 +9359,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
return false;
}
if( pc_isdead(sd) && pc_has_permission(sd,PC_PERM_DISABLE_CMD_DEAD) ) {
- clif_displaymessage(fd, msg_txt(1393)); // You can't use commands while dead
+ clif->displaymessage(fd, msg_txt(1393)); // You can't use commands while dead
return true;
}
}
@@ -9368,7 +9368,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
if (*message == charcommand_symbol &&
(ssd = map_nick2sd(charname)) == NULL && (ssd = map_nick2sd(charname2)) == NULL ) {
sprintf(output, msg_txt(1389), command); // %s failed. Player not found.
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
return true;
}
@@ -9376,7 +9376,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
if ( (info->func(fd, (*atcmd_msg == atcommand_symbol) ? sd : ssd, command, params) != 0) )
{
sprintf(output,msg_txt(154), command); // %s failed.
- clif_displaymessage(fd, output);
+ clif->displaymessage(fd, output);
return true;
}