summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-17 15:23:25 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-17 15:23:25 +0000
commitbfb41dab6775837b019cda58cd7bd0fef894f0bf (patch)
treea8f668a4b491875c394cbcbb77a49adcfefa1088 /src
parent89260738c3fc8bae908442578bc884c61919487b (diff)
downloadhercules-bfb41dab6775837b019cda58cd7bd0fef894f0bf.tar.gz
hercules-bfb41dab6775837b019cda58cd7bd0fef894f0bf.tar.bz2
hercules-bfb41dab6775837b019cda58cd7bd0fef894f0bf.tar.xz
hercules-bfb41dab6775837b019cda58cd7bd0fef894f0bf.zip
- Modified mob_can_changetarget to return true always when the new target is the provoked-by character. Fixes provoke not making the mob change target when it already is locked on another player.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6633 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 3cfe3b997..0328e42d1 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -733,9 +733,13 @@ int mob_spawn (struct mob_data *md)
static int mob_can_changetarget(struct mob_data* md, struct block_list* target, int mode)
{
// if the monster was provoked ignore the above rule [celest]
- if(md->state.provoke_flag && md->state.provoke_flag != target->id &&
- !battle_config.mob_ai&4)
- return 0;
+ if(md->state.provoke_flag)
+ {
+ if (md->state.provoke_flag == target->id)
+ return 1;
+ else if (!battle_config.mob_ai&4)
+ return 0;
+ }
switch (md->state.skillstate) {
case MSS_BERSERK: //Only Assist, Angry or Aggressive+CastSensor mobs can change target while attacking.