mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Spells: Reimplemented automatic spell learning
* Fixed learning/unlearning talents
This commit is contained in:
@@ -204,7 +204,7 @@ public:
|
||||
|
||||
// learn highest rank of talent and learn all non-talent spell ranks (recursive by tree)
|
||||
player->LearnSpellHighestRank(talentInfo->SpellID);
|
||||
player->AddTalent(talentInfo->SpellID, player->GetActiveTalentGroup(), true);
|
||||
player->AddTalent(talentInfo, player->GetActiveTalentGroup(), true);
|
||||
}
|
||||
|
||||
handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_TALENTS);
|
||||
|
||||
@@ -435,11 +435,11 @@ public:
|
||||
handler->PSendSysMessage(LANG_COMMAND_TARGET_LISTAURAS, auras.size());
|
||||
for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
{
|
||||
bool talent = (GetTalentBySpellID(itr->second->GetBase()->GetId()) != nullptr);
|
||||
|
||||
AuraApplication const* aurApp = itr->second;
|
||||
Aura const* aura = aurApp->GetBase();
|
||||
char const* name = aura->GetSpellInfo()->SpellName;
|
||||
bool talent = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_CU_IS_TALENT);
|
||||
|
||||
std::ostringstream ss_name;
|
||||
ss_name << "|cffffffff|Hspell:" << aura->GetId() << "|h[" << name << "]|h|r";
|
||||
|
||||
@@ -814,7 +814,7 @@ public:
|
||||
|
||||
SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL;
|
||||
|
||||
bool talent = (GetTalentBySpellID(id) != nullptr);
|
||||
bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT);
|
||||
bool passive = spellInfo->IsPassive();
|
||||
bool active = target && target->HasAura(id);
|
||||
|
||||
@@ -886,7 +886,7 @@ public:
|
||||
|
||||
SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL;
|
||||
|
||||
bool talent = (GetTalentBySpellID(id) != nullptr);
|
||||
bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT);
|
||||
bool passive = spellInfo->IsPassive();
|
||||
bool active = target && target->HasAura(id);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
|
||||
// No boomy, no deal.
|
||||
if (caster->GetActiveTalentSpec() != TALENT_SPEC_DRUID_BALANCE)
|
||||
if (caster->GetSpecId(caster->GetActiveTalentGroup()) != TALENT_SPEC_DRUID_BALANCE)
|
||||
return;
|
||||
|
||||
switch (GetSpellInfo()->Id)
|
||||
|
||||
Reference in New Issue
Block a user