[Client] Use correct stacking value when sending SpellsActive packets

pull/600/head
David Cernat 3 years ago
parent f2d95dc84d
commit 571f3e8ee7

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

Loading…
Cancel
Save