Core/Spell: Traps Hunter.

*Fix the range of the activation of the traps, according for video and comments.
*Fix armed traps in combat change in 3.0.2. see u http://us.battle.net/wow/en/game/patch-notes/3-0-2
This commit is contained in:
Retriman
2012-10-05 15:17:14 -04:00
parent 3d644d8d11
commit 7e651ed729
@@ -293,7 +293,7 @@ void GameObject::Update(uint32 diff)
else if (Unit* owner = GetOwner())
{
if (owner->isInCombat())
m_cooldownTime = time(NULL) + goInfo->trap.cooldown;
m_cooldownTime = time(NULL) + 1;
}
m_lootState = GO_READY;
break;
@@ -417,7 +417,7 @@ void GameObject::Update(uint32 diff)
bool IsBattlegroundTrap = false;
//FIXME: this is activation radius (in different casting radius that must be selected from spell data)
//TODO: move activated state code (cast itself) to GO_ACTIVATED, in this place only check activating and set state
float radius = (float)(goInfo->trap.radius)/2; // TODO rename radius to diameter (goInfo->trap.radius) should be (goInfo->trap.diameter)
float radius = (float)(goInfo->trap.radius)/3*2; // TODO rename radius to diameter (goInfo->trap.radius) should be (goInfo->trap.diameter)
if (!radius)
{
if (goInfo->trap.cooldown != 3) // cast in other case (at some triggering/linked go/etc explicit call)