1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

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

This commit is contained in:
David Cernat 2017-09-04 20:21:06 +03:00
parent b64f379949
commit b94c0a9991

View file

@ -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);