mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Corrected some logic in my recent commits.
-ff2dbfc381thanks LihO -6ccf95af4cthanks frostmourne
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -840,7 +840,7 @@ public:
|
||||
{
|
||||
DoCast(target, SPELL_MULTI_SHOT);
|
||||
}
|
||||
else if (target)
|
||||
else
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (me->GetMap()->IsDungeon() && !players.isEmpty())
|
||||
@@ -850,7 +850,7 @@ public:
|
||||
Player* player = itr->getSource();
|
||||
if (player && !player->isGameMaster() && me->IsInRange(player, 5.0f, 30.0f, false))
|
||||
{
|
||||
DoCast(target, SPELL_MULTI_SHOT);
|
||||
DoCast(player, SPELL_MULTI_SHOT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user