Corrected some logic in my recent commits.

- ff2dbfc381 thanks LihO
- 6ccf95af4c thanks frostmourne
This commit is contained in:
kaelima
2011-12-22 18:48:06 +01:00
parent ce0dfa88a6
commit 398299084e
2 changed files with 11 additions and 8 deletions
+9 -6
View File
@@ -3483,7 +3483,7 @@ void Spell::update(uint32 difftime)
{
case SPELL_STATE_PREPARING:
{
if (m_timer)
if (m_timer > 0)
{
if (difftime >= (uint32)m_timer)
m_timer = 0;
@@ -3498,7 +3498,7 @@ void Spell::update(uint32 difftime)
}
case SPELL_STATE_CASTING:
{
if (m_timer > 0)
if (m_timer)
{
// check if there are alive targets left
if (!UpdateChanneledTargetList())
@@ -3508,10 +3508,13 @@ void Spell::update(uint32 difftime)
finish();
}
if (difftime >= (uint32)m_timer)
m_timer = 0;
else
m_timer -= difftime;
if (m_timer > 0)
{
if (difftime >= (uint32)m_timer)
m_timer = 0;
else
m_timer -= difftime;
}
}
if (m_timer == 0)