summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--src/map/mob.c10
2 files changed, 10 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 6efcdb755..a18e0fa59 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/17
+ * 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. [Skotlex]
* Added check to clear previous skill when combo time ends. Should fix TK
Rankers being unable to initiate a combo with the same kick their previous
combo was finished with. [Skotlex]
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.