예제 #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
파일: Connection.cs 프로젝트: Reve/EVESharp
        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());
        }