Core/Misc: fix some warnings. As a result removed one redundant hook from FormulaScript.
--HG-- branch : trunk
This commit is contained in:
@@ -27,18 +27,16 @@ namespace Trinity
|
||||
{
|
||||
namespace Honor
|
||||
{
|
||||
inline float hk_honor_at_level_f(uint8 level, uint32 count = 1)
|
||||
inline float hk_honor_at_level_f(uint8 level, float multiplier = 1.0f)
|
||||
{
|
||||
float honor = count * level * 1.55f;
|
||||
sScriptMgr.OnHonorCalculation(honor, level, count);
|
||||
float honor = multiplier * level * 1.55f;
|
||||
sScriptMgr.OnHonorCalculation(honor, level, multiplier);
|
||||
return honor;
|
||||
}
|
||||
|
||||
inline uint32 hk_honor_at_level(uint8 level, uint32 count = 1)
|
||||
inline uint32 hk_honor_at_level(uint8 level, float multiplier = 1.0f)
|
||||
{
|
||||
uint32 honor = uint32(ceil(hk_honor_at_level_f(level, count)));
|
||||
sScriptMgr.OnHonorCalculation(honor, level, count);
|
||||
return honor;
|
||||
return uint32(ceil(hk_honor_at_level_f(level, multiplier)));
|
||||
}
|
||||
}
|
||||
namespace XP
|
||||
|
||||
@@ -227,7 +227,7 @@ class Quest
|
||||
std::string GetCompletedText() const { return CompletedText; }
|
||||
int32 GetRewOrReqMoney() const;
|
||||
uint32 GetRewHonorAddition() const { return RewHonorAddition; }
|
||||
uint32 GetRewHonorMultiplier() const { return RewHonorMultiplier; }
|
||||
float GetRewHonorMultiplier() const { return RewHonorMultiplier; }
|
||||
uint32 GetRewMoneyMaxLevel() const { return RewMoneyMaxLevel; }
|
||||
// use in XP calculation at client
|
||||
uint32 GetRewSpell() const { return RewSpell; }
|
||||
|
||||
@@ -267,7 +267,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
|
||||
if (m_player->GetReputationRank(repTemplate->faction[i]) <= ReputationRank(repTemplate->faction_rank[i]))
|
||||
{
|
||||
// bonuses are already given, so just modify standing by rate
|
||||
int32 spilloverRep = standing * repTemplate->faction_rate[i];
|
||||
int32 spilloverRep = int32(standing * repTemplate->faction_rate[i]);
|
||||
SetOneFactionReputation(sFactionStore.LookupEntry(repTemplate->faction[i]), spilloverRep, incremental);
|
||||
}
|
||||
}
|
||||
@@ -275,7 +275,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
|
||||
}
|
||||
else
|
||||
{
|
||||
float spillOverRepOut = standing;
|
||||
float spillOverRepOut = float(standing);
|
||||
// check for sub-factions that receive spillover
|
||||
SimpleFactionsList const* flist = GetFactionTeamList(factionEntry->ID);
|
||||
// if has no sub-factions, check for factions with same parent
|
||||
|
||||
@@ -422,14 +422,9 @@ void ScriptMgr::OnWorldUpdate(uint32 diff)
|
||||
FOREACH_SCRIPT(WorldScript)->OnUpdate(NULL, diff);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnHonorCalculation(float& honor, uint8 level, uint32 count)
|
||||
void ScriptMgr::OnHonorCalculation(float& honor, uint8 level, float multiplier)
|
||||
{
|
||||
FOREACH_SCRIPT(FormulaScript)->OnHonorCalculation(honor, level, count);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnHonorCalculation(uint32& honor, uint8 level, uint32 count)
|
||||
{
|
||||
FOREACH_SCRIPT(FormulaScript)->OnHonorCalculation(honor, level, count);
|
||||
FOREACH_SCRIPT(FormulaScript)->OnHonorCalculation(honor, level, multiplier);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnGrayLevelCalculation(uint8& grayLevel, uint8 playerLevel)
|
||||
|
||||
@@ -279,10 +279,7 @@ class FormulaScript : public ScriptObject
|
||||
public:
|
||||
|
||||
// Called after calculating honor.
|
||||
virtual void OnHonorCalculation(float& /*honor*/, uint8 /*level*/, uint32 /*count*/) { }
|
||||
|
||||
// Called after calculating honor.
|
||||
virtual void OnHonorCalculation(uint32& /*honor*/, uint8 /*level*/, uint32 /*count*/) { }
|
||||
virtual void OnHonorCalculation(float& /*honor*/, uint8 /*level*/, float /*multiplier*/) { }
|
||||
|
||||
// Called after gray level calculation.
|
||||
virtual void OnGrayLevelCalculation(uint8& /*grayLevel*/, uint8 /*playerLevel*/) { }
|
||||
@@ -807,8 +804,7 @@ class ScriptMgr
|
||||
|
||||
public: /* FormulaScript */
|
||||
|
||||
void OnHonorCalculation(float& honor, uint8 level, uint32 count);
|
||||
void OnHonorCalculation(uint32& honor, uint8 level, uint32 count);
|
||||
void OnHonorCalculation(float& honor, uint8 level, float multiplier);
|
||||
void OnGrayLevelCalculation(uint8& grayLevel, uint8 playerLevel);
|
||||
void OnColorCodeCalculation(XPColorChar& color, uint8 playerLevel, uint8 mobLevel);
|
||||
void OnZeroDifferenceCalculation(uint8& diff, uint8 playerLevel);
|
||||
|
||||
Reference in New Issue
Block a user