当前位置: 首页>>代码示例>>C#>>正文


C# GameClient.SendMessage方法代码示例

本文整理汇总了C#中Mooege.Net.GS.GameClient.SendMessage方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.SendMessage方法的具体用法?C# GameClient.SendMessage怎么用?C# GameClient.SendMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mooege.Net.GS.GameClient的用法示例。


在下文中一共展示了GameClient.SendMessage方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendMessage

 public void SendMessage(GameClient client)
 {
     var list = GetMessageList();
     foreach (var msg in list)
         client.SendMessage(msg);
     _changedAttributes.Clear();
 }
开发者ID:kiwi0530,项目名称:mooege,代码行数:7,代码来源:GameAttributeMap.cs

示例2: OnJoinGame

        private void OnJoinGame(GameClient client, JoinBNetGameMessage message)
        {
            var game = GameManager.GetGameById(message.GameId);
            lock (game)
            {
                var toon = ToonManager.GetToonByLowID((ulong) message.ToonEntityId.Low);

                client.Game = game;

                if (toon.Owner.LoggedInClient == null)
                {
                    Logger.Warn("Client doesn't seem to be connected to moonet, dropping him..");
                    client.Connection.Disconnect();
                    return; // if moonet connection is lost, don't allow him to get in.
                }

                // Set references between MooNetClient and GameClient.
                client.BnetClient = toon.Owner.LoggedInClient;
                client.BnetClient.InGameClient = client;

                client.Player = new Player(game.StartWorld, client, toon);
                Logger.Info("Player {0}[PlayerIndex: {1}] connected.", client.Player.Properties.Name, client.Player.PlayerIndex);

                client.SendMessage(new VersionsMessage(message.SNOPackHash));

                client.SendMessage(new ConnectionEstablishedMessage
                {
                    PlayerIndex = client.Player.PlayerIndex,
                    Field1 = 0x4BB91A16,
                    SNOPackHash = message.SNOPackHash,
                });

                client.SendMessage(new GameSetupMessage // should be the current tick for the game /raist.
                {
                    Field0 = game.Tick,
                });

                client.SendMessage(new SavePointInfoMessage
                {
                    snoLevelArea = -1,
                });

                client.SendMessage(new HearthPortalInfoMessage
                {
                    snoLevelArea = -1,
                    Field1 = -1,
                });

                // transition player to act so client can load act related data? /raist
                client.SendMessage(new ActTransitionMessage
                {
                    Field0 = 0x00000000,
                    Field1 = true,
                });

                game.Enter(client.Player);
            }
        }    
开发者ID:Jonsevc,项目名称:mooege,代码行数:58,代码来源:ClientManager.cs

示例3: OnNewPlayer

        public void OnNewPlayer(GameClient client, JoinBNetGameMessage message)
        {
            client.BnetClient = GameManager.AvailableGames[(ulong)message.GameId].Clients.FirstOrDefault();
            if (client.BnetClient == null)
            {
                Logger.Warn("Couldn't find bnet client for joined client/player!");
                return;
            }

            client.BnetClient.InGameClient = client;

            client.SendMessageNow(new VersionsMessage(message.SNOPackHash));
            client.SendMessage(new ConnectionEstablishedMessage
            {
                Field0 = 0x00000000,
                Field1 = 0x4BB91A16,
                SNOPackHash = message.SNOPackHash,
            });
            client.SendMessage(new GameSetupMessage
            {
                Field0 = 0x00000077,
            });
            client.SendMessage(new SavePointInfoMessage
            {
                snoLevelArea = -1,
            });
            client.SendMessage(new HearthPortalInfoMessage
            {
                snoLevelArea = -1,
                Field1 = -1,
            });
            // transition player to act so client can load act related data? /raist
            client.SendMessage(new ActTransitionMessage
            {
                Field0 = 0x00000000,
                Field1 = true,
            });

            var player = new Mooege.Core.GS.Player.Player(this.Game.StartWorld, client, client.BnetClient.CurrentToon);
            client.Player = player;
        }
开发者ID:SKiLLsSoLoN,项目名称:mooege,代码行数:41,代码来源:PlayerManager.cs

