diff options
author | Spp <none@none> | 2010-04-07 19:14:10 +0200 |
---|---|---|
committer | Spp <none@none> | 2010-04-07 19:14:10 +0200 |
commit | d19e12708001fbef2308be0e8cb5375a2ac7af48 (patch) | |
tree | 09fc8f67a6197802e0512950f0b0a3438a9834e8 /src/game/QueryHandler.cpp | |
parent | 2e127f7a30706dc1d40c65de22ff02851732da24 (diff) |
Code style (game + scripts only):
"if(" --> "if ("
--HG--
branch : trunk
Diffstat (limited to 'src/game/QueryHandler.cpp')
-rw-r--r-- | src/game/QueryHandler.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/game/QueryHandler.cpp b/src/game/QueryHandler.cpp index f271c65dd24..aed1d5cf914 100644 --- a/src/game/QueryHandler.cpp +++ b/src/game/QueryHandler.cpp @@ -36,7 +36,7 @@ void WorldSession::SendNameQueryOpcode(Player *p) { - if(!p) + if (!p) return; // guess size WorldPacket data( SMSG_NAME_QUERY_RESPONSE, (8+1+1+1+1+1+10) ); @@ -47,7 +47,7 @@ void WorldSession::SendNameQueryOpcode(Player *p) data << uint8(p->getRace()); data << uint8(p->getGender()); data << uint8(p->getClass()); - if(DeclinedName const* names = p->GetDeclinedNames()) + if (DeclinedName const* names = p->GetDeclinedNames()) { data << uint8(1); // is declined for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i) @@ -79,18 +79,18 @@ void WorldSession::SendNameQueryOpcodeFromDB(uint64 guid) void WorldSession::SendNameQueryOpcodeFromDBCallBack(QueryResult_AutoPtr result, uint32 accountId) { - if(!result) + if (!result) return; WorldSession * session = sWorld.FindSession(accountId); - if(!session) + if (!session) return; Field *fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); std::string name = fields[1].GetCppString(); uint8 pRace = 0, pGender = 0, pClass = 0; - if(name == "") + if (name == "") name = session->GetTrinityString(LANG_NON_EXIST_CHARACTER); else { @@ -109,7 +109,7 @@ void WorldSession::SendNameQueryOpcodeFromDBCallBack(QueryResult_AutoPtr result, data << uint8(pClass); // class // if the first declined name field (5) is empty, the rest must be too - if(sWorld.getConfig(CONFIG_DECLINED_NAMES_USED) && fields[5].GetCppString() != "") + if (sWorld.getConfig(CONFIG_DECLINED_NAMES_USED) && fields[5].GetCppString() != "") { data << uint8(1); // is declined for (int i = 5; i < MAX_DECLINED_NAME_CASES+5; ++i) @@ -223,7 +223,7 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data ) recv_data >> guid; const GameObjectInfo *info = objmgr.GetGameObjectInfo(entryID); - if(info) + if (info) { std::string Name; std::string IconName; @@ -279,7 +279,7 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/) Corpse *corpse = GetPlayer()->GetCorpse(); - if(!corpse) + if (!corpse) { WorldPacket data(MSG_CORPSE_QUERY, 1); data << uint8(0); // corpse not found @@ -294,15 +294,15 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/) int32 corpsemapid = mapid; // if corpse at different map - if(mapid != _player->GetMapId()) + if (mapid != _player->GetMapId()) { // search entrance map for proper show entrance - if(MapEntry const* corpseMapEntry = sMapStore.LookupEntry(mapid)) + if (MapEntry const* corpseMapEntry = sMapStore.LookupEntry(mapid)) { - if(corpseMapEntry->IsDungeon() && corpseMapEntry->entrance_map >= 0) + if (corpseMapEntry->IsDungeon() && corpseMapEntry->entrance_map >= 0) { // if corpse map have entrance - if(Map const* entranceMap = MapManager::Instance().CreateBaseMap(corpseMapEntry->entrance_map)) + if (Map const* entranceMap = MapManager::Instance().CreateBaseMap(corpseMapEntry->entrance_map)) { mapid = corpseMapEntry->entrance_map; x = corpseMapEntry->entrance_x; @@ -477,7 +477,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) uint32 count; recv_data >> count; // quest count, max=25 - if(count >= MAX_QUEST_LOG_SIZE) + if (count >= MAX_QUEST_LOG_SIZE) return; WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4+(4+4)*count); @@ -492,14 +492,14 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) uint16 questSlot = _player->FindQuestSlot(questId); - if(questSlot != MAX_QUEST_LOG_SIZE) + if (questSlot != MAX_QUEST_LOG_SIZE) questOk =_player->GetQuestSlotQuestId(questSlot) == questId; - if(questOk) + if (questOk) { QuestPOIVector const *POI = objmgr.GetQuestPOIVector(questId); - if(POI) + if (POI) { data << uint32(questId); // quest ID data << uint32(POI->size()); // POI count |