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
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
Schema
bb_dkp_poolspool_idpool_namepool_descguild_idbb_guildbb_dkp_pool_eventspool_idevent_idbb_dkp_eventsStandings calculation
With the transaction ledger (#3), standings are calculated as:
For EP/GP systems, the priority ratio is simply
total_earned / ABS(total_spent).Reference
acp_dkp_mdkp.php,controller/points/Pool.phpadmin/manage_multidkp.php