Core/Talents:

Fixed SMSG_TALENTS_INFO packet
Fixed talents saving to DB
Renamed 'talent spec' to 'talent group' since this name was shadowing character specializations (and new name is correct according to JAM)
Enabled loading of MinorTalent.dbc (will be used later)
Added additional specialization check in LearnTalent
This commit is contained in:
Intel
2014-11-12 03:58:17 +02:00
parent 620f23d9dc
commit da52c8d54e
24 changed files with 337 additions and 385 deletions

View File

@@ -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->GetActiveSpec(), true);
player->AddTalent(talentInfo->SpellID, player->GetActiveTalentGroup());
}
handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_TALENTS);

View File

@@ -204,6 +204,7 @@ public:
Player* target;
ObjectGuid targetGuid;
std::string targetName;
/* TODO: 6.x remove/update pet talents
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
{
// Try reset talents as Hunter Pet
@@ -227,19 +228,22 @@ public:
handler->SetSentErrorMessage(true);
return false;
}
*/
if (target)
{
target->ResetTalents(true);
target->SendTalentsInfoData(false);
target->SendTalentsInfoData();
ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(target).c_str());
/* TODO: 6.x remove/update pet talents
Pet* pet = target->GetPet();
Pet::resetTalentsForAllPetsOf(target, pet);
if (pet)
target->SendTalentsInfoData(true);
*/
return true;
}
else if (!targetGuid.IsEmpty())

View File

@@ -168,7 +168,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader
Player* caster = GetCaster()->ToPlayer();
// No boomy, no deal.
if (caster->GetTalentSpec(caster->GetActiveSpec()) != TALENT_SPEC_DRUID_BALANCE)
if (caster->GetActiveTalentSpec() != TALENT_SPEC_DRUID_BALANCE)
return;
switch (GetSpellInfo()->Id)