Skip to content

DKP pools (MultiDKP) management #7

Description

@avandenberghe

Summary

Implement DKP pool management. A pool groups events and defines a separate DKP economy (e.g. "10-man raids", "25-man raids", "PvP").

Features

  • CRUD for DKP pools
  • Associate events to pools (M:N)
  • Associate item pools to DKP pools
  • Default pool per guild
  • Pool standings view: ranked list of members by net DKP
  • Pool summary: total earned, spent, adjustments per member

Schema

bb_dkp_pools

Column Type Description
pool_id INT PK AUTO
pool_name VARCHAR(255)
pool_desc VARCHAR(255)
guild_id INT FK to bb_guild

bb_dkp_pool_events

Column Type Description
pool_id INT FK
event_id INT FK to bb_dkp_events

Standings calculation

With the transaction ledger (#3), standings are calculated as:

SELECT player_id,
       SUM(CASE WHEN account IN ('earned','time_bonus','raid_bonus') THEN amount ELSE 0 END) AS total_earned,
       SUM(CASE WHEN account = 'spent' THEN amount ELSE 0 END) AS total_spent,
       SUM(CASE WHEN account = 'adjustment' THEN amount ELSE 0 END) AS total_adjustments,
       SUM(amount) AS net_dkp
FROM bb_dkp_transactions
WHERE pool_id = ?
GROUP BY player_id
ORDER BY net_dkp DESC

For EP/GP systems, the priority ratio is simply total_earned / ABS(total_spent).

Reference

  • Old bbDKP: acp_dkp_mdkp.php, controller/points/Pool.php
  • EQdkp Plus: admin/manage_multidkp.php

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions