1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
--------------------------------------
--Group List Manager
--------------------------------------
GROUP_LIST_MANAGER = nil
return manager
end
end
end
-- During group invitation, we can receive a lot of event spam at once on a single invite when the
--involved players are at the same location. Add a delay so we only refresh once in cases like this.
end
end
end
end
end
end
if ( wasLocalPlayer ) then
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnUnitCreated" , EVENT_UNIT_CREATED , function ( event , ... ) OnUnitCreated ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnUnitDestroyed" , EVENT_UNIT_DESTROYED , function ( event , ... ) OnUnitDestroyed ( ... ) end )
--We don't need to handle EVENT_GROUP_MEMBER_JOINED since EVENT_UNIT_CREATED will also occur
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnGroupMemberLeft" , EVENT_GROUP_MEMBER_LEFT , function ( event , ... ) OnGroupMemberLeft ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnLevelUpdate" , EVENT_LEVEL_UPDATE , function ( event , ... ) OnLevelUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnVeteranRankUpdate" , EVENT_VETERAN_RANK_UPDATE , function ( event , ... ) OnVeteranRankUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnZoneUpdate" , EVENT_ZONE_UPDATE , function ( event , ... ) OnZoneUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnGroupMemberRolesChanged" , EVENT_GROUP_MEMBER_ROLES_CHANGED , function ( event , ... ) OnGroupMemberRolesChanged ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnGroupMemberConnectedStatus" , EVENT_GROUP_MEMBER_CONNECTED_STATUS , function ( event , ... ) OnGroupMemberConnectedStatus ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnLeaderUpdate" , EVENT_LEADER_UPDATE , function ( event , ... ) OnLeaderUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnGroupUpdate" , EVENT_GROUP_UPDATE , function ( event , ... ) OnGroupUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnPlayerActivated" , EVENT_PLAYER_ACTIVATED , function ( event , ... ) OnPlayerActivated ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( "ZO_GroupList_OnGroupMemberAccountNameUpdated" , EVENT_GROUP_MEMBER_ACCOUNT_NAME_UPDATED , function ( event , ... ) OnGroupMemberAccountNameUpdated ( ... ) end )
end
if unitTag then
local userFacingCharacterName = ( not IsConsoleUI ( ) or unitOnline ) and rawCharacterName or GetString ( SI_GAMEPAD_GROUP_MEMBER_OFFLINE )
local status = unitOnline and PLAYER_STATUS_ONLINE or PLAYER_STATUS_OFFLINE
index = i ,
unitTag = unitTag ,
rawCharacterName = rawCharacterName ,
zone = zoneName ,
online = unitOnline ,
isDps = isDps ,
isHeal = isHeal ,
isTank = isTank ,
displayName = displayName ,
userFacingDisplayName = userFacingDisplayName ,
status = status ,
isGroup = true ,
}
end
end
end
end
--Globals
do
if groupIndex and groupIndex >= 1 and groupIndex <= GROUP_SIZE_MAX then
else
end
end , } )
return groupUnitTags [ unitTag ] ~= false
end
return groupUnitTags [ unitTag ] or nil
end
local groupIndices = { }
return groupIndices [ groupIndex ]
end
for i = 1 , GROUP_SIZE_MAX do
groupIndices [ i ] = "group" .. i
end
end |