[7696] Fixed compile warnings Author: AlexDereka

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-22 17:56:59 -05:00
parent e7e03d167e
commit 3a316370b1
4 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -4025,7 +4025,7 @@ bool ChatHandler::HandleModifyArenaCommand(const char * args)
bool ChatHandler::HandleReviveCommand(const char* args)
{
Player* player = NULL;
uint32 player_guid = 0;
uint64 player_guid = 0;
if (*args)
{
+1 -1
View File
@@ -203,7 +203,7 @@ class TRINITY_DLL_SPEC Object
return *(((uint8*)&m_uint32Values[ index ])+offset);
}
uint8 GetUInt16Value( uint16 index, uint8 offset) const
uint16 GetUInt16Value( uint16 index, uint8 offset) const
{
ASSERT( index < m_valuesCount || PrintIndexError( index , false) );
ASSERT( offset < 2 );
+1 -1
View File
@@ -1770,7 +1770,7 @@ class TRINITY_DLL_SPEC Player : public Unit
for (int i=0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; i++)
if (m_bgBattleGroundQueueID[i].bgQueueTypeId == bgQueueTypeId)
return m_bgBattleGroundQueueID[i].invitedToInstance != 0;
return PLAYER_MAX_BATTLEGROUND_QUEUES;
return false;
}
bool InBattleGroundQueueForBattleGroundQueueType(BattleGroundQueueTypeId bgQueueTypeId) const
{
+9 -9
View File
@@ -1586,29 +1586,29 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
// Reduce attack time
if (pVictim->haveOffhandWeapon() && offtime < basetime)
{
float percent20 = pVictim->GetAttackTime(OFF_ATTACK) * 0.20;
float percent60 = 3 * percent20;
float percent20 = pVictim->GetAttackTime(OFF_ATTACK) * 0.20f;
float percent60 = 3.0f * percent20;
if(offtime > percent20 && offtime <= percent60)
{
pVictim->setAttackTimer(OFF_ATTACK, uint32(percent20));
}
else if(offtime > percent60)
{
offtime -= 2 * percent20;
offtime -= 2.0f * percent20;
pVictim->setAttackTimer(OFF_ATTACK, uint32(offtime));
}
}
else
{
float percent20 = pVictim->GetAttackTime(BASE_ATTACK) * 0.20;
float percent60 = 3 * percent20;
float percent60 = 3.0f * percent20;
if(basetime > percent20 && basetime <= percent60)
{
pVictim->setAttackTimer(BASE_ATTACK, uint32(percent20));
}
else if(basetime > percent60)
{
basetime -= 2 * percent20;
basetime -= 2.0f * percent20;
pVictim->setAttackTimer(BASE_ATTACK, uint32(basetime));
}
}
@@ -1625,19 +1625,19 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
{
// -probability is between 0% and 40%
// 20% base chance
float Probability = 20;
float Probability = 20.0f;
//there is a newbie protection, at level 10 just 7% base chance; assuming linear function
if( pVictim->getLevel() < 30 )
Probability = 0.65f*pVictim->getLevel()+0.5;
Probability = 0.65f*pVictim->getLevel()+0.5f;
uint32 VictimDefense=pVictim->GetDefenseSkillValue();
uint32 AttackerMeleeSkill=GetUnitMeleeSkill();
Probability *= AttackerMeleeSkill/(float)VictimDefense;
if(Probability > 40)
Probability = 40;
if(Probability > 40.0f)
Probability = 40.0f;
if(roll_chance_f(Probability))
CastSpell(pVictim, 1604, true);