Inconsistent use of multidkp pool id in APA?

  • Bug-ID: #1763 - Product: EQdkp-Plus Core


    We use two DKP pools and had trouble getting automatic adjustments working correctly. It seemed as if it would always pull the value from the default/main pool and use that for the secondary pool.


    Looking into the code for apa_decay_current.class.php I noticed what looked like potentially problematic use of dkp_id in get_value(). Sometimes it uses $dkp_id and sometimes it uses $data['dkp_id']. It looks like most callsites for this function would pass in array() for $data, which may make it use the wrong DKP pool for certain calculations.

  • Both Values should have the same content.

    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

  • The below code is from pdh_r_adjustment.class.php

    Code
    1. public function get_value($adj_id, $dkp_id=0, $date=0) {
    2. if($dkp_id) {
    3. if(!isset($this->decayed[$dkp_id])) $this->decayed[$dkp_id] = $this->apa->is_decay('adjustment', $dkp_id);
    4. if($this->decayed[$dkp_id]) {
    5. $data = array('id' => $adj_id, 'value' => $this->objPagination->get($adj_id, 'adjustment_value'), 'date' => $this->get_date($adj_id));
    6. $val = $this->apa->get_value('adjustment', $dkp_id, $date, $data);
    7. }
    8. }
    9. return (isset($val)) ? $val : $this->objPagination->get($adj_id, 'adjustment_value');
    10. }

    In this snippet don't they logically have to be different? It won't enter this code unless $dkp_id is nonzero, but it will not create a dkp_id entry in $data.


    get_value() in auto_point_adjustments.class.php defaults to an empty $data but may potentially be called with a non-zero $dkp_id, also.

  • You are using current decay. Therefore the decay is handled on the current function.

    But you are talking about adjustments, which are handled by the RIA Decay. And the RIA decay does not make use of the dkp_id. Therefore it is correct.

    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

  • But you know that you have multiple events assigned to both Multidkp-Pools? Therefore the Points from the Raids are added to both pools. That is why Hestia e.g. has the same values for Earned for both pools.

    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