aboutsummaryrefslogtreecommitdiff
path: root/src/game/Corpse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Corpse.cpp')
-rw-r--r--src/game/Corpse.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/Corpse.cpp b/src/game/Corpse.cpp
index e3dd399a032..3e658e9c5dc 100644
--- a/src/game/Corpse.cpp
+++ b/src/game/Corpse.cpp
@@ -53,7 +53,7 @@ Corpse::~Corpse()
void Corpse::AddToWorld()
{
///- Register the corpse for guid lookup
- if(!IsInWorld())
+ if (!IsInWorld())
ObjectAccessor::Instance().AddObject(this);
Object::AddToWorld();
@@ -62,7 +62,7 @@ void Corpse::AddToWorld()
void Corpse::RemoveFromWorld()
{
///- Remove the corpse from the accessor
- if(IsInWorld())
+ if (IsInWorld())
ObjectAccessor::Instance().RemoveObject(this);
Object::RemoveFromWorld();
@@ -81,7 +81,7 @@ bool Corpse::Create( uint32 guidlow, Player *owner)
Relocate(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ(), owner->GetOrientation());
- if(!IsPositionValid())
+ if (!IsPositionValid())
{
sLog.outError("Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow, owner->GetName(), owner->GetPositionX(), owner->GetPositionY());
@@ -145,7 +145,7 @@ void Corpse::DeleteBonesFromWorld()
void Corpse::DeleteFromDB()
{
- if(GetType() == CORPSE_BONES)
+ if (GetType() == CORPSE_BONES)
// only specific bones
CharacterDatabase.PExecute("DELETE FROM corpse WHERE guid = '%d'", GetGUIDLow());
else
@@ -161,7 +161,7 @@ bool Corpse::LoadFromDB(uint32 guid, QueryResult *result, uint32 InstanceId)
// 0 1 2 3 4 5 6 7 8 9
result = CharacterDatabase.PQuery("SELECT position_x,position_y,position_z,orientation,map,data,time,corpse_type,instance,phaseMask FROM corpse WHERE guid = '%u'",guid);
- if( !result )
+ if ( !result )
{
sLog.outError("Corpse (GUID: %u) not found in table `corpse`, can't load. ",guid);
return false;
@@ -169,7 +169,7 @@ bool Corpse::LoadFromDB(uint32 guid, QueryResult *result, uint32 InstanceId)
Field *fields = result->Fetch();
- if(!LoadFromDB(guid, fields))
+ if (!LoadFromDB(guid, fields))
{
if (!external)
delete result;
@@ -193,7 +193,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
Object::_Create(guid, 0, HIGHGUID_CORPSE);
- if(!LoadValues( fields[5].GetString() ))
+ if (!LoadValues( fields[5].GetString() ))
{
sLog.outError("Corpse #%d have broken data in `data` field. Can't be loaded.",guid);
return false;
@@ -202,13 +202,13 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
m_time = time_t(fields[6].GetUInt64());
m_type = CorpseType(fields[7].GetUInt32());
- if(m_type >= MAX_CORPSE_TYPE)
+ if (m_type >= MAX_CORPSE_TYPE)
{
sLog.outError("Corpse (guidlow %d, owner %d) have wrong corpse type, not load.",GetGUIDLow(),GUID_LOPART(GetOwnerGUID()));
return false;
}
- if(m_type != CORPSE_BONES)
+ if (m_type != CORPSE_BONES)
m_isWorldObject = true;
uint32 instanceid = fields[8].GetUInt32();
@@ -224,7 +224,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
SetPhaseMask(phaseMask, false);
Relocate(positionX, positionY, positionZ, ort);
- if(!IsPositionValid())
+ if (!IsPositionValid())
{
sLog.outError("Corpse (guidlow %d, owner %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(), GUID_LOPART(GetOwnerGUID()), GetPositionX(), GetPositionY());