Core: Continued cleanup

If and for whitespaces.
This commit is contained in:
kaelima
2011-06-12 02:30:32 +02:00
parent da03bbbdab
commit b9e8694540
46 changed files with 219 additions and 222 deletions
+2 -2
View File
@@ -205,11 +205,11 @@ void Channel::Join(uint64 p, const char *pass)
if (!IsConstant())
{
// Update last_used timestamp in db
if(!players.empty())
if (!players.empty())
UpdateChannelUseageInDB();
// If the channel has no owner yet and ownership is allowed, set the new owner.
if ( !m_ownerGUID && m_ownership)
if (!m_ownerGUID && m_ownership)
{
SetOwner(p, (players.size() > 1 ? true : false));
players[p].SetModerator(true);
+2 -2
View File
@@ -177,9 +177,9 @@ bool ChatHandler::HandleGPSCommand(const char* args)
uint32 have_map = Map::ExistMap(obj->GetMapId(), gx, gy) ? 1 : 0;
uint32 have_vmap = Map::ExistVMap(obj->GetMapId(), gx, gy) ? 1 : 0;
if(have_vmap)
if (have_vmap)
{
if(map->IsOutdoors(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ()))
if (map->IsOutdoors(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ()))
PSendSysMessage("You are outdoors");
else
PSendSysMessage("You are indoors");
+4 -4
View File
@@ -441,10 +441,10 @@ bool ChatHandler::HandleCharacterChangeFactionCommand(const char * args)
uint64 target_guid;
std::string target_name;
if(!extractPlayerTarget((char*)args, &target, &target_guid, &target_name))
if (!extractPlayerTarget((char*)args, &target, &target_guid, &target_name))
return false;
if(target)
if (target)
{
// TODO : add text into database
PSendSysMessage(LANG_CUSTOMIZE_PLAYER, GetNameLink(target).c_str());
@@ -468,10 +468,10 @@ bool ChatHandler::HandleCharacterChangeRaceCommand(const char * args)
Player* target;
uint64 target_guid;
std::string target_name;
if(!extractPlayerTarget((char*)args, &target, &target_guid, &target_name))
if (!extractPlayerTarget((char*)args, &target, &target_guid, &target_name))
return false;
if(target)
if (target)
{
// TODO : add text into database
PSendSysMessage(LANG_CUSTOMIZE_PLAYER, GetNameLink(target).c_str());
+6 -6
View File
@@ -728,7 +728,7 @@ bool ChatHandler::HandleListCreatureCommand(const char *args)
float z = fields[3].GetFloat();
int mapid = fields[4].GetUInt16();
if (m_session)
if (m_session)
PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, guid, cInfo->Name.c_str(), x, y, z, mapid);
else
PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name.c_str(), x, y, z, mapid);
@@ -4113,13 +4113,13 @@ bool ChatHandler::HandleInstanceUnbindCommand(const char *args)
return false;
}
for(uint8 i = 0; i < MAX_DIFFICULTY; ++i)
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
{
Player::BoundInstancesMap &binds = player->GetBoundInstances(Difficulty(i));
for(Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end();)
for (Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end();)
{
InstanceSave *save = itr->second.save;
if(itr->first != player->GetMapId() && (!MapId || MapId == itr->first) && (diff == -1 || diff == save->GetDifficulty()))
if (itr->first != player->GetMapId() && (!MapId || MapId == itr->first) && (diff == -1 || diff == save->GetDifficulty()))
{
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
PSendSysMessage("unbinding map: %d inst: %d perm: %s diff: %d canReset: %s TTR: %s", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str());
@@ -4414,7 +4414,7 @@ bool ChatHandler::HandleChannelSetOwnership(const char *args)
if (strcmp(argstr, "on") == 0)
{
if(chn)
if (chn)
chn->SetOwnership(true);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_CHANNEL_OWNERSHIP);
stmt->setUInt8 (0, 1);
@@ -4424,7 +4424,7 @@ bool ChatHandler::HandleChannelSetOwnership(const char *args)
}
else if (strcmp(argstr, "off") == 0)
{
if(chn)
if (chn)
chn->SetOwnership(false);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_CHANNEL_OWNERSHIP);
stmt->setUInt8 (0, 0);