[7864] Use x.0f float constant format.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
NoFantasy 2009-05-21 17:15:23 +04:00 committed by VladimirMangos
parent bde5402b40
commit 50898eedde
4 changed files with 13 additions and 13 deletions

View file

@ -660,7 +660,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const
uint32 AuctionEntry::GetAuctionCut() 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 /// the sum of outbid is (1% from current bid)*5, if bid is very small, it is 1c

View file

@ -239,7 +239,7 @@ void LootStore::ReportNotExistedId(uint32 id) const
// RATE_DROP_ITEMS is no longer used for all types of entries // RATE_DROP_ITEMS is no longer used for all types of entries
bool LootStoreItem::Roll(bool rate) const bool LootStoreItem::Roll(bool rate) const
{ {
if(chance>=100.f) if(chance>=100.0f)
return true; return true;
if(mincountOrRef < 0) // reference case if(mincountOrRef < 0) // reference case
@ -817,7 +817,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. 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]; return &ExplicitlyChanced[i];
Roll -= ExplicitlyChanced[i].chance; Roll -= ExplicitlyChanced[i].chance;

View file

@ -5261,19 +5261,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if( procSpell->SpellFamilyFlags & 0x0000000000000004LL ) if( procSpell->SpellFamilyFlags & 0x0000000000000004LL )
{ {
triggered_spell_id = 40445; triggered_spell_id = 40445;
chance = 25.f; chance = 25.0f;
} }
// Rejuvenation // Rejuvenation
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL ) else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL )
{ {
triggered_spell_id = 40446; triggered_spell_id = 40446;
chance = 25.f; chance = 25.0f;
} }
// Mangle (cat/bear) // Mangle (cat/bear)
else if( procSpell->SpellFamilyFlags & 0x0000044000000000LL ) else if( procSpell->SpellFamilyFlags & 0x0000044000000000LL )
{ {
triggered_spell_id = 40452; triggered_spell_id = 40452;
chance = 40.f; chance = 40.0f;
} }
else else
return false; return false;
@ -5599,13 +5599,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if( procSpell->SpellFamilyFlags & 0x00000000C0000000LL) if( procSpell->SpellFamilyFlags & 0x00000000C0000000LL)
{ {
triggered_spell_id = 40471; triggered_spell_id = 40471;
chance = 15.f; chance = 15.0f;
} }
// Judgement // Judgement
else if( procSpell->SpellFamilyFlags & 0x0000000000800000LL ) else if( procSpell->SpellFamilyFlags & 0x0000000000800000LL )
{ {
triggered_spell_id = 40472; triggered_spell_id = 40472;
chance = 50.f; chance = 50.0f;
} }
else else
return false; return false;
@ -5765,17 +5765,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL) if (procSpell->SpellFamilyFlags & 0x0000000000000001LL)
{ {
triggered_spell_id = 40465; // Lightning Bolt triggered_spell_id = 40465; // Lightning Bolt
chance = 15.f; chance = 15.0f;
} }
else if (procSpell->SpellFamilyFlags & 0x0000000000000080LL) else if (procSpell->SpellFamilyFlags & 0x0000000000000080LL)
{ {
triggered_spell_id = 40465; // Lesser Healing Wave triggered_spell_id = 40465; // Lesser Healing Wave
chance = 10.f; chance = 10.0f;
} }
else if (procSpell->SpellFamilyFlags & 0x0000001000000000LL) else if (procSpell->SpellFamilyFlags & 0x0000001000000000LL)
{ {
triggered_spell_id = 40466; // Stormstrike triggered_spell_id = 40466; // Stormstrike
chance = 50.f; chance = 50.0f;
} }
else else
return false; return false;
@ -11247,7 +11247,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT
if (OriginalCastTime > 7000) OriginalCastTime = 7000; if (OriginalCastTime > 7000) OriginalCastTime = 7000;
if (OriginalCastTime < 1500) OriginalCastTime = 1500; if (OriginalCastTime < 1500) OriginalCastTime = 1500;
// Portion to Over Time // 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 ) if ( damagetype == DOT )
CastingTime = uint32(CastingTime * PtOT); CastingTime = uint32(CastingTime * PtOT);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7863" #define REVISION_NR "7864"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__