mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9381] Fixed some compile warnings.
This commit is contained in:
parent
2bdcb1161c
commit
ccfd42bf3e
55 changed files with 219 additions and 203 deletions
|
|
@ -695,7 +695,7 @@ bool ChatHandler::HandleReloadEventScriptsCommand(const char* arg)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadEventAITextsCommand(const char* arg)
|
||||
bool ChatHandler::HandleReloadEventAITextsCommand(const char* /*arg*/)
|
||||
{
|
||||
|
||||
sLog.outString( "Re-Loading Texts from `creature_ai_texts`...");
|
||||
|
|
@ -704,7 +704,7 @@ bool ChatHandler::HandleReloadEventAITextsCommand(const char* arg)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadEventAISummonsCommand(const char* arg)
|
||||
bool ChatHandler::HandleReloadEventAISummonsCommand(const char* /*arg*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading Summons from `creature_ai_summons`...");
|
||||
sEventAIMgr.LoadCreatureEventAI_Summons(true);
|
||||
|
|
@ -712,7 +712,7 @@ bool ChatHandler::HandleReloadEventAISummonsCommand(const char* arg)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadEventAIScriptsCommand(const char* arg)
|
||||
bool ChatHandler::HandleReloadEventAIScriptsCommand(const char* /*arg*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading Scripts from `creature_ai_scripts`...");
|
||||
sEventAIMgr.LoadCreatureEventAI_Scripts();
|
||||
|
|
@ -3816,7 +3816,7 @@ bool ChatHandler::HandleNpcInfoCommand(const char* /*args*/)
|
|||
uint32 Entry = target->GetEntry();
|
||||
CreatureInfo const* cInfo = target->GetCreatureInfo();
|
||||
|
||||
int32 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
time_t curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
if(curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay,true);
|
||||
|
|
@ -4882,7 +4882,7 @@ bool ChatHandler::HandleQuestComplete(const char* args)
|
|||
// All creature/GO slain/casted (not required, but otherwise it will display "Creature slain 0/10")
|
||||
for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
{
|
||||
uint32 creature = pQuest->ReqCreatureOrGOId[i];
|
||||
int32 creature = pQuest->ReqCreatureOrGOId[i];
|
||||
uint32 creaturecount = pQuest->ReqCreatureOrGOCount[i];
|
||||
|
||||
if(uint32 spell_id = pQuest->ReqSpell[i])
|
||||
|
|
@ -4899,7 +4899,7 @@ bool ChatHandler::HandleQuestComplete(const char* args)
|
|||
else if(creature < 0)
|
||||
{
|
||||
for(uint16 z = 0; z < creaturecount; ++z)
|
||||
player->CastedCreatureOrGO(creature,0,0);
|
||||
player->CastedCreatureOrGO(-(creature),0,0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5962,12 +5962,16 @@ bool ChatHandler::HandleCastSelfCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
std::string GetTimeString(uint32 time)
|
||||
std::string GetTimeString(time_t time)
|
||||
{
|
||||
uint16 days = time / DAY, hours = (time % DAY) / HOUR, minute = (time % HOUR) / MINUTE;
|
||||
time_t days = time / DAY;
|
||||
time_t hours = (time % DAY) / HOUR;
|
||||
time_t minute = (time % HOUR) / MINUTE;
|
||||
std::ostringstream ss;
|
||||
if(days) ss << days << "d ";
|
||||
if(hours) ss << hours << "h ";
|
||||
if(days)
|
||||
ss << days << "d ";
|
||||
if(hours)
|
||||
ss << hours << "h ";
|
||||
ss << minute << "m";
|
||||
return ss.str();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue