summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 18:13:16 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 18:13:16 +0000
commit08d47edb4cd49b4c4fa77085257127c8e2cee74a (patch)
tree9275f509d1dca8459ecaf7b6035130f67df74276 /src/map/atcommand.c
parenta871325dd0d55160996124d4a67c7ba23d748be0 (diff)
downloadhercules-08d47edb4cd49b4c4fa77085257127c8e2cee74a.tar.gz
hercules-08d47edb4cd49b4c4fa77085257127c8e2cee74a.tar.bz2
hercules-08d47edb4cd49b4c4fa77085257127c8e2cee74a.tar.xz
hercules-08d47edb4cd49b4c4fa77085257127c8e2cee74a.zip
[Optimized]:
- clif_specialeffect to use the enums. [Improved]: - buildin_specialeffect and buildin_specialeffect2 to accept effect area definition. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6855 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index bf0d3e2da..0b9467dea 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2378,7 +2378,7 @@ int atcommand_die(
const char* command, const char* message)
{
nullpo_retr(-1, sd);
- clif_specialeffect(&sd->bl,450,1);
+ clif_specialeffect(&sd->bl,450,SELF);
status_kill(&sd->bl);
clif_displaymessage(fd, msg_table[13]); // A pity! You've died.
@@ -4827,7 +4827,7 @@ int atcommand_doom(
struct map_session_data *pl_sd, **pl_allsd;
int i, users;
nullpo_retr(-1, sd);
- clif_specialeffect(&sd->bl,450,2);
+ clif_specialeffect(&sd->bl,450,ALL_SAMEMAP);
pl_allsd = map_getallusers(&users);
for(i = 0; i < users; i++) {
if ((pl_sd = pl_allsd[i]) && pl_sd->fd != fd && pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can doom only lower or same gm level
@@ -4851,7 +4851,7 @@ int atcommand_doommap(
struct map_session_data *pl_sd, **pl_allsd;
int i, users;
nullpo_retr(-1, sd);
- clif_specialeffect(&sd->bl,450,3);
+ clif_specialeffect(&sd->bl,450,ALL_CLIENT);
pl_allsd = map_getallusers(&users);
for (i = 0; i < users; i++) {
if ((pl_sd = pl_allsd[i]) && pl_sd->fd != fd && sd->bl.m == pl_sd->bl.m &&
@@ -6808,27 +6808,16 @@ int atcommand_effect(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- struct map_session_data *pl_sd, **pl_allsd;
- int type = 0, flag = 0, i, users;
+ int type = 0, flag = 0;
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %d", &type,&flag) < 2) {
clif_displaymessage(fd, "Please, enter at least a option (usage: @effect <type+>).");
return -1;
}
- if(flag <=0){
- clif_specialeffect(&sd->bl, type, flag);
- clif_displaymessage(fd, msg_table[229]); // Your effect has changed.
- }
- else{
- pl_allsd = map_getallusers(&users);
- for (i = 0; i < users; i++) {
- if ((pl_sd = pl_allsd[i])) {
- clif_specialeffect(&pl_sd->bl, type, flag);
- clif_displaymessage(pl_sd->fd, msg_table[229]); // Your effect has changed.
- }
- }
- }
+
+ clif_specialeffect(&sd->bl, type, flag);
+ clif_displaymessage(fd, msg_table[229]); // Your effect has changed.
return 0;
}
@@ -9796,10 +9785,10 @@ int atcommand_size(
if(size==1) {
sd->state.size=1;
- clif_specialeffect(&sd->bl,420,0);
+ clif_specialeffect(&sd->bl,420,AREA);
} else if(size==2) {
sd->state.size=2;
- clif_specialeffect(&sd->bl,422,0);
+ clif_specialeffect(&sd->bl,422,AREA);
}
return 0;