summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c1
-rw-r--r--src/map/mob.h2
-rw-r--r--src/map/skill.c10
3 files changed, 4 insertions, 9 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 9ed6f99f3..f2c400581 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -35,7 +35,6 @@
#include "date.h"
#include "irc.h"
-#define MIN_MOBTHINKTIME 100
#define IDLE_SKILL_INTERVAL 10 //Active idle skills should be triggered every 1 second (1000/MIN_MOBTHINKTIME)
#define MOB_LAZYSKILLPERC 10 // Probability for mobs far from players from doing their IDLE skill. (rate of 1000 minute)
diff --git a/src/map/mob.h b/src/map/mob.h
index 61f0d6345..6acc282fc 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -19,6 +19,8 @@
#define MAX_MOB_DROP 10
#define MAX_STEAL_DROP 7
+//Min time between AI executions
+#define MIN_MOBTHINKTIME 100
//Min time before mobs do a check to call nearby friends for help (or for slaves to support their master)
#define MIN_MOBLINKTIME 1000
diff --git a/src/map/skill.c b/src/map/skill.c
index bb895c68d..b3a5d432b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5739,10 +5739,7 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
break;
if(md) {
- if(tid != -1) //Set afterskill delay.
- md->last_thinktime=tick +md->status.amotion;
- else
- md->last_thinktime=tick +md->status.adelay;
+ md->last_thinktime=tick +MIN_MOBTHINKTIME;
if(md->skillidx >= 0 && md->db->skill[md->skillidx].emotion >= 0)
clif_emotion(src, md->db->skill[md->skillidx].emotion);
}
@@ -5927,10 +5924,7 @@ int skill_castend_pos (int tid, unsigned int tick, int id, int data)
break;
if(md) {
- if (tid != -1)
- md->last_thinktime=tick +md->status.amotion;
- else
- md->last_thinktime=tick +md->status.adelay;
+ md->last_thinktime=tick +MIN_MOBTHINKTIME;
if(md->skillidx >= 0 && md->db->skill[md->skillidx].emotion >= 0)
clif_emotion(src, md->db->skill[md->skillidx].emotion);
}