mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +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
|
|
@ -499,7 +499,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args)
|
|||
|
||||
if(target)
|
||||
{
|
||||
int32 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
time_t curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
if(curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
|
||||
|
|
@ -805,7 +805,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();
|
||||
|
|
@ -1646,7 +1646,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);
|
||||
|
|
@ -1809,7 +1809,7 @@ bool ChatHandler::HandleNpcTameCommand(const char* /*args*/)
|
|||
// place pet before player
|
||||
float x,y,z;
|
||||
player->GetClosePoint (x,y,z,creatureTarget->GetObjectSize (),CONTACT_DISTANCE);
|
||||
pet->Relocate (x,y,z,M_PI-player->GetOrientation ());
|
||||
pet->Relocate (x,y,z,M_PI_F-player->GetOrientation ());
|
||||
|
||||
// set pet to defensive mode by default (some classes can't control controlled pets in fact).
|
||||
pet->GetCharmInfo()->SetReactState(REACT_DEFENSIVE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue