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

[Client] Use correct stacking value when sending SpellsActive packets

This commit is contained in:
David Cernat 2022-02-12 18:43:18 +02:00
parent f2d95dc84d
commit 571f3e8ee7

View file

@ -232,18 +232,16 @@ namespace MWMechanics
*/
if (sendPacket)
{
bool isStackingSpell = it == end() || stack;
if (this == &MWMechanics::getPlayer().getClass().getCreatureStats(MWMechanics::getPlayer()).getActiveSpells())
{
mwmp::Main::get().getLocalPlayer()->sendSpellsActiveAddition(id, isStackingSpell, params);
mwmp::Main::get().getLocalPlayer()->sendSpellsActiveAddition(id, stack, params);
}
else
{
MWWorld::Ptr actorPtr = MWBase::Environment::get().getWorld()->searchPtrViaActorId(getActorId());
if (mwmp::Main::get().getCellController()->isLocalActor(actorPtr))
mwmp::Main::get().getCellController()->getLocalActor(actorPtr)->sendSpellsActiveAddition(id, isStackingSpell, params);
mwmp::Main::get().getCellController()->getLocalActor(actorPtr)->sendSpellsActiveAddition(id, stack, params);
}
}
/*