diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index 3d1485fb2..9575d5a48 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -27,6 +27,9 @@ #include "actorutil.hpp" #include "combat.hpp" +#include "../mwmp/Main.hpp" +#include "../mwmp/LocalPlayer.hpp" + namespace { @@ -213,8 +216,15 @@ namespace MWMechanics std::vector selectedSpells = autoCalcPlayerSpells(skills, attributes, race); for (std::vector::iterator it = selectedSpells.begin(); it != selectedSpells.end(); ++it) + { creatureStats.getSpells().add(*it); + // Added by tes3mp + // + // LocalPlayer has gained a spell, so send a packet with it + mwmp::Main::get().getLocalPlayer()->sendSpellAddition(*it); + } + // forced update and current value adjustments mActors.updateActor (ptr, 0);