Code style (game + scripts only):
"if(" --> "if ("
--HG--
branch : trunk
This commit is contained in:
1 parent
2e127f7a30
commit
d19e127080
254 files changed
+9517
-9517
No files matched your search
+10
-10
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user