Hi,
this is my mistake
Always happens at the end woe
or when using @agitend
any idea what could be?
help plis.
line 1882 in mob.c is
/*==========================================
* Negligent mode MOB AI (PC is not in near)
*------------------------------------------*/
static int mob_ai_sub_lazy(struct mob_data *md, va_list args)
{
unsigned int tick;
nullpo_ret(md); // <============= LINE 1882
if(md->bl.prev == NULL)
return 0;
tick = va_arg(args,unsigned int);
if (battle_config.mob_ai&0x20 && map[md->bl.m].users>0)
return (int)mob_ai_sub_hard(md, tick);
if (md->bl.prev==NULL || md->status.hp == 0)
return 1;
if(battle_config.mob_active_time &&
md->last_pcneartime &&
!(md->status.mode&MD_BOSS) &&
DIFF_TICK(tick,md->last_thinktime) > MIN_MOBTHINKTIME)
{
if (DIFF_TICK(tick,md->last_pcneartime) < battle_config.mob_active_time)
return (int)mob_ai_sub_hard(md, tick);
md->last_pcneartime = 0;
}
if(battle_config.boss_active_time &&
md->last_pcneartime &&
(md->status.mode&MD_BOSS) &&
DIFF_TICK(tick,md->last_thinktime) > MIN_MOBTHINKTIME)
{
if (DIFF_TICK(tick,md->last_pcneartime) < battle_config.boss_active_time)
return (int)mob_ai_sub_hard(md, tick);
md->last_pcneartime = 0;
}
if(DIFF_TICK(tick,md->last_thinktime)< 10*MIN_MOBTHINKTIME)
return 0;
md->last_thinktime=tick;
if (md->master_id) {
mob_ai_sub_hard_slavemob (md,tick);
return 0;
}
if( DIFF_TICK(md->next_walktime,tick) < 0 && (status_get_mode(&md->bl)&MD_CANMOVE) && unit_can_move(&md->bl) )
{
if( map[md->bl.m].users > 0 )
{
if( rnd()%1000 < MOB_LAZYMOVEPERC(md) )
mob_randomwalk(md, tick);
else
if( rnd()%1000 < MOB_LAZYSKILLPERC ) //Chance to do a mob's idle skill.
mobskill_use(md, tick, -1);
}
else
{
if( rnd()%1000 < MOB_LAZYMOVEPERC(md) )
mob_randomwalk(md, tick);
}
}
return 0;
}