is it possible to combine this 2 functions into 1? i think i found the error since im using @afk diff currently. when i tried to remove 1 of the functions, recompiling is working without any errors
void pc_update_last_action(struct map_session_data *sd)
{
nullpo_retv(sd);
t_tick tick = gettick();
sd->idletime = last_tick;
if (sd->state.afk == 1)
{
sd->state.afk = 0;
clif_changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.head_top);
clif_displaymessage(sd->fd, "Happy to see you again !");
}
}
void pc_update_last_action(struct map_session_data *sd)
{
struct battleground_data *bgd;
int64 tick = gettick();
sd->idletime = last_tick;
if (sd->bg_id && sd->state.bg_afk && (bgd = bg_team_search(sd->bg_id)) != NULL && bgd->g)
{ // Battleground AFK announce
char output[128];
sprintf(output, "%s : %s is no longer away...", bgd->g->name, sd->status.name);
clif_bg_message(bgd, bgd->bg_id, bgd->g->name, output, strlen(output) + 1);
sd->state.bg_afk = 0;
}
return 1;
}