Greetings!
Is there any way to mod EPGP addon to make it award multiplied amount of EP to some predefined list of players? So for example if I enter 100 EP to such player the addon awards 150 EP. If I fire mass award, everyone get 100 EP but such player get 150.
I try to award some raiders for stable attendance and good play by giving them more EP. Doing a mass award and then awarding bonus EPs to that players is such a pain so I want to slightly automate it. I tried digging into scripts but I am not programmer. I will solve that problem for days while maybe someone can solve it within 2 minutes
Thanks in advance for your suggestions.
- - - Updated - - -
Will it work?
Original:
Code:
function EPGP:IncEPBy(name, reason, amount, mass, undo)
* -- When we do mass EP or decay we know what we are doing even though
* -- CanIncEPBy returns false
* assert(EPGP:CanIncEPBy(reason, amount) or mass or undo)
* assert(type(name) == "string")
* local ep, gp, main = self:GetEPGP(name)
* if not ep then
*** self:Print(L["Ignoring EP change for unknown member %s"]:format(name))
*** return
* end
* amount = AddEPGP(main or name, amount, 0)
* if amount then
*** callbacks:Fire("EPAward", name, reason, amount, mass, undo)
* end
* self.db.profile.last_awards[reason] = amount
* return main or name
end
Mod:
Code:
function EPGP:IncEPBy(name, reason, amount, mass, undo)
* -- When we do mass EP or decay we know what we are doing even though
* -- CanIncEPBy returns false
* assert(EPGP:CanIncEPBy(reason, amount) or mass or undo)
* assert(type(name) == "string")
* local ep, gp, main = self:GetEPGP(name)
* if not ep then
*** self:Print(L["Ignoring EP change for unknown member %s"]:format(name))
*** return
* end
* local privelege = {"Buddy1", "Buddy2"}
* local priveleged = false
* for i = 1, #privelege do
*** if privelege* == main or privelege* == name then
***** priveleged = true
***** break
*** end
* end
* if priveleged then
*** amount = AddEPGP(main or name, amount * 2, 0)
* else
*** amount = AddEPGP(main or name, amount, 0)
* end
* if amount then
*** callbacks:Fire("EPAward", name, reason, amount, mass, undo)
* end
* self.db.profile.last_awards[reason] = amount
* return main or name
end