public static bool OnSkillFuncChangeMgcEffect(ref SSkillFuncContext inContext)
 {
     if (inContext.inStage == ESkillFuncStage.Enter)
     {
         int           skillFuncParam = inContext.GetSkillFuncParam(0, false);
         int           num2           = inContext.GetSkillFuncParam(2, false);
         int           num3           = inContext.GetSkillFuncParam(4, false);
         ValueDataInfo info1          = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYATKPT];
         info1.totalEftRatioByMgc += num2;
         ValueDataInfo info2 = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP];
         info2.totalEftRatioByMgc += num3;
         HeroWrapper actorControl = inContext.inTargetObj.handle.ActorControl as HeroWrapper;
         if (actorControl != null)
         {
             actorControl.OnApChangeByMgcEffect();
             inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCATKPT].ChangeEvent -= new ValueChangeDelegate(actorControl.OnApChangeByMgcEffect);
             inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCATKPT].ChangeEvent += new ValueChangeDelegate(actorControl.OnApChangeByMgcEffect);
         }
     }
     else if (inContext.inStage == ESkillFuncStage.Leave)
     {
         int           num4  = inContext.GetSkillFuncParam(2, false);
         int           num5  = inContext.GetSkillFuncParam(4, false);
         ValueDataInfo info3 = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYATKPT];
         info3.totalEftRatioByMgc -= num4;
         ValueDataInfo info4 = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP];
         info4.totalEftRatioByMgc -= num5;
         HeroWrapper wrapper2 = inContext.inTargetObj.handle.ActorControl as HeroWrapper;
         if (wrapper2 != null)
         {
             inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCATKPT].ChangeEvent -= new ValueChangeDelegate(wrapper2.OnApChangeByMgcEffect);
         }
     }
     return(true);
 }
