tropicdome/MyPetBattle — pull request #31 by joevt (2013-08-25 20:53:17+00:00)
Title: More sort options, better team matching communication

There were two sort methods when choosing pets for team matching:
0: rarity, leveldiff, level
1: leveldiff, rarity, level
I've added a third sort method which is useful when you want to use
lower level uncommon pets for getting more player XP when you've run
out of lower level (less than level 21) rare pets to fight agains the
other player's level 25 pet.
2: level, leveldiff, rarity

Additional sorting options can be added by editing the sort method drop
down button and the GetSortFunction function.

Renamed "MPB Options Panel" to "My Pet Battle" to make it more
consistant with the other addons listed in the interface options panel.

Made the initial Set Team to occur when the first
UPDATE_SUMMONPETS_ACTION event is received. This should happen when the
Pet Journal is ready to be used which means Set Team should no longer
fail the first time.

Removed the random number of attacks that occur when My Pet Battle does
not have the enabled option but does have the win trading option.

My Pet Battle won't try to change pet (when a pet dies) and cast a
spell in a single PET_BATTLE_PET_ROUND_PLAYBACK_COMPLETE event.

Fixed the "Would be casting" message. This is displayed when Enable is
checked and debug is enabled.

An appropriate message is displayed every time the queue is joined or
left and also every time a match is accepted or declined. These should
help track down queueing issues or prove it's not my fault!

When a player receives Set Team messages from the win-trading partner
and the player has "WT" enabled with "WT match levels" and the player
is not in battle and is not currently setting the team then the player
will leave the queue if they're queued and they will do a Set Team to
match the win-trading partner's team. If a player receives such
messages from a partner that has "Join PvP" enabled, then the player
will have its "Join PvP" option enabled as well.

When a player accepts a battle, it will send it's team list (species
and level of each slot) to the win trading partner. The win trading
partner will forfeit the match immediately if the team they see is not
the same. This is useful if you don't want to waste time battling a
human who will probably beat you and take more than 55 seconds to do
that.

Added a two second delay between declining a match and rejoining the
queue.

Added a two second delay between leaving the queue and rejoining the
queue.

The stopwatch is displayed when auto forfeit is enabled to show when
the auto-forfeit will occur even if win trade is not enabled.

Checking "Join PvP" will not cause Set Team to restart if Set Team is
already in progress.