diff options
| author | MitchesD <majklprofik@seznam.cz> | 2015-01-10 22:58:03 +0100 |
|---|---|---|
| committer | MitchesD <majklprofik@seznam.cz> | 2015-01-10 23:01:41 +0100 |
| commit | 82e5d1889377f95109f560a5fc47e03e99dda03e (patch) | |
| tree | c9c4948ba2dc08065f9d72575c72b8dad8cfb052 /src/server/scripts/EasternKingdoms | |
| parent | 2dfd1594cd3cc7fdba4131d2e825885cac2bcc17 (diff) | |
Scripts/Misc: some random changes after recent commits and cleanup
(cherry picked from commit f94cfc65771f53cd2b693779ecd00705cd66593a)
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp | 13 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp | 6 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp index 52078ceef8c..b094eb45dca 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp @@ -48,11 +48,6 @@ class boss_maleki_the_pallid : public CreatureScript public: boss_maleki_the_pallid() : CreatureScript("boss_maleki_the_pallid") { } - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI<boss_maleki_the_pallidAI>(creature); - } - struct boss_maleki_the_pallidAI : public ScriptedAI { boss_maleki_the_pallidAI(Creature* creature) : ScriptedAI(creature) @@ -85,6 +80,9 @@ public: _events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + while (uint32 eventId = _events.ExecuteEvent()) { switch (eventId) @@ -111,11 +109,16 @@ public: DoMeleeAttackIfReady(); } + private: EventMap _events; InstanceScript* instance; }; + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_maleki_the_pallidAI>(creature); + } }; void AddSC_boss_maleki_the_pallid() diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp index 6d9ccc5e882..0b3fa2e7caa 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp @@ -55,7 +55,8 @@ enum Events class boss_postmaster_malown : public CreatureScript { - public: boss_postmaster_malown() : CreatureScript("boss_postmaster_malown") { } + public: + boss_postmaster_malown() : CreatureScript("boss_postmaster_malown") { } struct boss_postmaster_malownAI : public BossAI { @@ -120,13 +121,14 @@ class boss_postmaster_malown : public CreatureScript break; } } + DoMeleeAttackIfReady(); } }; CreatureAI* GetAI(Creature* creature) const override { - return new boss_postmaster_malownAI(creature); + return GetInstanceAI<boss_postmaster_malownAI>(creature); } }; |
