From f9c9aa7d0266b7f2ca233e3434b10bfe7d32d971 Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Tue, 5 May 2009 17:25:52 +0400 Subject: [PATCH] Added missing talent points update at player/pet level change. --- src/game/Pet.cpp | 6 ++++++ src/game/Player.cpp | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 07c4fb6d..3e5253bd 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -1637,6 +1637,12 @@ void Pet::InitTalentForLevel() resetTalents(true); } SetFreeTalentPoints(talentPointsForLevel - m_usedTalentCount); + + Unit *owner = GetOwner(); + if (!owner || owner->GetTypeId() != TYPEID_PLAYER) + return; + + ((Player*)owner)->SendTalentsInfoData(true); } uint32 Pet::resetTalentsCost() const diff --git a/src/game/Player.cpp b/src/game/Player.cpp index fbb8eb1a..8d3fff91 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -2327,6 +2327,8 @@ void Player::InitTalentForLevel() else SetFreeTalentPoints(talentPointsForLevel-m_usedTalentCount); } + + SendTalentsInfoData(false); // update at client } void Player::InitStatsForLevel(bool reapplyMods) @@ -19920,6 +19922,9 @@ void Player::BuildPetTalentsInfoData(WorldPacket *data) void Player::SendTalentsInfoData(bool pet) { + if(GetSession()->PlayerLoading()) + return; + WorldPacket data(SMSG_TALENTS_INFO, 50); data << uint8(pet ? 1 : 0); if(pet) -- 2.11.4.GIT