From 3a223e0e8075139f4a91572ec33fa2841fd60c2d Mon Sep 17 00:00:00 2001 From: Paradox Date: Fri, 29 May 2009 08:32:59 -0400 Subject: Fix CRLF... please be sure to check your win32text settings, including cleverencode/cleverdecode settings before pushing to the repo --HG-- branch : trunk --- src/game/Player.cpp | 40 ++++++++++++++++++++-------------------- src/game/Spell.cpp | 14 +++++++------- 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/game/Player.cpp b/src/game/Player.cpp index b036fd1118e..6485355a294 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -16706,26 +16706,26 @@ void Player::AddSpellMod(SpellModifier* mod, bool apply) } } -// Restore spellmods in case of failed cast -void Player::RestoreSpellMods(Spell const* spell) -{ - if(!spell || (m_SpellModRemoveCount == 0)) - return; - - for(int i=0;icharges == -1 && mod->lastAffected == spell) - { - mod->lastAffected = NULL; - mod->charges = 1; - m_SpellModRemoveCount--; - } - } - } +// Restore spellmods in case of failed cast +void Player::RestoreSpellMods(Spell const* spell) +{ + if(!spell || (m_SpellModRemoveCount == 0)) + return; + + for(int i=0;icharges == -1 && mod->lastAffected == spell) + { + mod->lastAffected = NULL; + mod->charges = 1; + m_SpellModRemoveCount--; + } + } + } } void Player::RemoveSpellMods(Spell const* spell) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 001993201e0..29892fcfde3 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2721,13 +2721,13 @@ void Spell::finish(bool ok) if(!m_caster->IsNonMeleeSpellCasted(false, false, true)) m_caster->clearUnitState(UNIT_STAT_CASTING); - if(!ok) - { - //restore spell mods - if (m_caster->GetTypeId() == TYPEID_PLAYER) - ((Player*)m_caster)->RestoreSpellMods(this); - return; - } + if(!ok) + { + //restore spell mods + if (m_caster->GetTypeId() == TYPEID_PLAYER) + ((Player*)m_caster)->RestoreSpellMods(this); + return; + } // other code related only to successfully finished spells //remove spell mods -- cgit v1.2.3