diff options
Diffstat (limited to 'src/server/scripts')
16 files changed, 122 insertions, 60 deletions
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index ffea5fc8dc5..f18fc5ee243 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -357,7 +357,7 @@ public: if (GameObject* pGo = me->SummonGameObject(183410, -533.140f, -105.322f, -156.016f, 0, 0, 0, 0, 0, 1000)) { GoSummonList.push_back(pGo->GetGUID()); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); //We can't use it! + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it! } Summon(3); break; @@ -372,7 +372,7 @@ public: if (GameObject* pGo = me->SummonGameObject(183410, -542.199f, -96.854f, -155.790f, 0, 0, 0, 0, 0, 1000)) { GoSummonList.push_back(pGo->GetGUID()); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } break; case 5: @@ -392,7 +392,7 @@ public: if (GameObject* pGo = me->SummonGameObject(183410, -507.820f, -103.333f, -151.353f, 0, 0, 0, 0, 0, 1000)) { GoSummonList.push_back(pGo->GetGUID()); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); //We can't use it! + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it! Summon(6); } break; @@ -400,7 +400,7 @@ public: if (GameObject* pGo = me->SummonGameObject(183410, -511.829f, -86.249f, -151.431f, 0, 0, 0, 0, 0, 1000)) { GoSummonList.push_back(pGo->GetGUID()); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); //We can't use it! + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it! } break; case 9: diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp index afd39b9b8d0..303a307d2b9 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp @@ -58,7 +58,7 @@ public: if (pInstance) { pGo->SetGoState(GO_STATE_ACTIVE); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); pInstance->SetData(DATA_FIRE, pInstance->GetData(DATA_FIRE) + 1); return true; } diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp index 0b0e9076fc1..07c7fcf6f27 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp @@ -126,12 +126,12 @@ public: case GO_SHRINE_OF_GELIHAST: m_uiShrineOfGelihastGUID = go->GetGUID(); if (m_auiEncounter[0] != DONE) - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; case GO_ALTAR_OF_THE_DEEPS: m_uiAltarOfTheDeepsGUID = go->GetGUID(); if (m_auiEncounter[3] != DONE) - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; case GO_AKU_MAI_DOOR: if (m_auiEncounter[2] == DONE) @@ -149,14 +149,14 @@ public: m_auiEncounter[0] = uiData; if (uiData == DONE) if (GameObject* go = instance->GetGameObject(m_uiShrineOfGelihastGUID)) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; case TYPE_AKU_MAI: m_auiEncounter[3] = uiData; if (uiData == DONE) if (GameObject* go = instance->GetGameObject(m_uiAltarOfTheDeepsGUID)) { - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); go->SummonCreature(NPC_MORRIDUNE, SpawnsLocation[4], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); } break; diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp index 60cd1b5f82a..19287d656a8 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp @@ -105,7 +105,7 @@ public: case GO_GONG: uiGongGUID = go->GetGUID(); if (m_auiEncounter[0] == DONE) - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; default: break; @@ -123,7 +123,7 @@ public: case 9: case 14: if (GameObject* go = instance->GetGameObject(uiGongGUID)) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; case 1: case 10: @@ -134,7 +134,7 @@ public: if (!go) return; - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); uint32 uiCreature = 0; uint8 uiSummonTimes = 0; diff --git a/src/server/scripts/Kalimdor/ashenvale.cpp b/src/server/scripts/Kalimdor/ashenvale.cpp index da38e26fd22..527d6b3d3e4 100644 --- a/src/server/scripts/Kalimdor/ashenvale.cpp +++ b/src/server/scripts/Kalimdor/ashenvale.cpp @@ -331,7 +331,7 @@ class npc_muglash : public CreatureScript if (GameObject* pGo = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2)) { - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); SetEscortPaused(true); } break; diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp index ba34591b84c..a4ded3f65b0 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp @@ -394,7 +394,7 @@ public: if (pPrinceTaldaram && pPrinceTaldaram->isAlive()) { // maybe these are hacks :( - pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); pGO->SetGoState(GO_STATE_ACTIVE); switch(pGO->GetEntry()) diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp index f9922009b1f..7472efcdc42 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp @@ -115,17 +115,17 @@ public: if (spheres[0] == IN_PROGRESS) { go->SetGoState(GO_STATE_ACTIVE); - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } - else go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + else go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; case 193094: Prince_TaldaramSpheres[1] = go->GetGUID(); if (spheres[1] == IN_PROGRESS) { go->SetGoState(GO_STATE_ACTIVE); - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } - else go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + else go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; case 192236: Prince_TaldaramGate = go->GetGUID(); // Web gate past Prince Taldaram if (m_auiEncounter[1] == DONE)HandleGameObject(0, true, go);break; diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index 8eca03a2075..f9ba820d54d 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -159,11 +159,11 @@ public: case 192518: uiSladRanAltar = go->GetGUID(); // Make sure that they start out as unusuable - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); if (m_auiEncounter[0] == DONE) { if (uiSladRanStatueState == GO_STATE_ACTIVE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); else { ++phase; @@ -174,11 +174,11 @@ public: case 192519: uiMoorabiAltar = go->GetGUID(); // Make sure that they start out as unusuable - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); if (m_auiEncounter[0] == DONE) { if (uiMoorabiStatueState == GO_STATE_ACTIVE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); else { ++phase; @@ -189,11 +189,11 @@ public: case 192520: uiDrakkariColossusAltar = go->GetGUID(); // Make sure that they start out as unusuable - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); if (m_auiEncounter[0] == DONE) { if (uiDrakkariColossusStatueState == GO_STATE_ACTIVE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); else { ++phase; @@ -261,7 +261,7 @@ public: { GameObject* go = instance->GetGameObject(uiSladRanAltar); if (go) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } break; case DATA_MOORABI_EVENT: @@ -270,7 +270,7 @@ public: { GameObject* go = instance->GetGameObject(uiMoorabiAltar); if (go) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); if (bHeroicMode) HandleGameObject(uiEckTheFerociousDoor, true); } @@ -281,7 +281,7 @@ public: { GameObject* go = instance->GetGameObject(uiDrakkariColossusAltar); if (go) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } break; case DATA_GAL_DARAH_EVENT: @@ -524,7 +524,7 @@ public: InstanceScript *pInstance = pGO->GetInstanceScript(); uint64 uiStatue = 0; - pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); pGO->SetGoState(GO_STATE_ACTIVE); if (pInstance) @@ -545,7 +545,7 @@ public: if (!pInstance->GetData64(DATA_STATUE_ACTIVATE)) { pInstance->SetData64(DATA_STATUE_ACTIVATE, uiStatue); - pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); pGO->SetGoState(GO_STATE_ACTIVE); } return true; diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index 6d3f32a0cae..cd742b11d58 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -216,7 +216,7 @@ public: if (pKeristrasza && pKeristrasza->isAlive()) { // maybe these are hacks :( - pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); pGO->SetGoState(GO_STATE_ACTIVE); CAST_AI(boss_keristrasza::boss_keristraszaAI, pKeristrasza->AI())->CheckContainmentSpheres(true); diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index 5ab6a96dff3..a4676dee852 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -129,21 +129,21 @@ public: { AnomalusContainmentSphere = go->GetGUID(); if (m_auiEncounter[1] == DONE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; } case 188528: { OrmoroksContainmentSphere = go->GetGUID(); if (m_auiEncounter[2] == DONE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; } case 188526: { TelestrasContainmentSphere = go->GetGUID(); if (m_auiEncounter[0] == DONE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; } } @@ -171,7 +171,7 @@ public: { GameObject* Sphere = instance->GetGameObject(TelestrasContainmentSphere); if (Sphere) - Sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + Sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } m_auiEncounter[0] = data; break; @@ -181,7 +181,7 @@ public: if (data == DONE) { if (GameObject* Sphere = instance->GetGameObject(AnomalusContainmentSphere)) - Sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + Sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } m_auiEncounter[1] = data; break; @@ -191,7 +191,7 @@ public: if (data == DONE) { if (GameObject* Sphere = instance->GetGameObject(OrmoroksContainmentSphere)) - Sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + Sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } m_auiEncounter[2] = data; break; diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp index 779abd6ddf8..776b69d599b 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp @@ -49,6 +49,7 @@ enum Spells SPELL_SMOKE_TRAIL = 63575, SPELL_ELECTROSHOCK = 62522, SPELL_NAPALM = 63666, + SPELL_INVIS_AND_STEALTH_DETECT = 18950, // Passive //TOWER Additional SPELLS SPELL_THORIM_S_HAMMER = 62911, // Tower of Storms SPELL_MIMIRON_S_INFERNO = 62909, // Tower of Flames @@ -243,6 +244,8 @@ class boss_flame_leviathan : public CreatureScript Shutout = true; Unbroken = true; + DoCast(SPELL_INVIS_AND_STEALTH_DETECT); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); me->SetReactState(REACT_PASSIVE); } @@ -327,6 +330,9 @@ class boss_flame_leviathan : public CreatureScript void JustDied(Unit* /*victim*/) { _JustDied(); + // Set Field Flags 67108928 = 64 | 67108864 = UNIT_FLAG_UNK_6 | UNIT_FLAG_SKINNABLE + // Set DynFlags 12 + // Set NPCFlags 0 DoScriptText(SAY_DEATH, me); } @@ -1466,6 +1472,51 @@ class achievement_orbit_uary : public AchievementCriteriaScript } }; +class spell_load_into_catapult : public SpellScriptLoader +{ + enum Spells + { + SPELL_PASSENGER_LOADED = 62340, + }; + + public: + spell_load_into_catapult() : SpellScriptLoader("spell_load_into_catapult") { } + + class spell_load_into_catapult_AuraScript : public AuraScript + { + PrepareAuraScript(spell_load_into_catapult_AuraScript); + + void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* owner = GetOwner()->ToUnit(); + if (!owner) + return; + + owner->CastSpell(owner, SPELL_PASSENGER_LOADED, true); + } + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* owner = GetOwner()->ToUnit(); + if (!owner) + return; + + owner->RemoveAurasDueToSpell(SPELL_PASSENGER_LOADED); + } + + void Register() + { + OnEffectApply += AuraEffectApplyFn(spell_load_into_catapult_AuraScript::OnApply, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL); + OnEffectRemove += AuraEffectRemoveFn(spell_load_into_catapult_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_load_into_catapult_AuraScript(); + } +}; + void AddSC_boss_flame_leviathan() { new boss_flame_leviathan(); @@ -1495,4 +1546,6 @@ void AddSC_boss_flame_leviathan() new achievement_orbital_devastation(); new achievement_nuked_from_orbit(); new achievement_orbit_uary(); + + new spell_load_into_catapult(); } diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp index 5ba0d1da53c..b3f77e893c3 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp @@ -301,7 +301,7 @@ class go_razorscale_harpoon : public GameObjectScript { InstanceScript* instance = go->GetInstanceScript(); if (ObjectAccessor::GetCreature(*go, instance ? instance->GetData64(BOSS_RAZORSCALE) : 0)) - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); return false; } }; diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp index cb250adc01a..e7dffae5c9d 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp @@ -446,7 +446,7 @@ class instance_ulduar : public InstanceMapScript { if (GameObject* HodirRareCache = instance->GetGameObject(HodirRareCacheGUID)) if (GetData(DATA_HODIR_RARE_CACHE)) - HodirRareCache->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + HodirRareCache->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); if (GameObject* HodirChest = instance->GetGameObject(HodirChestGUID)) HodirChest->SetRespawnTime(HodirChest->GetRespawnDelay()); HandleGameObject(HodirDoorGUID, true); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index 137492c16ca..9727ce3cbec 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -147,7 +147,7 @@ public: if (pGo) { pGo->SetGoState(GO_STATE_READY); - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } } } @@ -841,7 +841,7 @@ public: Creature* pPalehoof = Unit::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); if (pPalehoof && pPalehoof->isAlive()) { - pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); pGO->SetGoState(GO_STATE_ACTIVE); CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase(); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp index e2c5dc5d341..2eff50c1f8e 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp @@ -136,7 +136,7 @@ public: if (m_auiEncounter[1] == DONE) { HandleGameObject(0, true, go); - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } break; } diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 690b8015ca6..0fedf101a9c 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -727,31 +727,40 @@ class npc_hyldsmeet_protodrake : public CreatureScript class npc_hyldsmeet_protodrakeAI : public CreatureAI { - npc_hyldsmeet_protodrakeAI(Creature* c) : CreatureAI(c), _accessoryRespawnTimer(0), _vehicleKit(NULL) {} + public: + npc_hyldsmeet_protodrakeAI(Creature* c) : CreatureAI(c), _accessoryRespawnTimer(0), _vehicleKit(c->GetVehicleKit()) {} - void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) - { - if (apply) - return; + void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) + { + if (apply) + return; - if (who->GetEntry() == NPC_HYLDSMEET_DRAKERIDER) - _accessoryRespawnTimer = who->ToCreature()->GetRespawnDelay(); - } + if (who->GetEntry() == NPC_HYLDSMEET_DRAKERIDER) + _accessoryRespawnTimer = 5 * MINUTE * IN_MILLISECONDS; + } - void UpdateAI(uint32 const diff) - { - //! We need to manually reinstall accessories because the vehicle itself is friendly to players, - //! so EnterEvadeMode is never triggered. The accessory on the other hand is hostile and killable. - if (_accessoryRespawnTimer && _accessoryRespawnTimer <= diff && _vehicleKit) - _vehicleKit->InstallAllAccessories(false); - else - _accessoryRespawnTimer -= diff; - } + void UpdateAI(uint32 const diff) + { + //! We need to manually reinstall accessories because the vehicle itself is friendly to players, + //! so EnterEvadeMode is never triggered. The accessory on the other hand is hostile and killable. + if (_accessoryRespawnTimer && _accessoryRespawnTimer <= diff && _vehicleKit) + { + _vehicleKit->InstallAllAccessories(true); + _accessoryRespawnTimer = 0; + } + else + _accessoryRespawnTimer -= diff; + } - uint32 _accessoryRespawnTimer; - Vehicle* _vehicleKit; + private: + uint32 _accessoryRespawnTimer; + Vehicle* _vehicleKit; }; + CreatureAI* GetAI(Creature* creature) const + { + return new npc_hyldsmeet_protodrakeAI (creature); + } }; void AddSC_storm_peaks() |
