Conditions in Automatic points adjustment calculation functions not working as intended

  • Hello, first of all thank you for this great tool! Myself and my guild really love it.


    We have an automatic "Decay on current" point adjustment setup to decay everyone's dkp by 15% every week. I would like this to stop during a two week period during the holidays, since we had a very hecktik raid schedule and our raids were soft reserve raids those weeks, not dkp.


    Here is the calculation function I am trying to use :

    ( ref_date >= 1577077200000 && ref_date <= 1578286800000) ? value : ( value * 0.85)

    However, when I save this function the page ends up in error state, and If i do look at public_html/data/eqdkp/apa/func_NoXmasDecay.func.php I can see that there was an error saving the formula, the : between the two values is missing, like so :

    ( ref_date >= 1577077200000 && ref_date <= 1578286800000) ? value ( value * 0.85)

    If i change it in the php file and reload the page the error is gone, but the function doesnt seem to work, it's always decaying even during the time window specified in the function. If i try to inverse the condition, it does the opposite and never decays.

    FYI those timestamps correspond to dec 23rd 2019 and jan 6th 2020.

    Help here would be appreciated! Thank you!

  • I found another way to fix my issue, I applied two one-time adjustments of value * 1.1764 and we're back to pre-holiday values. It doesnt fix the issue with the conditions but it fixes my issue of not decaying during holidays

  • The timestamps are not valid unix timestamps, as they include milliseconds.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!