示例4: SendAttributes

        private void SendAttributes(List<NetAttributeKeyValue> netAttributesList, GameClient client)
        {
            // Attributes can't be send all together
            // must be split up to part of max 15 attributes at once
            List<NetAttributeKeyValue> tmpList = new List<NetAttributeKeyValue>(netAttributesList);

            while (tmpList.Count > 0)
            {
                int selectCount = (tmpList.Count > 15) ? 15 : tmpList.Count;
                client.SendMessage(new AttributesSetValuesMessage()
                {
                    Id = 0x004D,
                    Field0 = ItemId,
                    atKeyVals = tmpList.GetRange(0, selectCount).ToArray(),
                });
                tmpList.RemoveRange(0, selectCount);
            }
        }
开发者ID:God601,项目名称:D3Mighty,代码行数:18,代码来源:Item.cs

示例5: SpawnMob

        public void SpawnMob(GameClient client, int mobId) // this shoudn't even rely on client or it's position though i know this is just a hack atm ;) /raist.
        {
            int nId = mobId;
            if (client.Player.Hero.Position == null)
                return;

            if (client.ObjectIdsSpawned == null)
            {
                client.ObjectIdsSpawned = new List<int>();
                client.ObjectIdsSpawned.Add(client.ObjectId - 100);
                client.ObjectIdsSpawned.Add(client.ObjectId);
            }

            client.ObjectId++;
            client.ObjectIdsSpawned.Add(client.ObjectId);

            #region ACDEnterKnown Hittable Zombie
            client.SendMessage(new ACDEnterKnownMessage()
            {
                Id = 0x003B,
                Field0 = client.ObjectId,
                Field1 = nId,
                Field2 = 0x8,
                Field3 = 0x0,
                Field4 = new WorldLocationMessageData()
                {
                    Field0 = 1.35f,
                    Field1 = new PRTransform()
                    {
                        Field0 = new Quaternion()
                        {
                            Amount = 0.768145f,
                            Axis = new Vector3D()
                            {
                                X = 0f,
                                Y = 0f,
                                Z = -0.640276f,
                            },
                        },
                        ReferencePoint = new Vector3D()
                        {
                            X = client.Player.Hero.Position.X + 5,
                            Y = client.Player.Hero.Position.Y + 5,
                            Z = client.Player.Hero.Position.Z,
                        },
                    },
                    Field2 = 0x772E0000,
                },
                Field5 = null,
                Field6 = new GBHandle()
                {
                    Field0 = 1,
                    Field1 = 1,
                },
                Field7 = 0x00000001,
                Field8 = nId,
                Field9 = 0x0,
                Field10 = 0x0,
                Field11 = 0x0,
                Field12 = 0x0,
                Field13 = 0x0
            });
            client.SendMessage(new AffixMessage()
            {
                Id = 0x48,
                Field0 = client.ObjectId,
                Field1 = 0x1,
                aAffixGBIDs = new int[0]
            });
            client.SendMessage(new AffixMessage()
            {
                Id = 0x48,
                Field0 = client.ObjectId,
                Field1 = 0x2,
                aAffixGBIDs = new int[0]
            });
            client.SendMessage(new ACDCollFlagsMessage
            {
                Id = 0xa6,
                Field0 = client.ObjectId,
                Field1 = 0x1
            });

            GameAttributeMap attribs = new GameAttributeMap();
            attribs[GameAttribute.Untargetable] = false;
            attribs[GameAttribute.Uninterruptible] = true;
            attribs[GameAttribute.Buff_Visual_Effect, 1048575] = true;            
            attribs[GameAttribute.Buff_Icon_Count0, 30582] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30286] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30285] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30284] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30283] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30290] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 79486] = 1;
            attribs[GameAttribute.Buff_Active, 30286] = true;
            attribs[GameAttribute.Buff_Active, 30285] = true;
            attribs[GameAttribute.Buff_Active, 30284] = true;
            attribs[GameAttribute.Buff_Active, 30283] = true;
            attribs[GameAttribute.Buff_Active, 30290] = true;

//.........这里部分代码省略.........
开发者ID:Rianon,项目名称:mooege,代码行数:101,代码来源:Universe.cs

