Closed Retriman closed 11 years ago
Check Prevent lost talents points.
@@ -25255,10 +25255,16 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank) learnSpell(spellid, false); AddTalent(spellid, GetActiveSpec(), true); sLog->outDetail("TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, GetActiveSpec()); + // Save Talents + SQLTransaction trans = CharacterDatabase.BeginTransaction(); + _SaveTalents(trans); + _SaveSpells(trans); + CharacterDatabase.CommitTransaction(trans); + // set talent tree for player if (!GetPrimaryTalentTree(GetActiveSpec())) { SetPrimaryTalentTree(GetActiveSpec(), talentInfo->TalentTab); std::vector<uint32> const* specSpells = GetTalentTreePrimarySpells(talentInfo->TalentTab);
added in commit 7dc7df72c78f8dee9f0a744701b78cf51d1160db
Check Prevent lost talents points.