[7864] Use x.0f float constant format. Author: NoFantasy

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-21 10:52:35 -05:00
parent 5fe179019f
commit 6d6a4a7856
3 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -660,7 +660,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const
uint32 AuctionEntry::GetAuctionCut() const
{
return uint32(auctionHouseEntry->cutPercent * bid * sWorld.getRate(RATE_AUCTION_CUT) / 100.f);
return uint32(auctionHouseEntry->cutPercent * bid * sWorld.getRate(RATE_AUCTION_CUT) / 100.0f);
}
/// the sum of outbid is (1% from current bid)*5, if bid is very small, it is 1c
+2 -2
View File
@@ -242,7 +242,7 @@ void LootStore::ReportNotExistedId(uint32 id) const
// RATE_DROP_ITEMS is no longer used for all types of entries
bool LootStoreItem::Roll(bool rate) const
{
if(chance>=100.f)
if(chance>=100.0f)
return true;
if(mincountOrRef < 0) // reference case
@@ -820,7 +820,7 @@ LootStoreItem const * LootTemplate::LootGroup::Roll() const
for (uint32 i=0; i<ExplicitlyChanced.size(); ++i) //check each explicitly chanced entry in the template and modify its chance based on quality.
{
if(ExplicitlyChanced[i].chance>=100.f)
if(ExplicitlyChanced[i].chance>=100.0f)
return &ExplicitlyChanced[i];
Roll -= ExplicitlyChanced[i].chance;
+9 -9
View File
@@ -5799,19 +5799,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if( procSpell->SpellFamilyFlags[0] & 0x4 )
{
triggered_spell_id = 40445;
chance = 25.f;
chance = 25.0f;
}
// Rejuvenation
else if( procSpell->SpellFamilyFlags[0] & 0x10 )
{
triggered_spell_id = 40446;
chance = 25.f;
chance = 25.0f;
}
// Mangle (cat/bear)
else if( procSpell->SpellFamilyFlags[1] & 0x00000440)
{
triggered_spell_id = 40452;
chance = 40.f;
chance = 40.0f;
}
else
return false;
@@ -6178,13 +6178,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if( procSpell->SpellFamilyFlags[0] & 0xC0000000)
{
triggered_spell_id = 40471;
chance = 15.f;
chance = 15.0f;
}
// Judgement
else if( procSpell->SpellFamilyFlags[0] & 0x800000 )
{
triggered_spell_id = 40472;
chance = 50.f;
chance = 50.0f;
}
else
return false;
@@ -6358,17 +6358,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if (procSpell->SpellFamilyFlags[0] & 0x1)
{
triggered_spell_id = 40465; // Lightning Bolt
chance = 15.f;
chance = 15.0f;
}
else if (procSpell->SpellFamilyFlags[0] & 0x80)
{
triggered_spell_id = 40465; // Lesser Healing Wave
chance = 10.f;
chance = 10.0f;
}
else if (procSpell->SpellFamilyFlags[1] & 0x00000010)
{
triggered_spell_id = 40466; // Stormstrike
chance = 50.f;
chance = 50.0f;
}
else
return false;
@@ -12637,7 +12637,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT
if (OriginalCastTime > 7000) OriginalCastTime = 7000;
if (OriginalCastTime < 1500) OriginalCastTime = 1500;
// Portion to Over Time
float PtOT = (overTime / 15000.f) / ((overTime / 15000.f) + (OriginalCastTime / 3500.f));
float PtOT = (overTime / 15000.0f) / ((overTime / 15000.0f) + (OriginalCastTime / 3500.0f));
if ( damagetype == DOT )
CastingTime = uint32(CastingTime * PtOT);