示例6: OnToonTargetChange

        private void OnToonTargetChange(GameClient client, TargetMessage message)
        {
            //Logger.Info("Player interaction with " + message.AsText());

            Portal p=GetPortal(message.Field1);

            if (p!=null)
            {
                //we have a transition between worlds here
                ChangeToonWorld(client, p.TargetWorldID, p.TargetPos); //targetpos will always be valid as otherwise the portal wouldn't be targetable
                return;
            }

            else if (client.ObjectIdsSpawned == null || !client.ObjectIdsSpawned.Contains(message.Field1)) return;

            client.ObjectIdsSpawned.Remove(message.Field1);

            var killAni = new int[]{
                    0x2cd7,
                    0x2cd4,
                    0x01b378,
                    0x2cdc,
                    0x02f2,
                    0x2ccf,
                    0x2cd0,
                    0x2cd1,
                    0x2cd2,
                    0x2cd3,
                    0x2cd5,
                    0x01b144,
                    0x2cd6,
                    0x2cd8,
                    0x2cda,
                    0x2cd9
            };
            client.SendMessage(new PlayEffectMessage()
            {
                Id = 0x7a,
                Field0 = message.Field1,
                Field1 = 0x0,
                Field2 = 0x2,
            });
            client.SendMessage(new PlayEffectMessage()
            {
                Id = 0x7a,
                Field0 = message.Field1,
                Field1 = 0xc,
            });
            client.SendMessage(new PlayHitEffectMessage()
            {
                Id = 0x7b,
                Field0 = message.Field1,
                Field1 = 0x789E00E2,
                Field2 = 0x2,
                Field3 = false,
            });

            client.SendMessage(new FloatingNumberMessage()
            {
                Id = 0xd0,
                Field0 = message.Field1,
                Field1 = 9001.0f,
                Field2 = 0,
            });

            client.SendMessage(new ANNDataMessage()
            {
                Id = 0x6d,
                Field0 = message.Field1,
            });

            int ani = killAni[RandomHelper.Next(killAni.Length)];
            //Logger.Info("Ani used: " + ani);

            client.SendMessage(new PlayAnimationMessage()
            {
                Id = 0x6c,
                Field0 = message.Field1,
                Field1 = 0xb,
                Field2 = 0,
                tAnim = new PlayAnimationMessageSpec[1]
                {
                    new PlayAnimationMessageSpec()
                    {
                        Field0 = 0x2,
                        Field1 = ani,
                        Field2 = 0x0,
                        Field3 = 1f
                    }
                }
            });

            client.PacketId += 10 * 2;
            client.SendMessage(new DWordDataMessage()
            {
                Id = 0x89,
                Field0 = client.PacketId,
            });

            client.SendMessage(new ANNDataMessage()
//.........这里部分代码省略.........
开发者ID:Rianon,项目名称:mooege,代码行数:101,代码来源:Universe.cs

示例7: ChangeToonWorld

        public void ChangeToonWorld(GameClient client, int WorldID, Vector3D Pos)
        {
            Hero hero = client.Player.Hero;

            World newworld = null;
            //don't use getworld() here as that'd create a new empty world anyway
            foreach (var x in _worlds)
                if (x.WorldID == WorldID)
                    newworld = x;

            World currentworld = null;
            //don't use getworld() here as that'd create a new empty world anyway
            foreach (var x in _worlds)
                if (x.WorldID == hero.WorldId)
                    currentworld = x;
            
            if (newworld == null || currentworld==null) return; //don't go to a world we don't have in the universe

            currentworld.DestroyWorld(hero);

            hero.WorldId = newworld.WorldID;
            hero.CurrentWorldSNO = newworld.WorldSNO;
            hero.Position.X = Pos.X;
            hero.Position.Y = Pos.Y;
            hero.Position.Z = Pos.Z;

            newworld.Reveal(hero);

            client.SendMessage(new ACDWorldPositionMessage
            {
                Id = 0x3f,
                Field0 = 0x789E00E2,
                Field1 = new WorldLocationMessageData
                {
                    Field0 = 1.43f,
                    Field1 = new PRTransform
                    {
                        Field0 = new Quaternion
                        {
                            Amount = 0.05940768f,
                            Axis = new Vector3D
                            {
                                X = 0f,
                                Y = 0f,
                                Z = 0.9982339f,
                            }
                        },
                        ReferencePoint = hero.Position,
                    },
                    Field2 = newworld.WorldID,
                }
            });

            client.FlushOutgoingBuffer();

            client.SendMessage(new PlayerWarpedMessage()
            {
                Id = 0x0B1,
                Field0 = 9,
                Field1 = 0f,
            });

            client.PacketId += 40 * 2;
            client.SendMessage(new DWordDataMessage()
            {
                Id = 0x89,
                Field0 = client.PacketId,
            });

            client.FlushOutgoingBuffer();
        }
开发者ID:Rianon,项目名称:mooege,代码行数:71,代码来源:Universe.cs

示例8: UpdateClient

        public void UpdateClient(GameClient client)
        {
            client.SendMessage(new HeroStateMessage()
            {
                Id = 0x003A,
                Field0 = new HeroStateData()
                {
                    Field0 = 0x00000000,
                    Field1 = 0x00000000,
                    Field2 = 0x00000000,
                    Gender = client.BnetClient.CurrentToon.Gender,
                    PlayerSavedData = new PlayerSavedData()
                    {
                        HotBarButtons = hotbarSkills,
                        SkilKeyMappings = new SkillKeyMapping[15]
                        {
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
                             new SkillKeyMapping()
                             {
                                Power = -1,
                                Field1 = -1,
                                Field2 = 0x00000000,
                             },
//.........这里部分代码省略.........
开发者ID:Tareg,项目名称:mooege,代码行数:101,代码来源:Skillset.cs

示例9: SendDWordTick

 public void SendDWordTick(GameClient client)
 {
     client.PacketId += 10 * 2;
     client.SendMessage(new DWordDataMessage()
     {
         Id = 0x89,
         Field0 = client.PacketId,
     });
 }
开发者ID:Sasho,项目名称:mooege,代码行数:9,代码来源:PowerManager.cs

示例10: BasicNPC

        public BasicNPC(int objectId, ref GameClient g)
        {
            ID = objectId;
            Client = g;
            //Game.SendMessage(new AffixMessage()
            //{
            //    Id = 0x48,
            //    Field0 = objectId,
            //    Field1 = 0x1,
            //    aAffixGBIDs = new int[0]
            //});
            //Game.SendMessage(new AffixMessage()
            //{
            //    Id = 0x48,
            //    Field0 = objectId,
            //    Field1 = 0x2,
            //    aAffixGBIDs = new int[0]
            //});
            //Game.SendMessage(new ACDCollFlagsMessage
            //{
            //    Id = 0xa6,
            //    Field0 = objectId,
            //    Field1 = 0x1
            //});

            Client.SendMessage(new AttributesSetValuesMessage
            {
                Id = 0x4d,
                Field0 = objectId,
                atKeyVals = new NetAttributeKeyValue[15] {
                    new NetAttributeKeyValue {
                        Attribute = GameAttribute.Attributes[214],
                        Int = 0
                    },
                    new NetAttributeKeyValue {
                        Attribute = GameAttribute.Attributes[464],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 1048575,
                        Attribute = GameAttribute.Attributes[441],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30582,
                        Attribute = GameAttribute.Attributes[560],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30286,
                        Attribute = GameAttribute.Attributes[560],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30285,
                        Attribute = GameAttribute.Attributes[560],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30284,
                        Attribute = GameAttribute.Attributes[560],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30283,
                        Attribute = GameAttribute.Attributes[560],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30290,
                        Attribute = GameAttribute.Attributes[560],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 79486,
                        Attribute = GameAttribute.Attributes[560],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30286,
                        Attribute = GameAttribute.Attributes[460],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30285,
                        Attribute = GameAttribute.Attributes[460],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30284,
                        Attribute = GameAttribute.Attributes[460],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30283,
                        Attribute = GameAttribute.Attributes[460],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 30290,
//.........这里部分代码省略.........
开发者ID:tehCm,项目名称:mooege,代码行数:101,代码来源:BasicNPC.cs

示例11: SpawnMob

        public void SpawnMob(GameClient client, int mobId) // this shoudn't even rely on client or it's position though i know this is just a hack atm ;) /raist.
        {
            int nId = mobId;
            if (client.Player.Hero.Position == null)
                return;

            if (client.ObjectIdsSpawned == null)
            {
                client.ObjectIdsSpawned = new List<int>();
                // why is this necessary?
                //client.ObjectIdsSpawned.Add(client.ObjectId - 100);
                client.ObjectIdsSpawned.Add(this.NextObjectId);
            }

            int objectId = this.NextObjectId;
            client.ObjectIdsSpawned.Add(objectId);

            #region ACDEnterKnown Hittable Zombie
            Vector3D pos = client.Player.Hero.Position;
            BasicNPC mob = new BasicNPC(objectId, mobId, new WorldPlace { Field0 = new Vector3D(pos.X - 5, pos.Y - 5, pos.Z), });
            GetWorld(client.Player.Hero.WorldId).AddNpc(mob);
            mob.Reveal(client);

            client.SendMessage(new AffixMessage()
            {
                Id = 0x48,
                Field0 = objectId,
                Field1 = 0x1,
                aAffixGBIDs = new int[0]
            });
            client.SendMessage(new AffixMessage()
            {
                Id = 0x48,
                Field0 = objectId,
                Field1 = 0x2,
                aAffixGBIDs = new int[0]
            });
            client.SendMessage(new ACDCollFlagsMessage
            {
                Id = 0xa6,
                Field0 = objectId,
                Field1 = 0x1
            });

            GameAttributeMap attribs = new GameAttributeMap();
            attribs[GameAttribute.Untargetable] = false;
            attribs[GameAttribute.Uninterruptible] = true;
            attribs[GameAttribute.Buff_Visual_Effect, 1048575] = true;
            attribs[GameAttribute.Buff_Icon_Count0, 30582] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30286] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30285] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30284] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30283] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 30290] = 1;
            attribs[GameAttribute.Buff_Icon_Count0, 79486] = 1;
            attribs[GameAttribute.Buff_Active, 30286] = true;
            attribs[GameAttribute.Buff_Active, 30285] = true;
            attribs[GameAttribute.Buff_Active, 30284] = true;
            attribs[GameAttribute.Buff_Active, 30283] = true;
            attribs[GameAttribute.Buff_Active, 30290] = true;

            attribs[GameAttribute.Hitpoints_Max_Total] = 4.546875f;
            attribs[GameAttribute.Buff_Active, 79486] = true;
            attribs[GameAttribute.Hitpoints_Max] = 4.546875f;
            attribs[GameAttribute.Hitpoints_Total_From_Level] = 0f;
            attribs[GameAttribute.Hitpoints_Cur] = 4.546875f;
            attribs[GameAttribute.Invulnerable] = true;
            attribs[GameAttribute.Buff_Active, 30582] = true;
            attribs[GameAttribute.TeamID] = 10;
            attribs[GameAttribute.Level] = 1;

            attribs.SendMessage(client, objectId);


            client.SendMessage(new ACDGroupMessage
            {
                Id = 0xb8,
                Field0 = objectId,
                Field1 = unchecked((int)0xb59b8de4),
                Field2 = unchecked((int)0xffffffff)
            });

            client.SendMessage(new ANNDataMessage
            {
                Id = 0x3e,
                Field0 = objectId
            });

            client.SendMessage(new ACDTranslateFacingMessage
            {
                Id = 0x70,
                Field0 = objectId,
                Field1 = (float)(RandomHelper.NextDouble() * 2.0 * Math.PI),
                Field2 = false
            });

            client.SendMessage(new SetIdleAnimationMessage
            {
                Id = 0xa5,
                Field0 = objectId,
//.........这里部分代码省略.........
开发者ID:sexywop,项目名称:mooege,代码行数:101,代码来源:Universe.cs

示例12: Reveal

 public void Reveal(GameClient client){
     client.SendMessage(new ACDEnterKnownMessage()
     {
         Id = 0x003B,
         Field0 = client.ObjectId,
         Field1 = snoId,
         Field2 = 0x8,
         Field3 = 0x0,
         Field4 = new WorldLocationMessageData()
         {
             Field0 = 1.35f,
             Field1 = new PRTransform()
             {
                 Field0 = new Quaternion()
                 {
                     Amount = 0.768145f,
                     Axis = new Vector3D()
                     {
                         X = 0f,
                         Y = 0f,
                         Z = -0.640276f,
                     },
                 },
                 ReferencePoint = Location.Field0,
             },
             Field2 = 0x772E0000,
         },
         Field5 = null,
         Field6 = new GBHandle()
         {
             Field0 = 1,
             Field1 = 1,
         },
         Field7 = 0x00000001,
         Field8 = snoId,
         Field9 = 0x0,
         Field10 = 0x0,
         Field11 = 0x0,
         Field12 = 0x0,
         Field13 = 0x0
     });
 }
开发者ID:God601,项目名称:D3Mighty,代码行数:42,代码来源:BasicNPC.cs

示例13: SpawnMob

        public void SpawnMob(GameClient client, int mobId) // this shoudn't even rely on client or it's position though i know this is just a hack atm ;) /raist.
        {
            int nId = mobId;
            if (client.Player.Hero.Position == null)
                return;

            if (client.ObjectIdsSpawned == null)
            {
                client.ObjectIdsSpawned = new List<int>();
                client.ObjectIdsSpawned.Add(client.ObjectId - 100);
                client.ObjectIdsSpawned.Add(client.ObjectId);
            }

            client.ObjectId++;
            client.ObjectIdsSpawned.Add(client.ObjectId);

            #region ACDEnterKnown Hittable Zombie
            client.SendMessage(new ACDEnterKnownMessage()
            {
                Id = 0x003B,
                Field0 = client.ObjectId,
                Field1 = nId,
                Field2 = 0x8,
                Field3 = 0x0,
                Field4 = new WorldLocationMessageData()
                {
                    Field0 = 1.35f,
                    Field1 = new PRTransform()
                    {
                        Field0 = new Quaternion()
                        {
                            Amount = 0.768145f,
                            Axis = new Vector3D()
                            {
                                X = 0f,
                                Y = 0f,
                                Z = -0.640276f,
                            },
                        },
                        ReferencePoint = new Vector3D()
                        {
                            X = client.Player.Hero.Position.X + 5,
                            Y = client.Player.Hero.Position.Y + 5,
                            Z = client.Player.Hero.Position.Z,
                        },
                    },
                    Field2 = 0x772E0000,
                },
                Field5 = null,
                Field6 = new GBHandle()
                {
                    Field0 = 1,
                    Field1 = 1,
                },
                Field7 = 0x00000001,
                Field8 = nId,
                Field9 = 0x0,
                Field10 = 0x0,
                Field11 = 0x0,
                Field12 = 0x0,
                Field13 = 0x0
            });
            client.SendMessage(new AffixMessage()
            {
                Id = 0x48,
                Field0 = client.ObjectId,
                Field1 = 0x1,
                aAffixGBIDs = new int[0]
            });
            client.SendMessage(new AffixMessage()
            {
                Id = 0x48,
                Field0 = client.ObjectId,
                Field1 = 0x2,
                aAffixGBIDs = new int[0]
            });
            client.SendMessage(new ACDCollFlagsMessage
            {
                Id = 0xa6,
                Field0 = client.ObjectId,
                Field1 = 0x1
            });

            client.SendMessage(new AttributesSetValuesMessage
            {
                Id = 0x4d,
                Field0 = client.ObjectId,
                atKeyVals = new NetAttributeKeyValue[15] {
                    new NetAttributeKeyValue {
                        Attribute = GameAttribute.Attributes[214],
                        Int = 0
                    },
                    new NetAttributeKeyValue {
                        Attribute = GameAttribute.Attributes[464],
                        Int = 1
                    },
                    new NetAttributeKeyValue {
                        Field0 = 1048575,
                        Attribute = GameAttribute.Attributes[441],
                        Int = 1
//.........这里部分代码省略.........
开发者ID:Tareg,项目名称:mooege,代码行数:101,代码来源:Universe.cs


注:本文中的Mooege.Net.GS.GameClient.SendMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。