Skip to content

Commit d8ec534

Browse files
committed
update for #3 . has issues playing around talent
1 parent 1da63c9 commit d8ec534

4 files changed

Lines changed: 36 additions & 3 deletions

File tree

Config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ local function GetOptions()
373373
cPointDisplay:HideUIElements()
374374
end,
375375
order = 10,
376-
disabled = function() if (tid == "cp" or tid == "hp" or tid == "ss" or tid == "ac") then return false else return true end end,
376+
disabled = function() if (tid == "cp" or tid == "hp" or tid == "ss" or tid == "ac" or tid == "ch") then return false else return true end end,
377377
},
378378
showatzero = {
379379
type = "toggle",

Core.lua

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ cPointDisplay.Types = {
3232
points = {
3333
[1] = {name = "Mongoose Bite Charges", id = "mb", barcount = 3}
3434
}
35+
},
36+
["MONK"] = {
37+
name = "Monk",
38+
points = {
39+
[1] = {name = "Chi", id = "ch", barcount = 6} --barcount depends on a talent choice and should be adjusted later
40+
}
3541
}
3642
}
3743
local Types = cPointDisplay.Types
@@ -528,6 +534,20 @@ function cPointDisplay:GetPoints(CurClass, CurType)
528534
if CurType == "hp" then
529535
NewPoints = UnitPower("player", SPELL_POWER_HOLY_POWER)
530536
end
537+
-- Monk
538+
elseif CurClass == "MONK" and PlayerSpec == 3 then -- chi is only for windwalkers
539+
-- Chi
540+
local maxchi = db["MONK"].types["ch"].barcount
541+
local newmax
542+
if CurType == "ch" then
543+
NewPoints = UnitPower("player", SPELL_POWER_CHI)
544+
newmax = UnitPowerMax("player", SPELL_POWER_CHI)
545+
if newmax ~= maxchi then
546+
db["MONK"].types["ch"].barcount = newmax
547+
-- update with new max
548+
cPointDisplay:CreateFrames()
549+
end
550+
end
531551
-- Warlock
532552
elseif CurClass == "WARLOCK" then
533553
-- Soul Shards
@@ -988,6 +1008,14 @@ function cPointDisplay:HideUIElements()
9881008
end
9891009
end
9901010

1011+
if db["MONK"].types["ch"].enabled and db["MONK"].types["ch"].general.hideui then
1012+
local CB = MonkHarmonyBarFrame
1013+
if CB then
1014+
CB:Hide()
1015+
CB:SetScript("OnShow", function(self) self:Hide() end)
1016+
end
1017+
end
1018+
9911019
if db["WARLOCK"].types["ss"].enabled and db["WARLOCK"].types["ss"].general.hideui then
9921020
local SSF = WarlockPowerFrame
9931021
if SSF then
@@ -1053,6 +1081,10 @@ function cPointDisplay:PLAYER_LOGIN()
10531081
if (PlayerClass == "PALADIN") then
10541082
tinsert(EventList, "UNIT_POWER")
10551083
end
1084+
if (PlayerClass == "MONK") then
1085+
tinsert(EventList, "UNIT_POWER")
1086+
tinsert(EventList, "PLAYER_TALENT_UPDATE")
1087+
end
10561088
if (PlayerClass == "WARLOCK") then
10571089
tinsert(EventList, "UNIT_POWER")
10581090
tinsert(EventList, "UNIT_DISPLAYPOWER")

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Then open the renamed file and change the string `nibPointDisplayDB` to `cPointD
1313
- Holy Power
1414
- Soul Shards
1515
- Arcane Charges
16-
- Mongoose Bite Charges *(new)*
16+
- Mongoose Bite Charges
17+
- Chi *new*
1718

1819
###Requests
1920

cPointDisplay.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Title: |cFFFF9933c|rPointDisplay
33
## Author: Nibelheim, ChronosSF
44
## Notes: Customizable graphical point display (Combo Points, Holy Power, Soul Shards, etc.). Fan update of nibPointDisplay by Nibelheim.
5-
## Version: 1.1.2
5+
## Version: 1.1.3
66
## SavedVariables: cPointDisplayDB
77
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets
88

0 commit comments

Comments
 (0)