Add spaces after commas

This commit is contained in:
leak committed 2011-04-29 20:47:02 +02:00
1 parent 01a79947d5
commit 1003f30448
645 files changed
+9439 -9439

No files matched your search

+37 -37
View File
@@ -74,7 +74,7 @@ public:
if (!*args)
return false;
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
if (!cId)
return false;
@@ -86,7 +86,7 @@ public:
// by DB guid
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
if (!obj)
{
@@ -111,7 +111,7 @@ public:
return false;
// number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject_entry");
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject_entry");
if (!cId)
return false;
@@ -125,7 +125,7 @@ public:
if (!gInfo)
{
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST,id);
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
handler->SetSentErrorMessage(true);
return false;
}
@@ -133,8 +133,8 @@ public:
if (gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId))
{
// report to DB errors log as in loading case
sLog->outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.",id, gInfo->type, gInfo->displayId);
handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA,id);
sLog->outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", id, gInfo->type, gInfo->displayId);
handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA, id);
handler->SetSentErrorMessage(true);
return false;
}
@@ -163,7 +163,7 @@ public:
}
// fill the gameobject data and save to the db
pGameObj->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()),chr->GetPhaseMaskForSpawn());
pGameObj->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
// this will generate a new guid if the object is in an instance
if (!pGameObj->LoadFromDB(db_lowGUID, map))
@@ -177,7 +177,7 @@ public:
// TODO: is it really necessary to add both the real and DB table guid here ?
sObjectMgr->AddGameobjectToGrid(db_lowGUID, sObjectMgr->GetGOData(db_lowGUID));
handler->PSendSysMessage(LANG_GAMEOBJECT_ADD,id,gInfo->name.c_str(),db_lowGUID,x,y,z);
handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, id, gInfo->name.c_str(), db_lowGUID, x, y, z);
return true;
}
@@ -208,7 +208,7 @@ public:
uint32 id = atoi(charID);
chr->SummonGameObject(id,x,y,z,ang,0,0,rot2,rot3,spawntm);
chr->SummonGameObject(id, x, y, z, ang, 0, 0, rot2, rot3, spawntm);
return true;
}
@@ -221,7 +221,7 @@ public:
if (*args)
{
// number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject_entry");
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject_entry");
if (!cId)
return false;
@@ -229,15 +229,15 @@ public:
if (id)
result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, orientation, map, phaseMask, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE map = '%i' AND id = '%u' ORDER BY order_ ASC LIMIT 1",
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(),id);
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(), id);
else
{
std::string name = cId;
WorldDatabase.escape_string(name);
result = WorldDatabase.PQuery(
"SELECT guid, id, position_x, position_y, position_z, orientation, map, phaseMask, (POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ "
"FROM gameobject,gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'")" ORDER BY order_ ASC LIMIT 1",
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(),name.c_str());
"FROM gameobject, gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(), name.c_str());
}
}
else
@@ -254,7 +254,7 @@ public:
initString =false;
}
else
eventFilter << "," << *itr;
eventFilter << ", " << *itr;
}
if (!initString)
@@ -266,7 +266,7 @@ public:
"(POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ FROM gameobject "
"LEFT OUTER JOIN game_event_gameobject on gameobject.guid = game_event_gameobject.guid WHERE map = '%i' %s ORDER BY order_ ASC LIMIT 10",
handler->GetSession()->GetPlayer()->GetPositionX(), handler->GetSession()->GetPlayer()->GetPositionY(), handler->GetSession()->GetPlayer()->GetPositionZ(),
handler->GetSession()->GetPlayer()->GetMapId(),eventFilter.str().c_str());
handler->GetSession()->GetPlayer()->GetMapId(), eventFilter.str().c_str());
}
if (!result)
@@ -299,7 +299,7 @@ public:
if (!found)
{
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST,id);
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
return false;
}
@@ -307,11 +307,11 @@ public:
if (!goI)
{
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST,id);
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
return false;
}
GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(MAKE_NEW_GUID(lowguid,id,HIGHGUID_GAMEOBJECT));
GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(MAKE_NEW_GUID(lowguid, id, HIGHGUID_GAMEOBJECT));
handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, lowguid, goI->name.c_str(), lowguid, id, x, y, z, mapid, o, phase);
@@ -321,10 +321,10 @@ public:
if (curRespawnDelay < 0)
curRespawnDelay = 0;
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay,true);
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(),true);
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay, true);
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true);
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(),curRespawnDelayStr.c_str());
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
}
return true;
}
@@ -333,7 +333,7 @@ public:
static bool HandleGameObjectDeleteCommand(ChatHandler* handler, const char* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
if (!cId)
return false;
@@ -345,7 +345,7 @@ public:
// by DB guid
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
if (!obj)
{
@@ -357,7 +357,7 @@ public:
uint64 owner_guid = obj->GetOwnerGUID();
if (owner_guid)
{
Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(),owner_guid);
Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(), owner_guid);
if (!owner || !IS_PLAYER_GUID(owner_guid))
{
handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, GUID_LOPART(owner_guid), obj->GetGUIDLow());
@@ -365,7 +365,7 @@ public:
return false;
}
owner->RemoveGameObject(obj,false);
owner->RemoveGameObject(obj, false);
}
obj->SetRespawnTime(0); // not save respawn time
@@ -381,7 +381,7 @@ public:
static bool HandleGameObjectTurnCommand(ChatHandler* handler, const char* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
if (!cId)
return false;
@@ -393,7 +393,7 @@ public:
// by DB guid
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
if (!obj)
{
@@ -432,7 +432,7 @@ public:
static bool HandleGameObjectMoveCommand(ChatHandler* handler, const char* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
if (!cId)
return false;
@@ -444,7 +444,7 @@ public:
// by DB guid
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
if (!obj)
{
@@ -473,9 +473,9 @@ public:
float y = (float)atof(py);
float z = (float)atof(pz);
if (!MapManager::IsValidMapCoord(obj->GetMapId(),x,y,z))
if (!MapManager::IsValidMapCoord(obj->GetMapId(), x, y, z))
{
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,obj->GetMapId());
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, obj->GetMapId());
handler->SetSentErrorMessage(true);
return false;
}
@@ -497,7 +497,7 @@ public:
static bool HandleGameObjectSetPhaseCommand(ChatHandler* handler, const char* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
if (!cId)
return false;
@@ -509,7 +509,7 @@ public:
// by DB guid
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
if (!obj)
{
@@ -527,7 +527,7 @@ public:
return false;
}
obj->SetPhaseMask(phasemask,true);
obj->SetPhaseMask(phasemask, true);
obj->SaveToDB();
return true;
}
@@ -542,7 +542,7 @@ public:
"(POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ "
"FROM gameobject WHERE map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_",
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),
pl->GetMapId(),pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),distance*distance);
pl->GetMapId(), pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), distance*distance);
if (result)
{
@@ -567,7 +567,7 @@ public:
} while (result->NextRow());
}
handler->PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE,distance,count);
handler->PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE, distance, count);
return true;
}
@@ -659,7 +659,7 @@ public:
gobj->SetByteValue(GAMEOBJECT_BYTES_1, type, state);
else if (type == 4)
{
WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4);
WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM, 8+4);
data << gobj->GetGUID();
data << (uint32)(state);
gobj->SendMessageToSet(&data, true);