evil-morfar / RCLootCouncil2

RCLootCouncil - addon for World of Warcraft
https://rclootcouncil.com
GNU Lesser General Public License v3.0
19 stars 29 forks source link

Award Checking #78

Closed SafeteeWoW closed 6 years ago

SafeteeWoW commented 6 years ago

Mostly done. Award checking is done by LOOT_SLOT_CLEARED event.

ML:Award normally returns nil when award success. Now use a callback solution to communicate between ML:Award and PopupOnClickYes. I think this solution is very clean.

SafeteeWoW commented 6 years ago

Haven't fully tested this yet, but the code structure should be finalized. comment? The most significant change is that ML:Award now has a callback which is called as soon as the award result is known. This is convenient than message because I can do stuff as if the function is a synchronized call. I clean up a lot of duplicate code.

SafeteeWoW commented 6 years ago

Should we disable award items for awarded session in direct mode? Consider the case where every item is identical.

SafeteeWoW commented 6 years ago
evil-morfar commented 6 years ago

Haven't fully tested this yet, but the code structure should be finalized. comment?

Seems nice. We should really use some of the reasons from :CanGiveLoot() as responses in the votingFrame (instead of the current "Offline/not installed"). This will break backwards compability though.

Should we disable award items for awarded session in direct mode? Consider the case where every item is identical.

I'm not sure what you mean. Are you talking about awarding an item that has already been awarded? That should be handled in the voting frame (which I thought it already was) so it isn't an option for the ML. Edit: It is now ecc69f10d0284914957f2202459884b3395a2747.

evil-morfar commented 6 years ago

There's no need to complicate functions with things they shouldn't handle. I.e. ML:Award() should attempt to award items, and while it could deny already awarded items, it's better to just not give the user the option to award already awarded options. This helps to keep the coupling low, which in turn makes for better readability and better debugging.

SafeteeWoW commented 6 years ago
SafeteeWoW commented 6 years ago

Several commands need to be added to support the new award later feature and I haven't added yet. I'm bugfixing the current features.

SafeteeWoW commented 6 years ago

I should have cleared most of the bugs by far. I just need to add several more commands

SafeteeWoW commented 6 years ago
SafeteeWoW commented 6 years ago

I just need to do some locale clean up and more testing right now.

evil-morfar commented 6 years ago

I changed these 9b63e8c8312ebdb971bdab4e319138c2d6cfe6f3

evil-morfar commented 6 years ago

Can you confirm I covered all the changes of this PR? 4a47718927bb131bf1fcb3e9dc62e6a3d8672ed6

evil-morfar commented 6 years ago

@SafeteeWoW