zhazhhh
Members-
Posts
2 -
Joined
-
Last visited
-
Donations
0.00 GBP
zhazhhh's Achievements
Newbie (1/3)
0
Reputation
-
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
-
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
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®