diff options
| author | megamage <none@none> | 2009-01-29 19:35:49 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-01-29 19:35:49 -0600 |
| commit | b0bf621a139aaa6e620098fc7a4411a800fda43d (patch) | |
| tree | a80cfed503a562c4e436814dc056e8b22386efef /src/bindings/scripts | |
| parent | 25ab1fa4adfe1e9be1f8bfb6701f6a0d48887770 (diff) | |
| parent | adee7cab17e191ab9d735c326cd611f0380736d6 (diff) | |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts')
3 files changed, 9 insertions, 6 deletions
diff --git a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp index eee4269e12c..6b46b7aecde 100644 --- a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp +++ b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp @@ -1225,7 +1225,7 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI void UpdateAI(const uint32 diff) { //Check if we are in combat (also updates calls threat update code) - bool Combat = InCombat ? (m_creature->SelectHostilTarget() && m_creature->getVictim()) : false; + bool Combat = InCombat ? m_creature->SelectHostilTarget() : false; //Must return if creature isn't alive. Normally select hostil target and get victim prevent this if (!m_creature->isAlive()) @@ -1233,11 +1233,9 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI if (IsFleeing) { - if(TimetoFleeLeft < diff - || m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE - && m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != FLEEING_MOTION_TYPE) + if(TimetoFleeLeft < diff) { - m_creature->GetMotionMaster()->Clear(false); + m_creature->SetControlled(false, UNIT_STAT_FLEEING); m_creature->SetNoCallAssistance(false); m_creature->CallAssistance(); if(m_creature->getVictim()) diff --git a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp index c6ef71f25e5..6a11c455f67 100644 --- a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp +++ b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp @@ -149,7 +149,6 @@ struct TRINITY_DLL_DECL npc_dashel_stonefistAI : public ScriptedAI //m_creature->CombatStop(); EnterEvadeMode(); } - AttackedBy(done_by); } void Aggro(Unit *who) {} diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp index 87fe0f92641..c7e138e0918 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp @@ -144,6 +144,12 @@ struct TRINITY_DLL_DECL boss_lajAI : public ScriptedAI { } + void JustSummoned(Creature *summon) + { + if(summon && m_creature->getVictim()) + summon->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0)); + } + void UpdateAI(const uint32 diff) { if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() ) |
