[Sync] Some long overdue project sync

This commit is contained in:
Antz 2019-01-08 23:04:45 +00:00 committed by Antz
parent a479a2ccc5
commit 65ec4ea06e
76 changed files with 1693 additions and 1489 deletions

View file

@ -55,7 +55,7 @@ void Corpse::AddToWorld()
{
///- Register the corpse for guid lookup
if (!IsInWorld())
sObjectAccessor.AddObject(this);
{ sObjectAccessor.AddObject(this); }
Object::AddToWorld();
}
@ -64,7 +64,7 @@ void Corpse::RemoveFromWorld()
{
///- Remove the corpse from the accessor
if (IsInWorld())
sObjectAccessor.RemoveObject(this);
{ sObjectAccessor.RemoveObject(this); }
Object::RemoveFromWorld();
}
@ -232,9 +232,9 @@ bool Corpse::LoadFromDB(uint32 lowguid, Field* fields)
uint32 flags = CORPSE_FLAG_UNK2;
if (playerFlags & PLAYER_FLAGS_HIDE_HELM)
flags |= CORPSE_FLAG_HIDE_HELM;
{ flags |= CORPSE_FLAG_HIDE_HELM; }
if (playerFlags & PLAYER_FLAGS_HIDE_CLOAK)
flags |= CORPSE_FLAG_HIDE_CLOAK;
{ flags |= CORPSE_FLAG_HIDE_CLOAK; }
SetUInt32Value(CORPSE_FIELD_FLAGS, flags);
// no need to mark corpse as lootable, because corpses are not saved in battle grounds
@ -265,23 +265,23 @@ bool Corpse::isVisibleForInState(Player const* u, WorldObject const* viewPoint,
bool Corpse::IsHostileTo(Unit const* unit) const
{
if (Player* owner = sObjectMgr.GetPlayer(GetOwnerGuid()))
return owner->IsHostileTo(unit);
{ return owner->IsHostileTo(unit); }
else
return false;
{ return false; }
}
bool Corpse::IsFriendlyTo(Unit const* unit) const
{
if (Player* owner = sObjectMgr.GetPlayer(GetOwnerGuid()))
return owner->IsFriendlyTo(unit);
{ return owner->IsFriendlyTo(unit); }
else
return true;
{ return true; }
}
bool Corpse::IsExpired(time_t t) const
{
if (m_type == CORPSE_BONES)
return m_time < t - 60 * MINUTE;
{ return m_time < t - 60 * MINUTE; }
else
return m_time < t - 3 * DAY;
{ return m_time < t - 3 * DAY; }
}