summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-07 22:53:06 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-07 22:53:06 +0000
commita3a95f6d2dd67cb09a08d2d633cfcf77f6349715 (patch)
tree7ae23ca448eb2118389f10aa998fc67849f18e34
parentdd2e4d4fea67858cb39260549de6a2ccb49eb7b9 (diff)
downloadhercules-a3a95f6d2dd67cb09a08d2d633cfcf77f6349715.tar.gz
hercules-a3a95f6d2dd67cb09a08d2d633cfcf77f6349715.tar.bz2
hercules-a3a95f6d2dd67cb09a08d2d633cfcf77f6349715.tar.xz
hercules-a3a95f6d2dd67cb09a08d2d633cfcf77f6349715.zip
- Fixed the mob state not being set to Berserk/Angry correctly after the mob reaches the target's location.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7040 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/mob.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 58a45fc11..3c7b14ed0 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ 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/06/07
+ * Fixed the mob state not being set to Berserk/Angry correctly after the
+ mob reaches the target's location. [Skotlex]
* Added config setting mob_npc_warp, when set to yes, enables mobs to be
warped between maps when stepping on a npc-warp. [Skotlex]
* Added monster_ai setting &64, when enabled makes a mob run to any nearby
diff --git a/src/map/mob.c b/src/map/mob.c
index ea92b5122..61b77bf97 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1196,7 +1196,11 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
{ //Attempt to attack.
//At this point we know the target is attackable, we just gotta check if the range matches.
if (md->ud.target == tbl->id && md->ud.attacktimer != -1)
+ {
+ if (md->state.skillstate!=(md->state.aggressive?MSS_ANGRY:MSS_BERSERK))
+ md->state.skillstate = md->state.aggressive?MSS_ANGRY:MSS_BERSERK; //Correct the state.
return 0; //Already locked.
+ }
if (!battle_check_range (&md->bl, tbl, md->status.rhw.range))
{ //Out of range...