mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Merge branch 'darling_violetta' into 'master'
Replace magic numbers with enums Closes #6523 See merge request OpenMW/openmw!1512
This commit is contained in:
commit
23e279c23e
@ -94,6 +94,7 @@
|
||||
Bug #6493: Unlocking owned but not locked or unlocked containers is considered a crime
|
||||
Bug #6517: Rotations for KeyframeData in NIFs should be optional
|
||||
Bug #6519: Effects tooltips for ingredients work incorrectly
|
||||
Bug #6523: Disintegrate Weapon is resisted by Resist Magicka instead of Sanctuary
|
||||
Feature #890: OpenMW-CS: Column filtering
|
||||
Feature #1465: "Reset" argument for AI functions
|
||||
Feature #2554: Modifying an object triggers the instances table to scroll to the corresponding record
|
||||
|
@ -281,14 +281,12 @@ short MagicEffect::getResistanceEffect(short effect)
|
||||
effects[DisintegrateArmor] = Sanctuary;
|
||||
effects[DisintegrateWeapon] = Sanctuary;
|
||||
|
||||
for (int i=0; i<5; ++i)
|
||||
effects[DrainAttribute+i] = ResistMagicka;
|
||||
for (int i=0; i<5; ++i)
|
||||
effects[DamageAttribute+i] = ResistMagicka;
|
||||
for (int i=0; i<5; ++i)
|
||||
effects[AbsorbAttribute+i] = ResistMagicka;
|
||||
for (int i=0; i<10; ++i)
|
||||
effects[WeaknessToFire+i] = ResistMagicka;
|
||||
for (int i = DrainAttribute; i <= DamageSkill; ++i)
|
||||
effects[i] = ResistMagicka;
|
||||
for (int i = AbsorbAttribute; i <= AbsorbSkill; ++i)
|
||||
effects[i] = ResistMagicka;
|
||||
for (int i = WeaknessToFire; i <= WeaknessToNormalWeapons; ++i)
|
||||
effects[i] = ResistMagicka;
|
||||
|
||||
effects[Burden] = ResistMagicka;
|
||||
effects[Charm] = ResistMagicka;
|
||||
@ -326,14 +324,12 @@ short MagicEffect::getWeaknessEffect(short effect)
|
||||
static std::map<short, short> effects;
|
||||
if (effects.empty())
|
||||
{
|
||||
for (int i=0; i<5; ++i)
|
||||
effects[DrainAttribute+i] = WeaknessToMagicka;
|
||||
for (int i=0; i<5; ++i)
|
||||
effects[DamageAttribute+i] = WeaknessToMagicka;
|
||||
for (int i=0; i<5; ++i)
|
||||
effects[AbsorbAttribute+i] = WeaknessToMagicka;
|
||||
for (int i=0; i<10; ++i)
|
||||
effects[WeaknessToFire+i] = WeaknessToMagicka;
|
||||
for (int i = DrainAttribute; i <= DamageSkill; ++i)
|
||||
effects[i] = WeaknessToMagicka;
|
||||
for (int i = AbsorbAttribute; i <= AbsorbSkill; ++i)
|
||||
effects[i] = WeaknessToMagicka;
|
||||
for (int i = WeaknessToFire; i <= WeaknessToNormalWeapons; ++i)
|
||||
effects[i] = WeaknessToMagicka;
|
||||
|
||||
effects[Burden] = WeaknessToMagicka;
|
||||
effects[Charm] = WeaknessToMagicka;
|
||||
|
Loading…
x
Reference in New Issue
Block a user