nehtik / epgp

Automatically exported from code.google.com/p/epgp
0 stars 0 forks source link

Problem with standby list #418

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.RL and officer A have the epgp addon. RL start rescue.
2.Player A Wisp RL, Player B Wisp Officer A. All receveid message for 
stand by list.
3.Player A receveid EP, but not Player B

Only the RL decides who can be in the standby list, Shif click on player. 
Only these player will receive wisper that a notification they that they 
are in the list. Every time that the raid takes EP, only player in list 
takes EP and will receive a wisp that notification they that they must 
send back to the RL the wisp of confirmation in order to remain in list. 
If the player in list grup any raid they must automatically exit from the 
list.

What is the expected output? What do you see instead?

What version of the product are you using? What locale is your client (en,
ru, kr, ch, es, tw)? What other addons do you have installed and what
versions?
EPGP version 5.4.8

Paste the text surrounded by -EPGP- in Guild Information here:

-EPGP-
@BASE_GP:10
@DECAY_P:10
@MIN_EP:2000
@EXTRAS_P:100
-EPGP-

If this is about http://epgpweb.appspot.com integration, what is the realm
and region of your guild?

Raveholdth EU server. My Guild is Ðeus lo Vult, www.deuslovult.it

Please provide any additional information below.

Original issue reported on code.google.com by magokim...@gmail.com on 12 May 2009 at 1:31

GoogleCodeExporter commented 8 years ago
This is as expected. The announce whisper goes to a channel by one player, the 
RL. If
you whisper random Officer X you should not get EP. At least I do not see why 
you should.

Original comment by evlogimenos on 12 May 2009 at 3:15

GoogleCodeExporter commented 8 years ago
OK i insert in the code the check for this...
Only RL insert the player for first in Standby List, when the player wisp epgp 
standby and him aren't in standby list receveid the wisp " name player is not 
eligible for EP awards".

in epgp.lua
[code]
local global_config = {}
local ep_data = {}
local gp_data = {}
local main_data = {}
local alt_data = {}
local ignored = {}
local db
local standings = {}
local selected = {}
selected._count = 0  -- This is safe since _ is not allowed in names
local RLselected = {}  -- Insert new variable...

-- Insert 3 new Function
function EPGP:RLSelectMember(name)
  RLselected[name] = true
  return true
end

function EPGP:RLDeSelectMember(name)
  RLselected[name] = false
  return true
end

function EPGP:RLInsertInStandByList(name)
  if RLselected[name] then
    return true
  end
  return false
end
[/code]

in ui.lua
[code]
-- Make all our rows have a check on them and setup the OnClick
  -- handler for each row.
  for i,r in ipairs(rowFrame.rows) do
    r.check = r:CreateTexture(nil, "BACKGROUND")
    r.check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
    r.check:SetWidth(r:GetHeight())
    r.check:SetHeight(r:GetHeight())
    r.check:SetPoint("RIGHT", r.cells[1])

    r:RegisterForClicks("LeftButtonDown")
    r:SetScript(
      "OnClick",
      function(self, value)
        if IsModifiedClick("QUESTWATCHTOGGLE") then
          if self.check:IsShown() then
            EPGP:DeSelectMember(self.name)
            EPGP:RLDeSelectMember(self.name)  -- insert call new function
          else
            EPGP:SelectMember(self.name)
            EPGP:RLSelectMember(self.name)  -- insert call new function
          end
        else
          if EPGPSideFrame.name ~= self.name then
            self:LockHighlight()
            EPGPSideFrame:Hide()
            EPGPSideFrame.name = self.name
          end
          ToggleOnlySideFrame(EPGPSideFrame)
        end
      end)
[/code]

in whisper.lua
[code]
function mod:CHAT_MSG_WHISPER(event_name, msg, sender)
  if not UnitInRaid("player") then return end
  if not msg:match("epgp standby") then return end

  local member = msg:match("epgp standby ([^ ]+)")
  if member then
    member = member:sub(1,1):upper()..member:sub(2):lower()
  else
    member = sender
  end

  senderMap[member] = sender

  if not EPGP:GetEPGP(member) then
    SendChatMessage(L["%s is not eligible for EP awards"]:format(member),
                    "WHISPER", nil, sender)
  elseif EPGP:IsMemberInAwardList(member) then
    SendChatMessage(L["%s is already in the award list"]:format(member),
                    "WHISPER", nil, sender)
  elseif not EPGP:RLInsertInStandByList(member) then
    SendChatMessage(L["%s is not eligible for EP awards"]:format(member),
                    "WHISPER", nil, sender) -- insert new check
  else
    EPGP:SelectMember(member)
    SendChatMessage(L["%s is added to the award list"]:format(member),
                    "WHISPER", nil, sender)
  end
end
[/code]

Original comment by magokim...@gmail.com on 24 May 2009 at 4:15

GoogleCodeExporter commented 8 years ago
Can you provide this as a diff? It is quite hard to follow what changed you 
made.

Original comment by evlogimenos on 24 May 2009 at 9:48

GoogleCodeExporter commented 8 years ago
The RL decides who is in Standby list, from then on only who has been admitted 
can 
wisp and enter in the list after the eward of the EP!

Example:

RL Decides Player A is on StandBY List, but not Player B.
Player A Whisp RL and receveid Whisp "Player A is alredy in the award list"
Player B Whisp RL and receveid Whisp "Player B is not eligible for EP awards"
Raid and Player A awared EP.
Player A receveid Whisp "exit the award list"
Player A Whisp RL and receveid Whisp "Player A is now in award list"
Player B Whisp RL and receveid Whisp "Player B is not eligible for EP awards"

Only the player chosen of RL can enter in standby list!

Original comment by magokim...@gmail.com on 24 May 2009 at 11:25