diff options
Diffstat (limited to 'src')
14 files changed, 278 insertions, 91 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index 956a76790f8..4438f42564f 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -79,7 +79,7 @@ void SummonList::DespawnAll() } } -ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), IsFleeing(false), CombatMovement(true), m_uiEvadeCheckCooldown(2500) +ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), IsFleeing(false), m_bCombatMovement(true), m_uiEvadeCheckCooldown(2500) { HeroicMode = m_creature->GetMap()->IsHeroic(); } @@ -572,9 +572,9 @@ void ScriptedAI::SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand, int32 ui m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, uint32(uiRanged)); } -void ScriptedAI::SetCombatMovement(bool CombatMove) +void ScriptedAI::SetCombatMovement(bool bCombatMove) { - CombatMovement = CombatMove; + m_bCombatMovement = bCombatMove; } // Hacklike storage used for misc creatures that are expected to evade of outside of a certain area. @@ -623,22 +623,6 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) return true; } -/*void Scripted_NoMovementAI::MoveInLineOfSight(Unit *who) -{ - if( !m_creature->getVictim() && m_creature->canAttack(who) && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature) ) - { - if (!m_creature->canFly() && !m_creature->IsWithinDist(who, CREATURE_Z_ATTACK_RANGE)) - return; - - float attackRadius = m_creature->GetAttackDistance(who); - if( m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) ) - { - who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); - } - } -}*/ - void Scripted_NoMovementAI::AttackStart(Unit* who) { if (!who) diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h index 13d721f01ab..cfce5c25bfa 100644 --- a/src/bindings/scripts/include/sc_creature.h +++ b/src/bindings/scripts/include/sc_creature.h @@ -190,14 +190,14 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE); + //Generally used to control if MoveChase() is to be used or not in AttackStart(). Some creatures does not chase victims void SetCombatMovement(bool CombatMove); + bool IsCombatMovement() { return m_bCombatMovement; } bool EnterEvadeIfOutOfCombatArea(const uint32 uiDiff); - protected: - bool CombatMovement; - private: + bool m_bCombatMovement; uint32 m_uiEvadeCheckCooldown; }; @@ -205,8 +205,6 @@ struct TRINITY_DLL_DECL Scripted_NoMovementAI : public ScriptedAI { Scripted_NoMovementAI(Creature* creature) : ScriptedAI(creature) {} - //Called if IsVisible(Unit *who) is true at each *who move - //void MoveInLineOfSight(Unit* who); //Called at each attack of m_creature by any victim void AttackStart(Unit* who); diff --git a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp index d8a6cdf1c21..2a6e593c113 100644 --- a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp +++ b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp @@ -28,7 +28,7 @@ void npc_escortAI::AttackStart(Unit *who) if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) m_creature->GetMotionMaster()->MovementExpired(); - if(CombatMovement) + if (IsCombatMovement()) m_creature->GetMotionMaster()->MoveChase(who); } } @@ -45,7 +45,9 @@ void npc_escortAI::JustRespawned() { IsBeingEscorted = false; IsOnHold = false; - CombatMovement = true; + + if (!IsCombatMovement()) + SetCombatMovement(true); m_uiWPWaitTimer = 0; diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp index 753b8a31470..eb48a3dbe7a 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp @@ -34,10 +34,11 @@ EndScriptData */ #define SPELL_SONIC_SHOCK 38797 #define SPELL_THUNDERING_STORM 39365 -struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI { - boss_murmurAI(Creature *c) : Scripted_NoMovementAI(c) + boss_murmurAI(Creature *c) : ScriptedAI(c) { + SetCombatMovement(false); HeroicMode = m_creature->GetMap()->IsHeroic(); } diff --git a/src/bindings/scripts/scripts/zone/desolace/desolace.cpp b/src/bindings/scripts/scripts/zone/desolace/desolace.cpp index 1f0e2e71286..6423fc08018 100644 --- a/src/bindings/scripts/scripts/zone/desolace/desolace.cpp +++ b/src/bindings/scripts/scripts/zone/desolace/desolace.cpp @@ -167,7 +167,7 @@ void AddSC_desolace() newscript = new Script; newscript->Name = "npc_aged_dying_ancient_kodo"; - newscript->GetAI = GetAI_npc_aged_dying_ancient_kodo; + newscript->GetAI = &GetAI_npc_aged_dying_ancient_kodo; newscript->pEffectDummyCreature = &EffectDummyCreature_npc_aged_dying_ancient_kodo; newscript->pGossipHello = &GossipHello_npc_aged_dying_ancient_kodo; newscript->RegisterSelf(); diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp index 4eef9a5d5c8..26aabed2cd7 100644 --- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp +++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp @@ -19,6 +19,7 @@ #include "precompiled.h" #include "Vehicle.h" #include "ObjectMgr.h" +#include "../../npc/npc_escortAI.h" #define GCD_CAST 1 @@ -480,6 +481,190 @@ CreatureAI* GetAI_npc_a_special_surprise(Creature* pCreature) } /*###### +## npc_koltira_deathweaver +######*/ + +enum eKoltira +{ + SAY_BREAKOUT1 = -1609079, + SAY_BREAKOUT2 = -1609080, + SAY_BREAKOUT3 = -1609081, + SAY_BREAKOUT4 = -1609082, + SAY_BREAKOUT5 = -1609083, + SAY_BREAKOUT6 = -1609084, + SAY_BREAKOUT7 = -1609085, + SAY_BREAKOUT8 = -1609086, + SAY_BREAKOUT9 = -1609087, + SAY_BREAKOUT10 = -1609088, + + SPELL_KOLTIRA_TRANSFORM = 52899, + SPELL_ANTI_MAGIC_ZONE = 52894, + + QUEST_BREAKOUT = 12727, + + NPC_CRIMSON_ACOLYTE = 29007, + NPC_HIGH_INQUISITOR_VALROTH = 29001, + NPC_KOLTIRA_ALT = 28447, + + //not sure about this id + //NPC_DEATH_KNIGHT_MOUNT = 29201, + MODEL_DEATH_KNIGHT_MOUNT = 25278 +}; + +struct TRINITY_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI +{ + npc_koltira_deathweaverAI(Creature *pCreature) : npc_escortAI(pCreature) { } + + uint32 m_uiWave; + uint32 m_uiWave_Timer; + uint64 m_uiValrothGUID; + + void Reset() + { + if (!IsBeingEscorted) + { + m_uiWave = 0; + m_uiWave_Timer = 3000; + m_uiValrothGUID = 0; + } + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + DoScriptText(SAY_BREAKOUT1, m_creature); + break; + case 1: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + case 2: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + //m_creature->UpdateEntry(NPC_KOLTIRA_ALT); //unclear if we must update or not + DoCast(m_creature, SPELL_KOLTIRA_TRANSFORM); + break; + case 3: + IsOnHold = true; + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + DoScriptText(SAY_BREAKOUT2, m_creature); + DoCast(m_creature, SPELL_ANTI_MAGIC_ZONE); // cast again that makes bubble up + break; + case 4: + SetRun(true); + break; + case 9: + m_creature->Mount(MODEL_DEATH_KNIGHT_MOUNT); + break; + case 10: + m_creature->Unmount(); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (Unit* pPlayer = Unit::GetUnit(*m_creature, PlayerGUID)) + { + pSummoned->AI()->AttackStart(pPlayer); + pSummoned->AddThreat(m_creature, 0.0f); + } + + if (pSummoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH) + m_uiValrothGUID = pSummoned->GetGUID(); + } + + void SummonAcolyte(uint32 uiAmount) + { + for(uint32 i = 0; i < uiAmount; ++i) + m_creature->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329, -6045.818, 127.583, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + } + + void UpdateAI(const uint32 uiDiff) + { + npc_escortAI::UpdateAI(uiDiff); + + if (IsOnHold) + { + if (m_uiWave_Timer < uiDiff) + { + switch(m_uiWave) + { + case 0: + DoScriptText(SAY_BREAKOUT3, m_creature); + SummonAcolyte(3); + m_uiWave_Timer = 20000; + break; + case 1: + DoScriptText(SAY_BREAKOUT4, m_creature); + SummonAcolyte(3); + m_uiWave_Timer = 20000; + break; + case 2: + DoScriptText(SAY_BREAKOUT5, m_creature); + SummonAcolyte(4); + m_uiWave_Timer = 20000; + break; + case 3: + DoScriptText(SAY_BREAKOUT6, m_creature); + m_creature->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329, -6045.818, 127.583, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); + m_uiWave_Timer = 1000; + break; + case 4: + { + Unit* pTemp = Unit::GetUnit(*m_creature, m_uiValrothGUID); + + if (!pTemp || !pTemp->isAlive()) + { + DoScriptText(SAY_BREAKOUT8, m_creature); + m_uiWave_Timer = 5000; + } + else + { + m_uiWave_Timer = 2500; + return; //return, we don't want m_uiWave to increment now + } + break; + } + case 5: + DoScriptText(SAY_BREAKOUT9, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_ANTI_MAGIC_ZONE); + m_uiWave_Timer = 2500; + break; + case 6: + DoScriptText(SAY_BREAKOUT10, m_creature); + IsOnHold = false; + break; + } + + ++m_uiWave; + } + else + m_uiWave_Timer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_koltira_deathweaver(Creature* pCreature) +{ + npc_koltira_deathweaverAI* pTempAI = new npc_koltira_deathweaverAI(pCreature); + + pTempAI->FillPointMovementListForCreature(); + + return (CreatureAI*)pTempAI; +} + +bool QuestAccept_npc_koltira_deathweaver(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_BREAKOUT) + { + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + CAST_AI(npc_escortAI,pCreature->AI())->Start(false, true, false, pPlayer->GetGUID()); + } + return true; +} + +/*###### ##Quest 12848 ######*/ @@ -1242,6 +1427,12 @@ void AddSC_the_scarlet_enclave() Script *newscript; newscript = new Script; + newscript->Name = "npc_koltira_deathweaver"; + newscript->GetAI = &GetAI_npc_koltira_deathweaver; + newscript->pQuestAccept = &QuestAccept_npc_koltira_deathweaver; + newscript->RegisterSelf(); + + newscript = new Script; newscript->Name="npc_unworthy_initiate"; newscript->GetAI = &GetAI_npc_unworthy_initiate; newscript->RegisterSelf(); diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 03b99e0ef36..fbb9aaaf673 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -41,10 +41,11 @@ EndScriptData */ #define H_SPELL_SHADOW_BOLT 39297 #define SPELL_SUMMON_FIENDISH_HOUND 30707 -struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI { - boss_omor_the_unscarredAI(Creature *c) : Scripted_NoMovementAI(c) + boss_omor_the_unscarredAI(Creature *c) : ScriptedAI(c) { + SetCombatMovement(false); HeroicMode = m_creature->GetMap()->IsHeroic(); } diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 954cb4ee872..d730cb4b680 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -297,7 +297,7 @@ void AddSC_boss_warchief_kargath_bladefist() Script *newscript; newscript = new Script; newscript->Name="boss_warchief_kargath_bladefist"; - newscript->GetAI = GetAI_boss_warchief_kargath_bladefist; + newscript->GetAI = &GetAI_boss_warchief_kargath_bladefist; newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp index 45874e4a83e..19bc46dfc53 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp @@ -88,7 +88,8 @@ EndScriptData */ void SummonCroneIfReady(ScriptedInstance* pInstance, Creature* pCreature) { - pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, 0); // Increment DeathCount + pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, SPECIAL); // Increment DeathCount + if(pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4) { if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96, -1755.95, pCreature->GetPositionZ(), 4.64, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS)) diff --git a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp index 554d8392b69..25c3f9c57f0 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp @@ -189,7 +189,12 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance break; Encounters[11] = data; break; - case DATA_OPERA_OZ_DEATHCOUNT: ++OzDeathCount; break; + case DATA_OPERA_OZ_DEATHCOUNT: + if (data == SPECIAL) + ++OzDeathCount; + else if (data == IN_PROGRESS) + OzDeathCount = 0; + break; } if(data == DONE) diff --git a/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp b/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp index 8156e8fff9c..a7bab8e75a9 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp @@ -304,6 +304,11 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI return; pInstance->SetData(DATA_OPERA_EVENT, IN_PROGRESS); + + //resets count for this event, in case earlier failed + if (Event == EVENT_OZ) + pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, IN_PROGRESS); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT), true); m_creature->CastSpell(m_creature, SPELL_TUXEDO, true); diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp index 4260e4f5bb2..7e956696aa8 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp @@ -83,9 +83,12 @@ EndScriptData */ #define ADD_8Z -229.683182 #define ADD_8O 4.693108 -struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL boss_ragnarosAI : public ScriptedAI { - boss_ragnarosAI(Creature *c) : Scripted_NoMovementAI(c) {} + boss_ragnarosAI(Creature *c) : ScriptedAI(c) + { + SetCombatMovement(false); + } uint32 WrathOfRagnaros_Timer; uint32 HandOfRagnaros_Timer; diff --git a/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp b/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp index b513a4bce86..adf846322d3 100644 --- a/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp +++ b/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp @@ -80,14 +80,20 @@ bool GossipSelect_npc_braug_dimspirit(Player *player, Creature *_Creature, uint3 ## npc_kaya_flathoof ######*/ -#define SAY_START -1000347 -#define SAY_AMBUSH -1000348 -#define SAY_END -1000349 +enum +{ + FACTION_ESCORTEE_H = 775, + + NPC_GRIMTOTEM_RUFFIAN = 11910, + NPC_GRIMTOTEM_BRUTE = 11912, + NPC_GRIMTOTEM_SORCERER = 11913, + + SAY_START = -1000347, + SAY_AMBUSH = -1000348, + SAY_END = -1000349, -#define QUEST_PK 6523 -#define MOB_GB 11912 -#define MOB_GR 11910 -#define MOB_GS 11913 + QUEST_PROTECT_KAYA = 6523 +}; struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI { @@ -102,16 +108,16 @@ struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI switch(i) { - case 22: + case 16: DoScriptText(SAY_AMBUSH, m_creature); - m_creature->SummonCreature(MOB_GB, -48.53, -503.34, -46.31, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(MOB_GR, -38.85, -503.77, -45.90, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(MOB_GS, -36.37, -496.23, -45.71, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_GRIMTOTEM_BRUTE, -48.53, -503.34, -46.31, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -38.85, -503.77, -45.90, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_GRIMTOTEM_SORCERER, -36.37, -496.23, -45.71, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; - case 23: m_creature->SetInFront(player); + case 18: m_creature->SetInFront(player); DoScriptText(SAY_END, m_creature, player); if (player && player->GetTypeId() == TYPEID_PLAYER) - CAST_PLR(player)->GroupEventHappens(QUEST_PK, m_creature); + CAST_PLR(player)->GroupEventHappens(QUEST_PROTECT_KAYA, m_creature); break; } } @@ -131,7 +137,7 @@ struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI { Player* player = Unit::GetPlayer(PlayerGUID); if (player) - CAST_PLR(player)->FailQuest(QUEST_PK); + CAST_PLR(player)->FailQuest(QUEST_PROTECT_KAYA); } } @@ -143,7 +149,7 @@ struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI bool QuestAccept_npc_kaya_flathoof(Player* player, Creature* creature, Quest const* quest) { - if (quest->GetQuestId() == QUEST_PK) + if (quest->GetQuestId() == QUEST_PROTECT_KAYA) { CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID()); DoScriptText(SAY_START, creature); @@ -155,34 +161,11 @@ bool QuestAccept_npc_kaya_flathoof(Player* player, Creature* creature, Quest con CreatureAI* GetAI_npc_kaya_flathoofAI(Creature *_Creature) { - npc_kaya_flathoofAI* thisAI = new npc_kaya_flathoofAI(_Creature); - - thisAI->AddWaypoint(0, 122.37, -345.80, 3.59); - thisAI->AddWaypoint(1, 113.69, -350.01, 4.54); - thisAI->AddWaypoint(2, 107.32, -353.09, 3.33); - thisAI->AddWaypoint(3, 99.25, -342.43, 2.87); - thisAI->AddWaypoint(4, 111.19, -315.60, 3.71); - thisAI->AddWaypoint(5, 109.99, -293.92, 5.16); - thisAI->AddWaypoint(6, 104.59, -268.27, 4.78); - thisAI->AddWaypoint(7, 82.80, -247.28, 5.73); - thisAI->AddWaypoint(8, 66.44, -245.99, 5.85); - thisAI->AddWaypoint(9, 34.36, -246.01, 5.97); - thisAI->AddWaypoint(10, 13.24, -245.61, 5.25); - thisAI->AddWaypoint(11, -10.27, -248.66, 4.69); - thisAI->AddWaypoint(12, -26.07, -262.76, 0.01); - thisAI->AddWaypoint(13, -33.15, -282.03, -4.12); - thisAI->AddWaypoint(14, -28.42, -315.52, -8.56); - thisAI->AddWaypoint(15, -32.05, -339.34, -10.84); - thisAI->AddWaypoint(16, -35.22, -358.11, -16.20); - thisAI->AddWaypoint(17, -51.57, -391.63, -24.85); - thisAI->AddWaypoint(18, -58.58, -409.08, -29.97); - thisAI->AddWaypoint(19, -60.37, -441.23, -36.80); - thisAI->AddWaypoint(20, -59.03, -476.39, -44.98); - thisAI->AddWaypoint(21, -53.18, -490.31, -46.11); - thisAI->AddWaypoint(22, -43.77, -497.99, -46.13, 3000);// summon - thisAI->AddWaypoint(23, -41.77, -518.15, -46.13, 5000);//end - - return thisAI; + npc_kaya_flathoofAI* kayaAI = new npc_kaya_flathoofAI(_Creature); + + kayaAI->FillPointMovementListForCreature(); + + return kayaAI; } /*###### diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp index 923612d2fe0..08bf13b9810 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp @@ -106,9 +106,12 @@ EndScriptData */ #define KICK_Y 1984.0f #define KICK_Z -96.0f -struct TRINITY_DLL_DECL flesh_tentacleAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL flesh_tentacleAI : public ScriptedAI { - flesh_tentacleAI(Creature *c) : Scripted_NoMovementAI(c), Parent(0) {} + flesh_tentacleAI(Creature *c) : ScriptedAI(c), Parent(0) + { + SetCombatMovement(false); + } uint64 Parent; uint32 CheckTimer; @@ -428,10 +431,12 @@ struct TRINITY_DLL_DECL eye_of_cthunAI : public Scripted_NoMovementAI } }; -struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL cthunAI : public ScriptedAI { - cthunAI(Creature *c) : Scripted_NoMovementAI(c) + cthunAI(Creature *c) : ScriptedAI(c) { + SetCombatMovement(false); + pInst = c->GetInstanceData(); if (!pInst) error_log("TSCR: No Instance eye_of_cthunAI"); @@ -909,10 +914,12 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI } }; -struct TRINITY_DLL_DECL eye_tentacleAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL eye_tentacleAI : public ScriptedAI { - eye_tentacleAI(Creature *c) : Scripted_NoMovementAI(c) + eye_tentacleAI(Creature *c) : ScriptedAI(c) { + SetCombatMovement(false); + if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) Portal = pPortal->GetGUID(); } @@ -968,10 +975,12 @@ struct TRINITY_DLL_DECL eye_tentacleAI : public Scripted_NoMovementAI } }; -struct TRINITY_DLL_DECL claw_tentacleAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL claw_tentacleAI : public ScriptedAI { - claw_tentacleAI(Creature *c) : Scripted_NoMovementAI(c) + claw_tentacleAI(Creature *c) : ScriptedAI(c) { + SetCombatMovement(false); + if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) Portal = pPortal->GetGUID(); } @@ -1057,10 +1066,12 @@ struct TRINITY_DLL_DECL claw_tentacleAI : public Scripted_NoMovementAI } }; -struct TRINITY_DLL_DECL giant_claw_tentacleAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL giant_claw_tentacleAI : public ScriptedAI { - giant_claw_tentacleAI(Creature *c) : Scripted_NoMovementAI(c) + giant_claw_tentacleAI(Creature *c) : ScriptedAI(c) { + SetCombatMovement(false); + if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) Portal = pPortal->GetGUID(); } @@ -1156,10 +1167,12 @@ struct TRINITY_DLL_DECL giant_claw_tentacleAI : public Scripted_NoMovementAI } }; -struct TRINITY_DLL_DECL giant_eye_tentacleAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL giant_eye_tentacleAI : public ScriptedAI { - giant_eye_tentacleAI(Creature *c) : Scripted_NoMovementAI(c) + giant_eye_tentacleAI(Creature *c) : ScriptedAI(c) { + SetCombatMovement(false); + if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) Portal = pPortal->GetGUID(); } |