Наследование: IMessageConsumer
Пример #1
0
        public Hero(GameClient client, Universe universe, Toon toon)
        {
            this.InGameClient = client;
            this.Universe = universe;
            this.Properties = toon;
            this.CurrentWorldSNO = 0x115EE;

            // actor values
            this.Id = 0x789E00E2;
            this.SnoId = this.ClassSNO;
            this.WorldId = 0x772E0000;
            this.Field2 = 0x00000009;
            this.Field3 = 0x00000000;
            this.Scale = ModelScale;
            this.RotationAmount = 0.05940768f;
            this.RotationAxis = new Vector3D(0f, 0f, 0.9982339f);
            this.Position.X = 3143.75f;
            this.Position.Y = 2828.75f;
            this.Position.Z = 59.075588f;

            this.GBHandle = new GBHandle()
            {
                Field0 = 0x00000007,
                Field1 = this.Properties.ClassID,
            };

            this.Field7 = -1;
            this.Field8 = -1;
            this.Field9 = 0x00000000;
            this.Field10 = 0x0;
        }
Пример #2
0
        public GameServer()
        {
            GameUniverse=new Universe();

            this.OnConnect += ClientManager.OnConnect;
            this.OnDisconnect += ClientManager.OnDisconnect;
            this.DataReceived += GameServer_DataReceived;
            this.DataSent += (sender, e) => { };
        }
Пример #3
0
        public static void OnConnect(object sender, ConnectionEventArgs e)
        {
            Logger.Trace("Game-Client connected: {0}", e.Connection.ToString());

            // atm, just creating a universe - though clients should be able to join existing ones.
            var universe = new Universe();
            Universes.Add(universe);

            var gameClient = new GameClient(e.Connection,universe);
            e.Connection.Client = gameClient;
        }
Пример #4
0
 public Player(GameClient client, Universe universe, Toon bnetToon)
 {
     this.Client = client;
     this.Universe = universe;
     this.Hero = new Hero(client, universe, bnetToon);
 }
Пример #5
0
        public Hero(GameClient client, Universe universe, Toon toon)
        {
            RevealedWorlds = new List<World>();
            RevealedScenes = new List<Scene>();
            RevealedActors = new List<Actor>();

            this.InGameClient = client;
            this.Universe = universe;
            this.Properties = toon;
            this.CurrentWorldSNO = 0x115EE;

            // actor values
            this.Id = 0x789E00E2;
            this.SnoId = this.ClassSNO;
            this.Field2 = 0x00000009;
            this.Field3 = 0x00000000;
            this.Scale = ModelScale;
            this.RotationAmount = 0.05940768f;
            this.RotationAxis = new Vector3D(0f, 0f, 0.9982339f);
            
            //initial world and position
            this.WorldId = 0x772E0000;
            //new char starter pos:
            this.Position.X = 3143.75f;
            this.Position.Y = 2828.75f;
            this.Position.Z = 59.075588f;

            //den of evil:
            //this.Position.X = 2526.250000f;
            //this.Position.Y = 2098.750000f;
            //this.Position.Z = -5.381495f;

            //inn:
            //this.Position.X = 2996.250000f;
            //this.Position.Y = 2793.750000f;
            //this.Position.Z = 24.045330f;

            // adrias hut
            //this.Position.X = 1768.750000f;
            //this.Position.Y = 2921.250000f;
            //this.Position.Z = 20.333143f;        

            // cemetry of forsaken
            //this.Position.X = 2041.250000f;
            //this.Position.Y = 1778.750000f;
            //this.Position.Z = 0.426203f;

            //defiled crypt level 2
            //this.WorldId = 2000289804;
            //this.Position.X = 158.750000f;
            //this.Position.Y = 76.250000f;
            //this.Position.Z = 0.100000f;

            this.GBHandle = new GBHandle()
            {
                Field0 = 0x00000007,
                Field1 = this.Properties.ClassID,
            };

            this.Field7 = -1;
            this.Field8 = -1;
            this.Field9 = 0x00000000;
            this.Field10 = 0x0;
        }
Пример #6
0
 public GameClient(IConnection connection, Universe universe)
 {            
     this.Connection = connection;
     this.Universe = universe;
     _outgoingBuffer.WriteInt(32, 0);
 }
Пример #7
0
 public PlayerManager(Universe universe)
 {
     this.Universe = universe;
 }