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


C# GameClient.EnterInn方法代码示例

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


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

示例1: Handle

        public override void Handle(GameClient client)
        {
            
            if (this.Field1 == 0x77F20036)
            {
                client.EnterInn();
                return;
            }
            for (int i = 0; i < client.GetLocalWorld().encounters.Count; i++)
            {
                Monster monster = client.GetLocalWorld().encounters[i].GetMonsterByID(this.Field1);
                if (monster != null)
                {
                    if (monster.IsDead())
                    {
                        monster.Die();
                        client.GetLocalWorld().encounters[i].RemoveMonster(monster);
                    }
                    else
                    {
                        monster.Pain(18 + RandomHelper.Next(8));

                        if (monster.IsDead())
                        {
                            
                            monster.Die();
                            client.GetLocalWorld().encounters[i].RemoveMonster(monster);
                        }
                    }

                    break;
                }
            }
        }
开发者ID:yabizz,项目名称:d3sharp,代码行数:34,代码来源:TargetMessage.cs

示例2: Handle

        public override void Handle(GameClient client)
        {
            if (this.Field1 == 0x77F20036)
            {
                client.EnterInn();
                return;
            }
            else if (client.objectIdsSpawned == null || !client.objectIdsSpawned.Contains(this.Field1)) return;

            client.objectIdsSpawned.Remove(this.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 = this.Field1,
                Field1 = 0x0,
                Field2 = 0x2,
            });
            client.SendMessage(new PlayEffectMessage()
            {
                Id = 0x7a,
                Field0 = this.Field1,
                Field1 = 0xc,
            });
            client.SendMessage(new PlayHitEffectMessage()
            {
                Id = 0x7b,
                Field0 = this.Field1,
                Field1 = 0x789E00E2,
                Field2 = 0x2,
                Field3 = false,
            });

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

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

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

            client.SendMessage(new PlayAnimationMessage()
            {
                Id = 0x6c,
                Field0 = this.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 = 0xc5,
                Field0 = this.Field1,
            });

            client.SendMessage(new AttributeSetValueMessage
//.........这里部分代码省略.........
开发者ID:neoleszcz,项目名称:d3sharp,代码行数:101,代码来源:TargetMessage.cs


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