nehtik / epgp

Automatically exported from code.google.com/p/epgp
0 stars 0 forks source link

Recurring award sometimes stops after release & run back #425

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start recurring award let it tick 
2. die in Ulduar - easy :)
3. release and re-enter instance

What is the expected output? What do you see instead?

Not 100% repeatable but very frequently the recurring award is simply
unticked. 

What version of the product are you using? What locale is your client (en,
ru, kr, ch, es, tw)? What other addons do you have installed and what
versions?

I'm using the en Client, I have over 200 other addons installed so rather
too many to list, however I'm an active addon developer and thus have
various diagnostic tools installed. I'd therefore be very happy to assist
in tracking down the issue if you can point me where best to start looking.

Paste the text surrounded by -EPGP- in Guild Information here:
-EPGP-
@DECAY_P:10
@EXTRAS_P:25
@MIN_EP:10000
@BASE_GP:100
-EPGP-

Please provide any additional information below.

It would be useful on fixing this defect to implement an optional warning
on entering a raid zone if EPGP recurring award is not active. I was
thinking of knocking up a FuBar_EPGPFu plugin which would show time to next
recurring award on FuBar, and click to open EPGP window. I can release this
to you for inclusion in the project if you desire. 

Original issue reported on code.google.com by ShammyLe...@gmail.com on 22 May 2009 at 3:53

GoogleCodeExporter commented 8 years ago
FuBar_EPGPFu?? Where?? I desire!!!!

Original comment by magokim...@gmail.com on 22 May 2009 at 9:35

GoogleCodeExporter commented 8 years ago
I have the same problem.
Recurring awards untick itself, but still the addon shows "next recurring award 
in ... minutes" and the number of minutes does not count down.

Original comment by vald...@poczta.onet.pl on 28 May 2009 at 9:21

GoogleCodeExporter commented 8 years ago
I'll create a Curse.com project and upload FuBar_EPGPFu there. It works well at
present and is a really easy way of checking that this problem exists.

My observations, when you release the box gets unticked and the countdown on 
the EPGP
frame stalls. I've been planning on adding some debug code to test a theory 
however I
suspect its due to this code in the epgp module at line 886

        -- Check if we have a recurring award we can resume
        if EPGP:CanResumeRecurringEP() then
          EPGP:ResumeRecurringEP()
        else
          EPGP:CancelRecurringEP()
        end

This fires on a GUILD_ROSTER_UPDATE since the zone is changing outside instance 
->
inside instance this event should be firing. I suspect that something in
CanResumeRecurringEP is not correct.

The function is :
function EPGP:CanResumeRecurringEP()
  local vars = EPGP.db.profile
  local now = GetTime()
  if not vars.next_award then return false end

  -- Now check if we only missed at most one award period.
  local period_secs = vars.recurring_ep_period_mins * 60
  if vars.next_award + period_secs < now or vars.next_award > now then
    return false
  end
  return true
end

the bit that looks suspect is the "or vars.next_award > now" is it not expected 
that
the next award will be later than now? If so its returning false and thus 
calling
CancelRecurringEP() 

It could also be in LibGuildStorage-1.0.lua as there there are checks on 
function 

lib:IsCurrentState()
  return state == "CURRENT"
end

yet when GUILD_ROSTER_UPDATE is fired then the state is changed from CURRENT.

If I can help debug this further I will, my suspicion is that its to do with 
some
event firing possibly GUILD_ROSTER_UPDATE that's causing state to change and is
cancelling the recurring flag.

Note that GUILD_ROSTER_UPDATE might not fire if you entered and left the 
instance
fairly quickly as there would be no registered change. Or it might be it fires 
if
someone releases early (on a wipe call for instance) and attempts to get back 
into
the instance whilst the encounter is still technically in progress, in which 
case
they are thrown out back to outside the raid which would fire a 
GUILD_ROSTER_UPDATE.

Hope this helps.

Original comment by ShammyLe...@gmail.com on 29 May 2009 at 1:04

GoogleCodeExporter commented 8 years ago
This bug happens to me too, pretty mcuh every time I am managing the EP for a 
raid. 
I end up working around it by just doing manual EP rewards.

Original comment by nelfish....@gmail.com on 2 Jun 2009 at 6:37

GoogleCodeExporter commented 8 years ago
To further clarify, though the subject states it is the issue with 5.4.8 
version, 
i'm using the newest one (5.4.9) and still encountering this bug.

My settings:

-EPGP-
@DECAY_P:10
@MIN_EP:7000
@BASE_GP:200
-EPGP-

I'm using english version of the client, together with EPGP LootMaster, X-perl, 
DBM, 
Grim Reaper, Recount.
I'm also the only one in raid giving EP awards, and charging GP.

Original comment by vald...@poczta.onet.pl on 4 Jun 2009 at 10:15

GoogleCodeExporter commented 8 years ago
Can you try this patch and let me know if it works?

Index: epgp_recurring.lua
====================================================
===============
--- epgp_recurring.lua  (revision 1230)
+++ epgp_recurring.lua  (working copy)
@@ -91,12 +91,13 @@
   local now = GetTime()
   if not vars.next_award then return false end

-  -- Now check if we only missed at most one award period.
   local period_secs = vars.recurring_ep_period_mins * 60
-  if vars.next_award + period_secs < now or vars.next_award > now then
-    return false
+  local last_award = vars.next_award - period_secs
+  local next_next_award = vars.next_award + period_secs
+  if last_award < now and now < next_next_award then
+    return true
   end
-  return true
+  return false
 end

 function EPGP:CancelRecurringEP()

Original comment by evlogimenos on 6 Jun 2009 at 9:56

GoogleCodeExporter commented 8 years ago
If you checkout latest trunk can you verify that his is working properly?

Original comment by evlogimenos on 6 Jun 2009 at 10:38

GoogleCodeExporter commented 8 years ago
I am marking this as fixed. Please reopen if it is still a problem.

Original comment by evlogimenos on 11 Jun 2009 at 7:47

GoogleCodeExporter commented 8 years ago

Original comment by evlogimenos on 11 Jun 2009 at 7:51