More Cleanups

This commit is contained in:
hondacrx
2021-06-08 12:56:09 -04:00
parent 302a1f293c
commit 52e43853fe
58 changed files with 223 additions and 257 deletions
+5 -5
View File
@@ -1413,13 +1413,13 @@ namespace Game.Entities
switch (Condition.Operator[i])
{
case 2: // requires less <color> than (<value> || <comparecolor>) gems
activate &= (_cur_gem < _cmp_gem) ? true : false;
activate &= (_cur_gem < _cmp_gem);
break;
case 3: // requires more <color> than (<value> || <comparecolor>) gems
activate &= (_cur_gem > _cmp_gem) ? true : false;
activate &= (_cur_gem > _cmp_gem);
break;
case 5: // requires at least <color> than (<value> || <comparecolor>) gems
activate &= (_cur_gem >= _cmp_gem) ? true : false;
activate &= (_cur_gem >= _cmp_gem);
break;
}
}
@@ -2039,7 +2039,7 @@ namespace Game.Entities
{
PlayerSpell spell = m_spells.LookupByKey(spellId);
bool disabled = (spell != null) ? spell.Disabled : false;
bool disabled = (spell != null) && spell.Disabled;
bool active = !disabled || spell.Active;
bool learning = AddSpell(spellId, active, true, dependent, false, false, fromSkill);
@@ -2989,7 +2989,7 @@ namespace Game.Entities
public void SetRuneCooldown(byte index, uint cooldown)
{
m_runes.Cooldown[index] = cooldown;
m_runes.SetRuneState(index, (cooldown == 0) ? true : false);
m_runes.SetRuneState(index, (cooldown == 0));
int activeRunes = m_runes.Cooldown.Count(p => p == 0);
if (activeRunes != GetPower(PowerType.Runes))
SetPower(PowerType.Runes, activeRunes);