@@ -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}
3743local 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" )
0 commit comments