コード例 #1
0
        public void FightStart()
        {
            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            if (curLvelContext != null && curLvelContext.m_warmHeroAiDiffInfo != null)
            {
                ResBattleDynamicDifficulty        warmHeroAiDiffInfo = curLvelContext.m_warmHeroAiDiffInfo;
                List <PoolObjHandle <ActorRoot> > campActors         = Singleton <GameObjMgr> .GetInstance().GetCampActors(Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().PlayerCamp);

                for (int i = 0; i < campActors.get_Count(); i++)
                {
                    ActorRoot handle = campActors.get_Item(i).get_handle();
                    if (handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                    {
                        PropertyHelper mActorValue = handle.ValueComponent.mActorValue;
                        mActorValue[31].baseValue += warmHeroAiDiffInfo.iSelfAttackAdd;
                        mActorValue[30].baseValue += warmHeroAiDiffInfo.iSelfDefenceAdd;
                    }
                }
            }
        }
コード例 #2
0
        public void FightStart()
        {
            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            if ((curLvelContext != null) && (curLvelContext.DynamicDifficultyCfg != null))
            {
                ResBattleDynamicDifficulty        dynamicDifficultyCfg = curLvelContext.DynamicDifficultyCfg;
                List <PoolObjHandle <ActorRoot> > campActors           = Singleton <GameObjMgr> .GetInstance().GetCampActors(Singleton <GamePlayerCenter> .instance.GetHostPlayer().PlayerCamp);

                for (int i = 0; i < campActors.Count; i++)
                {
                    PoolObjHandle <ActorRoot> handle = campActors[i];
                    ActorRoot root = handle.handle;
                    if (root.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                    {
                        PropertyHelper mActorValue = root.ValueComponent.mActorValue;
                        ValueDataInfo  info1       = mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_HURTOUTPUTRATE];
                        info1.baseValue += dynamicDifficultyCfg.iSelfAttackAdd;
                        ValueDataInfo info2 = mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_HURTREDUCERATE];
                        info2.baseValue += dynamicDifficultyCfg.iSelfDefenceAdd;
                    }
                }
            }
        }
コード例 #3
0
 public void SetWarmHeroAiDiff(byte aiLevel)
 {
     this.m_warmHeroAiDiffInfo = GameDataMgr.battleDynamicDifficultyDB.GetDataByKey((uint)aiLevel);
 }