diff options
| author | Nay <dnpd.dd@gmail.com> | 2012-09-13 17:25:13 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2012-09-13 17:25:13 +0100 |
| commit | 9b108fad857381f386324c8c8f75cca3480e20be (patch) | |
| tree | 0782d021dda96bc55d3e7db30d759afadf275c27 /src/server/scripts | |
| parent | 7dcbb7d9bf6cd2b5a1c537aae572fc3ac5972a6f (diff) | |
| parent | f03e650474463ad7454294e0fb5d6f169719ecbd (diff) | |
Merge remote-tracking branch 'origin/master' into mmaps
Diffstat (limited to 'src/server/scripts')
6 files changed, 228 insertions, 5 deletions
diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp index ade1b9fae02..4f503fdbb76 100644 --- a/src/server/scripts/Commands/cs_cheat.cpp +++ b/src/server/scripts/Commands/cs_cheat.cpp @@ -41,6 +41,7 @@ public: { "cooldown", SEC_GAMEMASTER, false, &HandleCoolDownCheatCommand, "", NULL }, { "power", SEC_GAMEMASTER, false, &HandlePowerCheatCommand, "", NULL }, { "waterwalk", SEC_GAMEMASTER, false, &HandleWaterWalkCheatCommand, "", NULL }, + { "status", SEC_GAMEMASTER, false, &HandleCheatStatusCommand, "", NULL }, { "taxi", SEC_GAMEMASTER, false, &HandleTaxiCheatCommand, "", NULL }, { "explore", SEC_GAMEMASTER, false, &HandleExploreCheatCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } @@ -159,6 +160,22 @@ public: return false; } + static bool HandleCheatStatusCommand(ChatHandler* handler, const char* /*args*/) + { + Player* player = handler->GetSession()->GetPlayer(); + + const char* enabled = "enabled"; + const char* disabled = "disabled"; + + handler->SendSysMessage(LANG_COMMAND_CHEAT_STATUS); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_GOD, player->GetCommandStatus(CHEAT_GOD) ? enabled : disabled); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_CD, player->GetCommandStatus(CHEAT_COOLDOWN) ? enabled : disabled); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_CT, player->GetCommandStatus(CHEAT_CASTTIME) ? enabled : disabled); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_POWER, player->GetCommandStatus(CHEAT_POWER) ? enabled : disabled); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_WW, player->GetCommandStatus(CHEAT_WATERWALK) ? enabled : disabled); + return true; + } + static bool HandleWaterWalkCheatCommand(ChatHandler* handler, const char* args) { if (!handler->GetSession() && !handler->GetSession()->GetPlayer()) diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index 9767126371b..af6104008ff 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -332,7 +332,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript } if (tributeChest) if (Creature* tirion = instance->GetCreature(TirionGUID)) - if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, 0, 0, 0, 0, 90000000)) + // need proper location.this one is guessed based on videos + if (GameObject* chest = tirion->SummonGameObject(tributeChest, 643.814f, 136.027f, 141.295f, 0, 0, 0, 0, 0, 90000000)) chest->SetRespawnTime(chest->GetRespawnDelay()); break; } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp index 37d08484f0b..4792a9c4e58 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -25,7 +25,6 @@ EndScriptData */ //Known Bugs: // - Need better implementation of Gossip and correct gossip text and option -// - Misses Dalaran Teleport at the end. #include "ScriptMgr.h" #include "ScriptedCreature.h" @@ -219,7 +218,7 @@ class npc_announcer_toc10 : public CreatureScript return true; if (GameObject* floor = GameObject::GetGameObject(*player, instanceScript->GetData64(GO_ARGENT_COLISEUM_FLOOR))) - floor->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED); + floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED); creature->CastSpell(creature, 69016, false); @@ -337,7 +336,7 @@ class boss_lich_king_toc : public CreatureScript break; case 5080: if (GameObject* go = instance->instance->GetGameObject(instance->GetData64(GO_ARGENT_COLISEUM_FLOOR))) - go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED); + go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED); me->CastSpell(me, 69016, false); if (instance) { @@ -797,7 +796,9 @@ class npc_tirion_toc : public CreatureScript instance->SetData(TYPE_EVENT, 0); break; case 6000: - me->NearTeleportTo(AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 4.0f); + me->SummonCreature(NPC_TIRION_FORDRING, EndSpawnLoc[0].GetPositionX(), EndSpawnLoc[0].GetPositionY(), EndSpawnLoc[0].GetPositionZ()); + me->SummonCreature(NPC_ARGENT_MAGE, EndSpawnLoc[1].GetPositionX(), EndSpawnLoc[1].GetPositionY(), EndSpawnLoc[1].GetPositionZ()); + me->SummonGameObject(GO_PORTAL_TO_DALARAN, EndSpawnLoc[2].GetPositionX(), EndSpawnLoc[2].GetPositionY(), EndSpawnLoc[2].GetPositionZ(), 5, 0, 0, 0, 0, 0); m_uiUpdateTimer = 20000; instance->SetData(TYPE_EVENT, 6005); break; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h index ba230551b24..58cbd727963 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h @@ -129,6 +129,13 @@ const Position AnubarakLoc[]= {740.184509f, 193.443390f, 142.117584f, 0}, // 4 - Nerub Spawn }; +const Position EndSpawnLoc[]= +{ + {648.9167f, 131.0208f, 141.6161f, 0}, // 0 - Highlord Tirion Fordring + {649.1614f, 142.0399f, 141.3057f ,0}, // 1 - Argent Mage + {644.6250f, 149.2743f, 140.6015f ,0}, // 2 - Portal to Dalaran +}; + enum euiWorldStates { UPDATE_STATE_UI_SHOW = 4390, @@ -163,6 +170,7 @@ enum eCreature NPC_BARRENT = 34816, NPC_TIRION = 34996, NPC_TIRION_FORDRING = 36095, + NPC_ARGENT_MAGE = 36097, NPC_FIZZLEBANG = 35458, NPC_GARROSH = 34995, NPC_VARIAN = 34990, @@ -245,6 +253,7 @@ enum eGameObject GO_MAIN_GATE_DOOR = 195647, GO_EAST_PORTCULLIS = 195648, GO_WEB_DOOR = 195485, + GO_PORTAL_TO_DALARAN = 195682, }; enum eAchievementData diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index 44c37fc9753..ec9e4e116bf 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -181,6 +181,23 @@ public: me->RemoveAurasDueToSpell(SPELL_SUBMERGE); } + void MoveInLineOfSight(Unit* who) + { + if (!who) + return; + + if (me->isInCombat()) + return; + + if (who->GetTypeId() != TYPEID_PLAYER) + return; + + if (me->GetDistance(who) > 50.0f) + return; + + AttackStartNoMove(who); + } + void EnterCombat(Unit* who) { me->AddThreat(who, 10000.0f); @@ -412,6 +429,7 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->Yell(SUFF_SAY_RECAP, LANG_UNIVERSAL, 0); DoScriptText(SUFF_SAY_RECAP, me); + me->SetReactState(REACT_PASSIVE); } } @@ -532,6 +550,7 @@ public: damage = 0; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); DoScriptText(SUFF_SAY_RECAP, me); + me->SetReactState(REACT_PASSIVE); } else { diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index cbf45910495..06d3602d8e8 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -25,6 +25,9 @@ #include "ScriptedCreature.h" #include "SpellScript.h" #include "Vehicle.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "CellImpl.h" class spell_generic_quest_update_entry_SpellScript : public SpellScript { @@ -1314,6 +1317,174 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad } }; +// "Bombing Run" and "Bomb Them Again!" +enum Quest11010_11102_11023Data +{ + // Spell + SPELL_FLAK_CANNON_TRIGGER = 40110, + SPELL_CHOOSE_LOC = 40056, + SPELL_AGGRO_CHECK = 40112, + // NPCs + NPC_FEL_CANNON2 = 23082 +}; + +// 40113 Knockdown Fel Cannon: The Aggro Check Aura +class spell_q11010_q11102_q11023_aggro_check_aura : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_aggro_check_aura() : SpellScriptLoader("spell_q11010_q11102_q11023_aggro_check_aura") { } + + class spell_q11010_q11102_q11023_aggro_check_aura_AuraScript : public AuraScript + { + PrepareAuraScript(spell_q11010_q11102_q11023_aggro_check_aura_AuraScript); + + void HandleTriggerSpell(AuraEffect const* /*aurEff*/) + { + if (Unit* target = GetTarget()) + // On trigger proccing + target->CastSpell(target, SPELL_AGGRO_CHECK); + } + + void Register() + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_q11010_q11102_q11023_aggro_check_aura_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_q11010_q11102_q11023_aggro_check_aura_AuraScript(); + } +}; + +// 40112 Knockdown Fel Cannon: The Aggro Check +class spell_q11010_q11102_q11023_aggro_check : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_aggro_check() : SpellScriptLoader("spell_q11010_q11102_q11023_aggro_check") { } + + class spell_q11010_q11102_q11023_aggro_check_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q11010_q11102_q11023_aggro_check_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (Player* playerTarget = GetHitPlayer()) + // Check if found player target is on fly mount or using flying form + if (playerTarget->HasAuraType(SPELL_AURA_FLY) || playerTarget->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) + playerTarget->CastSpell(playerTarget, SPELL_FLAK_CANNON_TRIGGER, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_q11010_q11102_q11023_aggro_check_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q11010_q11102_q11023_aggro_check_SpellScript(); + } +}; + +// 40119 Knockdown Fel Cannon: The Aggro Burst +class spell_q11010_q11102_q11023_aggro_burst : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_aggro_burst() : SpellScriptLoader("spell_q11010_q11102_q11023_aggro_burst") { } + + class spell_q11010_q11102_q11023_aggro_burst_AuraScript : public AuraScript + { + PrepareAuraScript(spell_q11010_q11102_q11023_aggro_burst_AuraScript); + + void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) + { + if (Unit* target = GetTarget()) + // On each tick cast Choose Loc to trigger summon + target->CastSpell(target, SPELL_CHOOSE_LOC); + } + + void Register() + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_q11010_q11102_q11023_aggro_burst_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_q11010_q11102_q11023_aggro_burst_AuraScript(); + } +}; + +// 40056 Knockdown Fel Cannon: Choose Loc +class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_choose_loc() : SpellScriptLoader("spell_q11010_q11102_q11023_choose_loc") { } + + class spell_q11010_q11102_q11023_choose_loc_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q11010_q11102_q11023_choose_loc_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + // Check for player that is in 65 y range + std::list<Player*> playerList; + Trinity::AnyPlayerInObjectRangeCheck checker(caster, 765.0f); + Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(caster, playerList, checker); + caster->VisitNearbyWorldObject(65.0f, searcher); + for (std::list<Player*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) + // Check if found player target is on fly mount or using flying form + if ((*itr)->HasAuraType(SPELL_AURA_FLY) || (*itr)->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) + // Summom Fel Cannon (bunny version) at found player + caster->SummonCreature(NPC_FEL_CANNON2, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ()); + } + + void Register() + { + OnEffectHit += SpellEffectFn(spell_q11010_q11102_q11023_choose_loc_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q11010_q11102_q11023_choose_loc_SpellScript(); + } +}; + +// 39844 - Skyguard Blasting Charge +// 40160 - Throw Bomb +class spell_q11010_q11102_q11023_q11008_check_fly_mount : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_q11008_check_fly_mount() : SpellScriptLoader("spell_q11010_q11102_q11023_q11008_check_fly_mount") { } + + class spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript); + + SpellCastResult CheckRequirement() + { + Unit* caster = GetCaster(); + // This spell will be cast only if caster has one of these auras + if (!(caster->HasAuraType(SPELL_AURA_FLY) || caster->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))) + return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; + return SPELL_CAST_OK; + } + + void Register() + { + OnCheckCast += SpellCheckCastFn(spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript::CheckRequirement); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -1345,4 +1516,9 @@ void AddSC_quest_spell_scripts() new spell_q12735_song_of_cleansing(); new spell_q12372_cast_from_gossip_trigger(); new spell_q12372_destabilize_azure_dragonshrine_dummy(); + new spell_q11010_q11102_q11023_aggro_check_aura(); + new spell_q11010_q11102_q11023_aggro_check(); + new spell_q11010_q11102_q11023_aggro_burst(); + new spell_q11010_q11102_q11023_choose_loc(); + new spell_q11010_q11102_q11023_q11008_check_fly_mount(); } |
