コード例 #1
0
ファイル: GameClient.cs プロジェクト: Brokenstorm/d3sharp
 public void OnMessage(TargetMessage msg)
 {
     GameWorld.HandleTarget(msg.Field1);
     throw new NotImplementedException();
 }
コード例 #2
0
ファイル: GameClient.cs プロジェクト: iced3/d3sharp
        public void OnMessage(TargetMessage msg)
        {
            if (msg.Field1 == 0x77F20036)
            {
                EnterInn();
                return;
            }
            else if (objectIdsSpawned == null || !objectIdsSpawned.Contains(msg.Field1)) return;
            if (msg.Field1 == null); //
            { //
                SpawnMob(mobs[rand.Next(0, mobs.Length)]); // dirty hack to always spawn the next mob -ice@#d3sharp
            } //
            objectIdsSpawned.Remove(msg.Field1);

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

            SendMessage(new FloatingNumberMessage()
            {
                Id = 0xd0,
                Field0 = msg.Field1,
                Field1 = rand.Next(1000, 13000), // randomly generated between 1000 and 13000 -ice@#d3sharp
                Field2 = rand.Next(1, 4), // randomized damage color code: 1 = white, 2 = yellow, 3 = red, 4 = larger red -ice@#d3sharp
            });

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

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

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

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

            SendMessage(new ANNDataMessage()
            {
                Id = 0xc5,
                Field0 = msg.Field1,
            });

            SendMessage(new AttributeSetValueMessage
            {
                Id = 0x4c,
                Field0 = msg.Field1,
                Field1 = new NetAttributeKeyValue
                {
                    Attribute = GameAttribute.Attributes[0x4d],
                    Float = 0
                }
            });

            SendMessage(new AttributeSetValueMessage
            {
                Id = 0x4c,
                Field0 = msg.Field1,
                Field1 = new NetAttributeKeyValue
                {
                    Attribute = GameAttribute.Attributes[0x1c2],
                    Int = 1
                }
            });

            SendMessage(new AttributeSetValueMessage
            {
                Id = 0x4c,
                Field0 = msg.Field1,
                Field1 = new NetAttributeKeyValue
                {
                    Attribute = GameAttribute.Attributes[0x1c5],
                    Int = 1
                }
            });
            SendMessage(new PlayEffectMessage()
            {
                Id = 0x7a,
                Field0 = msg.Field1,
                Field1 = 0xc,
            });
            SendMessage(new PlayEffectMessage()
            {
                Id = 0x7a,
                Field0 = msg.Field1,
                Field1 = 0x37,
            });
            SendMessage(new PlayHitEffectMessage()
            {
                Id = 0x7b,
                Field0 = msg.Field1,
                Field1 = 0x789E00E2,
                Field2 = 0x2,
                Field3 = false,
            });
            packetId += 10 * 2;
            SendMessage(new DWordDataMessage()
            {
                Id = 0x89,
                Field0 = packetId,
            });
        }
コード例 #3
0
ファイル: GameClient.cs プロジェクト: Zopzop/d3sharp
        public void OnMessage(TargetMessage msg)
        {
            if (msg.Field1 == 0x77F20036)
            {
                EnterInn();
                return;
            }
            else if (objectIdsSpawned == null || !objectIdsSpawned.Contains(msg.Field1)) return;

            objectIdsSpawned.Remove(msg.Field1);

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

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

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

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

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

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

            SendMessage(new ANNDataMessage()
            {
                Id = 0xc5,
                Field0 = msg.Field1,
            });

            SendMessage(new AttributeSetValueMessage
            {
                Id = 0x4c,
                Field0 = msg.Field1,
                Field1 = new NetAttributeKeyValue
                {
                    Attribute = GameAttribute.Attributes[0x4d],
                    Float = 0
                }
            });

            SendMessage(new AttributeSetValueMessage
            {
                Id = 0x4c,
                Field0 = msg.Field1,
                Field1 = new NetAttributeKeyValue
                {
                    Attribute = GameAttribute.Attributes[0x1c2],
                    Int = 1
                }
            });

            SendMessage(new AttributeSetValueMessage
            {
                Id = 0x4c,
                Field0 = msg.Field1,
                Field1 = new NetAttributeKeyValue
                {
                    Attribute = GameAttribute.Attributes[0x1c5],
                    Int = 1
                }
            });
            SendMessage(new PlayEffectMessage()
            {
                Id = 0x7a,
                Field0 = msg.Field1,
                Field1 = 0xc,
            });
            SendMessage(new PlayEffectMessage()
            {
                Id = 0x7a,
                Field0 = msg.Field1,
                Field1 = 0x37,
            });
            SendMessage(new PlayHitEffectMessage()
            {
                Id = 0x7b,
                Field0 = msg.Field1,
                Field1 = 0x789E00E2,
                Field2 = 0x2,
                Field3 = false,
            });
            packetId += 10 * 2;
            SendMessage(new DWordDataMessage()
            {
                Id = 0x89,
                Field0 = packetId,
            });
        }
コード例 #4
0
ファイル: GameClient.cs プロジェクト: kwyjibbo/d3sharp
 public void OnMessage(TargetMessage msg)
 {
     throw new NotImplementedException();
 }