diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/timer.c | 2 | ||||
-rw-r--r-- | src/map/mob.c | 22 | ||||
-rw-r--r-- | src/map/mob.h | 1 |
3 files changed, 7 insertions, 18 deletions
diff --git a/src/common/timer.c b/src/common/timer.c index 34c95fcf6..a2e67aa09 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -452,7 +452,7 @@ void timer_final(void) struct timer_func_list *tfl; struct timer_func_list *next; - for( tfl=tfl_root; tfl != NULL; tfl = next ) + for( tfl=tfl_root; tfl != NULL; tfl = next ) { next = tfl->next; // copy next pointer aFree(tfl->name); // free structures aFree(tfl); diff --git a/src/map/mob.c b/src/map/mob.c index b2dc67482..f38a5d3ac 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1063,7 +1063,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) if(md->bl.prev == NULL || md->status.hp <= 0) return 1; - if (DIFF_TICK(tick, md->last_thinktime) < md->db->min_thinktime) + if (DIFF_TICK(tick, md->last_thinktime) < MIN_MOBTHINKTIME) return 0; md->last_thinktime = tick; @@ -1335,7 +1335,7 @@ static int mob_ai_sub_lazy(DBKey key,void * data,va_list ap) tick=va_arg(ap,unsigned int); - if(DIFF_TICK(tick,md->last_thinktime)< 10*md->db->min_thinktime) + if(DIFF_TICK(tick,md->last_thinktime)< 10*MIN_MOBTHINKTIME) return 0; md->last_thinktime=tick; @@ -2925,7 +2925,6 @@ int mob_clone_spawn(struct map_session_data *sd, int m, int x, int y, const char mob_db_data[class_]->job_exp=1; mob_db_data[class_]->range2=AREA_SIZE; //Let them have the same view-range as players. mob_db_data[class_]->range3=AREA_SIZE; //Min chase of a screen. - mob_db_data[class_]->min_thinktime = 500; //Average player's reflexes? mob_db_data[class_]->option=sd->sc.option; //Skill copy [Skotlex] @@ -3143,7 +3142,6 @@ static int mob_makedummymobdb(int class_) mob_dummy->status.adelay=1000; mob_dummy->status.amotion=500; mob_dummy->status.dmotion=500; - mob_dummy->min_thinktime=5000; mob_dummy->base_exp=2; mob_dummy->job_exp=1; mob_dummy->range2=10; @@ -3308,12 +3306,8 @@ static int mob_readdb(void) status->mode&=~MD_AGGRESSIVE; status->speed=atoi(str[26]); status->aspd_rate = 1000; - db->min_thinktime=atoi(str[27]); - status->adelay = status->amotion=atoi(str[28]); - if (db->min_thinktime > status->adelay) - status->adelay = db->min_thinktime; - if (db->min_thinktime < MIN_MOBTHINKTIME) - db->min_thinktime = MIN_MOBTHINKTIME; + status->adelay = atoi(str[27]); + status->amotion = atoi(str[28]); status->dmotion=atoi(str[29]); if(battle_config.monster_damage_delay_rate != 100) status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100; @@ -4012,12 +4006,8 @@ static int mob_read_sqldb(void) status->mode&=~MD_AGGRESSIVE; status->speed = TO_INT(26); status->aspd_rate = 1000; - db->min_thinktime = TO_INT(27); - status->adelay = status->amotion = TO_INT(28); - if (db->min_thinktime > status->adelay) - status->adelay = db->min_thinktime; - if (db->min_thinktime < MIN_MOBTHINKTIME) - db->min_thinktime = MIN_MOBTHINKTIME; + status->adelay = TO_INT(27); + status->amotion = TO_INT(28); status->dmotion = TO_INT(29); if(battle_config.monster_damage_delay_rate != 100) status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100; diff --git a/src/map/mob.h b/src/map/mob.h index 03d35b076..f4895c7e0 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -58,7 +58,6 @@ struct mob_db { char sprite[NAME_LENGTH],name[NAME_LENGTH],jname[NAME_LENGTH]; unsigned int base_exp,job_exp; unsigned int mexp,mexpper; - unsigned int min_thinktime; //Min think time, Recharge Time as aegis calls it. int range2,range3; short race2; // celest unsigned short lv; |