summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-02 17:14:00 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-02 17:14:00 +0000
commitdf801754db61508ccb447b26f6b2b2aa9a304f9e (patch)
treec92a997f8327b0256fe665c62ca1b2b35346af18 /src/map/mob.c
parente67711acbe9d29a2feb9293fccc72cd15603ee76 (diff)
downloadhercules-df801754db61508ccb447b26f6b2b2aa9a304f9e.tar.gz
hercules-df801754db61508ccb447b26f6b2b2aa9a304f9e.tar.bz2
hercules-df801754db61508ccb447b26f6b2b2aa9a304f9e.tar.xz
hercules-df801754db61508ccb447b26f6b2b2aa9a304f9e.zip
* Changes to map_foreach* functions:
- removed the unecessary use of va_copy in map_foreachpc - applied the same function pattern to map_foreachmob and map_foreachiddb - created map_foreachnpc - extended the behaviour of map_foreach* functions to stop iterating when func returns -1 (also added missing changelog entries from ultramage >.>) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12684 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index b8d833227..d50f9ddd0 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1666,9 +1666,8 @@ static int mob_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
/*==========================================
* Negligent mode MOB AI (PC is not in near)
*------------------------------------------*/
-static int mob_ai_sub_lazy(DBKey key,void * data,va_list ap)
+static int mob_ai_sub_lazy(struct mob_data *md, va_list args)
{
- struct mob_data *md = (struct mob_data *)data;
unsigned int tick;
int mode;
@@ -1677,7 +1676,7 @@ static int mob_ai_sub_lazy(DBKey key,void * data,va_list ap)
if(md->bl.prev == NULL)
return 0;
- tick=va_arg(ap,unsigned int);
+ tick = va_arg(args,unsigned int);
if (md->nd || (battle_config.mob_ai&0x20 && map[md->bl.m].users>0))
return (int)mob_ai_sub_hard(md, tick);