diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-24 14:52:11 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-24 14:52:11 +0000 |
commit | dc9ae7b5a2a047d3cf3e889b0d1df0d7af67e2a4 (patch) | |
tree | 05b3fa0c830cdbdb14ffc85ae56ff153ff4c929d /src/map/mob.c | |
parent | 52c05755226744e3fc6f42779d60f6ed392a5e4b (diff) | |
download | hercules-dc9ae7b5a2a047d3cf3e889b0d1df0d7af67e2a4.tar.gz hercules-dc9ae7b5a2a047d3cf3e889b0d1df0d7af67e2a4.tar.bz2 hercules-dc9ae7b5a2a047d3cf3e889b0d1df0d7af67e2a4.tar.xz hercules-dc9ae7b5a2a047d3cf3e889b0d1df0d7af67e2a4.zip |
- Fixed skill_delayfix not altering delay at all after you reached 150.
- Applied ers to pet loot drops.
- Cleaned up the pet loot drop function.
- Mob skill state MSS_ANY won't include MSS_DEAD now.
- Added mob skill state MSS_ANYTARGET ("anytarget") which means any state (except dead) on which the mob has a target set.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6250 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 2ff43cdc9..c9b969b44 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1383,23 +1383,6 @@ static int mob_ai_hard(int tid,unsigned int tick,int id,int data) }
/*==========================================
- * The structure object for item drop with delay
- * Since it is only two being able to pass [ int ] a timer function
- * Data is put in and passed to this structure object.
- *------------------------------------------
- */
-struct item_drop {
- struct item item_data;
- struct item_drop *next;
-};
-
-struct item_drop_list {
- int m,x,y;
- struct map_session_data *first_sd,*second_sd,*third_sd;
- struct item_drop *item;
-};
-
-/*==========================================
* Initializes the delay drop structure for mob-dropped items.
*------------------------------------------
*/
@@ -2617,10 +2600,12 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) if (DIFF_TICK(tick, md->skilldelay[i]) < ms[i].delay)
continue;
- // Ԕ
- if (ms[i].state != MSS_ANY && ms[i].state != md->state.skillstate)
- continue;
-
+ if (ms[i].state != md->state.skillstate && md->state.skillstate != MSS_DEAD) {
+ if (ms[i].state == MSS_ANY || (ms[i].state == MSS_ANYTARGET && md->target_id))
+ ; //ANYTARGET works with any state as long as there's a target. [Skotlex]
+ else
+ continue;
+ }
if (rand() % 10000 > ms[i].permillage) //Lupus (max value = 10000)
continue;
@@ -3478,7 +3463,7 @@ static int mob_readskilldb(void) { "hiding", SC_HIDING },
{ "sight", SC_SIGHT },
}, state[] = {
- { "any", MSS_ANY },
+ { "any", MSS_ANY }, //All states except Dead
{ "idle", MSS_IDLE },
{ "walk", MSS_WALK },
{ "loot", MSS_LOOT },
@@ -3487,6 +3472,7 @@ static int mob_readskilldb(void) { "angry", MSS_ANGRY }, //Preemptive attack (aggressive mobs)
{ "chase", MSS_RUSH }, //Chase escaping target
{ "follow", MSS_FOLLOW }, //Preemptive chase (aggressive mobs)
+ { "anytarget",MSS_ANYTARGET }, //Berserk+Angry+Rush+Follow
}, target[] = {
{ "target", MST_TARGET },
{ "self", MST_SELF },
|