Thread Tools Display Modes
10/10/15, 03:55 PM   #1
CaptainBlagbird
 
CaptainBlagbird's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 53
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
??
  Reply With Quote
10/10/15, 05:17 PM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
There is an option to disband a group, but I never heard of a group getting destroyed (besides in pvp by other players ).
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
  Reply With Quote
10/10/15, 06:47 PM   #3
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by CaptainBlagbird View Post
GROUP_LEAVE_REASON_KICKED
User was kicked from the group

Originally Posted by CaptainBlagbird View Post
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.

Originally Posted by CaptainBlagbird View Post
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.


Originally Posted by CaptainBlagbird View Post
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.

Last edited by circonian : 10/10/15 at 06:53 PM.
  Reply With Quote
10/11/15, 05:50 AM   #4
CaptainBlagbird
 
CaptainBlagbird's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 53
Thank you!
  Reply With Quote
10/11/15, 07:46 AM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
I added this to the wiki. Feel free to edit it in case I got something wrong.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Need clarification for GROUP_LEAVE_REASON_* globals


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off