mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-02 15:51:34 +00:00
[Client] Track actor IDs in ActiveSpells
This commit is contained in:
parent
3e81371e53
commit
c027862609
3 changed files with 48 additions and 0 deletions
|
@ -517,4 +517,22 @@ namespace MWMechanics
|
||||||
mSpellsChanged = true;
|
mSpellsChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Make it possible to set and get the actorId for these ActiveSpells
|
||||||
|
*/
|
||||||
|
int ActiveSpells::getActorId() const
|
||||||
|
{
|
||||||
|
return mActorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActiveSpells::setActorId(int actorId)
|
||||||
|
{
|
||||||
|
mActorId = actorId;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,16 @@ namespace MWMechanics
|
||||||
mutable MagicEffects mEffects;
|
mutable MagicEffects mEffects;
|
||||||
mutable bool mSpellsChanged;
|
mutable bool mSpellsChanged;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Track the actorId corresponding to these ActiveSpells
|
||||||
|
*/
|
||||||
|
int mActorId;
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
void rebuildEffects() const;
|
void rebuildEffects() const;
|
||||||
|
|
||||||
/// Add any effects that are in "from" and not in "addTo" to "addTo"
|
/// Add any effects that are in "from" and not in "addTo" to "addTo"
|
||||||
|
@ -146,6 +156,17 @@ namespace MWMechanics
|
||||||
|
|
||||||
void visitEffectSources (MWMechanics::EffectSourceVisitor& visitor) const;
|
void visitEffectSources (MWMechanics::EffectSourceVisitor& visitor) const;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Make it possible to set and get the actorId for these ActiveSpells
|
||||||
|
*/
|
||||||
|
int getActorId() const;
|
||||||
|
void setActorId(int actorId);
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,15 @@ namespace MWMechanics
|
||||||
|
|
||||||
ActiveSpells &CreatureStats::getActiveSpells()
|
ActiveSpells &CreatureStats::getActiveSpells()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Set the actorId associated with these ActiveSpells so it can be used inside them
|
||||||
|
*/
|
||||||
|
mActiveSpells.setActorId(getActorId());
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
return mActiveSpells;
|
return mActiveSpells;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue