Пример #1
0
            public ZoneInfo RemoveZone(string uuid)
            {
                if (string.IsNullOrEmpty(uuid))
                {
                    return(null);
                }

                ZoneInfo info;
                string   guildUUID = null;

                if (zones.TryGetValue(uuid, out info))
                {
                    guildUUID = info.guildUUID;

                    if (zonesMap.TryGetValue(info.serverGroupID, out var map))
                    {
                        map.Remove(uuid);
                    }
                    zones.Remove(uuid);
                    //---------------------------------------------------------------------------------------------
                    //分线表删除.
                    if (zonesLineMap.TryGetValue(info.serverGroupID, out var lineMap))
                    {
                        lineMap.TryGetValue(info.map_data.id, out var lt);
                        RemoveLine(info.uuid, lt);
                    }
                    //---------------------------------------------------------------------------------------------
                    //公会场景表删除.
                    RemoveGuildZone(uuid, guildUUID);
                    if (!string.IsNullOrEmpty(info.roomKey))
                    {
                        roomZones.Remove(info.roomKey);
                    }
                }
                return(info);
            }