<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,7 +6,7 @@ if c ~= &quot;PALADIN&quot; then return end
 local Cork = Cork
 local UnitAura = UnitAura
 local SpellCastableOnUnit, IconLine = Cork.SpellCastableOnUnit, Cork.IconLine
-local ldb = LibStub:GetLibrary(&quot;LibDataBroker-1.1&quot;)
+local ldb, ae = LibStub:GetLibrary(&quot;LibDataBroker-1.1&quot;), LibStub(&quot;AceEvent-3.0&quot;)
 Cork.hasraidspell = true
 
 
@@ -67,7 +67,7 @@ local dataobj = ldb:NewDataObject(&quot;Cork Blessings&quot;, {type = &quot;cork&quot;})
 function dataobj:Init() known = {} RefreshKnownSpells() end
 
 local function Test(unit)
-	if not Cork.dbpc[&quot;Blessings-enabled&quot;] or not Cork:ValidUnit(unit, true) then return end
+	if not Cork.dbpc[&quot;Blessings-enabled&quot;] or IsResting() or not Cork:ValidUnit(unit, true) then return end
 	if not HasMyBlessing(unit) then
 		local _, class = UnitClass(unit)
 		local spell = Cork.dbpc[&quot;Blessings-&quot;..class]
@@ -78,6 +78,8 @@ end
 Cork:RegisterRaidEvents(&quot;Blessings&quot;, dataobj, Test)
 dataobj.Scan = Cork:GenerateRaidScan(Test)
 
+ae.RegisterEvent(dataobj, &quot;PLAYER_UPDATE_RESTING&quot;, &quot;Scan&quot;)
+
 
 function dataobj:CorkIt(frame)
 	RefreshKnownSpells()</diff>
      <filename>modules/PaladinBlessings.lua</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ local function Test()
 	local crusading = name and isMine == &quot;player&quot;
 
 	if mounted and not crusading then return iconline
-	elseif crusading and not mounted then
+	elseif crusading and not mounted and not IsResting() then
 		for buff in pairs(auras) do
 			local name, _, _, _, _, _, _, isMine = UnitAura(&quot;player&quot;, buff)
 			if name and isMine == &quot;player&quot; then return end</diff>
      <filename>modules/PaladinCrusaderAura.lua</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ function Cork:GenerateRaidBuffer(spellname, multispellname, icon, defaultstate)
 	end
 
 	local function Test(unit)
-		if not Cork.dbpc[spellname..&quot;-enabled&quot;] or not Cork:ValidUnit(unit) then return end
+		if not Cork.dbpc[spellname..&quot;-enabled&quot;] or IsResting() or not Cork:ValidUnit(unit) then return end
 
 		if not (UnitAura(unit, spellname) or multispellname and UnitAura(unit, multispellname)) then
 			local _, token = UnitClass(unit)
@@ -35,6 +35,9 @@ function Cork:GenerateRaidBuffer(spellname, multispellname, icon, defaultstate)
 	Cork:RegisterRaidEvents(spellname, dataobj, Test)
 	dataobj.Scan = Cork:GenerateRaidScan(Test)
 
+	ae.RegisterEvent(dataobj, &quot;PLAYER_UPDATE_RESTING&quot;, &quot;Scan&quot;)
+
+
 	if multispellname then dataobj.RaidLine = IconLine(icon, multispellname..&quot; (%d)&quot;) end
 
 </diff>
      <filename>templates/RaidBuffer.lua</filename>
    </modified>
    <modified>
      <diff>@@ -11,13 +11,14 @@ function Cork:GenerateSelfBuffer(spellname, icon)
 
 	function dataobj:Init() Cork.defaultspc[spellname..&quot;-enabled&quot;] = GetSpellInfo(spellname) ~= nil end
 
-	local function Test(unit) if Cork.dbpc[spellname..&quot;-enabled&quot;] and not UnitAura(&quot;player&quot;, spellname) then return iconline end end
-
-	LibStub(&quot;AceEvent-3.0&quot;).RegisterEvent(&quot;Cork &quot;..spellname, &quot;UNIT_AURA&quot;, function(event, unit) if unit == &quot;player&quot; then dataobj.player = Test() end end)
+	local function Test(unit) if Cork.dbpc[spellname..&quot;-enabled&quot;] and not UnitAura(&quot;player&quot;, spellname) and not IsResting() then return iconline end end
 
 	function dataobj:Scan() self.player = Test() end
 
 	function dataobj:CorkIt(frame)
 		if self.player then return frame:SetManyAttributes(&quot;type1&quot;, &quot;spell&quot;, &quot;spell&quot;, spellname, &quot;unit&quot;, &quot;player&quot;) end
 	end
+
+	ae.RegisterEvent(&quot;Cork &quot;..spellname, &quot;UNIT_AURA&quot;, function(event, unit) if unit == &quot;player&quot; then dataobj.player = Test() end end)
+	ae.RegisterEvent(dataobj, &quot;PLAYER_UPDATE_RESTING&quot;, &quot;Scan&quot;)
 end</diff>
      <filename>templates/SelfBuffer.lua</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@ function Cork:GenerateAdvancedSelfBuffer(modulename, spellidlist)
 	end
 
 	local function Test()
-		if Cork.dbpc[modulename..&quot;-enabled&quot;] then
+		if Cork.dbpc[modulename..&quot;-enabled&quot;] and not IsResting() then
 			for _,buff in pairs(buffnames) do
 				local name, _, _, _, _, _, _, isMine = UnitAura(&quot;player&quot;, buff)
 				if name and isMine then return end
@@ -42,8 +42,6 @@ function Cork:GenerateAdvancedSelfBuffer(modulename, spellidlist)
 		end
 	end
 
-	LibStub(&quot;AceEvent-3.0&quot;).RegisterEvent(&quot;Cork &quot;..modulename, &quot;UNIT_AURA&quot;, function(event, unit) if unit == &quot;player&quot; then dataobj.player = Test() end end)
-
 	function dataobj:Scan() self.player = Test() end
 
 	function dataobj:CorkIt(frame)
@@ -52,6 +50,9 @@ function Cork:GenerateAdvancedSelfBuffer(modulename, spellidlist)
 		if self.player then return frame:SetManyAttributes(&quot;type1&quot;, &quot;spell&quot;, &quot;spell&quot;, spell, &quot;unit&quot;, &quot;player&quot;) end
 	end
 
+	ae.RegisterEvent(&quot;Cork &quot;..modulename, &quot;UNIT_AURA&quot;, function(event, unit) if unit == &quot;player&quot; then dataobj.player = Test() end end)
+	ae.RegisterEvent(dataobj, &quot;PLAYER_UPDATE_RESTING&quot;, &quot;Scan&quot;)
+
 
 	----------------------
 	--      Config      --</diff>
      <filename>templates/SelfBufferAdvanced.lua</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bb34f3465df634f0656dedca6e46d56a43bfe4aa</id>
    </parent>
  </parents>
  <author>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </author>
  <url>http://github.com/tekkub/cork/commit/6511d4469da8971f53c40aa0f8023ac4636e6e4f</url>
  <id>6511d4469da8971f53c40aa0f8023ac4636e6e4f</id>
  <committed-date>2009-05-19T22:33:00-07:00</committed-date>
  <authored-date>2009-05-19T22:33:00-07:00</authored-date>
  <message>Make buffer modules hide when in town (resting)</message>
  <tree>6019c039d53e0d6e0abbb94c403095c4bffa5d0d</tree>
  <committer>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </committer>
</commit>
