mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
Some code cleanup.
This commit is contained in:
parent
d5f638b8c8
commit
65229fcf4e
32 changed files with 107 additions and 91 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue