private void Handlers_OnLogOnRequest(LogOnEvent e)
        {
            logger.Info("Got login request from client");

            DObject newObject = new DObject(dOManager);
            LogOnACK ackEvent = new LogOnACK();
            ackEvent.NewOId = dOManager.RegisterObject(newObject);
            communicator.SendEvent(e.Sender, ackEvent);

            // create actor for player
            ILogger newLogger = LightweightContainer.LogFactory.Create(typeof (ServerActor));
            ServerActor newActor = new ServerActor(newObject, newLogger, communicator);

            // TODO - Is this obsolete?
            TestDOEvent testDOEvent = new TestDOEvent();
            testDOEvent.TargetOId = 0;
            communicator.SendEvent(e.Sender, testDOEvent);
        }
Esempio n. 2
0
        private void Handlers_OnGetLogOnACK(LogOnACK e)
        {
            logger.Info("Got ACK for login", e.NewOId);

            DObject newObject = new DObject(dOManager);
            newObject.OId = e.NewOId;
            dOManager.StoreObject(newObject);

            // create actor for player
            ActorProxy newActor = new ActorProxy(newObject, LightweightContainer.LogFactory.Create(typeof (ActorProxy)));
            actors.Add(newObject.OId, newActor);
        }