mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[11857] Fix sent level in trainer spell list - this fixes problems especially with druid trainers
* This allows to really overwrite required level for spells * Adds proper checks when buying * Fixes default level requirement Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
20e2dddd6c
commit
adfa88d236
6 changed files with 31 additions and 19 deletions
|
|
@ -8269,6 +8269,8 @@ void ObjectMgr::LoadTrainers(char const* tableName, bool isTemplates)
|
|||
trainerSpell.reqSkillValue = fields[4].GetUInt32();
|
||||
trainerSpell.reqLevel = fields[5].GetUInt32();
|
||||
|
||||
trainerSpell.isProvidedReqLevel = trainerSpell.reqLevel > 0;
|
||||
|
||||
// calculate learned spell for profession case when stored cast-spell
|
||||
trainerSpell.learnedSpell = spell;
|
||||
for(int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
|
|
@ -8290,7 +8292,7 @@ void ObjectMgr::LoadTrainers(char const* tableName, bool isTemplates)
|
|||
}
|
||||
|
||||
// already checked as valid spell so exist.
|
||||
SpellEntry const *learnSpellinfo = sSpellStore.LookupEntry(trainerSpell.learnedSpell);
|
||||
SpellEntry const* learnSpellinfo = sSpellStore.LookupEntry(trainerSpell.learnedSpell);
|
||||
if (SpellMgr::IsProfessionSpell(trainerSpell.learnedSpell))
|
||||
{
|
||||
data.trainerType = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue