private void _handleMessageIDResponse(object sender, NetworkMessageContainer messageData)
        {
            var data = messageData?.MessageData as MessageIDResponse;

            if (data.SlaveServerID != _mySlaveID)
            {
                return;
            }
            else
            {
                switch (data.IDType)
                {
                case IDTypes.GalaxyID:
                    _galaxyIDManager.ReceiveServerIDs(data.IDs);
                    break;

                case IDTypes.TeamID:
                    _teamIDManager.ReceiveServerIDs(data.IDs);
                    break;

                case IDTypes.AccountID:
                    _accountIdManager.ReceiveServerIDs(data.IDs);
                    break;

                case IDTypes.TransactionID:
                    _transactionIdManager.ReceiveServerIDs(data.IDs);
                    break;

                default:
                    throw new NotImplementedException();
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Simulates IDs which would be generated by the master server, to allow for ship creation
        /// </summary>
        /// <param name="numIDs"></param>
        void GenerateIDsForLocalIDManager(GlobalIDManager globalIDManager, LocalIDManager galaxyIDManager, int numIDs)
        {
            var IDs = globalIDManager.GetFreeIDs(numIDs);

            galaxyIDManager.ReceiveServerIDs(IDs);
        }