Jump to content
  • 0

error in mob.c


egar_95

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  04/17/12
  • Last Seen:  

Hi,

this is my mistake

dibujorwo.jpg

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;
}

Edited by Emistry
Please use [CODEBOX] or Attachments for long contents.
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...