Core/Game: fix all warnings related to converting doubles and floats.
--HG-- branch : trunk
This commit is contained in:
@@ -828,7 +828,7 @@ bool ChatHandler::HandleGameObjectPhaseCommand(const char* args)
|
||||
|
||||
bool ChatHandler::HandleGameObjectNearCommand(const char* args)
|
||||
{
|
||||
float distance = (!*args) ? 10 : atol(args);
|
||||
float distance = (!*args) ? 10.0f : (float)(atof(args));
|
||||
uint32 count = 0;
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
@@ -1593,7 +1593,7 @@ bool ChatHandler::HandleNpcSpawnDistCommand(const char* args)
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
float option = atof((char*)args);
|
||||
float option = (float)(atof((char*)args));
|
||||
if (option < 0.0f)
|
||||
{
|
||||
SendSysMessage(LANG_BAD_VALUE);
|
||||
@@ -2662,7 +2662,7 @@ bool ChatHandler::HandleWpEventCommand(const char* args)
|
||||
|
||||
if (arg_str_2 == "posx")
|
||||
{
|
||||
coord = atof(arg_3);
|
||||
coord = (float)(atof(arg_3));
|
||||
WorldDatabase.PExecute("UPDATE waypoint_scripts SET x='%f' WHERE guid='%u'",
|
||||
coord, id);
|
||||
PSendSysMessage("|cff00ff00Waypoint script:|r|cff00ffff %u|r|cff00ff00 position_x updated.|r", id);
|
||||
@@ -2670,7 +2670,7 @@ bool ChatHandler::HandleWpEventCommand(const char* args)
|
||||
}
|
||||
else if (arg_str_2 == "posy")
|
||||
{
|
||||
coord = atof(arg_3);
|
||||
coord = (float)(atof(arg_3));
|
||||
WorldDatabase.PExecute("UPDATE waypoint_scripts SET y='%f' WHERE guid='%u'",
|
||||
coord, id);
|
||||
PSendSysMessage("|cff00ff00Waypoint script: %u position_y updated.|r", id);
|
||||
@@ -2678,7 +2678,7 @@ bool ChatHandler::HandleWpEventCommand(const char* args)
|
||||
}
|
||||
else if (arg_str_2 == "posz")
|
||||
{
|
||||
coord = atof(arg_3);
|
||||
coord = (float)(atof(arg_3));
|
||||
WorldDatabase.PExecute("UPDATE waypoint_scripts SET z='%f' WHERE guid='%u'",
|
||||
coord, id);
|
||||
PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 position_z updated.|r", id);
|
||||
@@ -2686,7 +2686,7 @@ bool ChatHandler::HandleWpEventCommand(const char* args)
|
||||
}
|
||||
else if (arg_str_2 == "orientation")
|
||||
{
|
||||
coord = atof(arg_3);
|
||||
coord = (float)(atof(arg_3));
|
||||
WorldDatabase.PExecute("UPDATE waypoint_scripts SET o='%f' WHERE guid='%u'",
|
||||
coord, id);
|
||||
PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 orientation updated.|r", id);
|
||||
|
||||
Reference in New Issue
Block a user