示例#1
0
        public static int AddNode(Node node)
        {
            int nodeID = nodes.Count;

            // Add the nodes
            nodeStatus.Add(nodeID, NodeStatus.NodeAlive);
            nodes.Add(nodeID, node);

            if (node == null)
            {
                Log.Debug("NodeManager", "Adding dummy node with id " + nodeID);
                return 0; // Ignore it...
            }

            Log.Debug("Node", "Node connected with id " + nodeID);

            // Send a notification with the nodeInfo
            NodeInfo info = new NodeInfo();

            info.nodeID = nodeID;
            info.solarSystems.Items.Add(new PyNone()); // This will let the node load the solarSystems it wants

            node.Notify(info.Encode());

            return nodeID;
        }
示例#2
0
文件: Node.cs 项目: Reve/EVESharp
        private void SendNodeChangeNotification()
        {
            NodeInfo nodeInfo = new NodeInfo();

            nodeInfo.nodeID = NodeManager.GetNodeID(this);
            nodeInfo.solarSystems.Items.Add(new PyNone()); // None = All solar systems

            Send(nodeInfo.Encode());
        }
示例#3
0
        public void SendNodeChangeNotification()
        {
            if (Type != ConnectionType.Node)
            {
                return;
            }

            NodeInfo nodeInfo = new NodeInfo();

            nodeInfo.nodeID = NodeID;
            nodeInfo.solarSystems.Items.Add(new PyNone()); // None = All solar systems

            Send(nodeInfo.Encode());
        }