diff --git a/apps/openmw/mwscript/statsextensions.cpp b/apps/openmw/mwscript/statsextensions.cpp index 5ac63016e..8b327f94a 100644 --- a/apps/openmw/mwscript/statsextensions.cpp +++ b/apps/openmw/mwscript/statsextensions.cpp @@ -449,7 +449,8 @@ namespace MWScript // Added by tes3mp // // LocalPlayer has gained a spell, so send a packet with it - mwmp::Main::get().getLocalPlayer()->sendSpellAddition(id); + if (ptr == MWMechanics::getPlayer()) + mwmp::Main::get().getLocalPlayer()->sendSpellAddition(id); } }; @@ -478,7 +479,8 @@ namespace MWScript // Added by tes3mp // // LocalPlayer has lost a spell, so send a packet with it - mwmp::Main::get().getLocalPlayer()->sendSpellRemoval(id); + if (ptr == MWMechanics::getPlayer()) + mwmp::Main::get().getLocalPlayer()->sendSpellRemoval(id); } };