mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 00:36:46 +00:00
Send packet with spells gained at character generation
This commit is contained in:
parent
78c6ab2a99
commit
be851f5e1a
1 changed files with 10 additions and 0 deletions
|
@ -27,6 +27,9 @@
|
||||||
#include "actorutil.hpp"
|
#include "actorutil.hpp"
|
||||||
#include "combat.hpp"
|
#include "combat.hpp"
|
||||||
|
|
||||||
|
#include "../mwmp/Main.hpp"
|
||||||
|
#include "../mwmp/LocalPlayer.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -213,8 +216,15 @@ namespace MWMechanics
|
||||||
std::vector<std::string> selectedSpells = autoCalcPlayerSpells(skills, attributes, race);
|
std::vector<std::string> selectedSpells = autoCalcPlayerSpells(skills, attributes, race);
|
||||||
|
|
||||||
for (std::vector<std::string>::iterator it = selectedSpells.begin(); it != selectedSpells.end(); ++it)
|
for (std::vector<std::string>::iterator it = selectedSpells.begin(); it != selectedSpells.end(); ++it)
|
||||||
|
{
|
||||||
creatureStats.getSpells().add(*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
|
// forced update and current value adjustments
|
||||||
mActors.updateActor (ptr, 0);
|
mActors.updateActor (ptr, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue