mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[9330] Fixed msvc compile warnings.
This commit is contained in:
parent
a167fd98d2
commit
696cba9c37
20 changed files with 142 additions and 144 deletions
|
|
@ -1184,7 +1184,7 @@ void Player::Update( uint32 p_time )
|
|||
}
|
||||
}
|
||||
//120 degrees of radiant range
|
||||
else if( !HasInArc( 2*M_PI/3, pVictim ))
|
||||
else if( !HasInArc( 2*M_PI_F/3, pVictim ))
|
||||
{
|
||||
setAttackTimer(BASE_ATTACK,100);
|
||||
if(m_swingErrorMsg != 2) // send single time (client auto repeat)
|
||||
|
|
@ -1215,7 +1215,7 @@ void Player::Update( uint32 p_time )
|
|||
{
|
||||
setAttackTimer(OFF_ATTACK,100);
|
||||
}
|
||||
else if( !HasInArc( 2*M_PI/3, pVictim ))
|
||||
else if( !HasInArc( 2*M_PI_F/3, pVictim ))
|
||||
{
|
||||
setAttackTimer(OFF_ATTACK,100);
|
||||
}
|
||||
|
|
@ -1961,7 +1961,7 @@ void Player::RewardRage( uint32 damage, uint32 weaponSpeedHitFactor, bool attack
|
|||
|
||||
// Berserker Rage effect
|
||||
if(HasAura(18499,0))
|
||||
addRage *= 1.3;
|
||||
addRage *= 1.3f;
|
||||
}
|
||||
|
||||
addRage *= sWorld.getRate(RATE_POWER_RAGE_INCOME);
|
||||
|
|
@ -6067,12 +6067,12 @@ void Player::UpdateArenaFields(void)
|
|||
void Player::UpdateHonorFields()
|
||||
{
|
||||
/// called when rewarding honor and at each save
|
||||
uint64 now = time(NULL);
|
||||
uint64 today = uint64(time(NULL) / DAY) * DAY;
|
||||
time_t now = time(NULL);
|
||||
time_t today = (time(NULL) / DAY) * DAY;
|
||||
|
||||
if(m_lastHonorUpdateTime < today)
|
||||
{
|
||||
uint64 yesterday = today - DAY;
|
||||
time_t yesterday = today - DAY;
|
||||
|
||||
uint16 kills_today = PAIR32_LOPART(GetUInt32Value(PLAYER_FIELD_KILLS));
|
||||
|
||||
|
|
@ -12737,7 +12737,7 @@ void Player::SendPreparedQuest(uint64 guid)
|
|||
NpcTextLocale const *nl = sObjectMgr.GetNpcTextLocale(textid);
|
||||
if (nl)
|
||||
{
|
||||
if (nl->Text_0[0].size() > loc_idx && !nl->Text_0[0][loc_idx].empty())
|
||||
if ((int32)nl->Text_0[0].size() > loc_idx && !nl->Text_0[0][loc_idx].empty())
|
||||
title = nl->Text_0[0][loc_idx];
|
||||
}
|
||||
}
|
||||
|
|
@ -12752,7 +12752,7 @@ void Player::SendPreparedQuest(uint64 guid)
|
|||
NpcTextLocale const *nl = sObjectMgr.GetNpcTextLocale(textid);
|
||||
if (nl)
|
||||
{
|
||||
if (nl->Text_1[0].size() > loc_idx && !nl->Text_1[0][loc_idx].empty())
|
||||
if ((int32)nl->Text_1[0].size() > loc_idx && !nl->Text_1[0][loc_idx].empty())
|
||||
title = nl->Text_1[0][loc_idx];
|
||||
}
|
||||
}
|
||||
|
|
@ -14225,7 +14225,7 @@ bool Player::HasQuestForItem( uint32 itemid ) const
|
|||
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(itemid);
|
||||
|
||||
// 'unique' item
|
||||
if (pProto->MaxCount && GetItemCount(itemid,true) < pProto->MaxCount)
|
||||
if (pProto->MaxCount && (int32)GetItemCount(itemid,true) < pProto->MaxCount)
|
||||
return true;
|
||||
|
||||
// allows custom amount drop when not 0
|
||||
|
|
@ -14233,7 +14233,7 @@ bool Player::HasQuestForItem( uint32 itemid ) const
|
|||
{
|
||||
if (GetItemCount(itemid,true) < qinfo->ReqSourceCount[j])
|
||||
return true;
|
||||
} else if (GetItemCount(itemid,true) < pProto->Stackable)
|
||||
} else if ((int32)GetItemCount(itemid,true) < pProto->Stackable)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -14323,7 +14323,7 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver)
|
|||
{
|
||||
if (const QuestLocale* pLocale = sObjectMgr.GetQuestLocale(pQuest->GetQuestId()))
|
||||
{
|
||||
if (pLocale->Title.size() > loc_idx && !pLocale->Title[loc_idx].empty())
|
||||
if ((int32)pLocale->Title.size() > loc_idx && !pLocale->Title[loc_idx].empty())
|
||||
strTitle = pLocale->Title[loc_idx];
|
||||
}
|
||||
}
|
||||
|
|
@ -14878,9 +14878,9 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
|
||||
m_rest_bonus = fields[22].GetFloat();
|
||||
//speed collect rest bonus in offline, in logout, far from tavern, city (section/in hour)
|
||||
float bubble0 = 0.031;
|
||||
float bubble0 = 0.031f;
|
||||
//speed collect rest bonus in offline, in logout, in tavern, city (section/in hour)
|
||||
float bubble1 = 0.125;
|
||||
float bubble1 = 0.125f;
|
||||
|
||||
if(time_diff > 0)
|
||||
{
|
||||
|
|
@ -20825,7 +20825,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
|||
}
|
||||
|
||||
// we already have same or higher talent rank learned
|
||||
if(curtalent_maxrank >= (talentRank + 1))
|
||||
if(curtalent_maxrank >= int32(talentRank + 1))
|
||||
return;
|
||||
|
||||
// check if we have enough talent points
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue