Download
(3 Kb)
Download
Updated: 02-01-11 06:49 AM
Updated:02-01-11 06:49 AM
Created:01-31-11 04:20 PM
Downloads:1,052
Favorites:0
MD5:
ELootChatMonitor
Version: 1.0.1
by: Ennie [More]
ELootChatMonitor
Small library, which will help addon authors to parse CHAT_MSG_LOOT messages.

All you need to do, is define desired functions like this:
Code:
ELootChatMonitor.onLootItem = function (event, player, item_link, item_amount) end
ELootChatMonitor.onLootMoney = function (event, copper_amount) end
ELootChatMonitor.onRollChoice = function (event, player, item) end
ELootChatMonitor.onRollResult = function (event, player, item, roll) end
ELootChatMonitor.onRollFinish = function (event, player, item) end
Events:

ELOOT_LOOT_ITEM is called when any type of loot appears in chat (looted, created, player or other players)
ELOOT_LOOT_MONEY is called when player loots money from mob
ELOOT_ROLL_CHOICE_NEED is called when player or group/raid members choose to roll need on item
ELOOT_ROLL_CHOICE_GREED is called when player or group/raid members choose to roll greed on item
ELOOT_ROLL_CHOICE_DE is called when player or group/raid members choose to roll on disenchant item
ELOOT_ROLL_CHOICE_PASS is called when player or group/raid members chose to pass on item
ELOOT_ROLL_RESULT_NEED is called when need roll result appeared
ELOOT_ROLL_RESULT_GREED is called when greed roll result appeared
ELOOT_ROLL_RESULT_DE is called when disenchant roll result appeared
ELOOT_ROLL_WON is called when someone wins item
ELOOT_ROLL_ALL_PASSED is called when all party/raid members passed on item



Notes:
- player can be "me" for player, name for other players, or "all" in case of "everyone passed on ... "
- item is always chat item link. you can extract item name, quality and id from it
- copper amount is summary value, and if you loot 1 silver and 1 copper it will be 101


Known issues:
- if some of your AddOns changing _G.LOOT_MONEY_SPLIT, make sure to do it before ELootChatMonitor loading, otherwise it will not track money loot.
- this lib is only tested on ruRU game client, and needs more testing on other locales

Credits:
Big thanks to lokyst, NeedyGreedy addon author for his awesome implementation of chat_msg_loot parsing. i've just created some sort of lib, based on it.
[b]1.0.1[b]
* Fixed error with undefined event handlers
Optional Files (0)


Post A Reply Comment Options
Unread 02-01-11, 05:42 PM  
sekillu
A Murloc Raider

Forum posts: 4
File comments: 22
Uploads: 0
thank you for this library !
finally something simple, now we can expect more loot addons XD
sekillu is offline Report comment to moderator  
Reply With Quote
Unread 02-09-11, 04:09 PM  
Ennie
A Murloc Raider
 
Ennie's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 24
Uploads: 6
i am working for my own AddOn, and this lib is part from it. i plan to fully rewrite xuerian`s XLoot without ace and other unneeded things. but it still far away from release...
__________________
Ennie is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: