summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-15 11:41:40 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-15 11:41:40 +0000
commitabfbf381c18d4c17e9594e7e3b903405c20e9f7f (patch)
tree67bdc8b45f716bd6f3a2b68433337e094b448662 /src/map
parentc0f2069689110d1df816d52e36d049d4b97a7a22 (diff)
downloadhercules-abfbf381c18d4c17e9594e7e3b903405c20e9f7f.tar.gz
hercules-abfbf381c18d4c17e9594e7e3b903405c20e9f7f.tar.bz2
hercules-abfbf381c18d4c17e9594e7e3b903405c20e9f7f.tar.xz
hercules-abfbf381c18d4c17e9594e7e3b903405c20e9f7f.zip
Cleaning/fixing the previous commits a bit
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13775 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/pc.c7
-rw-r--r--src/map/script.c2
-rw-r--r--src/map/unit.c6
6 files changed, 10 insertions, 10 deletions
diff --git a/src/map/battle.h b/src/map/battle.h
index 692fcc0a8..dd3d95a42 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -58,7 +58,6 @@ enum { // 最終計算のフラグ
BF_WEAPONMASK=0x000f,
BF_RANGEMASK= 0x00f0,
BF_SKILLMASK= 0x0f00,
- //0xf000 is used for marking if a zero damage is resulted from SafetyWall and the like. [Inkfish]
};
int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, int skill_id, int skill_lv, int damage, enum damage_lv dmg_lv, int ddelay);
diff --git a/src/map/clif.c b/src/map/clif.c
index aed6f6057..ee3e24c5f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3472,7 +3472,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
return;
ud = unit_bl2ud(bl);
- len = ( ud && ud->walktimer != -1 ) ? clif_set_unit_walking(bl,ud,buf) : clif_set_unit_idle(bl,buf,false);
+ len = ( ud && ud->walktimer != INVALID_TIMER ) ? clif_set_unit_walking(bl,ud,buf) : clif_set_unit_idle(bl,buf,false);
clif_send(buf,len,&sd->bl,SELF);
if (vd->cloth_color)
diff --git a/src/map/mob.c b/src/map/mob.c
index d6ac54517..dc2533672 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2558,7 +2558,7 @@ int mob_class_change (struct mob_data *md, int class_)
unit_skillcastcancel(&md->bl, 0);
status_set_viewdata(&md->bl, class_);
clif_mob_class_change(md,class_);
- status_calc_mob(md, 3);
+ status_calc_mob(md, 1);
md->ud.state.speed_changed = 1; //Speed change update.
if (battle_config.monster_class_change_recover) {
diff --git a/src/map/pc.c b/src/map/pc.c
index d7c2013c3..16e32d7d3 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5206,9 +5206,10 @@ int pc_resethate(struct map_session_data* sd)
int pc_skillatk_bonus(struct map_session_data *sd, int skill_num)
{
int i, bonus = 0;
- ARR_FIND(0, ARRAYLENGTH(sd->skillatk), i, !sd->skillatk[i].id || sd->skillatk[i].id == skill_num);
- if( i < ARRAYLENGTH(sd->skillatk) && sd->skillatk[i].id )
- bonus = sd->skillatk[i].val;
+
+ ARR_FIND(0, ARRAYLENGTH(sd->skillatk), i, sd->skillatk[i].id == skill_num);
+ if( i < ARRAYLENGTH(sd->skillatk) ) bonus = sd->skillatk[i].val;
+
if( sd->sc.data[SC_SKILLATKBONUS] )
{
if( sd->sc.data[SC_SKILLATKBONUS]->val1 && sd->sc.data[SC_SKILLATKBONUS]->val1 == skill_num )
diff --git a/src/map/script.c b/src/map/script.c
index a85346218..81cb2933c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11162,7 +11162,7 @@ BUILDIN_FUNC(npcstop)
struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
if(nd) {
- unit_stop_walking(&nd->bl,5);
+ unit_stop_walking(&nd->bl,1|4);
}
return 0;
diff --git a/src/map/unit.c b/src/map/unit.c
index 8fa929da8..dd24c6d16 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -159,7 +159,7 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr data)
if (bl->x != x || bl->y != y || ud->walktimer != -1)
return 0; //map_moveblock has altered the object beyond what we expected (moved/warped it)
- ud->walktimer = 1; //FIXME: why '1'? [ultramage]
+ ud->walktimer = -2; // arbitrary non-INVALID_TIMER value to make the clif code send walking packets
map_foreachinmovearea(clif_insight, bl, AREA_SIZE, -dx, -dy, sd?BL_ALL:BL_PC, bl);
ud->walktimer = INVALID_TIMER;
@@ -508,7 +508,7 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool
map_moveblock(bl, dst_x, dst_y, gettick());
- ud->walktimer = 1; //Enables clif_insight related packets to spawn character in moving animation.
+ ud->walktimer = -2; // arbitrary non-INVALID_TIMER value to make the clif code send walking packets
map_foreachinmovearea(clif_insight, bl, AREA_SIZE, -dx, -dy, sd?BL_ALL:BL_PC, bl);
ud->walktimer = INVALID_TIMER;
@@ -814,7 +814,7 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int
}
else
{
- unit_stop_walking(bl,6);
+ unit_stop_walking(bl,2|4);
if(ud->target)
add_timer(ud->canmove_tick+1, unit_walktobl_sub, bl->id, ud->target);
}