mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
[Client] Limit PlayerEquipment packets sent by recharging enchantments
This commit is contained in:
parent
715cac807d
commit
8c0b75d9f4
@ -1,5 +1,6 @@
|
||||
#include <components/esm/esmwriter.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/Utils.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/journal.hpp"
|
||||
@ -476,9 +477,11 @@ void LocalPlayer::updateEquipment(bool forceUpdate)
|
||||
|
||||
if (it != invStore.end())
|
||||
{
|
||||
if (!::Misc::StringUtils::ciEqual(it->getCellRef().getRefId(), equipmentItems[slot].refId) ||
|
||||
it->getCellRef().getCharge() != item.charge ||
|
||||
it->getCellRef().getEnchantmentCharge() != item.enchantmentCharge ||
|
||||
MWWorld::CellRef &cellRef = it->getCellRef();
|
||||
|
||||
if (Misc::StringUtils::ciEqual(cellRef.getRefId(), item.refId) == false ||
|
||||
cellRef.getCharge() != item.charge ||
|
||||
Utils::compareFloats(cellRef.getEnchantmentCharge(), item.enchantmentCharge, 1.0f) == false ||
|
||||
it->getRefData().getCount() != item.count ||
|
||||
forceUpdate)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user