diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-20 11:38:53 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-20 11:38:53 +0000 |
commit | ff10cb63f64792647611910a7cc463ab27a697db (patch) | |
tree | f2e56fd1a553d95424c3a1a06921f4ccd800ee37 /src/map | |
parent | 5035131dab63fd4667cb3267a5d447866843c334 (diff) | |
download | hercules-ff10cb63f64792647611910a7cc463ab27a697db.tar.gz hercules-ff10cb63f64792647611910a7cc463ab27a697db.tar.bz2 hercules-ff10cb63f64792647611910a7cc463ab27a697db.tar.xz hercules-ff10cb63f64792647611910a7cc463ab27a697db.zip |
* Made atcommand declarations use ACMD_FUNC macro (bugreport:4252, related r11607).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14477 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 450 |
1 files changed, 225 insertions, 225 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a5805ad18..77aef527f 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -63,7 +63,7 @@ typedef struct AtCommandInfo static AtCommandInfo* get_atcommandinfo_byname(const char* name); static AtCommandInfo* get_atcommandinfo_byfunc(const AtCommandFunc func); -int atcommand_commands(const int fd, struct map_session_data* sd, const char* command, const char* message); +ACMD_FUNC(commands); /*========================================= @@ -176,7 +176,7 @@ void do_final_msg(void) /*========================================== * @send (used for testing packet sends from the client) *------------------------------------------*/ -int atcommand_send(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(send) { int len=0,off,end,type; long num; @@ -411,7 +411,7 @@ int atcommand_send(const int fd, struct map_session_data* sd, const char* comman /*========================================== * @rura, @warp, @mapmove *------------------------------------------*/ -int atcommand_mapmove(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mapmove) { char map_name[MAP_NAME_LENGTH_EXT]; unsigned short mapindex; @@ -464,7 +464,7 @@ int atcommand_mapmove(const int fd, struct map_session_data* sd, const char* com /*========================================== * Displays where a character is. Corrected version by Silent. [Skotlex] *------------------------------------------*/ -int atcommand_where(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(where) { struct map_session_data* pl_sd; @@ -494,7 +494,7 @@ int atcommand_where(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_jumpto(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(jumpto) { struct map_session_data *pl_sd = NULL; @@ -545,7 +545,7 @@ int atcommand_jumpto(const int fd, struct map_session_data* sd, const char* comm /*========================================== * *------------------------------------------*/ -int atcommand_jump(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(jump) { int x = 0, y = 0; @@ -581,7 +581,7 @@ int atcommand_jump(const int fd, struct map_session_data* sd, const char* comman /*========================================== * @who3 = Player name, his location *------------------------------------------*/ -int atcommand_who3(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(who3) { char temp0[100]; struct map_session_data *pl_sd; @@ -656,7 +656,7 @@ int atcommand_who3(const int fd, struct map_session_data* sd, const char* comman /*========================================== * Player name, BLevel, Job, *------------------------------------------*/ -int atcommand_who2(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(who2) { char temp0[100]; struct map_session_data *pl_sd; @@ -726,7 +726,7 @@ int atcommand_who2(const int fd, struct map_session_data* sd, const char* comman /*========================================== * Player name, Playrs Party / Guild name *------------------------------------------*/ -int atcommand_who(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(who) { char temp0[100]; struct map_session_data *pl_sd; @@ -806,7 +806,7 @@ int atcommand_who(const int fd, struct map_session_data* sd, const char* command /*========================================== * *------------------------------------------*/ -int atcommand_whomap3(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(whomap3) { struct map_session_data *pl_sd; struct s_mapiterator* iter; @@ -862,7 +862,7 @@ int atcommand_whomap3(const int fd, struct map_session_data* sd, const char* com /*========================================== * *------------------------------------------*/ -int atcommand_whomap2(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(whomap2) { struct map_session_data *pl_sd; struct s_mapiterator* iter; @@ -920,7 +920,7 @@ int atcommand_whomap2(const int fd, struct map_session_data* sd, const char* com /*========================================== * *------------------------------------------*/ -int atcommand_whomap(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(whomap) { char temp0[100]; char temp1[100]; @@ -994,7 +994,7 @@ int atcommand_whomap(const int fd, struct map_session_data* sd, const char* comm /*========================================== * *------------------------------------------*/ -int atcommand_whogm(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(whogm) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -1080,7 +1080,7 @@ int atcommand_whogm(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_save(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(save) { nullpo_retr(-1, sd); @@ -1098,7 +1098,7 @@ int atcommand_save(const int fd, struct map_session_data* sd, const char* comman /*========================================== * *------------------------------------------*/ -int atcommand_load(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(load) { int m; @@ -1123,7 +1123,7 @@ int atcommand_load(const int fd, struct map_session_data* sd, const char* comman /*========================================== * *------------------------------------------*/ -int atcommand_speed(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(speed) { int speed; @@ -1146,7 +1146,7 @@ int atcommand_speed(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_storage(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(storage) { nullpo_retr(-1, sd); @@ -1168,7 +1168,7 @@ int atcommand_storage(const int fd, struct map_session_data* sd, const char* com /*========================================== * *------------------------------------------*/ -int atcommand_guildstorage(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(guildstorage) { nullpo_retr(-1, sd); @@ -1198,7 +1198,7 @@ int atcommand_guildstorage(const int fd, struct map_session_data* sd, const char /*========================================== * *------------------------------------------*/ -int atcommand_option(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(option) { int param1 = 0, param2 = 0, param3 = 0; nullpo_retr(-1, sd); @@ -1220,7 +1220,7 @@ int atcommand_option(const int fd, struct map_session_data* sd, const char* comm /*========================================== * *------------------------------------------*/ -int atcommand_hide(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(hide) { nullpo_retr(-1, sd); if (sd->sc.option & OPTION_INVISIBLE) { @@ -1243,7 +1243,7 @@ int atcommand_hide(const int fd, struct map_session_data* sd, const char* comman /*========================================== * Changes a character's class *------------------------------------------*/ -int atcommand_jobchange(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(jobchange) { //FIXME: redundancy, potentially wrong code, should use job_name() or similar instead of hardcoding the table [ultramage] int job = 0, upper = 0; @@ -1412,7 +1412,7 @@ int atcommand_jobchange(const int fd, struct map_session_data* sd, const char* c /*========================================== * *------------------------------------------*/ -int atcommand_die(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(die) { nullpo_retr(-1, sd); clif_specialeffect(&sd->bl,450,SELF); @@ -1425,7 +1425,7 @@ int atcommand_die(const int fd, struct map_session_data* sd, const char* command /*========================================== * *------------------------------------------*/ -int atcommand_kill(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(kill) { struct map_session_data *pl_sd; nullpo_retr(-1, sd); @@ -1460,7 +1460,7 @@ int atcommand_kill(const int fd, struct map_session_data* sd, const char* comman /*========================================== * *------------------------------------------*/ -int atcommand_alive(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(alive) { nullpo_retr(-1, sd); if (!status_revive(&sd->bl, 100, 100)) @@ -1476,7 +1476,7 @@ int atcommand_alive(const int fd, struct map_session_data* sd, const char* comma /*========================================== * +kamic [LuzZza] *------------------------------------------*/ -int atcommand_kami(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(kami) { unsigned long color=0; nullpo_retr(-1, sd); @@ -1513,7 +1513,7 @@ int atcommand_kami(const int fd, struct map_session_data* sd, const char* comman /*========================================== * *------------------------------------------*/ -int atcommand_heal(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(heal) { int hp = 0, sp = 0; // [Valaris] thanks to fov nullpo_retr(-1, sd); @@ -1571,7 +1571,7 @@ int atcommand_heal(const int fd, struct map_session_data* sd, const char* comman /*========================================== * @item command (usage: @item <name/id_of_item> <quantity>) (modified by [Yor] for pet_egg) *------------------------------------------*/ -int atcommand_item(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(item) { char item_name[100]; int number = 0, item_id, flag; @@ -1629,7 +1629,7 @@ int atcommand_item(const int fd, struct map_session_data* sd, const char* comman /*========================================== * *------------------------------------------*/ -int atcommand_item2(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(item2) { struct item item_tmp; struct item_data *item_data; @@ -1709,7 +1709,7 @@ int atcommand_item2(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_itemreset(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(itemreset) { int i; nullpo_retr(-1, sd); @@ -1732,7 +1732,7 @@ int atcommand_itemreset(const int fd, struct map_session_data* sd, const char* c /*========================================== * Atcommand @lvlup *------------------------------------------*/ -int atcommand_baselevelup(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(baselevelup) { int level=0, i=0, status_point=0; nullpo_retr(-1, sd); @@ -1789,7 +1789,7 @@ int atcommand_baselevelup(const int fd, struct map_session_data* sd, const char* /*========================================== * *------------------------------------------*/ -int atcommand_joblevelup(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(joblevelup) { int level=0; nullpo_retr(-1, sd); @@ -1843,7 +1843,7 @@ int atcommand_joblevelup(const int fd, struct map_session_data* sd, const char* /*========================================== * @help *------------------------------------------*/ -int atcommand_help(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(help) { char buf[2048], w1[2048], w2[2048]; int i, gm_level; @@ -1881,7 +1881,7 @@ int atcommand_help(const int fd, struct map_session_data* sd, const char* comman /*========================================== * @help2 - Char commands [Kayla] *------------------------------------------*/ -int atcommand_help2(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(help2) { char buf[2048], w1[2048], w2[2048]; int i, gm_level; @@ -1944,7 +1944,7 @@ static int atcommand_pvpoff_sub(struct block_list *bl,va_list ap) return 0; } -int atcommand_pvpoff(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(pvpoff) { nullpo_retr(-1, sd); @@ -1980,7 +1980,7 @@ static int atcommand_pvpon_sub(struct block_list *bl,va_list ap) return 0; } -int atcommand_pvpon(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(pvpon) { nullpo_retr(-1, sd); @@ -2005,7 +2005,7 @@ int atcommand_pvpon(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_gvgoff(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(gvgoff) { nullpo_retr(-1, sd); @@ -2025,7 +2025,7 @@ int atcommand_gvgoff(const int fd, struct map_session_data* sd, const char* comm /*========================================== * *------------------------------------------*/ -int atcommand_gvgon(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(gvgon) { nullpo_retr(-1, sd); @@ -2044,7 +2044,7 @@ int atcommand_gvgon(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_model(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(model) { int hair_style = 0, hair_color = 0, cloth_color = 0; nullpo_retr(-1, sd); @@ -2076,7 +2076,7 @@ int atcommand_model(const int fd, struct map_session_data* sd, const char* comma /*========================================== * @dye && @ccolor *------------------------------------------*/ -int atcommand_dye(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(dye) { int cloth_color = 0; nullpo_retr(-1, sd); @@ -2103,7 +2103,7 @@ int atcommand_dye(const int fd, struct map_session_data* sd, const char* command /*========================================== * @hairstyle && @hstyle *------------------------------------------*/ -int atcommand_hair_style(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(hair_style) { int hair_style = 0; nullpo_retr(-1, sd); @@ -2130,7 +2130,7 @@ int atcommand_hair_style(const int fd, struct map_session_data* sd, const char* /*========================================== * @haircolor && @hcolor *------------------------------------------*/ -int atcommand_hair_color(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(hair_color) { int hair_color = 0; nullpo_retr(-1, sd); @@ -2157,7 +2157,7 @@ int atcommand_hair_color(const int fd, struct map_session_data* sd, const char* /*========================================== * @go [city_number or city_name] - Updated by Harbin *------------------------------------------*/ -int atcommand_go(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(go) { int i; int town; @@ -2325,7 +2325,7 @@ int atcommand_go(const int fd, struct map_session_data* sd, const char* command, /*========================================== * *------------------------------------------*/ -int atcommand_monster(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(monster) { char name[NAME_LENGTH]; char monster[NAME_LENGTH]; @@ -2411,7 +2411,7 @@ int atcommand_monster(const int fd, struct map_session_data* sd, const char* com } // small monster spawning [Valaris] -int atcommand_monstersmall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(monstersmall) { char name[NAME_LENGTH] = ""; char monster[NAME_LENGTH] = ""; @@ -2487,7 +2487,7 @@ int atcommand_monstersmall(const int fd, struct map_session_data* sd, const char return 0; } // big monster spawning [Valaris] -int atcommand_monsterbig(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(monsterbig) { char name[NAME_LENGTH] = ""; char monster[NAME_LENGTH] = ""; @@ -2607,7 +2607,7 @@ void atcommand_killmonster_sub(const int fd, struct map_session_data* sd, const return; } -int atcommand_killmonster(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(killmonster) { atcommand_killmonster_sub(fd, sd, message, 1); return 0; @@ -2616,7 +2616,7 @@ int atcommand_killmonster(const int fd, struct map_session_data* sd, const char* /*========================================== * *------------------------------------------*/ -int atcommand_killmonster2(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(killmonster2) { atcommand_killmonster_sub(fd, sd, message, 0); return 0; @@ -2625,7 +2625,7 @@ int atcommand_killmonster2(const int fd, struct map_session_data* sd, const char /*========================================== * *------------------------------------------*/ -int atcommand_refine(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(refine) { int i,j, position = 0, refine = 0, current_position, final_refine; int count; @@ -2703,7 +2703,7 @@ int atcommand_refine(const int fd, struct map_session_data* sd, const char* comm /*========================================== * *------------------------------------------*/ -int atcommand_produce(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(produce) { char item_name[100]; int item_id, attribute = 0, star = 0; @@ -2766,7 +2766,7 @@ int atcommand_produce(const int fd, struct map_session_data* sd, const char* com /*========================================== * *------------------------------------------*/ -int atcommand_memo(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(memo) { int position = 0; nullpo_retr(-1, sd); @@ -2802,7 +2802,7 @@ int atcommand_memo(const int fd, struct map_session_data* sd, const char* comman /*========================================== * *------------------------------------------*/ -int atcommand_gat(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(gat) { int y; nullpo_retr(-1, sd); @@ -2827,7 +2827,7 @@ int atcommand_gat(const int fd, struct map_session_data* sd, const char* command /*========================================== * *------------------------------------------*/ -int atcommand_displaystatus(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(displaystatus) { int i, type, flag, tick; nullpo_retr(-1, sd); @@ -2847,7 +2847,7 @@ int atcommand_displaystatus(const int fd, struct map_session_data* sd, const cha /*========================================== * @stpoint (Rewritten by [Yor]) *------------------------------------------*/ -int atcommand_statuspoint(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(statuspoint) { int point, new_status_point; @@ -2879,7 +2879,7 @@ int atcommand_statuspoint(const int fd, struct map_session_data* sd, const char* /*========================================== * @skpoint (Rewritten by [Yor]) *------------------------------------------*/ -int atcommand_skillpoint(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(skillpoint) { int point, new_skill_point; nullpo_retr(-1, sd); @@ -2912,7 +2912,7 @@ int atcommand_skillpoint(const int fd, struct map_session_data* sd, const char* /*========================================== * @zeny (Rewritten by [Yor]) *------------------------------------------*/ -int atcommand_zeny(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(zeny) { int zeny, new_zeny; nullpo_retr(-1, sd); @@ -2946,7 +2946,7 @@ int atcommand_zeny(const int fd, struct map_session_data* sd, const char* comman /*========================================== * *------------------------------------------*/ -int atcommand_param(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(param) { int i, value = 0, new_value, max; const char* param[] = { "str", "agi", "vit", "int", "dex", "luk" }; @@ -3000,7 +3000,7 @@ int atcommand_param(const int fd, struct map_session_data* sd, const char* comma /*========================================== * Stat all by fritz (rewritten by [Yor]) *------------------------------------------*/ -int atcommand_stat_all(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(stat_all) { int index, count, value, max, new_value; short* status[6]; @@ -3056,7 +3056,7 @@ int atcommand_stat_all(const int fd, struct map_session_data* sd, const char* co /*========================================== * *------------------------------------------*/ -int atcommand_guildlevelup(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(guildlevelup) { int level = 0; short added_level; @@ -3097,7 +3097,7 @@ int atcommand_guildlevelup(const int fd, struct map_session_data* sd, const char /*========================================== * *------------------------------------------*/ -int atcommand_makeegg(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(makeegg) { struct item_data *item_data; int id, pet_id; @@ -3137,7 +3137,7 @@ int atcommand_makeegg(const int fd, struct map_session_data* sd, const char* com /*========================================== * *------------------------------------------*/ -int atcommand_hatch(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(hatch) { nullpo_retr(-1, sd); if (sd->status.pet_id <= 0) @@ -3153,7 +3153,7 @@ int atcommand_hatch(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_petfriendly(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(petfriendly) { int friendly; struct pet_data *pd; @@ -3190,7 +3190,7 @@ int atcommand_petfriendly(const int fd, struct map_session_data* sd, const char* /*========================================== * *------------------------------------------*/ -int atcommand_pethungry(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(pethungry) { int hungry; struct pet_data *pd; @@ -3225,7 +3225,7 @@ int atcommand_pethungry(const int fd, struct map_session_data* sd, const char* c /*========================================== * *------------------------------------------*/ -int atcommand_petrename(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(petrename) { struct pet_data *pd; nullpo_retr(-1, sd); @@ -3250,7 +3250,7 @@ int atcommand_petrename(const int fd, struct map_session_data* sd, const char* c /*========================================== * *------------------------------------------*/ -int atcommand_recall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(recall) { struct map_session_data *pl_sd = NULL; @@ -3298,7 +3298,7 @@ int atcommand_recall(const int fd, struct map_session_data* sd, const char* comm * charblock command (usage: charblock <player_name>) * This command do a definitiv ban on a player *------------------------------------------*/ -int atcommand_char_block(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(char_block) { nullpo_retr(-1, sd); @@ -3330,7 +3330,7 @@ int atcommand_char_block(const int fd, struct map_session_data* sd, const char* * <example> @ban +1m-2mn1s-6y test_player * this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time. *------------------------------------------*/ -int atcommand_char_ban(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(char_ban) { char * modif_p; int year, month, day, hour, minute, second, value; @@ -3397,7 +3397,7 @@ int atcommand_char_ban(const int fd, struct map_session_data* sd, const char* co /*========================================== * charunblock command (usage: charunblock <player_name>) *------------------------------------------*/ -int atcommand_char_unblock(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(char_unblock) { nullpo_retr(-1, sd); @@ -3418,7 +3418,7 @@ int atcommand_char_unblock(const int fd, struct map_session_data* sd, const char /*========================================== * charunban command (usage: charunban <player_name>) *------------------------------------------*/ -int atcommand_char_unban(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(char_unban) { nullpo_retr(-1, sd); @@ -3439,7 +3439,7 @@ int atcommand_char_unban(const int fd, struct map_session_data* sd, const char* /*========================================== * *------------------------------------------*/ -int atcommand_night(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(night) { nullpo_retr(-1, sd); @@ -3456,7 +3456,7 @@ int atcommand_night(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_day(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(day) { nullpo_retr(-1, sd); @@ -3473,7 +3473,7 @@ int atcommand_day(const int fd, struct map_session_data* sd, const char* command /*========================================== * *------------------------------------------*/ -int atcommand_doom(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(doom) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -3500,7 +3500,7 @@ int atcommand_doom(const int fd, struct map_session_data* sd, const char* comman /*========================================== * *------------------------------------------*/ -int atcommand_doommap(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(doommap) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -3541,7 +3541,7 @@ static void atcommand_raise_sub(struct map_session_data* sd) /*========================================== * *------------------------------------------*/ -int atcommand_raise(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(raise) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -3561,7 +3561,7 @@ int atcommand_raise(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_raisemap(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(raisemap) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -3582,7 +3582,7 @@ int atcommand_raisemap(const int fd, struct map_session_data* sd, const char* co /*========================================== * *------------------------------------------*/ -int atcommand_kick(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(kick) { struct map_session_data *pl_sd; nullpo_retr(-1, sd); @@ -3614,7 +3614,7 @@ int atcommand_kick(const int fd, struct map_session_data* sd, const char* comman /*========================================== * *------------------------------------------*/ -int atcommand_kickall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(kickall) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -3638,7 +3638,7 @@ int atcommand_kickall(const int fd, struct map_session_data* sd, const char* com /*========================================== * *------------------------------------------*/ -int atcommand_allskill(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(allskill) { nullpo_retr(-1, sd); pc_allskillup(sd); // all skills @@ -3652,7 +3652,7 @@ int atcommand_allskill(const int fd, struct map_session_data* sd, const char* co /*========================================== * *------------------------------------------*/ -int atcommand_questskill(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(questskill) { int skill_id; nullpo_retr(-1, sd); @@ -3683,7 +3683,7 @@ int atcommand_questskill(const int fd, struct map_session_data* sd, const char* /*========================================== * *------------------------------------------*/ -int atcommand_lostskill(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(lostskill) { int skill_id; nullpo_retr(-1, sd); @@ -3716,7 +3716,7 @@ int atcommand_lostskill(const int fd, struct map_session_data* sd, const char* c /*========================================== * *------------------------------------------*/ -int atcommand_spiritball(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(spiritball) { int max_spiritballs = min(ARRAYLENGTH(sd->spirit_timer), 0x7FFF); int number; @@ -3742,7 +3742,7 @@ int atcommand_spiritball(const int fd, struct map_session_data* sd, const char* /*========================================== * *------------------------------------------*/ -int atcommand_party(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(party) { char party[NAME_LENGTH]; nullpo_retr(-1, sd); @@ -3762,7 +3762,7 @@ int atcommand_party(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_guild(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(guild) { char guild[NAME_LENGTH]; int prev; @@ -3786,7 +3786,7 @@ int atcommand_guild(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_agitstart(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(agitstart) { nullpo_retr(-1, sd); if (agit_flag == 1) { @@ -3804,7 +3804,7 @@ int atcommand_agitstart(const int fd, struct map_session_data* sd, const char* c /*========================================== * *------------------------------------------*/ -int atcommand_agitstart2(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(agitstart2) { nullpo_retr(-1, sd); if (agit2_flag == 1) { @@ -3822,7 +3822,7 @@ int atcommand_agitstart2(const int fd, struct map_session_data* sd, const char* /*========================================== * *------------------------------------------*/ -int atcommand_agitend(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(agitend) { nullpo_retr(-1, sd); if (agit_flag == 0) { @@ -3840,7 +3840,7 @@ int atcommand_agitend(const int fd, struct map_session_data* sd, const char* com /*========================================== * *------------------------------------------*/ -int atcommand_agitend2(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(agitend2) { nullpo_retr(-1, sd); if (agit2_flag == 0) { @@ -3858,7 +3858,7 @@ int atcommand_agitend2(const int fd, struct map_session_data* sd, const char* co /*========================================== * @mapexit - shuts down the map server *------------------------------------------*/ -int atcommand_mapexit(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mapexit) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -3883,7 +3883,7 @@ int atcommand_mapexit(const int fd, struct map_session_data* sd, const char* com /*========================================== * idsearch <part_of_name>: revrited by [Yor] *------------------------------------------*/ -int atcommand_idsearch(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(idsearch) { char item_name[100]; unsigned int i, match; @@ -3919,7 +3919,7 @@ int atcommand_idsearch(const int fd, struct map_session_data* sd, const char* co /*========================================== * Recall All Characters Online To Your Location *------------------------------------------*/ -int atcommand_recallall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(recallall) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -3964,7 +3964,7 @@ int atcommand_recallall(const int fd, struct map_session_data* sd, const char* c /*========================================== * Recall online characters of a guild to your location *------------------------------------------*/ -int atcommand_guildrecall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(guildrecall) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -4023,7 +4023,7 @@ int atcommand_guildrecall(const int fd, struct map_session_data* sd, const char* /*========================================== * Recall online characters of a party to your location *------------------------------------------*/ -int atcommand_partyrecall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(partyrecall) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -4082,7 +4082,7 @@ int atcommand_partyrecall(const int fd, struct map_session_data* sd, const char* /*========================================== * *------------------------------------------*/ -int atcommand_reloaditemdb(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reloaditemdb) { nullpo_retr(-1, sd); itemdb_reload(); @@ -4094,7 +4094,7 @@ int atcommand_reloaditemdb(const int fd, struct map_session_data* sd, const char /*========================================== * *------------------------------------------*/ -int atcommand_reloadmobdb(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reloadmobdb) { nullpo_retr(-1, sd); mob_reload(); @@ -4108,7 +4108,7 @@ int atcommand_reloadmobdb(const int fd, struct map_session_data* sd, const char* /*========================================== * *------------------------------------------*/ -int atcommand_reloadskilldb(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reloadskilldb) { nullpo_retr(-1, sd); skill_reload(); @@ -4121,7 +4121,7 @@ int atcommand_reloadskilldb(const int fd, struct map_session_data* sd, const cha /*========================================== * @reloadatcommand - reloads atcommand_athena.conf *------------------------------------------*/ -int atcommand_reloadatcommand(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reloadatcommand) { atcommand_config_read(ATCOMMAND_CONF_FILENAME); clif_displaymessage(fd, msg_txt(254)); @@ -4130,7 +4130,7 @@ int atcommand_reloadatcommand(const int fd, struct map_session_data* sd, const c /*========================================== * @reloadbattleconf - reloads battle_athena.conf *------------------------------------------*/ -int atcommand_reloadbattleconf(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reloadbattleconf) { struct Battle_Config prev_config; memcpy(&prev_config, &battle_config, sizeof(prev_config)); @@ -4180,7 +4180,7 @@ int atcommand_reloadbattleconf(const int fd, struct map_session_data* sd, const /*========================================== * @reloadstatusdb - reloads job_db1.txt job_db2.txt job_db2-2.txt refine_db.txt size_fix.txt *------------------------------------------*/ -int atcommand_reloadstatusdb(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reloadstatusdb) { status_readdb(); clif_displaymessage(fd, msg_txt(256)); @@ -4189,7 +4189,7 @@ int atcommand_reloadstatusdb(const int fd, struct map_session_data* sd, const ch /*========================================== * @reloadpcdb - reloads exp.txt skill_tree.txt attr_fix.txt statpoint.txt *------------------------------------------*/ -int atcommand_reloadpcdb(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reloadpcdb) { pc_readdb(); clif_displaymessage(fd, msg_txt(257)); @@ -4199,7 +4199,7 @@ int atcommand_reloadpcdb(const int fd, struct map_session_data* sd, const char* /*========================================== * @reloadmotd - reloads motd.txt *------------------------------------------*/ -int atcommand_reloadmotd(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reloadmotd) { pc_read_motd(); clif_displaymessage(fd, msg_txt(268)); @@ -4209,7 +4209,7 @@ int atcommand_reloadmotd(const int fd, struct map_session_data* sd, const char* /*========================================== * @reloadscript - reloads all scripts (npcs, warps, mob spawns, ...) *------------------------------------------*/ -int atcommand_reloadscript(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reloadscript) { nullpo_retr(-1, sd); //atcommand_broadcast( fd, sd, "@broadcast", "eAthena Server is Rehashing..." ); @@ -4233,7 +4233,7 @@ int atcommand_reloadscript(const int fd, struct map_session_data* sd, const char * 2 = Shows NPCs in that map * 3 = Shows the shops/chats in that map (not implemented) *------------------------------------------*/ -int atcommand_mapinfo(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mapinfo) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -4474,7 +4474,7 @@ int atcommand_mapinfo(const int fd, struct map_session_data* sd, const char* com /*========================================== * *------------------------------------------*/ -int atcommand_mount_peco(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mount_peco) { nullpo_retr(-1, sd); @@ -4504,7 +4504,7 @@ int atcommand_mount_peco(const int fd, struct map_session_data* sd, const char* /*========================================== *Spy Commands by Syrus22 *------------------------------------------*/ -int atcommand_guildspy(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(guildspy) { char guild_name[NAME_LENGTH]; struct guild *g; @@ -4545,7 +4545,7 @@ int atcommand_guildspy(const int fd, struct map_session_data* sd, const char* co /*========================================== * *------------------------------------------*/ -int atcommand_partyspy(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(partyspy) { char party_name[NAME_LENGTH]; struct party_data *p; @@ -4587,7 +4587,7 @@ int atcommand_partyspy(const int fd, struct map_session_data* sd, const char* co /*========================================== * @repairall [Valaris] *------------------------------------------*/ -int atcommand_repairall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(repairall) { int count, i; nullpo_retr(-1, sd); @@ -4616,7 +4616,7 @@ int atcommand_repairall(const int fd, struct map_session_data* sd, const char* c /*========================================== * @nuke [Valaris] *------------------------------------------*/ -int atcommand_nuke(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(nuke) { struct map_session_data *pl_sd; nullpo_retr(-1, sd); @@ -4647,7 +4647,7 @@ int atcommand_nuke(const int fd, struct map_session_data* sd, const char* comman /*========================================== * @tonpc *------------------------------------------*/ -int atcommand_tonpc(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(tonpc) { char npcname[NAME_LENGTH+1]; struct npc_data *nd; @@ -4677,7 +4677,7 @@ int atcommand_tonpc(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_shownpc(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(shownpc) { char NPCname[NAME_LENGTH+1]; nullpo_retr(-1, sd); @@ -4703,7 +4703,7 @@ int atcommand_shownpc(const int fd, struct map_session_data* sd, const char* com /*========================================== * *------------------------------------------*/ -int atcommand_hidenpc(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(hidenpc) { char NPCname[NAME_LENGTH+1]; nullpo_retr(-1, sd); @@ -4725,7 +4725,7 @@ int atcommand_hidenpc(const int fd, struct map_session_data* sd, const char* com return 0; } -int atcommand_loadnpc(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(loadnpc) { FILE *fp; @@ -4751,7 +4751,7 @@ int atcommand_loadnpc(const int fd, struct map_session_data* sd, const char* com return 0; } -int atcommand_unloadnpc(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(unloadnpc) { struct npc_data *nd; char NPCname[NAME_LENGTH+1]; @@ -4819,7 +4819,7 @@ char* txt_time(unsigned int duration) * @time/@date/@serverdate/@servertime: Display the date/time of the server (by [Yor] * Calculation management of GM modification (@day/@night GM commands) is done *------------------------------------------*/ -int atcommand_servertime(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(servertime) { const struct TimerData * timer_data; const struct TimerData * timer_data2; @@ -4920,7 +4920,7 @@ static void get_jail_time(int jailtime, int* year, int* month, int* day, int* ho * @jail <char_name> by [Yor] * Special warp! No check with nowarp and nowarpto flag *------------------------------------------*/ -int atcommand_jail(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(jail) { struct map_session_data *pl_sd; int x, y; @@ -4975,7 +4975,7 @@ int atcommand_jail(const int fd, struct map_session_data* sd, const char* comman * @unjail/@discharge <char_name> by [Yor] * Special warp! No check with nowarp and nowarpto flag *------------------------------------------*/ -int atcommand_unjail(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(unjail) { struct map_session_data *pl_sd; @@ -5010,7 +5010,7 @@ int atcommand_unjail(const int fd, struct map_session_data* sd, const char* comm return 0; } -int atcommand_jailfor(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(jailfor) { struct map_session_data *pl_sd = NULL; int year, month, day, hour, minute, value; @@ -5123,7 +5123,7 @@ int atcommand_jailfor(const int fd, struct map_session_data* sd, const char* com //By Coltaro -int atcommand_jailtime(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(jailtime) { int year, month, day, hour, minute; @@ -5156,7 +5156,7 @@ int atcommand_jailtime(const int fd, struct map_session_data* sd, const char* co /*========================================== * @disguise <mob_id> by [Valaris] (simplified by [Yor]) *------------------------------------------*/ -int atcommand_disguise(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(disguise) { int id = 0; nullpo_retr(-1, sd); @@ -5201,7 +5201,7 @@ int atcommand_disguise(const int fd, struct map_session_data* sd, const char* co /*========================================== * DisguiseAll *------------------------------------------*/ -int atcommand_disguiseall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(disguiseall) { int mob_id=0; struct map_session_data *pl_sd; @@ -5233,7 +5233,7 @@ int atcommand_disguiseall(const int fd, struct map_session_data* sd, const char* /*========================================== * @undisguise by [Yor] *------------------------------------------*/ -int atcommand_undisguise(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(undisguise) { nullpo_retr(-1, sd); if (sd->disguise) { @@ -5250,7 +5250,7 @@ int atcommand_undisguise(const int fd, struct map_session_data* sd, const char* /*========================================== * UndisguiseAll *------------------------------------------*/ -int atcommand_undisguiseall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(undisguiseall) { struct map_session_data *pl_sd; struct s_mapiterator* iter; @@ -5270,7 +5270,7 @@ int atcommand_undisguiseall(const int fd, struct map_session_data* sd, const cha /*========================================== * @exp by [Skotlex] *------------------------------------------*/ -int atcommand_exp(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(exp) { char output[CHAT_SIZE_MAX]; double nextb, nextj; @@ -5294,7 +5294,7 @@ int atcommand_exp(const int fd, struct map_session_data* sd, const char* command /*========================================== * @broadcast by [Valaris] *------------------------------------------*/ -int atcommand_broadcast(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(broadcast) { nullpo_retr(-1, sd); @@ -5314,7 +5314,7 @@ int atcommand_broadcast(const int fd, struct map_session_data* sd, const char* c /*========================================== * @localbroadcast by [Valaris] *------------------------------------------*/ -int atcommand_localbroadcast(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(localbroadcast) { nullpo_retr(-1, sd); @@ -5335,7 +5335,7 @@ int atcommand_localbroadcast(const int fd, struct map_session_data* sd, const ch /*========================================== * @email <actual@email> <new@email> by [Yor] *------------------------------------------*/ -int atcommand_email(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(email) { char actual_email[100]; char new_email[100]; @@ -5371,7 +5371,7 @@ int atcommand_email(const int fd, struct map_session_data* sd, const char* comma /*========================================== *@effect *------------------------------------------*/ -int atcommand_effect(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(effect) { int type = 0, flag = 0; nullpo_retr(-1, sd); @@ -5390,7 +5390,7 @@ int atcommand_effect(const int fd, struct map_session_data* sd, const char* comm * @killer by MouseJstr * enable killing players even when not in pvp *------------------------------------------*/ -int atcommand_killer(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(killer) { nullpo_retr(-1, sd); sd->state.killer = !sd->state.killer; @@ -5408,7 +5408,7 @@ int atcommand_killer(const int fd, struct map_session_data* sd, const char* comm * @killable by MouseJstr * enable other people killing you *------------------------------------------*/ -int atcommand_killable(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(killable) { nullpo_retr(-1, sd); sd->state.killable = !sd->state.killable; @@ -5426,7 +5426,7 @@ int atcommand_killable(const int fd, struct map_session_data* sd, const char* co * @skillon by MouseJstr * turn skills on for the map *------------------------------------------*/ -int atcommand_skillon(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(skillon) { nullpo_retr(-1, sd); map[sd->bl.m].flag.noskill = 0; @@ -5438,7 +5438,7 @@ int atcommand_skillon(const int fd, struct map_session_data* sd, const char* com * @skilloff by MouseJstr * Turn skills off on the map *------------------------------------------*/ -int atcommand_skilloff(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(skilloff) { nullpo_retr(-1, sd); map[sd->bl.m].flag.noskill = 1; @@ -5450,7 +5450,7 @@ int atcommand_skilloff(const int fd, struct map_session_data* sd, const char* co * @npcmove by MouseJstr * move a npc *------------------------------------------*/ -int atcommand_npcmove(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(npcmove) { int x = 0, y = 0, m; struct npc_data *nd = 0; @@ -5488,7 +5488,7 @@ int atcommand_npcmove(const int fd, struct map_session_data* sd, const char* com * @addwarp by MouseJstr * Create a new static warp point. *------------------------------------------*/ -int atcommand_addwarp(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(addwarp) { char mapname[32]; int x,y; @@ -5523,7 +5523,7 @@ int atcommand_addwarp(const int fd, struct map_session_data* sd, const char* com * @follow by [MouseJstr] * Follow a player .. staying no more then 5 spaces away *------------------------------------------*/ -int atcommand_follow(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(follow) { struct map_session_data *pl_sd = NULL; nullpo_retr(-1, sd); @@ -5559,7 +5559,7 @@ int atcommand_follow(const int fd, struct map_session_data* sd, const char* comm * @dropall by [MouseJstr] * Drop all your possession on the ground *------------------------------------------*/ -int atcommand_dropall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(dropall) { int i; nullpo_retr(-1, sd); @@ -5577,7 +5577,7 @@ int atcommand_dropall(const int fd, struct map_session_data* sd, const char* com * @storeall by [MouseJstr] * Put everything into storage *------------------------------------------*/ -int atcommand_storeall(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(storeall) { int i; nullpo_retr(-1, sd); @@ -5607,7 +5607,7 @@ int atcommand_storeall(const int fd, struct map_session_data* sd, const char* co * @skillid by [MouseJstr] * lookup a skill by name *------------------------------------------*/ -int atcommand_skillid(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(skillid) { int skillen, idx; nullpo_retr(-1, sd); @@ -5635,7 +5635,7 @@ int atcommand_skillid(const int fd, struct map_session_data* sd, const char* com * @useskill by [MouseJstr] * A way of using skills without having to find them in the skills menu *------------------------------------------*/ -int atcommand_useskill(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(useskill) { struct map_session_data *pl_sd = NULL; struct block_list *bl; @@ -5680,7 +5680,7 @@ int atcommand_useskill(const int fd, struct map_session_data* sd, const char* co * Debug command to locate new skill IDs. It sends the * three possible skill-effect packets to the area. *------------------------------------------*/ -int atcommand_displayskill(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(displayskill) { struct status_data * status; unsigned int tick; @@ -5705,7 +5705,7 @@ int atcommand_displayskill(const int fd, struct map_session_data* sd, const char * @skilltree by [MouseJstr] * prints the skill tree for a player required to get to a skill *------------------------------------------*/ -int atcommand_skilltree(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(skilltree) { struct map_session_data *pl_sd = NULL; int skillnum; @@ -5789,7 +5789,7 @@ void getring (struct map_session_data* sd) * @marry by [MouseJstr], fixed by Lupus * Marry two players *------------------------------------------*/ -int atcommand_marry(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(marry) { struct map_session_data *pl_sd1 = NULL; struct map_session_data *pl_sd2 = NULL; @@ -5831,7 +5831,7 @@ int atcommand_marry(const int fd, struct map_session_data* sd, const char* comma * @divorce by [MouseJstr], fixed by [Lupus] * divorce two players *------------------------------------------*/ -int atcommand_divorce(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(divorce) { struct map_session_data *pl_sd = NULL; @@ -5862,7 +5862,7 @@ int atcommand_divorce(const int fd, struct map_session_data* sd, const char* com /*========================================== * @changelook by [Celest] *------------------------------------------*/ -int atcommand_changelook(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(changelook) { int i, j = 0, k = 0; int pos[6] = { LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HEAD_BOTTOM,LOOK_WEAPON,LOOK_SHIELD,LOOK_SHOES }; @@ -5889,7 +5889,7 @@ int atcommand_changelook(const int fd, struct map_session_data* sd, const char* * @autotrade by durf [Lupus] [Paradox924X] * Turns on/off Autotrade for a specific player *------------------------------------------*/ -int atcommand_autotrade(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(autotrade) { nullpo_retr(-1, sd); @@ -5923,7 +5923,7 @@ int atcommand_autotrade(const int fd, struct map_session_data* sd, const char* c * @changegm by durf (changed by Lupus) * Changes Master of your Guild to a specified guild member *------------------------------------------*/ -int atcommand_changegm(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(changegm) { struct guild *g; struct map_session_data *pl_sd; @@ -5960,7 +5960,7 @@ int atcommand_changegm(const int fd, struct map_session_data* sd, const char* co * @changeleader by Skotlex * Changes the leader of a party. *------------------------------------------*/ -int atcommand_changeleader(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(changeleader) { nullpo_retr(-1, sd); @@ -5979,7 +5979,7 @@ int atcommand_changeleader(const int fd, struct map_session_data* sd, const char * @partyoption by Skotlex * Used to change the item share setting of a party. *------------------------------------------*/ -int atcommand_partyoption(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(partyoption) { struct party_data *p; int mi, option; @@ -6023,7 +6023,7 @@ int atcommand_partyoption(const int fd, struct map_session_data* sd, const char* * @autoloot by Upa-Kun * Turns on/off AutoLoot for a specific player *------------------------------------------*/ -int atcommand_autoloot(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(autoloot) { int rate; double drate; @@ -6055,7 +6055,7 @@ int atcommand_autoloot(const int fd, struct map_session_data* sd, const char* co /*========================================== * @autolootitem *------------------------------------------*/ -int atcommand_autolootitem(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(autolootitem) { struct item_data *item_data = NULL; @@ -6090,7 +6090,7 @@ int atcommand_autolootitem(const int fd, struct map_session_data* sd, const char /*========================================== * It is made to rain. *------------------------------------------*/ -int atcommand_rain(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(rain) { nullpo_retr(-1, sd); if (map[sd->bl.m].flag.rain) { @@ -6108,7 +6108,7 @@ int atcommand_rain(const int fd, struct map_session_data* sd, const char* comman /*========================================== * It is made to snow. *------------------------------------------*/ -int atcommand_snow(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(snow) { nullpo_retr(-1, sd); if (map[sd->bl.m].flag.snow) { @@ -6127,7 +6127,7 @@ int atcommand_snow(const int fd, struct map_session_data* sd, const char* comman /*========================================== * Cherry tree snowstorm is made to fall. (Sakura) *------------------------------------------*/ -int atcommand_sakura(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(sakura) { nullpo_retr(-1, sd); if (map[sd->bl.m].flag.sakura) { @@ -6145,7 +6145,7 @@ int atcommand_sakura(const int fd, struct map_session_data* sd, const char* comm /*========================================== * Clouds appear. *------------------------------------------*/ -int atcommand_clouds(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(clouds) { nullpo_retr(-1, sd); if (map[sd->bl.m].flag.clouds) { @@ -6164,7 +6164,7 @@ int atcommand_clouds(const int fd, struct map_session_data* sd, const char* comm /*========================================== * Different type of clouds using effect 516 *------------------------------------------*/ -int atcommand_clouds2(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(clouds2) { nullpo_retr(-1, sd); if (map[sd->bl.m].flag.clouds2) { @@ -6183,7 +6183,7 @@ int atcommand_clouds2(const int fd, struct map_session_data* sd, const char* com /*========================================== * Fog hangs over. *------------------------------------------*/ -int atcommand_fog(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(fog) { nullpo_retr(-1, sd); if (map[sd->bl.m].flag.fog) { @@ -6201,7 +6201,7 @@ int atcommand_fog(const int fd, struct map_session_data* sd, const char* command /*========================================== * Fallen leaves fall. *------------------------------------------*/ -int atcommand_leaves(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(leaves) { nullpo_retr(-1, sd); if (map[sd->bl.m].flag.leaves) { @@ -6220,7 +6220,7 @@ int atcommand_leaves(const int fd, struct map_session_data* sd, const char* comm /*========================================== * Fireworks appear. *------------------------------------------*/ -int atcommand_fireworks(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(fireworks) { nullpo_retr(-1, sd); if (map[sd->bl.m].flag.fireworks) { @@ -6239,7 +6239,7 @@ int atcommand_fireworks(const int fd, struct map_session_data* sd, const char* c /*========================================== * Clearing Weather Effects by Dexity *------------------------------------------*/ -int atcommand_clearweather(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(clearweather) { nullpo_retr(-1, sd); map[sd->bl.m].flag.rain=0; @@ -6259,7 +6259,7 @@ int atcommand_clearweather(const int fd, struct map_session_data* sd, const char /*=============================================================== * Sound Command - plays a sound for everyone around! [Codemaster] *---------------------------------------------------------------*/ -int atcommand_sound(const int fd, struct map_session_data *sd, const char *command, const char *message) +ACMD_FUNC(sound) { char sound_file[100]; @@ -6281,7 +6281,7 @@ int atcommand_sound(const int fd, struct map_session_data *sd, const char *comma /*========================================== * MOB Search *------------------------------------------*/ -int atcommand_mobsearch(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mobsearch) { char mob_name[100]; int mob_id; @@ -6344,7 +6344,7 @@ static int atcommand_cleanmap_sub(struct block_list *bl, va_list ap) return 0; } -int atcommand_cleanmap(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(cleanmap) { map_foreachinarea(atcommand_cleanmap_sub, sd->bl.m, sd->bl.x-AREA_SIZE*2, sd->bl.y-AREA_SIZE*2, @@ -6358,7 +6358,7 @@ int atcommand_cleanmap(const int fd, struct map_session_data* sd, const char* co * make a NPC/PET talk * @npctalkc [SnakeDrak] *------------------------------------------*/ -int atcommand_npctalk(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(npctalk) { char name[NAME_LENGTH],mes[100],temp[100]; struct npc_data *nd; @@ -6397,7 +6397,7 @@ int atcommand_npctalk(const int fd, struct map_session_data* sd, const char* com return 0; } -int atcommand_pettalk(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(pettalk) { char mes[100],temp[100]; struct pet_data *pd; @@ -6447,7 +6447,7 @@ int atcommand_pettalk(const int fd, struct map_session_data* sd, const char* com /// @users - displays the number of players present on each map (and percentage) /// #users displays on the target user instead of self -int atcommand_users(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(users) { char buf[CHAT_SIZE_MAX]; int i; @@ -6494,7 +6494,7 @@ int atcommand_users(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_reset(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reset) { pc_resetstate(sd); pc_resetskill(sd,1); @@ -6506,7 +6506,7 @@ int atcommand_reset(const int fd, struct map_session_data* sd, const char* comma /*========================================== * *------------------------------------------*/ -int atcommand_summon(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(summon) { char name[NAME_LENGTH]; int mob_id = 0; @@ -6558,7 +6558,7 @@ int atcommand_summon(const int fd, struct map_session_data* sd, const char* comm * Temp adjust the GM level required to use a GM command * Useful during beta testing to allow players to use GM commands for short periods of time *------------------------------------------*/ -int atcommand_adjcmdlvl(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(adjcmdlvl) { int newlev, newremotelev; char name[100]; @@ -6602,7 +6602,7 @@ int atcommand_adjcmdlvl(const int fd, struct map_session_data* sd, const char* c * Create a temp GM * Useful during beta testing to allow players to use GM commands for short periods of time *------------------------------------------*/ -int atcommand_adjgmlvl(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(adjgmlvl) { int newlev; char user[NAME_LENGTH]; @@ -6629,7 +6629,7 @@ int atcommand_adjgmlvl(const int fd, struct map_session_data* sd, const char* co * @trade by [MouseJstr] * Open a trade window with a remote player *------------------------------------------*/ -int atcommand_trade(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(trade) { struct map_session_data *pl_sd = NULL; nullpo_retr(-1, sd); @@ -6653,7 +6653,7 @@ int atcommand_trade(const int fd, struct map_session_data* sd, const char* comma * @setbattleflag by [MouseJstr] * set a battle_config flag without having to reboot *------------------------------------------*/ -int atcommand_setbattleflag(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(setbattleflag) { char flag[128], value[128]; nullpo_retr(-1, sd); @@ -6677,7 +6677,7 @@ int atcommand_setbattleflag(const int fd, struct map_session_data* sd, const cha /*========================================== * @unmute [Valaris] *------------------------------------------*/ -int atcommand_unmute(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(unmute) { struct map_session_data *pl_sd = NULL; nullpo_retr(-1, sd); @@ -6708,7 +6708,7 @@ int atcommand_unmute(const int fd, struct map_session_data* sd, const char* comm /*========================================== * @uptime by MC Cameri *------------------------------------------*/ -int atcommand_uptime(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(uptime) { unsigned long seconds = 0, day = 24*60*60, hour = 60*60, minute = 60, days = 0, hours = 0, minutes = 0; @@ -6732,7 +6732,7 @@ int atcommand_uptime(const int fd, struct map_session_data* sd, const char* comm * @changesex <sex> * => Changes one's sex. Argument sex can be 0 or 1, m or f, male or female. *------------------------------------------*/ -int atcommand_changesex(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(changesex) { nullpo_retr(-1, sd); chrif_changesex(sd); @@ -6742,7 +6742,7 @@ int atcommand_changesex(const int fd, struct map_session_data* sd, const char* c /*================================================ * @mute - Mutes a player for a set amount of time *------------------------------------------------*/ -int atcommand_mute(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mute) { struct map_session_data *pl_sd = NULL; int manner; @@ -6784,7 +6784,7 @@ int atcommand_mute(const int fd, struct map_session_data* sd, const char* comman /*========================================== * @refresh (like @jumpto <<yourself>>) *------------------------------------------*/ -int atcommand_refresh(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(refresh) { nullpo_retr(-1, sd); clif_refresh(sd); @@ -6795,7 +6795,7 @@ int atcommand_refresh(const int fd, struct map_session_data* sd, const char* com * @identify * => GM's magnifier. *------------------------------------------*/ -int atcommand_identify(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(identify) { int i,num; @@ -6818,7 +6818,7 @@ int atcommand_identify(const int fd, struct map_session_data* sd, const char* co * @gmotd (Global MOTD) * by davidsiaw :P *------------------------------------------*/ -int atcommand_gmotd(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(gmotd) { char buf[CHAT_SIZE_MAX]; FILE *fp; @@ -6842,7 +6842,7 @@ int atcommand_gmotd(const int fd, struct map_session_data* sd, const char* comma return 0; } -int atcommand_misceffect(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(misceffect) { int effect = 0; nullpo_retr(-1, sd); @@ -6858,7 +6858,7 @@ int atcommand_misceffect(const int fd, struct map_session_data* sd, const char* /*========================================== * MAIL SYSTEM *------------------------------------------*/ -int atcommand_mail(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mail) { nullpo_ret(sd); #ifndef TXT_ONLY @@ -6871,7 +6871,7 @@ int atcommand_mail(const int fd, struct map_session_data* sd, const char* comman * Show Monster DB Info v 1.0 * originally by [Lupus] eAthena *------------------------------------------*/ -int atcommand_mobinfo(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mobinfo) { unsigned char msize[3][7] = {"Small", "Medium", "Large"}; unsigned char mrace[12][11] = {"Formless", "Undead", "Beast", "Plant", "Insect", "Fish", "Demon", "Demi-Human", "Angel", "Dragon", "Boss", "Non-Boss"}; @@ -6992,7 +6992,7 @@ int atshowmobs_timer(int tid, unsigned int tick, int id, intptr data) return 1; } -int atcommand_showmobs(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(showmobs) { char mob_name[100]; int mob_id; @@ -7056,7 +7056,7 @@ int atcommand_showmobs(const int fd, struct map_session_data* sd, const char* co /*========================================== * homunculus level up [orn] *------------------------------------------*/ -int atcommand_homlevel(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(homlevel) { TBL_HOM * hd; int level = 0, i = 0; @@ -7089,7 +7089,7 @@ int atcommand_homlevel(const int fd, struct map_session_data* sd, const char* co /*========================================== * homunculus evolution H [orn] *------------------------------------------*/ -int atcommand_homevolution(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(homevolution) { nullpo_retr(-1, sd); @@ -7109,7 +7109,7 @@ int atcommand_homevolution(const int fd, struct map_session_data* sd, const char /*========================================== * call choosen homunculus [orn] *------------------------------------------*/ -int atcommand_makehomun(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(makehomun) { int homunid; nullpo_retr(-1, sd); @@ -7138,7 +7138,7 @@ int atcommand_makehomun(const int fd, struct map_session_data* sd, const char* c /*========================================== * modify homunculus intimacy [orn] *------------------------------------------*/ -int atcommand_homfriendly(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(homfriendly) { int friendly = 0; @@ -7165,7 +7165,7 @@ int atcommand_homfriendly(const int fd, struct map_session_data* sd, const char* /*========================================== * modify homunculus hunger [orn] *------------------------------------------*/ -int atcommand_homhungry(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(homhungry) { int hungry = 0; @@ -7192,7 +7192,7 @@ int atcommand_homhungry(const int fd, struct map_session_data* sd, const char* c /*========================================== * make the homunculus speak [orn] *------------------------------------------*/ -int atcommand_homtalk(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(homtalk) { char mes[100],temp[100]; @@ -7222,7 +7222,7 @@ int atcommand_homtalk(const int fd, struct map_session_data* sd, const char* com /*========================================== * Show homunculus stats *------------------------------------------*/ -int atcommand_hominfo(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(hominfo) { struct homun_data *hd; struct status_data *status; @@ -7258,7 +7258,7 @@ int atcommand_hominfo(const int fd, struct map_session_data* sd, const char* com return 0; } -int atcommand_homstats(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(homstats) { struct homun_data *hd; struct s_homunculus_db *db; @@ -7327,7 +7327,7 @@ int atcommand_homstats(const int fd, struct map_session_data* sd, const char* co return 0; } -int atcommand_homshuffle(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(homshuffle) { nullpo_retr(-1, sd); @@ -7346,7 +7346,7 @@ int atcommand_homshuffle(const int fd, struct map_session_data* sd, const char* * Show Items DB Info v 1.0 * originally by [Lupus] eAthena *------------------------------------------*/ -int atcommand_iteminfo(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(iteminfo) { char *itype[12] = {"Potion/Food", "BUG!", "Usable", "Etc", "Weapon", "Protection", "Card", "Egg", "Pet Acessory", "BUG!", "Arrow"}; //, "Lure/Scroll"}; No need, type 11 items are converted to type 2 upon loading [Skotlex] @@ -7398,7 +7398,7 @@ int atcommand_iteminfo(const int fd, struct map_session_data* sd, const char* co /*========================================== * Show who drops the item. *------------------------------------------*/ -int atcommand_whodrops(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(whodrops) { struct item_data *item_data, *item_array[MAX_SEARCH]; int i,j, count = 1; @@ -7442,7 +7442,7 @@ int atcommand_whodrops(const int fd, struct map_session_data* sd, const char* co return 0; } -int atcommand_whereis(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(whereis) { struct mob_db *mob, *mob_array[MAX_SEARCH]; int count; @@ -7494,7 +7494,7 @@ int atcommand_whereis(const int fd, struct map_session_data* sd, const char* com * @adopt by [Veider] * adopt a novice *------------------------------------------*/ -int atcommand_adopt(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(adopt) { struct map_session_data *pl_sd1, *pl_sd2, *pl_sd3; char player1[NAME_LENGTH], player2[NAME_LENGTH], player3[NAME_LENGTH]; @@ -7536,7 +7536,7 @@ int atcommand_adopt(const int fd, struct map_session_data* sd, const char* comma return 0; } -int atcommand_version(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(version) { const char * revision; @@ -7573,7 +7573,7 @@ static int atcommand_mutearea_sub(struct block_list *bl,va_list ap) return 0; } -int atcommand_mutearea(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mutearea) { int time; nullpo_ret(sd); @@ -7593,7 +7593,7 @@ int atcommand_mutearea(const int fd, struct map_session_data* sd, const char* co } -int atcommand_rates(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(rates) { char buf[CHAT_SIZE_MAX]; @@ -7620,7 +7620,7 @@ int atcommand_rates(const int fd, struct map_session_data* sd, const char* comma * @me by lordalfa * => Displays the OUTPUT string on top of the Visible players Heads. *------------------------------------------*/ -int atcommand_me(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(me) { char tempmes[CHAT_SIZE_MAX]; nullpo_retr(-1, sd); @@ -7649,7 +7649,7 @@ int atcommand_me(const int fd, struct map_session_data* sd, const char* command, * @size * => Resize your character sprite. [Valaris] *------------------------------------------*/ -int atcommand_size(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(size) { int size=0; @@ -7676,7 +7676,7 @@ int atcommand_size(const int fd, struct map_session_data* sd, const char* comman * @monsterignore * => Makes monsters ignore you. [Valaris] *------------------------------------------*/ -int atcommand_monsterignore(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(monsterignore) { nullpo_retr(-1, sd); @@ -7694,7 +7694,7 @@ int atcommand_monsterignore(const int fd, struct map_session_data* sd, const cha * @fakename * => Gives your character a fake name. [Valaris] *------------------------------------------*/ -int atcommand_fakename(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(fakename) { char name[NAME_LENGTH]; nullpo_retr(-1, sd); @@ -7729,7 +7729,7 @@ int atcommand_fakename(const int fd, struct map_session_data* sd, const char* co * => Shows information about the map flags [map name] * Also set flags *------------------------------------------*/ -int atcommand_mapflag(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(mapflag) { // WIP return 0; @@ -7738,7 +7738,7 @@ int atcommand_mapflag(const int fd, struct map_session_data* sd, const char* com /*=================================== * Remove some messages *-----------------------------------*/ -int atcommand_showexp(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(showexp) { if (sd->state.showexp) { sd->state.showexp = 0; @@ -7751,7 +7751,7 @@ int atcommand_showexp(const int fd, struct map_session_data* sd, const char* com return 0; } -int atcommand_showzeny(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(showzeny) { if (sd->state.showzeny) { sd->state.showzeny = 0; @@ -7764,7 +7764,7 @@ int atcommand_showzeny(const int fd, struct map_session_data* sd, const char* co return 0; } -int atcommand_showdelay(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(showdelay) { if (sd->state.showdelay) { sd->state.showdelay = 0; @@ -7786,7 +7786,7 @@ int atcommand_showdelay(const int fd, struct map_session_data* sd, const char* c * @reject - reject invitation * @leave - leave duel *------------------------------------------*/ -int atcommand_invite(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(invite) { unsigned int did = sd->duel_group; struct map_session_data *target_sd = map_nick2sd((char *)message); @@ -7830,7 +7830,7 @@ int atcommand_invite(const int fd, struct map_session_data* sd, const char* comm return 0; } -int atcommand_duel(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(duel) { char output[CHAT_SIZE_MAX]; unsigned int maxpl=0, newduel; @@ -7885,7 +7885,7 @@ int atcommand_duel(const int fd, struct map_session_data* sd, const char* comman } -int atcommand_leave(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(leave) { if(sd->duel_group <= 0) { // "Duel: @leave without @duel." @@ -7898,7 +7898,7 @@ int atcommand_leave(const int fd, struct map_session_data* sd, const char* comma return 0; } -int atcommand_accept(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(accept) { char output[CHAT_SIZE_MAX]; @@ -7921,7 +7921,7 @@ int atcommand_accept(const int fd, struct map_session_data* sd, const char* comm return 0; } -int atcommand_reject(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(reject) { if(sd->duel_invite <= 0) { // "Duel: @reject without invititation." @@ -7938,7 +7938,7 @@ int atcommand_reject(const int fd, struct map_session_data* sd, const char* comm /*=================================== * Cash Points *-----------------------------------*/ -int atcommand_cash(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(cash) { int value; nullpo_retr(-1, sd); @@ -7969,7 +7969,7 @@ int atcommand_cash(const int fd, struct map_session_data* sd, const char* comman /*=================================== * Away message (@away, @aw) [LuzZza] *-----------------------------------*/ -int atcommand_away(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(away) { if(strlen(message) > 0) { if(strlen(message) > 128) @@ -7991,7 +7991,7 @@ int atcommand_away(const int fd, struct map_session_data* sd, const char* comman } // @clone/@slaveclone/@evilclone <playername> [Valaris] -int atcommand_clone(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(clone) { int x=0,y=0,flag=0,master=0,i=0; struct map_session_data *pl_sd=NULL; @@ -8045,7 +8045,7 @@ int atcommand_clone(const int fd, struct map_session_data* sd, const char* comma * Main chat [LuzZza] * Usage: @main <on|off|message> *-----------------------------------*/ -int atcommand_main(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(main) { if(strlen(message) > 0) { @@ -8097,7 +8097,7 @@ int atcommand_main(const int fd, struct map_session_data* sd, const char* comman * Autorejecting Invites/Deals [LuzZza] * Usage: @noask *-------------------------------------*/ -int atcommand_noask(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(noask) { if(sd->state.noask) { clif_displaymessage(fd, msg_txt(391)); // Autorejecting is deactivated. @@ -8114,7 +8114,7 @@ int atcommand_noask(const int fd, struct map_session_data* sd, const char* comma * Send a @request message to all GMs of lowest_gm_level. * Usage: @request <petition> *-------------------------------------*/ -int atcommand_request(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(request) { if (!message || !*message) { clif_displaymessage(sd->fd,msg_txt(277)); // Usage: @request <petition/message to online GMs>. @@ -8131,7 +8131,7 @@ int atcommand_request(const int fd, struct map_session_data* sd, const char* com /*========================================== * Feel (SG save map) Reset [HiddenDragon] *------------------------------------------*/ -int atcommand_feelreset(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(feelreset) { pc_resetfeel(sd); clif_displaymessage(fd, "Reset 'Feeling' maps."); @@ -8142,7 +8142,7 @@ int atcommand_feelreset(const int fd, struct map_session_data* sd, const char* c /*========================================== * AUCTION SYSTEM *------------------------------------------*/ -int atcommand_auction(const int fd, struct map_session_data *sd, const char *command, const char *message) +ACMD_FUNC(auction) { nullpo_ret(sd); @@ -8156,7 +8156,7 @@ int atcommand_auction(const int fd, struct map_session_data *sd, const char *com /*========================================== * Kill Steal Protection *------------------------------------------*/ -int atcommand_ksprotection(const int fd, struct map_session_data *sd, const char *command, const char *message) +ACMD_FUNC(ksprotection) { nullpo_retr(-1,sd); @@ -8191,7 +8191,7 @@ int atcommand_ksprotection(const int fd, struct map_session_data *sd, const char /*========================================== * Map Kill Steal Protection Setting *------------------------------------------*/ -int atcommand_allowks(const int fd, struct map_session_data *sd, const char *command, const char *message) +ACMD_FUNC(allowks) { nullpo_retr(-1,sd); @@ -8207,7 +8207,7 @@ int atcommand_allowks(const int fd, struct map_session_data *sd, const char *com return 0; } -int atcommand_resetstat(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(resetstat) { nullpo_retr(-1, sd); @@ -8217,7 +8217,7 @@ int atcommand_resetstat(const int fd, struct map_session_data* sd, const char* c return 0; } -int atcommand_resetskill(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(resetskill) { nullpo_retr(-1,sd); @@ -8232,7 +8232,7 @@ int atcommand_resetskill(const int fd, struct map_session_data* sd, const char* * #cartlist: Displays contents of target's cart. * #itemlist: Displays contents of target's inventory. *------------------------------------------*/ -int atcommand_itemlist(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(itemlist) { int i, j, count, counter; const char* location; @@ -8393,7 +8393,7 @@ int atcommand_itemlist(const int fd, struct map_session_data* sd, const char* co return 0; } -int atcommand_stats(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(stats) { char job_jobname[100]; char output[CHAT_SIZE_MAX]; @@ -8454,7 +8454,7 @@ int atcommand_stats(const int fd, struct map_session_data* sd, const char* comma return 0; } -int atcommand_delitem(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(delitem) { char item_name[100]; int i, number = 0, item_id, item_position, count; @@ -8517,7 +8517,7 @@ int atcommand_delitem(const int fd, struct map_session_data* sd, const char* com /*========================================== * Custom Fonts *------------------------------------------*/ -int atcommand_font(const int fd, struct map_session_data *sd, const char *command, const char *message) +ACMD_FUNC(font) { int font_id; nullpo_retr(-1,sd); @@ -9105,7 +9105,7 @@ void do_final_atcommand() /*========================================== * @commands Lists available @ commands to you *------------------------------------------*/ -int atcommand_commands(const int fd, struct map_session_data* sd, const char* command, const char* message) +ACMD_FUNC(commands) { char line_buff[CHATBOX_SIZE]; int i, gm_lvl = pc_isGM(sd), count = 0; |