Jump to content

zhazhhh

Members
  • Posts

    2
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

zhazhhh's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. OK , it's a patch from TC.BUT it's not hard to buid spellinfo class.So I did it ,but not all compelete:) I think it necessary to write spellinfo class for mangoszero.we could do it in develop21
  2. yeah...it's not db error,it's core error- -! i fixed it. src/game/Object/Player.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/game/Object/Player.cpp b/src/game/Object/Player.cpp index 0915f4f..127a4e0 100644 --- a/src/game/Object/Player.cpp +++ b/src/game/Object/Player.cpp @@ -12322,9 +12322,27 @@ void Player::RewardQuest(Quest const* pQuest, uint32 reward, Object* questGiver, // cast spells after mark quest complete (some spells have quest completed state reqyurements in spell_area data) if (pQuest->GetRewSpellCast() > 0) - { CastSpell(this, pQuest->GetRewSpellCast(), true); } + { + SpellInfo const* spellInfo = sSpellStore.LookupEntry(pQuest->GetRewSpellCast()); + if (questGiver->isType(TYPEMASK_UNIT) && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM)) + { + if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID())) + creature->CastSpell(this, pQuest->GetRewSpellCast(), true); + } + else + CastSpell(this, pQuest->GetRewSpellCast(), true); + } else if (pQuest->GetRewSpell() > 0) - { CastSpell(this, pQuest->GetRewSpell(), true); } + { + SpellInfo const* spellInfo = sSpellStore.LookupEntry(pQuest->GetRewSpell()); + if (questGiver->isType(TYPEMASK_UNIT) && spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM)) + { + if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID())) + creature->CastSpell(this, pQuest->GetRewSpell(), true); + } + else + CastSpell(this, pQuest->GetRewSpell(), true); + } // remove auras from spells with quest reward state limitations // Some spells applied at quest reward
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use