From 04fca41114ed5266a9bdbec60cad4bcdf4541be8 Mon Sep 17 00:00:00 2001 From: ultramage Date: Sun, 29 Jun 2008 06:00:05 +0000 Subject: Random assortment of various small corrections and tweaks. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12894 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char_sql/int_auction.c | 1 + src/map/chrif.c | 13 +++++++------ src/map/clif.c | 4 ++-- src/map/clif.h | 1 - src/map/npc.c | 24 ++++++++++++------------ src/map/script.c | 10 ++++------ src/map/skill.c | 15 ++++++++------- 7 files changed, 34 insertions(+), 34 deletions(-) (limited to 'src') diff --git a/src/char_sql/int_auction.c b/src/char_sql/int_auction.c index a1476cb4c..caa9b3df9 100644 --- a/src/char_sql/int_auction.c +++ b/src/char_sql/int_auction.c @@ -12,6 +12,7 @@ #include "char.h" #include "inter.h" #include "int_mail.h" +#include "int_auction.h" #include #include diff --git a/src/map/chrif.c b/src/map/chrif.c index 4fb22629f..87e174e49 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -17,6 +17,7 @@ #include "npc.h" #include "pc.h" #include "pet.h" +#include "skill.h" #include "status.h" #include "mercenary.h" #include "chrif.h" @@ -910,18 +911,18 @@ int chrif_deadopt(int father_id, int mother_id, int child_id) if( father_id && (sd = map_charid2sd(father_id)) != NULL && sd->status.child == child_id ) { sd->status.child = 0; - sd->status.skill[410].id = 0; - sd->status.skill[410].lv = 0; - sd->status.skill[410].flag = 0; + sd->status.skill[WE_CALLBABY].id = 0; + sd->status.skill[WE_CALLBABY].lv = 0; + sd->status.skill[WE_CALLBABY].flag = 0; clif_skillinfoblock(sd); } if( mother_id && (sd = map_charid2sd(mother_id)) != NULL && sd->status.child == child_id ) { sd->status.child = 0; - sd->status.skill[410].id = 0; - sd->status.skill[410].lv = 0; - sd->status.skill[410].flag = 0; + sd->status.skill[WE_CALLBABY].id = 0; + sd->status.skill[WE_CALLBABY].lv = 0; + sd->status.skill[WE_CALLBABY].flag = 0; clif_skillinfoblock(sd); } diff --git a/src/map/clif.c b/src/map/clif.c index fe802e580..bc04c6efb 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7060,9 +7060,9 @@ int clif_refresh(struct map_session_data *sd) map_foreachinrange(clif_getareachar,&sd->bl,AREA_SIZE,BL_ALL,sd); clif_weather_check(sd); if( pc_issit(sd) ) - clif_sitting(&sd->bl); + clif_sitting(&sd->bl); // FIXME: just send to self, not area if( pc_isdead(sd) ) //When you refresh, resend the death packet. - clif_clearunit_area(&sd->bl,1); + clif_clearunit_single(sd->bl.id,1,sd->fd); #ifndef TXT_ONLY mail_clear(sd); diff --git a/src/map/clif.h b/src/map/clif.h index e268a96a0..4cf738ec9 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -175,7 +175,6 @@ void clif_talkiebox(struct block_list* bl, const char* talkie); void clif_wedding_effect(struct block_list *bl); void clif_divorced(struct map_session_data* sd, const char* name); //void clif_callpartner(struct map_session_data *sd); -void clif_adopt_process(struct map_session_data *sd); void clif_soundeffect(struct map_session_data* sd, struct block_list* bl, const char* name, int type); int clif_soundeffectall(struct block_list* bl, const char *name, int type, enum send_target coverage); void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, unsigned int tick); diff --git a/src/map/npc.c b/src/map/npc.c index 52adadf29..8ec20c487 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2060,16 +2060,16 @@ void npc_setcells(struct npc_data* nd) switch(nd->subtype) { - case WARP: - xs = nd->u.warp.xs; - ys = nd->u.warp.ys; - break; - case SCRIPT: - xs = nd->u.scr.xs; - ys = nd->u.scr.ys; - break; - default: - return; // Other types doesn't have touch area + case WARP: + xs = nd->u.warp.xs; + ys = nd->u.warp.ys; + break; + case SCRIPT: + xs = nd->u.scr.xs; + ys = nd->u.scr.ys; + break; + default: + return; // Other types doesn't have touch area } if (m < 0 || xs < 0 || ys < 0) @@ -2896,7 +2896,7 @@ int npc_reload(void) "\t-'"CL_WHITE"%d"CL_RESET"' Warps\n" "\t-'"CL_WHITE"%d"CL_RESET"' Shops\n" "\t-'"CL_WHITE"%d"CL_RESET"' Scripts\n" - "\t-'"CL_WHITE"%d"CL_RESET"' Mob sets\n" + "\t-'"CL_WHITE"%d"CL_RESET"' Spawn sets\n" "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n" "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n", npc_id - npc_new_min, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob); @@ -3007,7 +3007,7 @@ int do_init_npc(void) "\t-'"CL_WHITE"%d"CL_RESET"' Warps\n" "\t-'"CL_WHITE"%d"CL_RESET"' Shops\n" "\t-'"CL_WHITE"%d"CL_RESET"' Scripts\n" - "\t-'"CL_WHITE"%d"CL_RESET"' Mob sets\n" + "\t-'"CL_WHITE"%d"CL_RESET"' Spawn sets\n" "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n" "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n", npc_id - START_NPC_NUM, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob); diff --git a/src/map/script.c b/src/map/script.c index 4eb2e6324..8781aaa92 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -4312,8 +4312,7 @@ BUILDIN_FUNC(areawarp) else if(!(index=mapindex_name2id(str))) return 0; - map_foreachinarea(buildin_areawarp_sub, - m,x0,y0,x1,y1,BL_PC, index,x,y ); + map_foreachinarea(buildin_areawarp_sub, m,x0,y0,x1,y1,BL_PC, index,x,y); return 0; } @@ -7558,8 +7557,7 @@ BUILDIN_FUNC(killmonsterall) } } - map_foreachinmap(buildin_killmonsterall_sub_strip, - m,BL_MOB); + map_foreachinmap(buildin_killmonsterall_sub_strip,m,BL_MOB); return 0; } @@ -11794,10 +11792,10 @@ BUILDIN_FUNC(setnpcdisplay) name = script_getstr(st,2); data = script_getdata(st,3); - if( script_hasdata(st,5) ) - size = script_getnum(st,5); if( script_hasdata(st,4) ) class_ = script_getnum(st,4); + if( script_hasdata(st,5) ) + size = script_getnum(st,5); get_val(st, data); if( data_isstring(data) ) diff --git a/src/map/skill.c b/src/map/skill.c index 4fa16de9b..758aa6fd2 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1473,9 +1473,8 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds damage = dmg.damage + dmg.damage2; - if (skillid == AL_INCAGI || skillid == AL_BLESSING) - if (tsd->sc.data[SC_CHANGEUNDEAD]) - damage = 1; + if( (skillid == AL_INCAGI || skillid == AL_BLESSING) && tsd->sc.data[SC_CHANGEUNDEAD] ) + damage = 1; if (damage > 0 && dmg.flag&BF_WEAPON && src != bl && src == dsrc && skillid != WS_CARTTERMINATION) // FIXME(?): Quick and dirty check, but HSCR does bypass Shield Reflect... so I make it bypass the whole reflect thing [DracoRPG] @@ -1764,11 +1763,13 @@ int skill_area_sub (struct block_list *bl, va_list ap) if(battle_check_target(src,bl,flag) > 0) { - if (flag&(SD_SPLASH|SD_PREAMBLE)) { - if (flag&SD_PREAMBLE && !skill_area_temp[2]) - clif_skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); + // several splash skills need this initial dummy packet to display correctly + if (flag&SD_PREAMBLE && skill_area_temp[2] == 0) + clif_skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); + + if (flag&(SD_SPLASH|SD_PREAMBLE)) skill_area_temp[2]++; - } + return func(src,bl,skill_id,skill_lv,tick,flag); } return 0; -- cgit v1.2.3-70-g09d2