diff options
| author | megamage <none@none> | 2009-05-21 10:52:35 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-21 10:52:35 -0500 |
| commit | 6d6a4a78567eb6c18848ab38374c017289018938 (patch) | |
| tree | c3a703e38ae8f50cecdc47ce4ee881f67993af08 /src | |
| parent | 5fe179019fded52718f6fce9a76c052785df48a5 (diff) | |
[7864] Use x.0f float constant format. Author: NoFantasy
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/AuctionHouseMgr.cpp | 2 | ||||
| -rw-r--r-- | src/game/LootMgr.cpp | 4 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 18 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index e34795c9ecd..bfb24b15e7a 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -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 diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index 267749fd5a4..86cbeb75b0b 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -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; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index c674549380d..12b588e53a7 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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); |
