mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +00:00
refactor(Core/Game): restyle game lib with astyle (#3466)
This commit is contained in:
@@ -35,7 +35,7 @@ DynamicObject::~DynamicObject()
|
||||
ASSERT(!_isViewpoint);
|
||||
delete _removedAura;
|
||||
}
|
||||
|
||||
|
||||
void DynamicObject::CleanupsBeforeDelete(bool finalCleanup /* = true */)
|
||||
{
|
||||
if (Transport* transport = GetTransport())
|
||||
@@ -50,7 +50,7 @@ void DynamicObject::CleanupsBeforeDelete(bool finalCleanup /* = true */)
|
||||
}
|
||||
|
||||
void DynamicObject::AddToWorld()
|
||||
{
|
||||
{
|
||||
///- Register the dynamicObject for guid lookup and for caster
|
||||
if (!IsInWorld())
|
||||
{
|
||||
@@ -61,7 +61,7 @@ void DynamicObject::AddToWorld()
|
||||
}
|
||||
|
||||
void DynamicObject::RemoveFromWorld()
|
||||
{
|
||||
{
|
||||
///- Remove the dynamicObject from the accessor and from all lists of objects in world
|
||||
if (IsInWorld())
|
||||
{
|
||||
@@ -84,7 +84,7 @@ void DynamicObject::RemoveFromWorld()
|
||||
}
|
||||
|
||||
bool DynamicObject::CreateDynamicObject(uint32 guidlow, Unit* caster, uint32 spellId, Position const& pos, float radius, DynamicObjectType type)
|
||||
{
|
||||
{
|
||||
SetMap(caster->GetMap());
|
||||
Relocate(pos);
|
||||
if (!IsPositionValid())
|
||||
@@ -122,7 +122,7 @@ bool DynamicObject::CreateDynamicObject(uint32 guidlow, Unit* caster, uint32 spe
|
||||
}
|
||||
|
||||
void DynamicObject::Update(uint32 p_time)
|
||||
{
|
||||
{
|
||||
// caster has to be always available and in the same map
|
||||
ASSERT(_caster);
|
||||
ASSERT(_caster->GetMap() == GetMap());
|
||||
@@ -153,7 +153,7 @@ void DynamicObject::Update(uint32 p_time)
|
||||
}
|
||||
|
||||
void DynamicObject::Remove()
|
||||
{
|
||||
{
|
||||
if (IsInWorld())
|
||||
{
|
||||
SendObjectDeSpawnAnim(GetGUID());
|
||||
@@ -163,7 +163,7 @@ void DynamicObject::Remove()
|
||||
}
|
||||
|
||||
int32 DynamicObject::GetDuration() const
|
||||
{
|
||||
{
|
||||
if (!_aura)
|
||||
return _duration;
|
||||
else
|
||||
@@ -171,7 +171,7 @@ int32 DynamicObject::GetDuration() const
|
||||
}
|
||||
|
||||
void DynamicObject::SetDuration(int32 newDuration)
|
||||
{
|
||||
{
|
||||
if (!_aura)
|
||||
_duration = newDuration;
|
||||
else
|
||||
@@ -179,18 +179,18 @@ void DynamicObject::SetDuration(int32 newDuration)
|
||||
}
|
||||
|
||||
void DynamicObject::Delay(int32 delaytime)
|
||||
{
|
||||
{
|
||||
SetDuration(GetDuration() - delaytime);
|
||||
}
|
||||
|
||||
void DynamicObject::SetAura(Aura* aura)
|
||||
{
|
||||
{
|
||||
ASSERT(!_aura && aura);
|
||||
_aura = aura;
|
||||
}
|
||||
|
||||
void DynamicObject::RemoveAura()
|
||||
{
|
||||
{
|
||||
ASSERT(_aura && !_removedAura);
|
||||
_removedAura = _aura;
|
||||
_aura = nullptr;
|
||||
@@ -199,7 +199,7 @@ void DynamicObject::RemoveAura()
|
||||
}
|
||||
|
||||
void DynamicObject::SetCasterViewpoint()
|
||||
{
|
||||
{
|
||||
if (Player* caster = _caster->ToPlayer())
|
||||
{
|
||||
caster->SetViewpoint(this, true);
|
||||
@@ -208,7 +208,7 @@ void DynamicObject::SetCasterViewpoint()
|
||||
}
|
||||
|
||||
void DynamicObject::RemoveCasterViewpoint()
|
||||
{
|
||||
{
|
||||
if (Player* caster = _caster->ToPlayer())
|
||||
{
|
||||
caster->SetViewpoint(this, false);
|
||||
@@ -217,7 +217,7 @@ void DynamicObject::RemoveCasterViewpoint()
|
||||
}
|
||||
|
||||
void DynamicObject::BindToCaster()
|
||||
{
|
||||
{
|
||||
ASSERT(!_caster);
|
||||
_caster = ObjectAccessor::GetUnit(*this, GetCasterGUID());
|
||||
ASSERT(_caster);
|
||||
@@ -226,7 +226,7 @@ void DynamicObject::BindToCaster()
|
||||
}
|
||||
|
||||
void DynamicObject::UnbindFromCaster()
|
||||
{
|
||||
{
|
||||
ASSERT(_caster);
|
||||
_caster->_UnregisterDynObject(this);
|
||||
_caster = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user