aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/QueryHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/QueryHandler.cpp')
-rw-r--r--src/server/game/Handlers/QueryHandler.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index aec8553cb53..a2566c9a7f0 100644
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -16,20 +16,20 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "WorldSession.h"
+#include "CharacterCache.h"
#include "Common.h"
#include "DatabaseEnv.h"
-#include "WorldPacket.h"
-#include "WorldSession.h"
+#include "DBCStores.h"
#include "Log.h"
-#include "World.h"
+#include "MapManager.h"
+#include "NPCHandler.h"
+#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Player.h"
+#include "QueryPackets.h"
#include "UpdateMask.h"
-#include "NPCHandler.h"
-#include "MapManager.h"
-#include "CharacterCache.h"
-
-#include "Packets/QueryPackets.h"
+#include "World.h"
void WorldSession::SendNameQueryOpcode(ObjectGuid guid)
{
@@ -52,7 +52,7 @@ void WorldSession::SendNameQueryOpcode(ObjectGuid guid)
data << uint8(nameData->Sex);
data << uint8(nameData->Class);
- if (DeclinedName const* names = (player ? player->GetDeclinedNames() : NULL))
+ if (DeclinedName const* names = (player ? player->GetDeclinedNames() : nullptr))
{
data << uint8(1); // Name is declined
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
@@ -83,8 +83,8 @@ void WorldSession::HandleQueryTimeOpcode(WorldPacket & /*recvData*/)
void WorldSession::SendQueryTimeResponse()
{
WorldPacket data(SMSG_QUERY_TIME_RESPONSE, 4+4);
- data << uint32(time(NULL));
- data << uint32(sWorld->GetNextDailyQuestsResetTime() - time(NULL));
+ data << uint32(time(nullptr));
+ data << uint32(sWorld->GetNextDailyQuestsResetTime() - time(nullptr));
SendPacket(&data);
}
@@ -300,7 +300,7 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket& recvData)
std::string Text = pageText->Text;
LocaleConstant localeConstant = GetSessionDbLocaleIndex();
- if (localeConstant >= LOCALE_enUS)
+ if (localeConstant != LOCALE_enUS)
if (PageTextLocale const* pageTextLocale = sObjectMgr->GetPageTextLocale(pageID))
ObjectMgr::GetLocaleString(pageTextLocale->Text, localeConstant, Text);