diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-27 11:44:02 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-27 11:44:02 +0000 |
commit | a3819e6f6a5a06139519221011502a76603dfbfc (patch) | |
tree | a8a0ddd54bb187fb3f60df36d3934c45da9d292b | |
parent | 49f5f55dad7c68b514a83d8a0b48014020f71a6f (diff) | |
download | hercules-a3819e6f6a5a06139519221011502a76603dfbfc.tar.gz hercules-a3819e6f6a5a06139519221011502a76603dfbfc.tar.bz2 hercules-a3819e6f6a5a06139519221011502a76603dfbfc.tar.xz hercules-a3819e6f6a5a06139519221011502a76603dfbfc.zip |
- Fixed unit_attack_timer mismatch warnings (this was solved yesterday, but I forgot to apply the fix to trunk)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6306 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/itemdb.h | 2 | ||||
-rw-r--r-- | src/map/mob.c | 1 | ||||
-rw-r--r-- | src/map/unit.c | 7 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 4b0273910..6e977766c 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -38,7 +38,6 @@ struct item_data { unsigned char *script; //Default script for everything.
unsigned char *equip_script; //Script executed once when equipping.
unsigned char *unequip_script;//Script executed once when unequipping.
-
struct {
unsigned available : 1;
unsigned value_notdc : 1;
@@ -120,7 +119,6 @@ struct item_data* itemdb_exists(int nameid); int itemdb_group(int nameid);
int itemdb_searchrandomid(int flags);
-int itemdb_searchrandomgroup(int groupid);
#define itemdb_value_buy(n) itemdb_search(n)->value_buy
#define itemdb_value_sell(n) itemdb_search(n)->value_sell
diff --git a/src/map/mob.c b/src/map/mob.c index ccbc5851b..d9ef6dd22 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1520,7 +1520,6 @@ int mob_respawn(int tid, unsigned int tick, int id,int data ) md->last_thinktime = tick;
md->next_walktime = tick+rand()%50+5000;
md->last_linktime = tick;
- unit_dataset(&md->bl);
map_addblock(&md->bl);
mob_heal(md,data*status_get_max_hp(&md->bl)/100);
clif_spawn(&md->bl);
diff --git a/src/map/unit.c b/src/map/unit.c index d86224f22..7cb9ceed1 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -197,6 +197,9 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data) return 0;
}
+ if(tid == -1) //A directly invoked timer is from battle_stop_walking, therefore the rest is irrelevant.
+ return 0;
+
if(ud->state.change_walk_target)
return unit_walktoxy_sub(bl);
@@ -1192,7 +1195,7 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t return 0;
if(ud->attacktimer != tid){
if(battle_config.error_log)
- printf("unit_attack_timer %d != %d\n",ud->attacktimer,tid);
+ ShowError("unit_attack_timer %d != %d\n",ud->attacktimer,tid);
return 0;
}
BL_CAST( BL_PC , src, sd);
@@ -1344,7 +1347,7 @@ int unit_skillcastcancel(struct block_list *bl,int type) else
ret=delete_timer( ud->skilltimer, skill_castend_id );
if(ret<0)
- printf("delete timer error : skillid : %d\n",ret);
+ ShowError("delete timer error : skillid : %d\n",ret);
if(bl->type==BL_MOB) ((TBL_MOB*)bl)->skillidx = -1;
|