private void GroupTitlesHandler(Packet packet, Simulator simulator)
{
if (OnGroupTitles != null)
{
GroupTitlesReplyPacket titles = (GroupTitlesReplyPacket)packet;
Dictionary<UUID, GroupTitle> groupTitleCache = new Dictionary<UUID, GroupTitle>();
foreach (GroupTitlesReplyPacket.GroupDataBlock block in titles.GroupData)
{
GroupTitle groupTitle = new GroupTitle();
groupTitle.GroupID = titles.AgentData.GroupID;
groupTitle.Title = Utils.BytesToString(block.Title);
groupTitle.Selected = block.Selected;
groupTitleCache[block.RoleID] = groupTitle;
}
try { OnGroupTitles(groupTitleCache); }
catch (Exception e) { Logger.Log(e.Message, Helpers.LogLevel.Error, Client, e); }
}
}