 *BananaDKP*
A custom DKP addon for personal use.

BDKP was written for my guild because we were in need of something simple, and
we didn't want to manage it in any way.

It is almost completely automated, and comes with a default DKP module called
Symphony. Read more about it later.

 *Synchronization*
BDKP comes prepacked with synchronization features, so that if you have more
than 1 person running it, DKP is automatically synchronized between those
players. This means that you can have for example 3 people running it, and you
don't have to always have those people present on raids.

The synchronization is not encrypted, and it is not checked or verified in any
way, so if anyone wants to, they can easily (if they're well-versed in Lua and
Ace2) intercept the communications and modify the DKP tables to their own liking.

If someone with an older version of BDKP, or the current module joins the raid,
their BDKP will automatically be disabled, provided there is a leader set.

Synchronization is done when someone sets themselves as the current DKP stream
leader in a raid, or when the module wants it to happen. The Symphony module
requests a DKP sync after an item has been looted or whenever the hour counter
changes.

 *Modules*
BDKP supports pluggable DKP modules, which means that the default module that
comes with BDKP is optional. You can create your own module that calculates DKP
based on several events/notifications from the core of BDKP, including boss
deaths and items looted.

 *Leader*
When you form a raid, one of the people running BDKP should set himself as the
current DKP stream leader. The leader will be responsible for taking bids for
items and for choosing what items should be added to the loot tables for the
players and not, as well as controlling the options for the current DKP module.

 *About Symphony*
Named after the person who suggested the DKP method to use. Simply
put, your DKP is #hoursRaided / (1 + #itemsLooted), and it only counts epic
items or higher.

When an item is looted, Symphony will pop up a question box to the leader if the
item is of epic quality or higher, where the leader can choose to either ignore
it, or add it to that players loot table.

Symphony provides an automatic hour incrementer for the raid. When you form a
raid, set yourself as the leader and start the automatic incrementer. After 30
minutes, everyone in the raid and on the core sitout list will get +1 hour, and
then it will re-schedule another +1 after one hour, and keep doing that until
you pause it or stop it entirely.

 *Communication flow*
(it is outdated, since the communication flow is not set in stone yet - I'll
update this description when I've got something I'm happy with)

Note that the communication for BananaDKP is not secure, it can be modified
by local clients as they see fit.
This means that any DKP value that anyone has should be subject to public
inquiery at all times.

The communication could be made secure, if that is desired, by using any of
the encryption libraries available at the wowace SVN.

1. You form a new raid or join an existing one, provided you have set the
   DKP ID, go to :Init.

:Init
1. You send a global VersionPing, and wait 10 seconds for responses. If
   you don't get any, go to :Done.
2. If you got ANY response with a version that does not match your own, go
   to :Done.
3. If you got less than 3 responses, go to :Done.
4. Go to :LeaderPing.

:LeaderPing
1. You send a LeaderPing broadcast. If you get no leader response in 5
   seconds, go to :NoLeader.
2. Send a DKPSyncRequest to the leader. If you don't get any response
   in 10 seconds, set our state to failed and enable the "Get current
   leader" option. If you click that, go to :Init.
3. Go to :Done.

:NoLeader
1. If you are the raid leader or officer, the option "Set myself as leader"
   is now available. If you click that, go to :SetSelfLeader.
2. Go to :Done.

:SetSelfLeader
1. You send a SetLeader broadcast, and start a timeout of 30 seconds where
   people can either accept or reject you as the leader.
   If you get 1 or more rejects OR no accepts, you are not set as the
   leader, and go to :Done.
   If you get no rejects AND an accept, you are set as the leader.
2. Send a broadcasted DKPSyncRequest, where people respond to you in whisper
   with their DKP data, you sync it with you local table, and then send a
   DKPLeaderSync with your data, so people can update their local DKP tables
   with the global sync.
3. Go to :Done.

:Done

