mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 12:24:22 +08:00
fix
This commit is contained in:
parent
8aa7a41af1
commit
ab97511b8e
2
data/sql/updates/db_world/fixHornofWinter.sql
Normal file
2
data/sql/updates/db_world/fixHornofWinter.sql
Normal file
@ -0,0 +1,2 @@
|
||||
-- Fixes Horn of Winter rank chain
|
||||
UPDATE `npc_trainer` SET `ReqSpell` = 57330 WHERE `SpellID` = 57623; -- Rank 2 requires Rank 1
|
||||
@ -3930,20 +3930,12 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
|
||||
if (!trainer_spell->learnedSpell[i])
|
||||
continue;
|
||||
|
||||
uint32 firstRankSpell = sSpellMgr->GetFirstSpellInChain(trainer_spell->learnedSpell[i]);
|
||||
for (uint32 spellId = firstRankSpell; spellId; spellId = sSpellMgr->GetNextSpellInChain(spellId))
|
||||
{
|
||||
if (HasSpell(spellId))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!HasSpell(trainer_spell->learnedSpell[i]))
|
||||
{
|
||||
hasSpell = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// known spell
|
||||
if (hasSpell)
|
||||
return TRAINER_SPELL_GRAY;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user