[10224] Small code style cleanup.

This commit is contained in:
VladimirMangos 2010-07-19 08:20:37 +04:00
parent 093db9c033
commit 6192bdbe1b
2 changed files with 14 additions and 15 deletions

View file

@ -261,9 +261,9 @@ void GameObject::Update(uint32 /*p_time*/)
{
// traps can have time and can not have
GameObjectInfo const* goInfo = GetGOInfo();
if(goInfo->type == GAMEOBJECT_TYPE_TRAP)
if (goInfo->type == GAMEOBJECT_TYPE_TRAP)
{
if(m_cooldownTime >= time(NULL))
if (m_cooldownTime >= time(NULL))
return;
// traps
@ -274,13 +274,13 @@ void GameObject::Update(uint32 /*p_time*/)
//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);
if(!radius)
if (!radius)
{
if(goInfo->trap.cooldown != 3) // cast in other case (at some triggering/linked go/etc explicit call)
if (goInfo->trap.cooldown != 3) // cast in other case (at some triggering/linked go/etc explicit call)
return;
else
{
if(m_respawnTime > 0)
if (m_respawnTime > 0)
break;
// battlegrounds gameobjects has data2 == 0 && data5 == 3
@ -291,7 +291,7 @@ void GameObject::Update(uint32 /*p_time*/)
// Note: this hack with search required until GO casting not implemented
// search unfriendly creature
if(owner && goInfo->trap.charges > 0) // hunter trap
if (owner && goInfo->trap.charges > 0) // hunter trap
{
MaNGOS::AnyUnfriendlyUnitInObjectRangeCheck u_check(this, owner, radius);
MaNGOS::UnitSearcher<MaNGOS::AnyUnfriendlyUnitInObjectRangeCheck> checker(this,ok, u_check);
@ -320,20 +320,20 @@ void GameObject::Update(uint32 /*p_time*/)
m_cooldownTime = time(NULL) + (goInfo->trap.cooldown ? goInfo->trap.cooldown : uint32(4));
// count charges
if(goInfo->trap.charges > 0)
if (goInfo->trap.charges > 0)
AddUse();
if(IsBattleGroundTrap && ok->GetTypeId() == TYPEID_PLAYER)
if (IsBattleGroundTrap && ok->GetTypeId() == TYPEID_PLAYER)
{
//BattleGround gameobjects case
if(((Player*)ok)->InBattleGround())
if(BattleGround *bg = ((Player*)ok)->GetBattleGround())
if (((Player*)ok)->InBattleGround())
if (BattleGround *bg = ((Player*)ok)->GetBattleGround())
bg->HandleTriggerBuff(GetGUID());
}
}
}
if(uint32 max_charges = goInfo->GetCharges())
if (uint32 max_charges = goInfo->GetCharges())
{
if (m_usetimes >= max_charges)
{
@ -342,7 +342,6 @@ void GameObject::Update(uint32 /*p_time*/)
}
}
}
break;
}
case GO_ACTIVATED:

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10223"
#define REVISION_NR "10224"
#endif // __REVISION_NR_H__