Skip to content

Commit 93fa921

Browse files
committed
The mana regen from the Primal Mooncloth set is now included in the calculations
Minor visual fixes
1 parent df5d3b2 commit 93fa921

5 files changed

+42
-7
lines changed

CharacterStatsTBC.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Interface: 20501
22
## Author: Peter Getov
3-
## Version: 1.1.1
3+
## Version: 1.1.2
44
## Title: |cff00aeffCharacterStatsTBC|r
55
## Notes: Advanced Character Stats
66
## DefaultState: enabled

CharacterStatsTbcCallbacks.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ function CSC_CharacterHitRatingFrame_OnEnter(self)
188188
if unitClassId == CSC_MAGE_CLASS_ID then
189189
GameTooltip:AddLine(CSC_SYMBOL_SPACE); -- Blank line.
190190
GameTooltip:AddLine(CSC_SPELL_HIT_SUBTOOLTIP_TXT);
191-
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_ARCANE_SPELL_HIT_TXT, (self.arcaneHit + self.spellHitGearTalents).."%");
192-
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_FIRE_SPELL_HIT_TXT, (self.fireHit + self.spellHitGearTalents).."%");
193-
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_FROST_SPELL_HIT_TXT, (self.frostHit + self.spellHitGearTalents).."%");
191+
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_ARCANE_SPELL_HIT_TXT, format("%.2F%%", self.arcaneHit + self.spellHitGearTalents));
192+
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_FIRE_SPELL_HIT_TXT, format("%.2F%%", self.fireHit + self.spellHitGearTalents));
193+
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_FROST_SPELL_HIT_TXT, format("%.2F%%", self.frostHit + self.spellHitGearTalents));
194194
elseif unitClassId == CSC_WARLOCK_CLASS_ID then
195195
GameTooltip:AddLine(CSC_SYMBOL_SPACE); -- Blank line.
196196
GameTooltip:AddLine(CSC_SPELL_HIT_SUBTOOLTIP_TXT);
197-
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_DESTRUCTION_SPELL_HIT_TXT, self.spellHitGearTalents.."%");
198-
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_AFFLICTION_SPELL_HIT_TXT, (self.afflictionHit + self.spellHitGearTalents).."%");
197+
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_DESTRUCTION_SPELL_HIT_TXT, format("%.2F%%", self.spellHitGearTalents));
198+
GameTooltip:AddDoubleLine(CSC_SYMBOL_TAB..CSC_AFFLICTION_SPELL_HIT_TXT, format("%.2F%%", self.afflictionHit + self.spellHitGearTalents));
199199
end
200200
elseif (ratingIndex == CR_HIT_MELEE) then
201201
local missChanceVsNPC, missChanceVsBoss, missChanceVsPlayer, dwMissChanceVsNpc, dwMissChanceVsBoss, dwMissChanceVsPlayer = CSC_GetPlayerMissChances(unit, ratingBonus);

CharacterStatsTbcClassUtils.lua

+29
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,35 @@ function CSC_GetMP5FromSetBonus(unit)
246246
return mp5;
247247
end
248248

249+
function CSC_GetMP5ModifierFromSetBonus(unit)
250+
local unitClassId = select(3, UnitClass(unit));
251+
local modifier = 0;
252+
253+
if unitClassId ~= CSC_DRUID_CLASS_ID and unitClassId ~= CSC_PRIEST_CLASS_ID and unitClassId ~= CSC_PALADIN_CLASS_ID and unitClassId ~= CSC_SHAMAN_CLASS_ID then
254+
return modifier;
255+
end
256+
257+
local firstItemslotIndex = 1;
258+
local lastItemslotIndex = 18;
259+
260+
local equippedSetItems = 0;
261+
for itemSlot = firstItemslotIndex, lastItemslotIndex do
262+
local itemId = GetInventoryItemID(unit, itemSlot);
263+
264+
if (itemId) then
265+
if (itemId == g_PrimalMooncloth[itemId]) then
266+
equippedSetItems = equippedSetItems + 1;
267+
end
268+
end
269+
end
270+
271+
if equippedSetItems >= 3 then
272+
modifier = 0.05;
273+
end
274+
275+
return modifier;
276+
end
277+
249278
function CSC_GetShamanT2SpellCrit(unit)
250279
local spellCritFromSet = 0;
251280
local firstItemslotIndex = 1;

CharacterStatsTbcConstants.lua

+6
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ g_TheTenStormsIds = {
102102
[16950] = 16950
103103
};
104104

105+
g_PrimalMooncloth = {
106+
[21875] = 21875,
107+
[21874] = 21874,
108+
[21873] = 21873
109+
};
110+
105111
g_AuraIdToMp5 = {
106112
-- BOW
107113
[19742] = 10,

CharacterStatsTbcCore.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ function CSC_PaperDollFrame_SetManaRegen(statFrame, unit)
11291129
g_lastSeenCastingManaRegen = casting;
11301130

11311131
local mp5FromGear = CSC_GetMP5FromGear(unit) + CSC_GetMP5FromSetBonus(unit);
1132-
local mp5ModifierCasting = CSC_GetMP5ModifierFromTalents(unit);
1132+
local mp5ModifierCasting = CSC_GetMP5ModifierFromTalents(unit) + CSC_GetMP5ModifierFromSetBonus(unit);
11331133

11341134
local mp5FromAuras, mp5CombatModifier = CSC_GetMP5FromAuras();
11351135
if mp5CombatModifier > 0 then

0 commit comments

Comments
 (0)