コード例 #1
0
        private void GroupTitlesHandler(Packet packet, Simulator simulator)
        {
            GroupTitlesReplyPacket titles = (GroupTitlesReplyPacket)packet;

            Dictionary <LLUUID, GroupTitle> groupTitleCache = new Dictionary <LLUUID, GroupTitle>();

            foreach (GroupTitlesReplyPacket.GroupDataBlock block in titles.GroupData)
            {
                GroupTitle groupTitle = new GroupTitle();

                groupTitle.Title    = Helpers.FieldToString(block.Title);
                groupTitle.Selected = block.Selected;

                groupTitleCache[block.RoleID] = groupTitle;
            }

            GroupTitlesCallbacks[titles.AgentData.GroupID](groupTitleCache);
        }
コード例 #2
0
        private void GroupTitlesHandler(Packet packet, Simulator simulator)
        {
            GroupTitlesReplyPacket titles = (GroupTitlesReplyPacket)packet;

            Dictionary<LLUUID, GroupTitle> groupTitleCache = new Dictionary<LLUUID, GroupTitle>();

            foreach (GroupTitlesReplyPacket.GroupDataBlock block in titles.GroupData)
            {
                GroupTitle groupTitle = new GroupTitle();

                groupTitle.Title = Helpers.FieldToString(block.Title);
                groupTitle.Selected = block.Selected;

                groupTitleCache[block.RoleID] = groupTitle;
            }

            GroupTitlesCallbacks[titles.AgentData.GroupID](groupTitleCache);
        }
コード例 #3
0
ファイル: GroupManager.cs プロジェクト: Belxjander/Asuna
        private void GroupTitlesHandler(Packet packet, Simulator simulator)
        {
            if (OnGroupTitles != null)
            {
                GroupTitlesReplyPacket titles = (GroupTitlesReplyPacket)packet;
                Dictionary<LLUUID, GroupTitle> groupTitleCache = new Dictionary<LLUUID, GroupTitle>();

                foreach (GroupTitlesReplyPacket.GroupDataBlock block in titles.GroupData)
                {
                    GroupTitle groupTitle = new GroupTitle();

                    groupTitle.Title = Helpers.FieldToUTF8String(block.Title);
                    groupTitle.Selected = block.Selected;

                    groupTitleCache[block.RoleID] = groupTitle;
                }

                try { OnGroupTitles(groupTitleCache); }
                catch (Exception e) { Client.Log(e.ToString(), Helpers.LogLevel.Error); }
            }
        }