mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
*Implement SPELL_EFFECT_QUEST_START (150).
--HG-- branch : trunk
This commit is contained in:
@@ -378,6 +378,7 @@ class Spell
|
||||
void EffectKillCreditPersonal(uint32 i);
|
||||
void EffectKillCredit(uint32 i);
|
||||
void EffectQuestFail(uint32 i);
|
||||
void EffectQuestStart(uint32 i);
|
||||
void EffectRedirectThreat(uint32 i);
|
||||
void EffectWMODamage(uint32 i);
|
||||
void EffectWMORepair(uint32 i);
|
||||
|
||||
@@ -215,7 +215,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||
&Spell::EffectQuestFail, //147 SPELL_EFFECT_QUEST_FAIL quest fail
|
||||
&Spell::EffectUnused, //148 SPELL_EFFECT_148 unused
|
||||
&Spell::EffectChargeDest, //149 SPELL_EFFECT_CHARGE_DEST
|
||||
&Spell::EffectUnused, //150 SPELL_EFFECT_150 unused
|
||||
&Spell::EffectQuestStart, //150 SPELL_EFFECT_QUEST_START
|
||||
&Spell::EffectTriggerRitualOfSummoning, //151 SPELL_EFFECT_TRIGGER_SPELL_2
|
||||
&Spell::EffectNULL, //152 SPELL_EFFECT_152 summon Refer-a-Friend
|
||||
&Spell::EffectNULL, //153 SPELL_EFFECT_CREATE_PET misc value is creature entry
|
||||
@@ -225,10 +225,10 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||
&Spell::EffectCreateItem2, //157 SPELL_EFFECT_CREATE_ITEM_2 create item or create item template and replace by some randon spell loot item
|
||||
&Spell::EffectMilling, //158 SPELL_EFFECT_MILLING milling
|
||||
&Spell::EffectRenamePet, //159 SPELL_EFFECT_ALLOW_RENAME_PET allow rename pet once again
|
||||
&Spell::EffectNULL, //160 SPELL_EFFECT_160 unused
|
||||
&Spell::EffectNULL, //160 SPELL_EFFECT_160 1 spell - 45534
|
||||
&Spell::EffectSpecCount, //161 SPELL_EFFECT_TALENT_SPEC_COUNT second talent spec (learn/revert)
|
||||
&Spell::EffectActivateSpec, //162 SPELL_EFFECT_TALENT_SPEC_SELECT activate primary/secondary spec
|
||||
&Spell::EffectNULL, //163
|
||||
&Spell::EffectNULL, //163 unused
|
||||
&Spell::EffectRemoveAura, //164 SPELL_EFFECT_REMOVE_AURA
|
||||
};
|
||||
|
||||
@@ -7795,6 +7795,21 @@ void Spell::EffectQuestFail(uint32 i)
|
||||
unitTarget->ToPlayer()->FailQuest(m_spellInfo->EffectMiscValue[i]);
|
||||
}
|
||||
|
||||
void Spell::EffectQuestStart(uint32 i)
|
||||
{
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Player * player = unitTarget->ToPlayer();
|
||||
if (Quest const* qInfo = objmgr.GetQuestTemplate(m_spellInfo->EffectMiscValue[i]))
|
||||
{
|
||||
if (player->CanTakeQuest(qInfo, false) && player->CanAddQuest(qInfo, false))
|
||||
{
|
||||
player->AddQuest(qInfo, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::EffectActivateRune(uint32 eff_idx)
|
||||
{
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
|
||||
Reference in New Issue
Block a user