mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Merged pull request #1895
This commit is contained in:
commit
3b01355f27
@ -31,6 +31,7 @@
|
||||
Bug #3876: Landscape texture painting is misaligned
|
||||
Bug #3897: Have Goodbye give all choices the effects of Goodbye
|
||||
Bug #3911: [macOS] Typing in the "Content List name" dialog box produces double characters
|
||||
Bug #3920: RemoveSpellEffects doesn't remove constant effects
|
||||
Bug #3948: AiCombat moving target aiming uses incorrect speed for magic projectiles
|
||||
Bug #3950: FLATTEN_STATIC_TRANSFORMS optimization breaks animated collision shapes
|
||||
Bug #3993: Terrain texture blending map is not upscaled
|
||||
|
@ -197,8 +197,14 @@ namespace MWMechanics
|
||||
|
||||
void ActiveSpells::removeEffects(const std::string &id)
|
||||
{
|
||||
mSpells.erase(Misc::StringUtils::lowerCase(id));
|
||||
mSpellsChanged = true;
|
||||
for (TContainer::iterator spell = mSpells.begin(); spell != mSpells.end(); ++spell)
|
||||
{
|
||||
if (spell->first == id)
|
||||
{
|
||||
spell->second.mEffects.clear();
|
||||
mSpellsChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ActiveSpells::visitEffectSources(EffectSourceVisitor &visitor) const
|
||||
|
@ -279,6 +279,25 @@ namespace MWMechanics
|
||||
}
|
||||
}
|
||||
|
||||
void Spells::removeEffects(const std::string &id)
|
||||
{
|
||||
if (isSpellActive(id))
|
||||
{
|
||||
for (TContainer::iterator spell = mSpells.begin(); spell != mSpells.end(); ++spell)
|
||||
{
|
||||
if (spell->first == getSpell(id))
|
||||
{
|
||||
for (long unsigned int i = 0; i != spell->first->mEffects.mList.size(); i++)
|
||||
{
|
||||
spell->second.mPurgedEffects.insert(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mSpellsChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Spells::visitEffectSources(EffectSourceVisitor &visitor) const
|
||||
{
|
||||
if (mSpellsChanged) {
|
||||
|
@ -124,6 +124,8 @@ namespace MWMechanics
|
||||
|
||||
bool hasBlightDisease() const;
|
||||
|
||||
void removeEffects(const std::string& id);
|
||||
|
||||
void visitEffectSources (MWMechanics::EffectSourceVisitor& visitor) const;
|
||||
|
||||
void readState (const ESM::SpellState& state);
|
||||
|
@ -501,6 +501,7 @@ namespace MWScript
|
||||
runtime.pop();
|
||||
|
||||
ptr.getClass().getCreatureStats (ptr).getActiveSpells().removeEffects(spellid);
|
||||
ptr.getClass().getCreatureStats (ptr).getSpells().removeEffects(spellid);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user