Skip to content

Commit

Permalink
Move april fools joke to ClassicCastbars_Options, and disable it in r…
Browse files Browse the repository at this point in the history
…aids (#47)
  • Loading branch information
wardz committed Apr 1, 2021
1 parent d890695 commit 40b52d5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ read_globals = {
"UnitExists",
"STANDARD_TEXT_FONT",
"UnitIsDeadOrGhost",
"IsInRaid",
"CreateFramePool",
"DoEmote",
"date",
Expand Down
8 changes: 0 additions & 8 deletions ClassicCastbars/core/PoolManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,3 @@ end
print(format("Created %d frames in total.", framesCreated))
print(format("Currently active frames: %d.", framesActive))
end]]

if date("%d.%m") == "01.04" then -- April Fools :)
C_Timer.After(1800, function()
if not UnitIsDeadOrGhost("player") then
DoEmote(math.random(0, 1) == 1 and "fart" or "nosepick")
end
end)
end
8 changes: 8 additions & 0 deletions ClassicCastbars_Options/TestMode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,11 @@ TestMode:SetScript("OnEvent", function(self)
C_Timer.After(0.2, TestMode.ReanchorOnNameplateTargetSwitch)
end
end)

if date("%d.%m") == "01.04" then -- April Fools :)
C_Timer.After(1800, function()
if not UnitIsDeadOrGhost("player") and not IsInRaid() then
DoEmote(math.random(0, 1) == 1 and "fart" or "nosepick")
end
end)
end
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v1.3.21:
- Disable april fools joke while in raids. You can also now manually disable it by toggling ClassicCastbars_Options off.


v1.3.20:
- Minor hacky fix for player castbar color conflict with other addons.

Expand Down

0 comments on commit 40b52d5

Please sign in to comment.