Scripts/Quest: Adjustments to Runeforging (#28115)
(cherry picked from commit 444928f3c5fb51056321c9fe554743e25354de27)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "MotionMaster.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -1108,7 +1109,8 @@ class spell_gift_of_the_harvester : public SpellScript
|
||||
|
||||
enum Runeforging
|
||||
{
|
||||
SPELL_RUNEFORGING_CREDIT = 54586
|
||||
SPELL_RUNEFORGING_CREDIT = 54586,
|
||||
QUEST_RUNEFORGING = 12842
|
||||
};
|
||||
|
||||
/* 53343 - Rune of Razorice
|
||||
@@ -1125,12 +1127,15 @@ class spell_chapter1_runeforging_credit : public SpellScript
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_RUNEFORGING_CREDIT });
|
||||
return ValidateSpellInfo({ SPELL_RUNEFORGING_CREDIT }) &&
|
||||
sObjectMgr->GetQuestTemplate(QUEST_RUNEFORGING);
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_RUNEFORGING_CREDIT);
|
||||
if (Player* caster = GetCaster()->ToPlayer())
|
||||
if (caster->GetQuestStatus(QUEST_RUNEFORGING) == QUEST_STATUS_INCOMPLETE)
|
||||
caster->CastSpell(caster, SPELL_RUNEFORGING_CREDIT);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user