summaryrefslogtreecommitdiff
path: root/src/map/script.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/script.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/script.c')
-rw-r--r--src/map/script.c230
1 files changed, 115 insertions, 115 deletions
diff --git a/src/map/script.c b/src/map/script.c
index dcaeacf5b..a6bbdb0bd 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3797,7 +3797,7 @@ void run_script_main(struct script_state *st)
if ((sd = map_id2sd(st->rid))!=NULL)
{ //Restore previous stack and save char.
if(sd->state.using_fake_npc){
- clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
+ clif->clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
sd->state.using_fake_npc = 0;
}
//Restore previous script if any.
@@ -4349,7 +4349,7 @@ BUILDIN_FUNC(mes)
if( !script_hasdata(st, 3) )
{// only a single line detected in the script
- clif_scriptmes(sd, st->oid, script_getstr(st, 2));
+ clif->scriptmes(sd, st->oid, script_getstr(st, 2));
}
else
{// parse multiple lines as they exist
@@ -4358,7 +4358,7 @@ BUILDIN_FUNC(mes)
for( i = 2; script_hasdata(st, i); i++ )
{
// send the message to the client
- clif_scriptmes(sd, st->oid, script_getstr(st, i));
+ clif->scriptmes(sd, st->oid, script_getstr(st, i));
}
}
@@ -4378,7 +4378,7 @@ BUILDIN_FUNC(next)
return 0;
st->state = STOP;
- clif_scriptnext(sd, st->oid);
+ clif->scriptnext(sd, st->oid);
return 0;
}
@@ -4395,7 +4395,7 @@ BUILDIN_FUNC(close)
return 0;
st->state = CLOSE;
- clif_scriptclose(sd, st->oid);
+ clif->scriptclose(sd, st->oid);
return 0;
}
@@ -4412,7 +4412,7 @@ BUILDIN_FUNC(close2)
return 0;
st->state = STOP;
- clif_scriptclose(sd, st->oid);
+ clif->scriptclose(sd, st->oid);
return 0;
}
@@ -4529,10 +4529,10 @@ BUILDIN_FUNC(menu)
CREATE(menu, char, 2048);
safestrncpy(menu, StringBuf_Value(&buf), 2047);
ShowWarning("NPC Menu too long! (source:%s / length:%d)\n",nd?nd->name:"Unknown",StringBuf_Length(&buf));
- clif_scriptmenu(sd, st->oid, menu);
+ clif->scriptmenu(sd, st->oid, menu);
aFree(menu);
} else
- clif_scriptmenu(sd, st->oid, StringBuf_Value(&buf));
+ clif->scriptmenu(sd, st->oid, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
@@ -4630,10 +4630,10 @@ BUILDIN_FUNC(select)
CREATE(menu, char, 2048);
safestrncpy(menu, StringBuf_Value(&buf), 2047);
ShowWarning("NPC Menu too long! (source:%s / length:%d)\n",nd?nd->name:"Unknown",StringBuf_Length(&buf));
- clif_scriptmenu(sd, st->oid, menu);
+ clif->scriptmenu(sd, st->oid, menu);
aFree(menu);
} else
- clif_scriptmenu(sd, st->oid, StringBuf_Value(&buf));
+ clif->scriptmenu(sd, st->oid, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
if( sd->npc_menu >= 0xff ) {
@@ -4705,10 +4705,10 @@ BUILDIN_FUNC(prompt)
CREATE(menu, char, 2048);
safestrncpy(menu, StringBuf_Value(&buf), 2047);
ShowWarning("NPC Menu too long! (source:%s / length:%d)\n",nd?nd->name:"Unknown",StringBuf_Length(&buf));
- clif_scriptmenu(sd, st->oid, menu);
+ clif->scriptmenu(sd, st->oid, menu);
aFree(menu);
} else
- clif_scriptmenu(sd, st->oid, StringBuf_Value(&buf));
+ clif->scriptmenu(sd, st->oid, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
if( sd->npc_menu >= 0xff )
@@ -5424,9 +5424,9 @@ BUILDIN_FUNC(input)
sd->state.menu_or_input = 1;
st->state = RERUNLINE;
if( is_string_variable(name) )
- clif_scriptinputstr(sd,st->oid);
+ clif->scriptinputstr(sd,st->oid);
else
- clif_scriptinput(sd,st->oid);
+ clif->scriptinput(sd,st->oid);
}
else
{ // take received text/value and store it in the designated variable
@@ -5958,7 +5958,7 @@ BUILDIN_FUNC(changelook)
if( sd == NULL )
return 0;
- clif_changelook(&sd->bl,type,val);
+ clif->changelook(&sd->bl,type,val);
return 0;
}
@@ -5974,7 +5974,7 @@ BUILDIN_FUNC(cutin)
if( sd == NULL )
return 0;
- clif_cutin(sd,script_getstr(st,2),script_getnum(st,3));
+ clif->cutin(sd,script_getstr(st,2),script_getnum(st,3));
return 0;
}
@@ -5996,7 +5996,7 @@ BUILDIN_FUNC(viewpoint)
if( sd == NULL )
return 0;
- clif_viewpoint(sd,st->oid,type,x,y,id,color);
+ clif->viewpoint(sd,st->oid,type,x,y,id,color);
return 0;
}
@@ -6364,7 +6364,7 @@ BUILDIN_FUNC(getitem)
{
if ((flag = pc_additem(sd, &it, get_count, LOG_TYPE_SCRIPT)))
{
- clif_additem(sd, 0, 0, flag);
+ clif->additem(sd, 0, 0, flag);
if( pc_candrop(sd,&it) )
map_addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
@@ -6462,7 +6462,7 @@ BUILDIN_FUNC(getitem2)
{
if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT)))
{
- clif_additem(sd, 0, 0, flag);
+ clif->additem(sd, 0, 0, flag);
if( pc_candrop(sd,&item_tmp) )
map_addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
@@ -6525,7 +6525,7 @@ BUILDIN_FUNC(rentitem)
if( (flag = pc_additem(sd, &it, 1, LOG_TYPE_SCRIPT)) )
{
- clif_additem(sd, 0, 0, flag);
+ clif->additem(sd, 0, 0, flag);
return 1;
}
@@ -6878,7 +6878,7 @@ BUILDIN_FUNC(delitem)
ShowError("script:delitem: failed to delete %d items (AID=%d item_id=%d).\n", it.amount, sd->status.account_id, it.nameid);
st->state = END;
- clif_scriptclose(sd, st->oid);
+ clif->scriptclose(sd, st->oid);
return 1;
}
@@ -6954,7 +6954,7 @@ BUILDIN_FUNC(delitem2)
ShowError("script:delitem2: failed to delete %d items (AID=%d item_id=%d).\n", it.amount, sd->status.account_id, it.nameid);
st->state = END;
- clif_scriptclose(sd, st->oid);
+ clif->scriptclose(sd, st->oid);
return 1;
}
@@ -7473,9 +7473,9 @@ BUILDIN_FUNC(repair)
repaircounter++;
if(num==repaircounter){
sd->status.inventory[i].attribute=0;
- clif_equiplist(sd);
- clif_produceeffect(sd, 0, sd->status.inventory[i].nameid);
- clif_misceffect(&sd->bl, 3);
+ clif->equiplist(sd);
+ clif->produce_effect(sd, 0, sd->status.inventory[i].nameid);
+ clif->misceffect(&sd->bl, 3);
break;
}
}
@@ -7501,15 +7501,15 @@ BUILDIN_FUNC(repairall)
if(sd->status.inventory[i].nameid && sd->status.inventory[i].attribute)
{
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);
repaircounter++;
}
}
if(repaircounter)
{
- clif_misceffect(&sd->bl, 3);
- clif_equiplist(sd);
+ clif->misceffect(&sd->bl, 3);
+ clif->equiplist(sd);
}
return 0;
@@ -7694,15 +7694,15 @@ BUILDIN_FUNC(successrefitem)
sd->status.inventory[i].refine++;
pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below
- clif_refine(sd->fd,0,i,sd->status.inventory[i].refine);
- clif_delitem(sd,i,1,3);
+ clif->refine(sd->fd,0,i,sd->status.inventory[i].refine);
+ clif->delitem(sd,i,1,3);
//Logs items, got from (N)PC scripts [Lupus]
log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]);
- clif_additem(sd,i,1,0);
+ clif->additem(sd,i,1,0);
pc_equipitem(sd,i,ep);
- clif_misceffect(&sd->bl,3);
+ clif->misceffect(&sd->bl,3);
if(sd->status.inventory[i].refine == MAX_REFINE &&
sd->status.inventory[i].card[0] == CARD0_FORGE &&
sd->status.char_id == (int)MakeDWord(sd->status.inventory[i].card[2],sd->status.inventory[i].card[3])
@@ -7742,11 +7742,11 @@ BUILDIN_FUNC(failedrefitem)
if(i >= 0) {
sd->status.inventory[i].refine = 0;
pc_unequipitem(sd,i,3); //recalculate bonus
- clif_refine(sd->fd,1,i,sd->status.inventory[i].refine); //notify client of failure
+ clif->refine(sd->fd,1,i,sd->status.inventory[i].refine); //notify client of failure
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
- clif_misceffect(&sd->bl,2); // display failure effect
+ clif->misceffect(&sd->bl,2); // display failure effect
}
return 0;
@@ -7776,15 +7776,15 @@ BUILDIN_FUNC(downrefitem)
sd->status.inventory[i].refine++;
pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below
- clif_refine(sd->fd,2,i,sd->status.inventory[i].refine = sd->status.inventory[i].refine - 2);
- clif_delitem(sd,i,1,3);
+ clif->refine(sd->fd,2,i,sd->status.inventory[i].refine = sd->status.inventory[i].refine - 2);
+ clif->delitem(sd,i,1,3);
//Logs items, got from (N)PC scripts [Lupus]
log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]);
- clif_additem(sd,i,1,0);
+ clif->additem(sd,i,1,0);
pc_equipitem(sd,i,ep);
- clif_misceffect(&sd->bl,2);
+ clif->misceffect(&sd->bl,2);
}
return 0;
@@ -8668,7 +8668,7 @@ BUILDIN_FUNC(itemskill)
sd->skillitem=id;
sd->skillitemlv=lv;
- clif_item_skill(sd,id,lv);
+ clif->item_skill(sd,id,lv);
return 0;
}
/*==========================================
@@ -8684,7 +8684,7 @@ BUILDIN_FUNC(produce)
return 0;
trigger=script_getnum(st,2);
- clif_skill_produce_mix_list(sd, -1, trigger);
+ clif->skill_produce_mix_list(sd, -1, trigger);
return 0;
}
/*==========================================
@@ -8700,7 +8700,7 @@ BUILDIN_FUNC(cooking)
return 0;
trigger=script_getnum(st,2);
- clif_cooking_list(sd, trigger, AM_PHARMACY, 1, 1);
+ clif->cooking_list(sd, trigger, AM_PHARMACY, 1, 1);
return 0;
}
/*==========================================
@@ -9526,9 +9526,9 @@ BUILDIN_FUNC(announce)
(flag == 3) ? SELF :
ALL_CLIENT;
if (fontColor)
- clif_broadcast2(bl, mes, (int)strlen(mes)+1, strtol(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, target);
+ clif->broadcast2(bl, mes, (int)strlen(mes)+1, strtol(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, target);
else
- clif_broadcast(bl, mes, (int)strlen(mes)+1, flag&0xf0, target);
+ clif->broadcast(bl, mes, (int)strlen(mes)+1, flag&0xf0, target);
}
else
{
@@ -9552,9 +9552,9 @@ static int buildin_announce_sub(struct block_list *bl, va_list ap)
short fontAlign = (short)va_arg(ap, int);
short fontY = (short)va_arg(ap, int);
if (fontColor)
- clif_broadcast2(bl, mes, len, strtol(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, SELF);
+ clif->broadcast2(bl, mes, len, strtol(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, SELF);
else
- clif_broadcast(bl, mes, len, type, SELF);
+ clif->broadcast(bl, mes, len, type, SELF);
return 0;
}
/* Runs item effect on attached character.
@@ -9702,8 +9702,8 @@ BUILDIN_FUNC(getusersname)
/* Temporary fix for bugreport:1023.
* Do not uncomment unless you want thousands of 'next' buttons.
if((disp_num++)%10==0)
- clif_scriptnext(sd,st->oid);*/
- clif_scriptmes(sd,st->oid,pl_sd->status.name);
+ clif->scriptnext(sd,st->oid);*/
+ clif->scriptmes(sd,st->oid,pl_sd->status.name);
}
mapit_free(iter);
@@ -10146,7 +10146,7 @@ BUILDIN_FUNC(homunculus_evolution)
if (sd->hd->homunculus.intimacy > 91000)
merc_hom_evolution(sd->hd);
else
- clif_emotion(&sd->hd->bl, E_SWT);
+ clif->emotion(&sd->hd->bl, E_SWT);
}
return 0;
}
@@ -10175,7 +10175,7 @@ BUILDIN_FUNC(homunculus_mutate)
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;
}
@@ -10246,7 +10246,7 @@ BUILDIN_FUNC(birthpet)
return 0;
}
- clif_sendegg(sd);
+ clif->sendegg(sd);
return 0;
}
@@ -10332,11 +10332,11 @@ BUILDIN_FUNC(changebase)
if(!sd->disguise && vclass != sd->vd.class_) {
status_set_viewdata(&sd->bl, vclass);
//Updated client view. Base, Weapon and Cloth Colors.
- clif_changelook(&sd->bl,LOOK_BASE,sd->vd.class_);
- clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
+ clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_);
+ clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
if (sd->vd.cloth_color)
- clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
- clif_skillinfoblock(sd);
+ clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
+ clif->skillinfoblock(sd);
}
return 0;
@@ -10753,7 +10753,7 @@ static int script_mapflag_pvp_sub(struct block_list *bl,va_list ap) {
sd->pvp_won = 0;
sd->pvp_lost = 0;
}
- clif_map_property(sd, MAPPROPERTY_FREEPVPZONE);
+ clif->map_property(sd, MAPPROPERTY_FREEPVPZONE);
return 0;
}
BUILDIN_FUNC(setmapflag)
@@ -10798,7 +10798,7 @@ BUILDIN_FUNC(setmapflag)
case MF_PVP_NOGUILD: map[m].flag.pvp_noguild = 1; break;
case MF_GVG:
map[m].flag.gvg = 1;
- clif_map_property_mapall(m, MAPPROPERTY_AGITZONE);
+ clif->map_property_mapall(m, MAPPROPERTY_AGITZONE);
break;
case MF_GVG_NOPARTY: map[m].flag.gvg_noparty = 1; break;
case MF_NOTRADE: map[m].flag.notrade = 1; break;
@@ -10880,13 +10880,13 @@ BUILDIN_FUNC(removemapflag)
case MF_NOZENYPENALTY: map[m].flag.nozenypenalty = 0; break;
case MF_PVP:
map[m].flag.pvp = 0;
- clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+ clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
break;
case MF_PVP_NOPARTY: map[m].flag.pvp_noparty = 0; break;
case MF_PVP_NOGUILD: map[m].flag.pvp_noguild = 0; break;
case MF_GVG:
map[m].flag.gvg = 0;
- clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+ clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
break;
case MF_GVG_NOPARTY: map[m].flag.gvg_noparty = 0; break;
case MF_NOTRADE: map[m].flag.notrade = 0; break;
@@ -10950,7 +10950,7 @@ BUILDIN_FUNC(pvpon)
return 0; // nothing to do
map[m].flag.pvp = 1;
- clif_map_property_mapall(m, MAPPROPERTY_FREEPVPZONE);
+ clif->map_property_mapall(m, MAPPROPERTY_FREEPVPZONE);
if(battle_config.pk_mode) // disable ranking functions if pk_mode is on [Valaris]
return 0;
@@ -10976,7 +10976,7 @@ BUILDIN_FUNC(pvpon)
static int buildin_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;
@@ -10995,7 +10995,7 @@ BUILDIN_FUNC(pvpoff)
return 0; //fixed Lupus
map[m].flag.pvp = 0;
- clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+ clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
if(battle_config.pk_mode) // disable ranking options if pk_mode is on [Valaris]
return 0;
@@ -11013,7 +11013,7 @@ BUILDIN_FUNC(gvgon)
m = map_mapname2mapid(str);
if(m >= 0 && !map[m].flag.gvg) {
map[m].flag.gvg = 1;
- clif_map_property_mapall(m, MAPPROPERTY_AGITZONE);
+ clif->map_property_mapall(m, MAPPROPERTY_AGITZONE);
}
return 0;
@@ -11027,7 +11027,7 @@ BUILDIN_FUNC(gvgoff)
m = map_mapname2mapid(str);
if(m >= 0 && map[m].flag.gvg) {
map[m].flag.gvg = 0;
- clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+ clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
}
return 0;
@@ -11056,16 +11056,16 @@ BUILDIN_FUNC(emotion)
else
sd = script_rid2sd(st);
if (sd)
- clif_emotion(&sd->bl,type);
+ clif->emotion(&sd->bl,type);
} else
if( script_hasdata(st,4) )
{
TBL_NPC *nd = npc_name2id(script_getstr(st,4));
if(nd)
- clif_emotion(&nd->bl,type);
+ clif->emotion(&nd->bl,type);
}
else
- clif_emotion(map_id2bl(st->oid),type);
+ clif->emotion(map_id2bl(st->oid),type);
return 0;
}
@@ -11182,7 +11182,7 @@ BUILDIN_FUNC(flagemblem)
} else {
bool changed = ( nd->u.scr.guild_id != g_id )?true:false;
nd->u.scr.guild_id = g_id;
- clif_guild_emblem_area(&nd->bl);
+ clif->guild_emblem_area(&nd->bl);
/* guild flag caching */
if( g_id ) /* adding a id */
guild_flag_add(nd);
@@ -11344,7 +11344,7 @@ BUILDIN_FUNC(successremovecards) {
item_tmp.identify = 1;
if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // get back the cart in inventory
- 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);
}
}
@@ -11366,11 +11366,11 @@ BUILDIN_FUNC(successremovecards) {
pc_delitem(sd,i,1,0,3,LOG_TYPE_SCRIPT);
if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ //chk if can be spawn in inventory otherwise put on floor
- 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);
}
- clif_misceffect(&sd->bl,3);
+ clif->misceffect(&sd->bl,3);
}
return 0;
}
@@ -11411,7 +11411,7 @@ BUILDIN_FUNC(failedremovecards) {
item_tmp.identify = 1;
if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){
- 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);
}
}
@@ -11440,11 +11440,11 @@ BUILDIN_FUNC(failedremovecards) {
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){
- 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);
}
}
- clif_misceffect(&sd->bl,2);
+ clif->misceffect(&sd->bl,2);
}
return 0;
@@ -11576,7 +11576,7 @@ BUILDIN_FUNC(wedding_effect)
bl=map_id2bl(st->oid);
} else
bl=&sd->bl;
- clif_wedding_effect(bl);
+ clif->wedding_effect(bl);
return 0;
}
BUILDIN_FUNC(divorce)
@@ -12183,7 +12183,7 @@ BUILDIN_FUNC(classchange)
_class=script_getnum(st,2);
type=script_getnum(st,3);
- clif_class_change(bl,_class,type);
+ clif->class_change(bl,_class,type);
return 0;
}
@@ -12198,11 +12198,11 @@ BUILDIN_FUNC(misceffect)
if(st->oid && st->oid != fake_nd->bl.id) {
struct block_list *bl = map_id2bl(st->oid);
if (bl)
- clif_specialeffect(bl,type,AREA);
+ clif->specialeffect(bl,type,AREA);
} else{
TBL_PC *sd=script_rid2sd(st);
if(sd)
- clif_specialeffect(&sd->bl,type,AREA);
+ clif->specialeffect(&sd->bl,type,AREA);
}
return 0;
}
@@ -12218,7 +12218,7 @@ BUILDIN_FUNC(playBGM)
{
name = script_getstr(st,2);
- clif_playBGM(sd, name);
+ clif->playBGM(sd, name);
}
return 0;
@@ -12228,7 +12228,7 @@ static int playBGM_sub(struct block_list* bl,va_list ap)
{
const char* name = va_arg(ap,const char*);
- clif_playBGM(BL_CAST(BL_PC, bl), name);
+ clif->playBGM(BL_CAST(BL_PC, bl), name);
return 0;
}
@@ -12237,7 +12237,7 @@ static int playBGM_foreachpc_sub(struct map_session_data* sd, va_list args)
{
const char* name = va_arg(args, const char*);
- clif_playBGM(sd, name);
+ clif->playBGM(sd, name);
return 0;
}
@@ -12285,7 +12285,7 @@ BUILDIN_FUNC(soundeffect)
if(sd)
{
- clif_soundeffect(sd,&sd->bl,name,type);
+ clif->soundeffect(sd,&sd->bl,name,type);
}
return 0;
}
@@ -12295,7 +12295,7 @@ int soundeffect_sub(struct block_list* bl,va_list ap)
char* name = va_arg(ap,char*);
int type = va_arg(ap,int);
- clif_soundeffect((TBL_PC *)bl, bl, name, type);
+ clif->soundeffect((TBL_PC *)bl, bl, name, type);
return 0;
}
@@ -12321,7 +12321,7 @@ BUILDIN_FUNC(soundeffectall)
if(!script_hasdata(st,4))
{ // area around
- clif_soundeffectall(bl, name, type, AREA);
+ clif->soundeffectall(bl, name, type, AREA);
}
else
if(!script_hasdata(st,5))
@@ -12519,7 +12519,7 @@ BUILDIN_FUNC(skilleffect)
uint16 skill_lv=script_getnum(st,3);
sd=script_rid2sd(st);
- clif_skill_nodamage(&sd->bl,&sd->bl,skill_id,skill_lv,1);
+ clif->skill_nodamage(&sd->bl,&sd->bl,skill_id,skill_lv,1);
return 0;
}
@@ -12539,7 +12539,7 @@ BUILDIN_FUNC(npcskilleffect)
int y=script_getnum(st,5);
if (bl)
- clif_skill_poseffect(bl,skill_id,skill_lv,x,y,gettick());
+ clif->skill_poseffect(bl,skill_id,skill_lv,x,y,gettick());
return 0;
}
@@ -12560,16 +12560,16 @@ BUILDIN_FUNC(specialeffect)
{
TBL_NPC *nd = npc_name2id(script_getstr(st,4));
if(nd)
- clif_specialeffect(&nd->bl, type, target);
+ clif->specialeffect(&nd->bl, type, target);
}
else
{
if (target == SELF) {
TBL_PC *sd=script_rid2sd(st);
if (sd)
- clif_specialeffect_single(bl,type,sd->fd);
+ clif->specialeffect_single(bl,type,sd->fd);
} else {
- clif_specialeffect(bl, type, target);
+ clif->specialeffect(bl, type, target);
}
}
@@ -12586,7 +12586,7 @@ BUILDIN_FUNC(specialeffect2)
sd = map_nick2sd(script_getstr(st,4));
if (sd)
- clif_specialeffect(&sd->bl, type, target);
+ clif->specialeffect(&sd->bl, type, target);
return 0;
}
@@ -12663,7 +12663,7 @@ BUILDIN_FUNC(dispbottom)
const char *message;
message=script_getstr(st,2);
if(sd)
- clif_disp_onlyself(sd,message,(int)strlen(message));
+ clif->disp_onlyself(sd,message,(int)strlen(message));
return 0;
}
@@ -12683,7 +12683,7 @@ BUILDIN_FUNC(recovery)
status_revive(&sd->bl, 100, 100);
else
status_percent_heal(&sd->bl, 100, 100);
- clif_displaymessage(sd->fd,msg_txt(680));
+ clif->displaymessage(sd->fd,msg_txt(680));
}
mapit_free(iter);
return 0;
@@ -12898,7 +12898,7 @@ BUILDIN_FUNC(message)
if((pl_sd=map_nick2sd((char *) player)) == NULL)
return 0;
- clif_displaymessage(pl_sd->fd, msg);
+ clif->displaymessage(pl_sd->fd, msg);
return 0;
}
@@ -12919,7 +12919,7 @@ BUILDIN_FUNC(npctalk)
safestrncpy(name, nd->name, sizeof(name));
strtok(name, "#"); // discard extra name identifier if present
safesnprintf(message, sizeof(message), "%s : %s", name, str);
- clif_message(&nd->bl, message);
+ clif->message(&nd->bl, message);
}
return 0;
@@ -13230,7 +13230,7 @@ BUILDIN_FUNC(summon)
check_event(st, event);
}
- clif_skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
+ clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
md = mob_once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, _class, event, SZ_SMALL, AI_NONE);
if (md) {
@@ -13240,7 +13240,7 @@ BUILDIN_FUNC(summon)
delete_timer(md->deletetimer, mob_timer_delete);
md->deletetimer = add_timer(tick+(timeout>0?timeout*1000:60000),mob_timer_delete,md->bl.id,0);
mob_spawn (md); //Now it is ready for spawning.
- clif_specialeffect(&md->bl,344,AREA);
+ clif->specialeffect(&md->bl,344,AREA);
sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000);
}
return 0;
@@ -14403,8 +14403,8 @@ BUILDIN_FUNC(setnpcdisplay)
npc_setclass(nd, class_);
else if( size != -1 )
{ // Required to update the visual size
- clif_clearunit_area(&nd->bl, CLR_OUTSIGHT);
- clif_spawn(&nd->bl);
+ clif->clearunit_area(&nd->bl, CLR_OUTSIGHT);
+ clif->spawn(&nd->bl);
}
script_pushint(st,0);
@@ -14723,11 +14723,11 @@ BUILDIN_FUNC(callshop)
{
case 1: npc_buysellsel(sd,nd->bl.id,0); break; //Buy window
case 2: npc_buysellsel(sd,nd->bl.id,1); break; //Sell window
- default: clif_npcbuysell(sd,nd->bl.id); break; //Show menu
+ default: clif->npcbuysell(sd,nd->bl.id); break; //Show menu
}
}
else
- clif_cashshop_show(sd, nd);
+ clif->cashshop_show(sd, nd);
sd->npc_shopid = nd->bl.id;
script_pushint(st,1);
@@ -15346,7 +15346,7 @@ BUILDIN_FUNC(unitattack)
switch( unit_bl->type )
{
case BL_PC:
- clif_parse_ActionRequest_sub(((TBL_PC *)unit_bl), actiontype > 0 ? 0x07 : 0x00, target_bl->id, gettick());
+ clif->ActionRequest_sub(((TBL_PC *)unit_bl), actiontype > 0 ? 0x07 : 0x00, target_bl->id, gettick());
script_pushint(st, 1);
return 0;
case BL_MOB:
@@ -15404,9 +15404,9 @@ BUILDIN_FUNC(unittalk)
struct StringBuf sbuf;
StringBuf_Init(&sbuf);
StringBuf_Printf(&sbuf, "%s : %s", status_get_name(bl), message);
- clif_message(bl, StringBuf_Value(&sbuf));
+ clif->message(bl, StringBuf_Value(&sbuf));
if( bl->type == BL_PC )
- clif_displaymessage(((TBL_PC*)bl)->fd, StringBuf_Value(&sbuf));
+ clif->displaymessage(((TBL_PC*)bl)->fd, StringBuf_Value(&sbuf));
StringBuf_Destroy(&sbuf);
}
@@ -15428,7 +15428,7 @@ BUILDIN_FUNC(unitemote)
emotion = script_getnum(st,3);
bl = map_id2bl(unit_id);
if( bl != NULL )
- clif_emotion(bl, emotion);
+ clif->emotion(bl, emotion);
return 0;
}
@@ -15693,7 +15693,7 @@ BUILDIN_FUNC(openauction)
if( sd == NULL )
return 0;
- clif_Auction_openwindow(sd);
+ clif->auction_openwindow(sd);
return 0;
}
@@ -15911,7 +15911,7 @@ BUILDIN_FUNC(mercenary_set_faith)
*calls += value;
*calls = cap_value(*calls, 0, INT_MAX);
if( mercenary_get_guild(sd->md) == guild )
- clif_mercenary_updatestatus(sd,SP_MERCFAITH);
+ clif->mercenary_updatestatus(sd,SP_MERCFAITH);
return 0;
}
@@ -15930,7 +15930,7 @@ BUILDIN_FUNC(readbook)
book_id = script_getnum(st,2);
page = script_getnum(st,3);
- clif_readbook(sd->fd, book_id, page);
+ clif->readbook(sd->fd, book_id, page);
return 0;
}
@@ -16003,7 +16003,7 @@ BUILDIN_FUNC(showevent)
if( color < 0 || color > 3 )
color = 0; // set default color
- clif_quest_show_event(sd, &nd->bl, state, color);
+ clif->quest_show_event(sd, &nd->bl, state, color);
return 0;
}
@@ -16160,7 +16160,7 @@ BUILDIN_FUNC(bg_monster_set_team)
mob_stop_attack(md);
mob_stop_walking(md, 0);
md->target_id = md->attacked_id = 0;
- clif_charnameack(0, &md->bl);
+ clif->charnameack(0, &md->bl);
return 0;
}
@@ -16230,7 +16230,7 @@ BUILDIN_FUNC(bg_updatescore)
map[m].bgscore_lion = script_getnum(st,3);
map[m].bgscore_eagle = script_getnum(st,4);
- clif_bg_updatescore(m);
+ clif->bg_updatescore(m);
return 0;
}
@@ -16642,7 +16642,7 @@ BUILDIN_FUNC(setfont)
else
sd->user_font = 0;
- clif_font(sd);
+ clif->font(sd);
return 0;
}
@@ -16681,7 +16681,7 @@ static int buildin_mobuseskill_sub(struct block_list *bl,va_list ap)
else
unit_skilluse_id2(&md->bl, tbl->id, skill_id, skill_lv, casttime, cancel);
- clif_emotion(&md->bl, emotion);
+ clif->emotion(&md->bl, emotion);
return 0;
}
@@ -16739,7 +16739,7 @@ BUILDIN_FUNC(progressbar)
sd->progressbar.npc_id = st->oid;
sd->progressbar.timeout = gettick() + second*1000;
- clif_progressbar(sd, strtol(color, (char **)NULL, 0), second);
+ clif->progressbar(sd, strtol(color, (char **)NULL, 0), second);
return 0;
}
@@ -16856,7 +16856,7 @@ BUILDIN_FUNC(showdigit)
}
}
- clif_showdigit(sd, (unsigned char)type, value);
+ clif->showdigit(sd, (unsigned char)type, value);
return 0;
}
/**
@@ -16866,7 +16866,7 @@ BUILDIN_FUNC(makerune) {
TBL_PC* sd;
if( (sd = script_rid2sd(st)) == NULL )
return 0;
- clif_skill_produce_mix_list(sd,RK_RUNEMASTERY,24);
+ clif->skill_produce_mix_list(sd,RK_RUNEMASTERY,24);
sd->itemid = script_getnum(st,2);
return 0;
}
@@ -17286,7 +17286,7 @@ BUILDIN_FUNC(getrandgroupitem) {
// if not pet egg
if (!pet_create_egg(sd, nameid)) {
if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) {
- clif_additem(sd, 0, 0, flag);
+ clif->additem(sd, 0, 0, flag);
if( pc_candrop(sd,&item_tmp) )
map_addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}