Fix CRLF... please be sure to check your win32text settings, including cleverencode/cleverdecode settings before pushing to the repo
--HG-- branch : trunk
This commit is contained in:
+20
-20
@@ -16706,26 +16706,26 @@ void Player::AddSpellMod(SpellModifier* mod, bool apply)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore spellmods in case of failed cast
|
// Restore spellmods in case of failed cast
|
||||||
void Player::RestoreSpellMods(Spell const* spell)
|
void Player::RestoreSpellMods(Spell const* spell)
|
||||||
{
|
{
|
||||||
if(!spell || (m_SpellModRemoveCount == 0))
|
if(!spell || (m_SpellModRemoveCount == 0))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for(int i=0;i<MAX_SPELLMOD;++i)
|
for(int i=0;i<MAX_SPELLMOD;++i)
|
||||||
{
|
{
|
||||||
for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end();++itr)
|
for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end();++itr)
|
||||||
{
|
{
|
||||||
SpellModifier *mod = *itr;
|
SpellModifier *mod = *itr;
|
||||||
|
|
||||||
if (mod && mod->charges == -1 && mod->lastAffected == spell)
|
if (mod && mod->charges == -1 && mod->lastAffected == spell)
|
||||||
{
|
{
|
||||||
mod->lastAffected = NULL;
|
mod->lastAffected = NULL;
|
||||||
mod->charges = 1;
|
mod->charges = 1;
|
||||||
m_SpellModRemoveCount--;
|
m_SpellModRemoveCount--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::RemoveSpellMods(Spell const* spell)
|
void Player::RemoveSpellMods(Spell const* spell)
|
||||||
|
|||||||
+7
-7
@@ -2721,13 +2721,13 @@ void Spell::finish(bool ok)
|
|||||||
if(!m_caster->IsNonMeleeSpellCasted(false, false, true))
|
if(!m_caster->IsNonMeleeSpellCasted(false, false, true))
|
||||||
m_caster->clearUnitState(UNIT_STAT_CASTING);
|
m_caster->clearUnitState(UNIT_STAT_CASTING);
|
||||||
|
|
||||||
if(!ok)
|
if(!ok)
|
||||||
{
|
{
|
||||||
//restore spell mods
|
//restore spell mods
|
||||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||||
((Player*)m_caster)->RestoreSpellMods(this);
|
((Player*)m_caster)->RestoreSpellMods(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// other code related only to successfully finished spells
|
// other code related only to successfully finished spells
|
||||||
|
|
||||||
//remove spell mods
|
//remove spell mods
|
||||||
|
|||||||
Reference in New Issue
Block a user