Exemple #2
0
        public static bool OnSkillFuncHpCondition(ref SSkillFuncContext inContext)
        {
            int skillFuncParam = inContext.GetSkillFuncParam(1, false);

            if (skillFuncParam < 0 || skillFuncParam >= 37)
            {
                return(false);
            }
            RES_FUNCEFT_TYPE          key         = (RES_FUNCEFT_TYPE)skillFuncParam;
            PoolObjHandle <ActorRoot> inTargetObj = inContext.inTargetObj;

            if (!inTargetObj)
            {
                return(false);
            }
            int skillFuncParam2 = inContext.GetSkillFuncParam(2, false);

            if (inContext.inStage != ESkillFuncStage.Leave)
            {
                int actorHp         = inTargetObj.handle.ValueComponent.actorHp;
                int totalValue      = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP].totalValue;
                int num             = 10000 - actorHp * 10000 / totalValue;
                int skillFuncParam3 = inContext.GetSkillFuncParam(3, true);
                int skillFuncParam4 = inContext.GetSkillFuncParam(0, false);
                if (skillFuncParam4 == 0)
                {
                    return(false);
                }
                int num2   = num * skillFuncParam3 / skillFuncParam4;
                int iParam = inContext.LocalParams[0].iParam;
                if (skillFuncParam2 == 1)
                {
                    ValueDataInfo valueDataInfo = inTargetObj.handle.ValueComponent.mActorValue[key] >> iParam;
                    valueDataInfo = inTargetObj.handle.ValueComponent.mActorValue[key] << num2;
                }
                else
                {
                    ValueDataInfo valueDataInfo2 = inTargetObj.handle.ValueComponent.mActorValue[key] - iParam;
                    valueDataInfo2 = inTargetObj.handle.ValueComponent.mActorValue[key] + num2;
                }
                inContext.LocalParams[0].iParam = num2;
            }
            else if (inContext.inStage == ESkillFuncStage.Leave)
            {
                int iParam2 = inContext.LocalParams[0].iParam;
                if (skillFuncParam2 == 1)
                {
                    ValueDataInfo valueDataInfo3 = inTargetObj.handle.ValueComponent.mActorValue[key] >> iParam2;
                }
                else
                {
                    ValueDataInfo valueDataInfo4 = inTargetObj.handle.ValueComponent.mActorValue[key] - iParam2;
                }
            }
            return(true);
        }
 public static bool OnSkillFuncChangeMgcRate(ref SSkillFuncContext inContext)
 {
     if (inContext.inStage == ESkillFuncStage.Enter)
     {
         int           skillFuncParam = inContext.GetSkillFuncParam(3, false);
         ValueDataInfo info1          = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCATKPT];
         int           num2           = info1.totalEftRatio += skillFuncParam;
     }
     else if (inContext.inStage == ESkillFuncStage.Leave)
     {
         int           num3  = inContext.GetSkillFuncParam(3, false);
         ValueDataInfo info2 = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCATKPT];
         int           num4  = info2.totalEftRatio -= num3;
     }
     return(true);
 }
        public static bool OnSkillFuncRecoveryEffect(ref SSkillFuncContext inContext)
        {
            PoolObjHandle <ActorRoot> inTargetObj = inContext.inTargetObj;

            if (!inTargetObj)
            {
                return(false);
            }
            int skillFuncParam  = inContext.GetSkillFuncParam(0, false);
            int skillFuncParam2 = inContext.GetSkillFuncParam(1, false);
            int skillFuncParam3 = inContext.GetSkillFuncParam(4, false);

            if (inContext.inStage == ESkillFuncStage.Enter)
            {
                if (skillFuncParam == 0)
                {
                    ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[9] + skillFuncParam3;
                    valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[10] + skillFuncParam3;
                    valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[36] + skillFuncParam2;
                }
                else
                {
                    ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[9] << skillFuncParam3;
                    valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[10] << skillFuncParam3;
                    valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[36] << skillFuncParam2;
                }
            }
            else if (inContext.inStage == ESkillFuncStage.Leave)
            {
                if (skillFuncParam == 0)
                {
                    ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[9] - skillFuncParam3;
                    valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[10] - skillFuncParam3;
                    valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[36] - skillFuncParam2;
                }
                else
                {
                    ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[9] >> skillFuncParam3;
                    valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[10] >> skillFuncParam3;
                    valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[36] >> skillFuncParam2;
                }
            }
            return(true);
        }
        public static bool OnSkillFuncRecoveryEffect(ref SSkillFuncContext inContext)
        {
            PoolObjHandle <ActorRoot> inTargetObj = inContext.inTargetObj;

            if (!inTargetObj)
            {
                return(false);
            }
            int skillFuncParam  = inContext.GetSkillFuncParam(0, false);
            int skillFuncParam2 = inContext.GetSkillFuncParam(1, false);
            int skillFuncParam3 = inContext.GetSkillFuncParam(4, false);

            if (inContext.inStage == ESkillFuncStage.Enter)
            {
                if (skillFuncParam == 0)
                {
                    ValueDataInfo valueDataInfo = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYVAMP] + skillFuncParam3;
                    valueDataInfo = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCVAMP] + skillFuncParam3;
                    valueDataInfo = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_RECOVERYGAINEFFECT] + skillFuncParam2;
                }
                else
                {
                    ValueDataInfo valueDataInfo2 = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYVAMP] << skillFuncParam3;
                    valueDataInfo2 = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCVAMP] << skillFuncParam3;
                    valueDataInfo2 = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_RECOVERYGAINEFFECT] << skillFuncParam2;
                }
            }
            else if (inContext.inStage == ESkillFuncStage.Leave)
            {
                if (skillFuncParam == 0)
                {
                    ValueDataInfo valueDataInfo3 = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYVAMP] - skillFuncParam3;
                    valueDataInfo3 = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCVAMP] - skillFuncParam3;
                    valueDataInfo3 = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_RECOVERYGAINEFFECT] - skillFuncParam2;
                }
                else
                {
                    ValueDataInfo valueDataInfo4 = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYVAMP] >> skillFuncParam3;
                    valueDataInfo4 = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCVAMP] >> skillFuncParam3;
                    valueDataInfo4 = inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_RECOVERYGAINEFFECT] >> skillFuncParam2;
                }
            }
            return(true);
        }
 public static bool OnSkillFuncChangeMgcEffect(ref SSkillFuncContext inContext)
 {
     if (inContext.inStage == ESkillFuncStage.Enter)
     {
         int           skillFuncParam = inContext.GetSkillFuncParam(0, false);
         int           num2           = inContext.GetSkillFuncParam(2, false);
         int           num3           = inContext.GetSkillFuncParam(4, false);
         ValueDataInfo info1          = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYATKPT];
         info1.totalEftRatioByMgc += num2;
         ValueDataInfo info2 = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP];
         info2.totalEftRatioByMgc += num3;
     }
     else if (inContext.inStage == ESkillFuncStage.Leave)
     {
         int           num4  = inContext.GetSkillFuncParam(2, false);
         int           num5  = inContext.GetSkillFuncParam(4, false);
         ValueDataInfo info3 = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYATKPT];
         info3.totalEftRatioByMgc -= num4;
         ValueDataInfo info4 = inContext.inTargetObj.handle.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP];
         info4.totalEftRatioByMgc -= num5;
     }
     return(true);
 }
        private static void OnSkillFuncChangeValueProperty(ref SSkillFuncContext inContext, RES_FUNCEFT_TYPE _defType, bool _bAddValue)
        {
            PoolObjHandle <ActorRoot> inTargetObj = inContext.inTargetObj;

            if (!inTargetObj)
            {
                return;
            }
            int changeValueProperty = SkillFuncPropertyDelegator.GetChangeValueProperty(inTargetObj, ref inContext);
            int skillFuncParam      = inContext.GetSkillFuncParam(0, false);

            if (inContext.inStage != ESkillFuncStage.Leave)
            {
                if (_bAddValue)
                {
                    if (skillFuncParam == 0)
                    {
                        ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[_defType] + changeValueProperty;
                    }
                    else
                    {
                        ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[_defType] << changeValueProperty;
                    }
                    SSkillFuncIntParam[] expr_8E_cp_0 = inContext.LocalParams;
                    int expr_8E_cp_1 = 0;
                    expr_8E_cp_0[expr_8E_cp_1].iParam = expr_8E_cp_0[expr_8E_cp_1].iParam + changeValueProperty;
                }
                else
                {
                    if (skillFuncParam == 0)
                    {
                        ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[_defType] - changeValueProperty;
                    }
                    else
                    {
                        ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[_defType] >> changeValueProperty;
                    }
                    SSkillFuncIntParam[] expr_F3_cp_0 = inContext.LocalParams;
                    int expr_F3_cp_1 = 0;
                    expr_F3_cp_0[expr_F3_cp_1].iParam = expr_F3_cp_0[expr_F3_cp_1].iParam + changeValueProperty;
                }
            }
            else if (_bAddValue)
            {
                if (skillFuncParam == 0)
                {
                    ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[_defType] - inContext.LocalParams[0].iParam;
                }
                else
                {
                    ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[_defType] >> inContext.LocalParams[0].iParam;
                }
            }
            else if (skillFuncParam == 0)
            {
                ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[_defType] + inContext.LocalParams[0].iParam;
            }
            else
            {
                ValueDataInfo valueDataInfo = inTargetObj.get_handle().ValueComponent.mActorValue[_defType] << inContext.LocalParams[0].iParam;
            }
        }
        private static void OnSkillFuncChangeValueProperty(ref SSkillFuncContext inContext, RES_FUNCEFT_TYPE _defType, bool _bAddValue)
        {
            PoolObjHandle <ActorRoot> inTargetObj = inContext.inTargetObj;

            if (!inTargetObj)
            {
                return;
            }
            int changeValueProperty = SkillFuncPropertyDelegator.GetChangeValueProperty(inTargetObj, ref inContext);
            int skillFuncParam      = inContext.GetSkillFuncParam(0, false);

            if (inContext.inStage != ESkillFuncStage.Leave)
            {
                if (_bAddValue)
                {
                    if (skillFuncParam == 0)
                    {
                        ValueDataInfo valueDataInfo = inTargetObj.handle.ValueComponent.mActorValue[_defType] + changeValueProperty;
                    }
                    else
                    {
                        ValueDataInfo valueDataInfo2 = inTargetObj.handle.ValueComponent.mActorValue[_defType] << changeValueProperty;
                    }
                    SSkillFuncIntParam[] localParams = inContext.LocalParams;
                    int num = 0;
                    localParams[num].iParam = localParams[num].iParam + changeValueProperty;
                }
                else
                {
                    if (skillFuncParam == 0)
                    {
                        ValueDataInfo valueDataInfo3 = inTargetObj.handle.ValueComponent.mActorValue[_defType] - changeValueProperty;
                    }
                    else
                    {
                        ValueDataInfo valueDataInfo4 = inTargetObj.handle.ValueComponent.mActorValue[_defType] >> changeValueProperty;
                    }
                    SSkillFuncIntParam[] localParams2 = inContext.LocalParams;
                    int num2 = 0;
                    localParams2[num2].iParam = localParams2[num2].iParam + changeValueProperty;
                }
            }
            else if (_bAddValue)
            {
                if (skillFuncParam == 0)
                {
                    ValueDataInfo valueDataInfo5 = inTargetObj.handle.ValueComponent.mActorValue[_defType] - inContext.LocalParams[0].iParam;
                }
                else
                {
                    ValueDataInfo valueDataInfo6 = inTargetObj.handle.ValueComponent.mActorValue[_defType] >> inContext.LocalParams[0].iParam;
                }
            }
            else if (skillFuncParam == 0)
            {
                ValueDataInfo valueDataInfo7 = inTargetObj.handle.ValueComponent.mActorValue[_defType] + inContext.LocalParams[0].iParam;
            }
            else
            {
                ValueDataInfo valueDataInfo8 = inTargetObj.handle.ValueComponent.mActorValue[_defType] << inContext.LocalParams[0].iParam;
            }
        }