ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Need clarification for GROUP_LEAVE_REASON_* globals (https://www.esoui.com/forums/showthread.php?t=5206)

CaptainBlagbird 10/10/15 03:55 PM

Need clarification for GROUP_LEAVE_REASON_* globals
 
Can anyone help me on this?:

GROUP_LEAVE_REASON_KICKED
Leader kicked member from group.

GROUP_LEAVE_REASON_VOLUNTARY
Member left group.

GROUP_LEAVE_REASON_DISBAND
One member of a 2-player group left. Or is there an option to disband a group?

GROUP_LEAVE_REASON_DESTROYED
??

sirinsidiator 10/10/15 05:17 PM

There is an option to disband a group, but I never heard of a group getting destroyed (besides in pvp by other players :p).
The case is handled in alerthandlers.lua even though nothing is done, so it seems to be in the game at least.
Maybe it is something a game master can do?

Lua Code:
  1. if reason == GROUP_LEAVE_REASON_DISBAND then
  2.             if isLeader and not isLocalPlayer then
  3.                 if nameToShow ~= "" then
  4.                     message = zo_strformat(SI_GROUP_NOTIFICATION_GROUP_DISBANDED, nameToShow)
  5.                 end
  6.             end
  7.  
  8.             sound = SOUNDS.GROUP_DISBAND
  9.         elseif reason == GROUP_LEAVE_REASON_KICKED then
  10.             if isLocalPlayer then
  11.                 message = SI_GROUP_NOTIFICATION_GROUP_SELF_KICKED
  12.             else
  13.                 if nameToShow ~= "" then
  14.                     message = zo_strformat(GetString("SI_GROUPLEAVEREASON", reason), nameToShow)
  15.                 end
  16.             end
  17.  
  18.             sound = SOUNDS.GROUP_KICK
  19.         elseif reason == GROUP_LEAVE_REASON_VOLUNTARY then
  20.             if not isLocalPlayer then
  21.                 if nameToShow ~= "" then
  22.                     message = zo_strformat(GetString("SI_GROUPLEAVEREASON", reason), nameToShow)
  23.                 end
  24.             end
  25.  
  26.             sound = SOUNDS.GROUP_LEAVE
  27.         elseif reason == GROUP_LEAVE_REASON_DESTROYED then
  28.             --do nothing, we don't want to show additional alerts for this case
  29.         end

circonian 10/10/15 06:47 PM

Quote:

Originally Posted by CaptainBlagbird (Post 23824)
GROUP_LEAVE_REASON_KICKED

User was kicked from the group

Quote:

Originally Posted by CaptainBlagbird (Post 23824)
GROUP_LEAVE_REASON_VOLUNTARY

Fires on YOUR client whenever you voluntarily leave the group or when another member leaves the group AND there is still a group left (so there were more than 2 ppl). Otherwise, if there were only two people and the other person left you will receive a GROUP_LEAVE_REASON_DISBAND for both members.

Quote:

Originally Posted by CaptainBlagbird (Post 23824)
GROUP_LEAVE_REASON_DESTROYED

When your client has already left the group via leaving or getting kicked (not due to a group disband) this reason is received by your client for every other group member.


Quote:

Originally Posted by CaptainBlagbird (Post 23824)
GROUP_LEAVE_REASON_DISBAND
One member of a 2-player group left. Or is there an option to disband a group?

Fires when the leader disbands the group (yes there is an option for that)
or In a 2 member group, if the OTHER person leaves, YOU will receive a disband reason for both members.
*Note: the user who left will receive a GROUP_LEAVE_REASON_VOLUNTARY for themselves and a GROUP_LEAVE_REASON_DESTROYED for the other person.

CaptainBlagbird 10/11/15 05:50 AM

Thank you!

sirinsidiator 10/11/15 07:46 AM

I added this to the wiki. Feel free to edit it in case I got something wrong.


All times are GMT -6. The time now is 12:50 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI