diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-12 05:58:58 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-12 05:58:58 +0000 |
commit | 1c6443a7ab88539acf5e456c0911dbdd8b674582 (patch) | |
tree | 233d8764dc81ba713dd0d5391c767ea9e501fd66 /src/map/mob.h | |
parent | ed8c27d7fd6a98cac15020ff2f72dfceabf1957d (diff) | |
download | hercules-1c6443a7ab88539acf5e456c0911dbdd8b674582.tar.gz hercules-1c6443a7ab88539acf5e456c0911dbdd8b674582.tar.bz2 hercules-1c6443a7ab88539acf5e456c0911dbdd8b674582.tar.xz hercules-1c6443a7ab88539acf5e456c0911dbdd8b674582.zip |
Now using proper enum type for mob skill state tracking.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13075 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.h')
-rw-r--r-- | src/map/mob.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/map/mob.h b/src/map/mob.h index 3f9ef09a6..a0706944a 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -35,8 +35,22 @@ #define MOB_CLONE_START (MAX_MOB_DB-999) #define MOB_CLONE_END MAX_MOB_DB +//Mob skill states. +enum MobSkillState { + MSS_ANY = -1, + MSS_IDLE, + MSS_WALK, + MSS_LOOT, + MSS_DEAD, + MSS_BERSERK, //Aggressive mob attacking + MSS_ANGRY, //Mob retaliating from being attacked. + MSS_RUSH, //Mob following a player after being attacked. + MSS_FOLLOW, //Mob following a player without being attacked. + MSS_ANYTARGET, +}; + struct mob_skill { - short state; + enum MobSkillState state; short skill_id,skill_lv; short permillage; int casttime,delay; @@ -88,7 +102,7 @@ struct mob_data { //3: Alchemist Summon Flora } special_state; //Special mob information that does not needs to be zero'ed on mob respawn. struct { - unsigned skillstate : 8; + enum MobSkillState skillstate; unsigned aggressive : 1; //Signals whether the mob AI is in aggressive mode or reactive mode. [Skotlex] unsigned char steal_flag; //number of steal tries (to prevent steal exploit on mobs with few items) [Lupus] unsigned steal_coin_flag : 1; @@ -171,21 +185,6 @@ enum { MSC_SPAWN, }; -//Mob skill states. -enum { - MSS_ANY = -1, - MSS_IDLE, - MSS_WALK, - MSS_LOOT, - MSS_DEAD, - MSS_BERSERK, //Aggressive mob attacking - MSS_ANGRY, //Mob retaliating from being attacked. - MSS_RUSH, //Mob following a player after being attacked. - MSS_FOLLOW, //Mob following a player without being attacked. - MSS_ANYTARGET, -}; - - // The data structures for storing delayed item drops struct item_drop { struct item item_data; |