Skip to content

Commit 3982990

Browse files
committed
Corrected some logic in my recent commits.
- ff2dbfc thanks LihO - 6ccf95a thanks frostmourne
1 parent ce0dfa8 commit 3982990

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/server/game/Spells/Spell.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3483,7 +3483,7 @@ void Spell::update(uint32 difftime)
34833483
{
34843484
case SPELL_STATE_PREPARING:
34853485
{
3486-
if (m_timer)
3486+
if (m_timer > 0)
34873487
{
34883488
if (difftime >= (uint32)m_timer)
34893489
m_timer = 0;
@@ -3498,7 +3498,7 @@ void Spell::update(uint32 difftime)
34983498
}
34993499
case SPELL_STATE_CASTING:
35003500
{
3501-
if (m_timer > 0)
3501+
if (m_timer)
35023502
{
35033503
// check if there are alive targets left
35043504
if (!UpdateChanneledTargetList())
@@ -3508,10 +3508,13 @@ void Spell::update(uint32 difftime)
35083508
finish();
35093509
}
35103510

3511-
if (difftime >= (uint32)m_timer)
3512-
m_timer = 0;
3513-
else
3514-
m_timer -= difftime;
3511+
if (m_timer > 0)
3512+
{
3513+
if (difftime >= (uint32)m_timer)
3514+
m_timer = 0;
3515+
else
3516+
m_timer -= difftime;
3517+
}
35153518
}
35163519

35173520
if (m_timer == 0)

src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ class boss_hunter_toc5 : public CreatureScript
840840
{
841841
DoCast(target, SPELL_MULTI_SHOT);
842842
}
843-
else if (target)
843+
else
844844
{
845845
Map::PlayerList const& players = me->GetMap()->GetPlayers();
846846
if (me->GetMap()->IsDungeon() && !players.isEmpty())
@@ -850,7 +850,7 @@ class boss_hunter_toc5 : public CreatureScript
850850
Player* player = itr->getSource();
851851
if (player && !player->isGameMaster() && me->IsInRange(player, 5.0f, 30.0f, false))
852852
{
853-
DoCast(target, SPELL_MULTI_SHOT);
853+
DoCast(player, SPELL_MULTI_SHOT);
854854
break;
855855
}
856856
}

0 commit comments

Comments
 (0)