Core/Game: Fix remaining warnings on windows (and most likely almost all of the ones on *nix)
--HG-- branch : trunk
This commit is contained in:
@@ -491,7 +491,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args)
|
||||
|
||||
if (target)
|
||||
{
|
||||
int32 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
int32 curRespawnDelay = int32(target->GetRespawnTimeEx()-time(NULL));
|
||||
if (curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
|
||||
|
||||
@@ -4345,10 +4345,10 @@ bool ChatHandler::HandleNpcInfoCommand(const char* /*args*/)
|
||||
uint32 Entry = target->GetEntry();
|
||||
CreatureInfo const* cInfo = target->GetCreatureInfo();
|
||||
|
||||
int32 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
int64 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
if (curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay,true);
|
||||
std::string curRespawnDelayStr = secsToTimeString(uint64(curRespawnDelay),true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(),true);
|
||||
|
||||
PSendSysMessage(LANG_NPCINFO_CHAR, target->GetDBTableGUIDLow(), faction, npcflags, Entry, displayid, nativeid);
|
||||
@@ -5711,7 +5711,7 @@ bool ChatHandler::HandleBanInfoHelper(uint32 accountid, char const* accountname)
|
||||
if (fields[2].GetBool() && (fields[1].GetUInt64() == (uint64)0 ||unbandate >= time(NULL)))
|
||||
active = true;
|
||||
bool permanent = (fields[1].GetUInt64() == (uint64)0);
|
||||
std::string bantime = permanent?GetTrinityString(LANG_BANINFO_INFINITE):secsToTimeString(fields[1].GetUInt64(), true);
|
||||
std::string bantime = permanent ? GetTrinityString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].GetUInt64(), true);
|
||||
PSendSysMessage(LANG_BANINFO_HISTORYENTRY,
|
||||
fields[0].GetString(), bantime.c_str(), active ? GetTrinityString(LANG_BANINFO_YES):GetTrinityString(LANG_BANINFO_NO), fields[4].GetString(), fields[5].GetString());
|
||||
}while (result->NextRow());
|
||||
@@ -6154,7 +6154,7 @@ bool ChatHandler::HandlePDumpWriteCommand(const char *args)
|
||||
return false;
|
||||
}
|
||||
|
||||
switch(PlayerDumpWriter().WriteDump(file, guid))
|
||||
switch(PlayerDumpWriter().WriteDump(file, uint32(guid)))
|
||||
{
|
||||
case DUMP_SUCCESS:
|
||||
PSendSysMessage(LANG_COMMAND_EXPORT_SUCCESS);
|
||||
@@ -6550,9 +6550,9 @@ bool ChatHandler::HandleCastSelfCommand(const char *args)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string GetTimeString(uint32 time)
|
||||
std::string GetTimeString(uint64 time)
|
||||
{
|
||||
uint16 days = time / DAY, hours = (time % DAY) / HOUR, minute = (time % HOUR) / MINUTE;
|
||||
uint64 days = time / DAY, hours = (time % DAY) / HOUR, minute = (time % HOUR) / MINUTE;
|
||||
std::ostringstream ss;
|
||||
if (days) ss << days << "d ";
|
||||
if (hours) ss << hours << "h ";
|
||||
|
||||
Reference in New Issue
Block a user