Some code cleanup.

This commit is contained in:
H0zen 2017-06-06 02:41:26 +03:00 committed by Antz
parent d5f638b8c8
commit 65229fcf4e
32 changed files with 107 additions and 91 deletions

View file

@ -824,7 +824,7 @@ bool GameObject::isVisibleForInState(Player const* u, WorldObject const* viewPoi
// only rogue have skill for traps detection
if (Aura* aura = ((Player*)u)->GetAura(2836, EFFECT_INDEX_0))
{
if (roll_chance_i(aura->GetModifier()->m_amount) && u->isInFront(this, 15.0f))
if (roll_chance_i(aura->GetModifier()->m_amount) && u->IsInFront(this, 15.0f))
return true;
}
@ -1196,7 +1196,7 @@ void GameObject::Use(Unit* user)
bool IsBattleGroundTrap = !radius && goInfo->trap.cooldown == 3 && m_respawnTime == 0;
// FIXME: when GO casting will be implemented trap must cast spell to target
if (spellId = goInfo->trap.spellId)
if ((spellId = goInfo->trap.spellId))
caster->CastSpell(user, spellId, true, NULL, NULL, GetObjectGuid());
// use template cooldown if provided
m_cooldownTime = time(NULL) + (goInfo->trap.cooldown ? goInfo->trap.cooldown : uint32(4));