mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[10023] Change HandleLearnAllMySpellsCommand to learn only player's spells
This commit is contained in:
parent
7ed98198a7
commit
d8479debbb
2 changed files with 8 additions and 4 deletions
|
|
@ -1832,9 +1832,13 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/)
|
||||||
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;
|
||||||
|
|
||||||
|
|
@ -1859,7 +1863,7 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/)
|
||||||
if(!SpellMgr::IsSpellValid(spellInfo,m_session->GetPlayer(),false))
|
if(!SpellMgr::IsSpellValid(spellInfo,m_session->GetPlayer(),false))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
m_session->GetPlayer()->learnSpell(i, false);
|
m_session->GetPlayer()->learnSpell(spellInfo->Id, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS);
|
SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10022"
|
#define REVISION_NR "10023"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue