Ejemplo n.º 1
0
 public void Init(PropsCacheManager _propCacheManager)
 {
     propCacheManager = _propCacheManager;
 }
Ejemplo n.º 2
0
        private void ProcessAction(GameClient client, MagicActionIDs id, double[] actionParams, int nPropsSystemTypes, sbyte sShengWu_slot, sbyte sBuJian_slot)
        {
            switch (id)
            {
            case MagicActionIDs.POTION:
            case MagicActionIDs.HOLYWATER:
            case MagicActionIDs.RECOVERLIFEV:
            case MagicActionIDs.LIFESTEAL:
            case MagicActionIDs.FATALHURT:
            case MagicActionIDs.ADDATTACK:
            case MagicActionIDs.ADDATTACKINJURE:
            case MagicActionIDs.HITV:
            case MagicActionIDs.ADDDEFENSE:
            case MagicActionIDs.COUNTERACTINJUREVALUE:
            case MagicActionIDs.DAMAGETHORN:
            case MagicActionIDs.DODGE:
            case MagicActionIDs.MAXLIFEPERCENT:
            case MagicActionIDs.AddAttackPercent:
            case MagicActionIDs.AddDefensePercent:
            case MagicActionIDs.HitPercent:
            {
                ExtPropIndexes eExtProp = ExtPropIndexes.Max;
                switch (id)
                {
                case MagicActionIDs.POTION:
                    eExtProp = ExtPropIndexes.Potion;
                    break;

                case MagicActionIDs.HOLYWATER:
                    eExtProp = ExtPropIndexes.Holywater;
                    break;

                case MagicActionIDs.RECOVERLIFEV:
                    eExtProp = ExtPropIndexes.RecoverLifeV;
                    break;

                case MagicActionIDs.LIFESTEAL:
                    eExtProp = ExtPropIndexes.LifeSteal;
                    break;

                case MagicActionIDs.FATALHURT:
                    eExtProp = ExtPropIndexes.Fatalhurt;
                    break;

                case MagicActionIDs.ADDATTACK:
                    eExtProp = ExtPropIndexes.AddAttack;
                    break;

                case MagicActionIDs.ADDATTACKINJURE:
                    eExtProp = ExtPropIndexes.AddAttackInjure;
                    break;

                case MagicActionIDs.HITV:
                    eExtProp = ExtPropIndexes.HitV;
                    break;

                case MagicActionIDs.ADDDEFENSE:
                    eExtProp = ExtPropIndexes.AddDefense;
                    break;

                case MagicActionIDs.COUNTERACTINJUREVALUE:
                    eExtProp = ExtPropIndexes.CounteractInjureValue;
                    break;

                case MagicActionIDs.DAMAGETHORN:
                    eExtProp = ExtPropIndexes.DamageThorn;
                    break;

                case MagicActionIDs.DODGE:
                    eExtProp = ExtPropIndexes.Dodge;
                    break;

                case MagicActionIDs.MAXLIFEPERCENT:
                    eExtProp = ExtPropIndexes.MaxLifePercent;
                    break;

                case MagicActionIDs.AddAttackPercent:
                    eExtProp = ExtPropIndexes.AddAttackPercent;
                    break;

                case MagicActionIDs.AddDefensePercent:
                    eExtProp = ExtPropIndexes.AddDefensePercent;
                    break;

                case MagicActionIDs.HitPercent:
                    eExtProp = ExtPropIndexes.HitPercent;
                    break;
                }
                if (eExtProp != ExtPropIndexes.Max)
                {
                    client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                        {
                            nPropsSystemTypes,
                            (int)sShengWu_slot,
                            (int)sBuJian_slot,
                            1000,
                            (int)eExtProp,
                            actionParams[0]
                        });
                }
                break;
            }

            case MagicActionIDs.STRENGTH:
            {
                PropsCacheManager propsCacheManager = client.ClientData.PropsCacheManager;
                object[]          array             = new object[5];
                array[0] = nPropsSystemTypes;
                array[1] = (int)sShengWu_slot;
                array[2] = (int)sBuJian_slot;
                array[3] = 0;
                object[] array2 = array;
                int      num    = 4;
                double[] array3 = new double[4];
                array3[0]   = actionParams[0];
                array2[num] = array3;
                propsCacheManager.SetBaseProps(array);
                break;
            }

            case MagicActionIDs.CONSTITUTION:
                client.ClientData.PropsCacheManager.SetBaseProps(new object[]
                {
                    nPropsSystemTypes,
                    (int)sShengWu_slot,
                    (int)sBuJian_slot,
                    3,
                    new double[]
                    {
                        0.0,
                        0.0,
                        0.0,
                        actionParams[0]
                    }
                });
                break;

            case MagicActionIDs.DEXTERITY:
            {
                PropsCacheManager propsCacheManager2 = client.ClientData.PropsCacheManager;
                object[]          array = new object[5];
                array[0] = nPropsSystemTypes;
                array[1] = (int)sShengWu_slot;
                array[2] = (int)sBuJian_slot;
                array[3] = 2;
                object[] array4 = array;
                int      num2   = 4;
                double[] array3 = new double[4];
                array3[2]    = actionParams[0];
                array4[num2] = array3;
                propsCacheManager2.SetBaseProps(array);
                break;
            }

            case MagicActionIDs.INTELLIGENCE:
            {
                PropsCacheManager propsCacheManager3 = client.ClientData.PropsCacheManager;
                object[]          array = new object[5];
                array[0] = nPropsSystemTypes;
                array[1] = (int)sShengWu_slot;
                array[2] = (int)sBuJian_slot;
                array[3] = 1;
                object[] array5 = array;
                int      num3   = 4;
                double[] array3 = new double[4];
                array3[1]    = actionParams[0];
                array5[num3] = array3;
                propsCacheManager3.SetBaseProps(array);
                break;
            }
            }
        }