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

[Client] Fix code conflict with OpenMW in OpRemoveSpell correctly

This commit is contained in:
David Cernat 2019-12-02 00:27:33 +02:00
parent 9d6f3fdd09
commit a54bc364ba

View file

@ -519,7 +519,8 @@ namespace MWScript
Send an ID_PLAYER_SPELLBOOK packet every time a player loses a spell here Send an ID_PLAYER_SPELLBOOK packet every time a player loses a spell here
*/ */
MWMechanics::Spells &spells = ptr.getClass().getCreatureStats(ptr).getSpells(); MWMechanics::CreatureStats& creatureStats = ptr.getClass().getCreatureStats(ptr);
MWMechanics::Spells &spells = creatureStats.getSpells();
if (spells.hasSpell(id)) if (spells.hasSpell(id))
{ {
@ -533,7 +534,7 @@ namespace MWScript
creatureStats.getSpells().purgeEffect(effect.first.mId); creatureStats.getSpells().purgeEffect(effect.first.mId);
} }
ptr.getClass().getCreatureStats(ptr).getSpells().remove(id); creatureStats.getSpells().remove (id);
if (ptr == MWMechanics::getPlayer()) if (ptr == MWMechanics::getPlayer())
{ {