Beispiel #1
0
        private static int GetHeroCombatEft(PoolObjHandle <ActorRoot> actor)
        {
            if (actor == 0)
            {
                return(0);
            }
            int num = 0;
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorServerData actorData = new ActorServerData();

            if (actorDataProvider.GetActorServerData(ref actor.handle.TheActorMeta, ref actorData))
            {
                num += CHeroInfo.GetCombatEftByStarLevel((int)actorData.Level, (int)actorData.Star);
                num += CSkinInfo.GetCombatEft((uint)actorData.TheActorMeta.ConfigId, actorData.SkinId);
                ActorServerRuneData runeData = new ActorServerRuneData();
                for (int i = 0; i < 30; i++)
                {
                    if (actorDataProvider.GetActorServerRuneData(ref actor.handle.TheActorMeta, (ActorRunelSlot)i, ref runeData))
                    {
                        ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(runeData.RuneId);
                        if (dataByKey != null)
                        {
                            num += dataByKey.iCombatEft;
                        }
                    }
                }
            }
            return(num);
        }
Beispiel #2
0
    public static uint GetSelfSelSkill(ResDT_UnUseSkill unUseSkillInfo, uint heroId)
    {
        if (!CAddSkillSys.IsSelSkillAvailable())
        {
            return(0u);
        }
        if (unUseSkillInfo == null)
        {
            return(0u);
        }
        CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

        if (masterRoleInfo == null)
        {
            return(0u);
        }
        uint      num      = 0u;
        CHeroInfo heroInfo = masterRoleInfo.GetHeroInfo(heroId, true);

        if (heroInfo != null)
        {
            num = heroInfo.skillInfo.SelSkillID;
        }
        else if (masterRoleInfo.IsFreeHero(heroId))
        {
            COMDT_FREEHERO_INFO freeHeroSymbol = masterRoleInfo.GetFreeHeroSymbol(heroId);
            if (freeHeroSymbol != null)
            {
                num = freeHeroSymbol.dwSkillID;
            }
        }
        if (!CAddSkillSys.IsSelSkillAvailable(unUseSkillInfo, num))
        {
            num = GameDataMgr.addedSkiilDatabin.GetAnyData().dwUnlockSkillID;
        }
        if (!CAddSkillSys.IsSelSkillAvailable(unUseSkillInfo, num))
        {
            num = GameDataMgr.globalInfoDatabin.GetDataByKey(154u).dwConfValue;
        }
        return(num);
    }