[Client] Don't send Attribute & Skill packets as werewolf, part 2

pull/311/head
David Cernat 7 years ago
parent b64f379949
commit b94c0a9991

@ -97,15 +97,8 @@ void LocalPlayer::update()
updateDeadState(); updateDeadState();
updateEquipment(); updateEquipment();
updateStatsDynamic(); updateStatsDynamic();
updateAttributes();
// Only send attributes and skills if we are not a werewolf, or they will be updateSkills();
// overwritten by the werewolf ones
if (!isWerewolf)
{
updateAttributes();
updateSkills();
}
updateLevel(); updateLevel();
updateBounty(); updateBounty();
} }
@ -234,6 +227,10 @@ void LocalPlayer::updateStatsDynamic(bool forceUpdate)
void LocalPlayer::updateAttributes(bool forceUpdate) void LocalPlayer::updateAttributes(bool forceUpdate)
{ {
// Only send attributes if we are not a werewolf, or they will be
// overwritten by the werewolf ones
if (isWerewolf) return;
MWWorld::Ptr ptrPlayer = getPlayerPtr(); MWWorld::Ptr ptrPlayer = getPlayerPtr();
const MWMechanics::NpcStats &ptrNpcStats = ptrPlayer.getClass().getNpcStats(ptrPlayer); const MWMechanics::NpcStats &ptrNpcStats = ptrPlayer.getClass().getNpcStats(ptrPlayer);
bool attributesChanged = false; bool attributesChanged = false;
@ -256,6 +253,10 @@ void LocalPlayer::updateAttributes(bool forceUpdate)
void LocalPlayer::updateSkills(bool forceUpdate) void LocalPlayer::updateSkills(bool forceUpdate)
{ {
// Only send skills if we are not a werewolf, or they will be
// overwritten by the werewolf ones
if (isWerewolf) return;
MWWorld::Ptr ptrPlayer = getPlayerPtr(); MWWorld::Ptr ptrPlayer = getPlayerPtr();
const MWMechanics::NpcStats &ptrNpcStats = ptrPlayer.getClass().getNpcStats(ptrPlayer); const MWMechanics::NpcStats &ptrNpcStats = ptrPlayer.getClass().getNpcStats(ptrPlayer);

Loading…
Cancel
Save