summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-30 23:08:08 -0300
committershennetsind <ind@henn.et>2013-03-30 23:08:08 -0300
commit7ec1e8fdff6adad1979d750774f9003f223bf3ef (patch)
tree65553e83135c5f5f983c106914d0a35ea2f62588 /src/map/script.c
parent87373047cd4aaf8b0c2425133b9b907e3ea4d122 (diff)
downloadhercules-7ec1e8fdff6adad1979d750774f9003f223bf3ef.tar.gz
hercules-7ec1e8fdff6adad1979d750774f9003f223bf3ef.tar.bz2
hercules-7ec1e8fdff6adad1979d750774f9003f223bf3ef.tar.xz
hercules-7ec1e8fdff6adad1979d750774f9003f223bf3ef.zip
Hercules Renewal: clif.c complete
Added the last missing functions into the interface, all functions in clif.c are now wired to the interface. http://hercules.ws/board/topic/237-hercules-renewal/ Also shortened clif->displaymessage to clif->message, removed the old clif->message and merged its functionality with clif->disp_overhead (both use the same packet and do the same thing :P) - and a gazillion other stuff: http://hercules.ws/board/topic/316-introducing-hercules-channel-system/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a6bbdb0bd..e852a6e1e 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7262,22 +7262,16 @@ BUILDIN_FUNC(strcharinfo)
script_pushstrcopy(st,sd->status.name);
break;
case 1:
- if( ( p = party_search(sd->status.party_id) ) != NULL )
- {
+ if( ( p = party_search(sd->status.party_id) ) != NULL ) {
script_pushstrcopy(st,p->party.name);
- }
- else
- {
+ } else {
script_pushconststr(st,"");
}
break;
case 2:
- if( ( g = guild_search(sd->status.guild_id) ) != NULL )
- {
+ if( ( g = sd->guild ) != NULL ) {
script_pushstrcopy(st,g->name);
- }
- else
- {
+ } else {
script_pushconststr(st,"");
}
break;
@@ -12683,7 +12677,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->message(sd->fd,msg_txt(680));
}
mapit_free(iter);
return 0;
@@ -12898,7 +12892,7 @@ BUILDIN_FUNC(message)
if((pl_sd=map_nick2sd((char *) player)) == NULL)
return 0;
- clif->displaymessage(pl_sd->fd, msg);
+ clif->message(pl_sd->fd, msg);
return 0;
}
@@ -12919,7 +12913,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->disp_overhead(&nd->bl, message);
}
return 0;
@@ -15346,7 +15340,7 @@ BUILDIN_FUNC(unitattack)
switch( unit_bl->type )
{
case BL_PC:
- clif->ActionRequest_sub(((TBL_PC *)unit_bl), actiontype > 0 ? 0x07 : 0x00, target_bl->id, gettick());
+ clif->pActionRequest_sub(((TBL_PC *)unit_bl), actiontype > 0 ? 0x07 : 0x00, target_bl->id, gettick());
script_pushint(st, 1);
return 0;
case BL_MOB:
@@ -15404,9 +15398,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->disp_overhead(bl, StringBuf_Value(&sbuf));
if( bl->type == BL_PC )
- clif->displaymessage(((TBL_PC*)bl)->fd, StringBuf_Value(&sbuf));
+ clif->message(((TBL_PC*)bl)->fd, StringBuf_Value(&sbuf));
StringBuf_Destroy(&sbuf);
}