mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind (#23463)
* Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind * Revert "Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind" This reverts commita8055960* Revert "Revert "Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind"" This reverts commita5be792b* Fix NoPCH * Clean up * Clean up * fixup! Clean up * Caster -> Target * Rename 9999_99_99_99_world.sql to 2019_06_22_01_world.sql
This commit is contained in:
committed by
Giacomo Pozzoni
parent
40b09e3df1
commit
ac7c72d633
@@ -23,6 +23,8 @@
|
||||
#include "Player.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
#define LESS_MOB // if you do not have a good server and do not want it to be laggy as hell
|
||||
@@ -1664,8 +1666,34 @@ public:
|
||||
|
||||
};
|
||||
|
||||
// 58418 - Portal to Orgrimmar
|
||||
// 58420 - Portal to Stormwind
|
||||
class spell_teleport_leaders_blessing : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_teleport_leaders_blessing);
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
Player* target = GetHitPlayer();
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
uint32 spellID = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
|
||||
uint32 questID = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
|
||||
|
||||
if (target->GetQuestStatus(questID) == QUEST_STATUS_COMPLETE)
|
||||
target->CastSpell(target, spellID, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_teleport_leaders_blessing::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_the_scarlet_enclave_c5()
|
||||
{
|
||||
new npc_highlord_darion_mograine();
|
||||
new npc_the_lich_king_tirion_dawn();
|
||||
RegisterSpellScript(spell_teleport_leaders_blessing);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user