mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
Added missing talent points update at player/pet level change.
This commit is contained in:
parent
6b71704ac0
commit
395670f05a
2 changed files with 11 additions and 0 deletions
|
|
@ -1637,6 +1637,12 @@ void Pet::InitTalentForLevel()
|
||||||
resetTalents(true);
|
resetTalents(true);
|
||||||
}
|
}
|
||||||
SetFreeTalentPoints(talentPointsForLevel - m_usedTalentCount);
|
SetFreeTalentPoints(talentPointsForLevel - m_usedTalentCount);
|
||||||
|
|
||||||
|
Unit *owner = GetOwner();
|
||||||
|
if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
return;
|
||||||
|
|
||||||
|
((Player*)owner)->SendTalentsInfoData(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Pet::resetTalentsCost() const
|
uint32 Pet::resetTalentsCost() const
|
||||||
|
|
|
||||||
|
|
@ -2327,6 +2327,8 @@ void Player::InitTalentForLevel()
|
||||||
else
|
else
|
||||||
SetFreeTalentPoints(talentPointsForLevel-m_usedTalentCount);
|
SetFreeTalentPoints(talentPointsForLevel-m_usedTalentCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SendTalentsInfoData(false); // update at client
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::InitStatsForLevel(bool reapplyMods)
|
void Player::InitStatsForLevel(bool reapplyMods)
|
||||||
|
|
@ -19920,6 +19922,9 @@ void Player::BuildPetTalentsInfoData(WorldPacket *data)
|
||||||
|
|
||||||
void Player::SendTalentsInfoData(bool pet)
|
void Player::SendTalentsInfoData(bool pet)
|
||||||
{
|
{
|
||||||
|
if(GetSession()->PlayerLoading())
|
||||||
|
return;
|
||||||
|
|
||||||
WorldPacket data(SMSG_TALENTS_INFO, 50);
|
WorldPacket data(SMSG_TALENTS_INFO, 50);
|
||||||
data << uint8(pet ? 1 : 0);
|
data << uint8(pet ? 1 : 0);
|
||||||
if(pet)
|
if(pet)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue