Learn all my spells command should learn obly player's skills
This commit is contained in:
@@ -795,9 +795,13 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
uint32 family = clsEntry->spellfamily;
|
uint32 family = clsEntry->spellfamily;
|
||||||
|
|
||||||
for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i)
|
for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i)
|
||||||
{
|
{
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i);
|
SkillLineAbilityEntry const *entry = sSkillLineAbilityStore.LookupEntry(i);
|
||||||
|
if (!entry)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
SpellEntry const *spellInfo = sSpellStore.LookupEntry(entry->spellId);
|
||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -822,7 +826,7 @@ public:
|
|||||||
if (!SpellMgr::IsSpellValid(spellInfo,handler->GetSession()->GetPlayer(),false))
|
if (!SpellMgr::IsSpellValid(spellInfo,handler->GetSession()->GetPlayer(),false))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
handler->GetSession()->GetPlayer()->learnSpell(i, false);
|
handler->GetSession()->GetPlayer()->learnSpell(spellInfo->Id, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS);
|
handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS);
|
||||||
|
|||||||
Reference in New Issue
Block a user