public override bool GetActorStaticData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
 {
     actorData.TheActorMeta = actorMeta;
     ActorStaticDataProviderBase.ActorDataBuilder actorDataBuilder = null;
     this._actorDataBuilder.TryGetValue((uint)actorMeta.ActorType, out actorDataBuilder);
     return(actorDataBuilder != null && actorDataBuilder(ref actorMeta, ref actorData));
 }
        protected override bool BuildHeroData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticLobbyDataProvider);

            actorData.ProviderType = GameActorDataProviderType.StaticBattleDataProvider;
            return(actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData));
        }
 public override bool GetActorStaticPerStarLvData(ref ActorMeta actorMeta, ActorStarLv starLv, ref ActorPerStarLvData perStarLvData)
 {
     perStarLvData.TheActorMeta = actorMeta;
     perStarLvData.StarLv       = starLv;
     ActorStaticDataProviderBase.ActorPerLvDataBuilder actorPerLvDataBuilder = null;
     this._actorPerStarLvDataBuilder.TryGetValue((uint)actorMeta.ActorType, out actorPerLvDataBuilder);
     return(actorPerLvDataBuilder != null && actorPerLvDataBuilder(ref actorMeta, starLv, ref perStarLvData));
 }
 public override bool GetActorStaticSkillData(ref ActorMeta actorMeta, ActorSkillSlot skillSlot, ref ActorStaticSkillData skillData)
 {
     skillData.TheActorMeta = actorMeta;
     skillData.SkillSlot    = skillSlot;
     ActorStaticDataProviderBase.ActorSkillDataBuilder actorSkillDataBuilder = null;
     this._actorSkillDataBuilder.TryGetValue((uint)actorMeta.ActorType, out actorSkillDataBuilder);
     return(actorSkillDataBuilder != null && actorSkillDataBuilder(ref actorMeta, skillSlot, ref skillData));
 }
        protected override bool BuildHeroData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticLobbyDataProvider);

            actorData.ProviderType = GameActorDataProviderType.StaticBattleDataProvider;
            actorData.TheBaseAttribute.RandomPassiveSkillRule = 0;
            return(actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData));
        }
Example #6
0
        public override bool GetActorStaticData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            actorData.TheActorMeta = actorMeta;
            ActorDataBuilder builder = null;

            this._actorDataBuilder.TryGetValue((uint)actorMeta.ActorType, out builder);
            return((builder != null) && builder(ref actorMeta, ref actorData));
        }
		protected override bool BuildHeroData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
		{
			ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey((uint)actorData.TheActorMeta.ConfigId);
			if (dataByKey == null)
			{
				base.ErrorMissingHeroConfig((uint)actorData.TheActorMeta.ConfigId);
				return false;
			}
			this.BuildActorData(dataByKey, ref actorData);
			return true;
		}
Example #8
0
        protected override bool BuildMonsterData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            ResMonsterCfgInfo resMonsterCfgInfo = this.ConsiderDifficultyToChooseMonsterCfg((uint)actorData.TheActorMeta.ConfigId, actorData.TheActorMeta.Difficuty);

            if (resMonsterCfgInfo == null)
            {
                resMonsterCfgInfo = MonsterDataHelper.GetDataCfgInfo(actorData.TheActorMeta.ConfigId, (int)actorData.TheActorMeta.Difficuty);
                if (resMonsterCfgInfo == null)
                {
                    resMonsterCfgInfo = MonsterDataHelper.GetDataCfgInfo(actorData.TheActorMeta.ConfigId, 1);
                }
                if (resMonsterCfgInfo == null)
                {
                    base.ErrorMissingMonsterConfig((uint)actorData.TheActorMeta.ConfigId);
                    return(false);
                }
            }
            DynamicAttributeInfo dynamicAttributeInfo = this.ConsiderMonsterDynamicInfo(resMonsterCfgInfo);

            actorData.TheBaseAttribute.EpType                           = 1u;
            actorData.TheBaseAttribute.BaseHp                           = ((dynamicAttributeInfo == null) ? resMonsterCfgInfo.iBaseHP : dynamicAttributeInfo.iBaseHP);
            actorData.TheBaseAttribute.PerLvHp                          = 0;
            actorData.TheBaseAttribute.BaseAd                           = ((dynamicAttributeInfo == null) ? resMonsterCfgInfo.iBaseATT : dynamicAttributeInfo.iAD);
            actorData.TheBaseAttribute.PerLvAd                          = 0;
            actorData.TheBaseAttribute.BaseAp                           = ((dynamicAttributeInfo == null) ? resMonsterCfgInfo.iBaseINT : dynamicAttributeInfo.iAP);
            actorData.TheBaseAttribute.PerLvAp                          = 0;
            actorData.TheBaseAttribute.BaseAtkSpeed                     = 0;
            actorData.TheBaseAttribute.PerLvAtkSpeed                    = 0;
            actorData.TheBaseAttribute.BaseDef                          = ((dynamicAttributeInfo == null) ? resMonsterCfgInfo.iBaseDEF : dynamicAttributeInfo.iDef);
            actorData.TheBaseAttribute.PerLvDef                         = 0;
            actorData.TheBaseAttribute.BaseRes                          = ((dynamicAttributeInfo == null) ? resMonsterCfgInfo.iBaseRES : dynamicAttributeInfo.iRes);
            actorData.TheBaseAttribute.PerLvRes                         = 0;
            actorData.TheBaseAttribute.BaseHpRecover                    = resMonsterCfgInfo.iBaseHPAdd;
            actorData.TheBaseAttribute.PerLvHpRecover                   = 0;
            actorData.TheBaseAttribute.CriticalChance                   = 0;
            actorData.TheBaseAttribute.CriticalDamage                   = 0;
            actorData.TheBaseAttribute.Sight                            = resMonsterCfgInfo.iSightR;
            actorData.TheBaseAttribute.MoveSpeed                        = resMonsterCfgInfo.iBaseSpeed;
            actorData.TheBaseAttribute.SoulExpGained                    = resMonsterCfgInfo.iSoulExp;
            actorData.TheBaseAttribute.GoldCoinInBattleGained           = (int)resMonsterCfgInfo.wStartingGoldCoinInBattle;
            actorData.TheBaseAttribute.GoldCoinInBattleGainedFloatRange = (int)resMonsterCfgInfo.bGoldCoinInBattleRange;
            actorData.TheBaseAttribute.DynamicProperty                  = resMonsterCfgInfo.dwDynamicPropertyCfg;
            actorData.TheBaseAttribute.ClashMark                        = resMonsterCfgInfo.dwClashMark;
            actorData.TheBaseAttribute.RandomPassiveSkillRule           = (int)resMonsterCfgInfo.bRandomPassiveSkillRule;
            actorData.TheBaseAttribute.PassiveSkillID1                  = 0;
            actorData.TheBaseAttribute.PassiveSkillID2                  = 0;
            actorData.TheBaseAttribute.DeadControl                      = false;
            actorData.TheMonsterOnlyInfo.MonsterBaseLevel               = resMonsterCfgInfo.iLevel;
            actorData.TheMonsterOnlyInfo.SoldierType                    = resMonsterCfgInfo.bSoldierType;
            actorData.TheResInfo.Name    = StringHelper.UTF8BytesToString(ref resMonsterCfgInfo.szName);
            actorData.TheResInfo.ResPath = StringHelper.UTF8BytesToString(ref resMonsterCfgInfo.szCharacterInfo);
            actorData.ProviderType       = GameActorDataProviderType.StaticBattleDataProvider;
            return(true);
        }
        protected override bool BuildHeroData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey((uint)actorData.TheActorMeta.ConfigId);

            if (dataByKey == null)
            {
                base.ErrorMissingHeroConfig((uint)actorData.TheActorMeta.ConfigId);
                return(false);
            }
            actorData.TheBaseAttribute.EpType                           = dataByKey.dwEnergyType;
            actorData.TheBaseAttribute.BaseEp                           = dataByKey.iEnergy;
            actorData.TheBaseAttribute.EpGrowth                         = dataByKey.iEnergyGrowth;
            actorData.TheBaseAttribute.BaseEpRecover                    = dataByKey.iEnergyRec;
            actorData.TheBaseAttribute.PerLvEpRecover                   = dataByKey.iEnergyRecGrowth;
            actorData.TheBaseAttribute.BaseHp                           = dataByKey.iBaseHP;
            actorData.TheBaseAttribute.PerLvHp                          = dataByKey.iHpGrowth;
            actorData.TheBaseAttribute.BaseAd                           = dataByKey.iBaseATT;
            actorData.TheBaseAttribute.PerLvAd                          = dataByKey.iAtkGrowth;
            actorData.TheBaseAttribute.BaseAp                           = dataByKey.iBaseINT;
            actorData.TheBaseAttribute.PerLvAp                          = dataByKey.iSpellGrowth;
            actorData.TheBaseAttribute.BaseAtkSpeed                     = dataByKey.iBaseAtkSpd;
            actorData.TheBaseAttribute.PerLvAtkSpeed                    = dataByKey.iAtkSpdAddLvlup;
            actorData.TheBaseAttribute.BaseDef                          = dataByKey.iBaseDEF;
            actorData.TheBaseAttribute.PerLvDef                         = dataByKey.iDefGrowth;
            actorData.TheBaseAttribute.BaseRes                          = dataByKey.iBaseRES;
            actorData.TheBaseAttribute.PerLvRes                         = dataByKey.iResistGrowth;
            actorData.TheBaseAttribute.BaseHpRecover                    = dataByKey.iBaseHPAdd;
            actorData.TheBaseAttribute.PerLvHpRecover                   = dataByKey.iHPAddLvlup;
            actorData.TheBaseAttribute.CriticalChance                   = dataByKey.iCritRate;
            actorData.TheBaseAttribute.CriticalDamage                   = dataByKey.iCritEft;
            actorData.TheBaseAttribute.Sight                            = dataByKey.iSightR;
            actorData.TheBaseAttribute.MoveSpeed                        = dataByKey.iBaseSpeed;
            actorData.TheBaseAttribute.SoulExpGained                    = 0;
            actorData.TheBaseAttribute.GoldCoinInBattleGained           = 0;
            actorData.TheBaseAttribute.GoldCoinInBattleGainedFloatRange = 0;
            actorData.TheBaseAttribute.ClashMark                        = 0u;
            actorData.TheBaseAttribute.RandomPassiveSkillRule           = 0;
            actorData.TheBaseAttribute.PassiveSkillID1                  = dataByKey.iPassiveID1;
            actorData.TheBaseAttribute.PassiveSkillID2                  = dataByKey.iPassiveID2;
            actorData.TheBaseAttribute.DeadControl                      = (dataByKey.dwDeadControl == 1u);
            actorData.TheHeroOnlyInfo.HeroCapability                    = (int)dataByKey.bMainJob;
            actorData.TheHeroOnlyInfo.HeroDamageType                    = (int)dataByKey.bDamageType;
            actorData.TheHeroOnlyInfo.HeroAttackType                    = (int)dataByKey.bAttackType;
            actorData.TheHeroOnlyInfo.InitialStar                       = dataByKey.iInitialStar;
            actorData.TheHeroOnlyInfo.RecommendStandPos                 = dataByKey.iRecommendPosition;
            actorData.TheHeroOnlyInfo.AttackDistanceType                = (int)dataByKey.bAttackDistanceType;
            actorData.TheHeroOnlyInfo.HeroNamePinYin                    = dataByKey.szNamePinYin;
            actorData.TheResInfo.Name    = StringHelper.UTF8BytesToString(ref dataByKey.szName);
            actorData.TheResInfo.ResPath = StringHelper.UTF8BytesToString(ref dataByKey.szCharacterInfo);
            actorData.ProviderType       = GameActorDataProviderType.StaticLobbyDataProvider;
            return(true);
        }
Example #10
0
        protected override bool BuildOrganData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            ResOrganCfgInfo dataCfgInfoByCurLevelDiff = OrganDataHelper.GetDataCfgInfoByCurLevelDiff(actorData.TheActorMeta.ConfigId);

            if (dataCfgInfoByCurLevelDiff == null)
            {
                base.ErrorMissingOrganConfig((uint)actorData.TheActorMeta.ConfigId);
                return(false);
            }
            DynamicAttributeInfo dynamicAttributeInfo = this.ConsiderOrganDynamicInfo(dataCfgInfoByCurLevelDiff);

            actorData.TheBaseAttribute.EpType                           = 1u;
            actorData.TheBaseAttribute.BaseHp                           = ((dynamicAttributeInfo == null) ? dataCfgInfoByCurLevelDiff.iBaseHP : dynamicAttributeInfo.iBaseHP);
            actorData.TheBaseAttribute.PerLvHp                          = dataCfgInfoByCurLevelDiff.iHPLvlup;
            actorData.TheBaseAttribute.BaseAd                           = ((dynamicAttributeInfo == null) ? dataCfgInfoByCurLevelDiff.iBaseATT : dynamicAttributeInfo.iAD);
            actorData.TheBaseAttribute.PerLvAd                          = dataCfgInfoByCurLevelDiff.iATTLvlup;
            actorData.TheBaseAttribute.BaseAp                           = ((dynamicAttributeInfo == null) ? dataCfgInfoByCurLevelDiff.iBaseINT : dynamicAttributeInfo.iAP);
            actorData.TheBaseAttribute.PerLvAp                          = dataCfgInfoByCurLevelDiff.iINTLvlup;
            actorData.TheBaseAttribute.BaseAtkSpeed                     = 0;
            actorData.TheBaseAttribute.PerLvAtkSpeed                    = dataCfgInfoByCurLevelDiff.iAtkSpdAddLvlup;
            actorData.TheBaseAttribute.BaseDef                          = ((dynamicAttributeInfo == null) ? dataCfgInfoByCurLevelDiff.iBaseDEF : dynamicAttributeInfo.iDef);
            actorData.TheBaseAttribute.PerLvDef                         = dataCfgInfoByCurLevelDiff.iDEFLvlup;
            actorData.TheBaseAttribute.BaseRes                          = ((dynamicAttributeInfo == null) ? dataCfgInfoByCurLevelDiff.iBaseRES : dynamicAttributeInfo.iRes);
            actorData.TheBaseAttribute.PerLvRes                         = dataCfgInfoByCurLevelDiff.iRESLvlup;
            actorData.TheBaseAttribute.BaseHpRecover                    = dataCfgInfoByCurLevelDiff.iBaseHPAdd;
            actorData.TheBaseAttribute.PerLvHpRecover                   = dataCfgInfoByCurLevelDiff.iHPAddLvlup;
            actorData.TheBaseAttribute.CriticalChance                   = 0;
            actorData.TheBaseAttribute.CriticalDamage                   = 0;
            actorData.TheBaseAttribute.Sight                            = dataCfgInfoByCurLevelDiff.iSightR;
            actorData.TheBaseAttribute.MoveSpeed                        = dataCfgInfoByCurLevelDiff.iBaseSpeed;
            actorData.TheBaseAttribute.SoulExpGained                    = dataCfgInfoByCurLevelDiff.iSoulExp;
            actorData.TheBaseAttribute.GoldCoinInBattleGained           = (int)dataCfgInfoByCurLevelDiff.wGoldCoinInBattle;
            actorData.TheBaseAttribute.GoldCoinInBattleGainedFloatRange = 0;
            actorData.TheBaseAttribute.DynamicProperty                  = dataCfgInfoByCurLevelDiff.dwDynamicPropertyCfg;
            actorData.TheBaseAttribute.ClashMark                        = dataCfgInfoByCurLevelDiff.dwClashMark;
            actorData.TheBaseAttribute.RandomPassiveSkillRule           = 0;
            actorData.TheBaseAttribute.PassiveSkillID1                  = 0;
            actorData.TheBaseAttribute.PassiveSkillID2                  = 0;
            actorData.TheBaseAttribute.DeadControl                      = false;
            actorData.TheResInfo.Name                   = StringHelper.UTF8BytesToString(ref dataCfgInfoByCurLevelDiff.szName);
            actorData.TheResInfo.ResPath                = StringHelper.UTF8BytesToString(ref dataCfgInfoByCurLevelDiff.szCharacterInfo);
            actorData.TheOrganOnlyInfo.OrganType        = (int)dataCfgInfoByCurLevelDiff.bOrganType;
            actorData.TheOrganOnlyInfo.ShowInMinimap    = (dataCfgInfoByCurLevelDiff.bShowInMinimap != 0);
            actorData.TheOrganOnlyInfo.PhyArmorHurtRate = dataCfgInfoByCurLevelDiff.iPhyArmorHurtRate;
            actorData.TheOrganOnlyInfo.AttackRouteID    = dataCfgInfoByCurLevelDiff.iAktRouteID;
            actorData.TheOrganOnlyInfo.DeadEnemySoldier = dataCfgInfoByCurLevelDiff.iDeadEnemySoldier;
            actorData.TheOrganOnlyInfo.NoEnemyAddPhyDef = dataCfgInfoByCurLevelDiff.iNoEnemyAddPhyDef;
            actorData.TheOrganOnlyInfo.NoEnemyAddMgcDef = dataCfgInfoByCurLevelDiff.iNoEnemyAddMgcDef;
            actorData.TheOrganOnlyInfo.HorizonRadius    = dataCfgInfoByCurLevelDiff.iHorizonRadius;
            actorData.ProviderType = GameActorDataProviderType.StaticBattleDataProvider;
            return(true);
        }
Example #11
0
        public override bool GetActorServerRuneData(ref ActorMeta actorMeta, ActorRunelSlot runeSlot, ref ActorServerRuneData runeData)
        {
            runeData.TheActorMeta = actorMeta;
            ListView <COMDT_CHOICEHERO> inSearchList = null;

            if (!this._serverCachedInfo.TryGetValue(actorMeta.PlayerId, ref inSearchList))
            {
                return(false);
            }
            int configId = actorMeta.ConfigId;

            return(this.ConvertServerHeroRuneInfo(ref runeData, runeSlot, this.Find(inSearchList, (COMDT_CHOICEHERO hero) => (ulong)hero.stBaseInfo.stCommonInfo.dwHeroID == (ulong)((long)configId))));
        }
		protected override bool BuildCallActorData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
		{
			ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey((uint)actorData.TheActorMeta.HostConfigId);
			if (dataByKey == null)
			{
				base.ErrorMissingHeroConfig((uint)actorData.TheActorMeta.ConfigId);
				return false;
			}
			this.BuildActorData(dataByKey, ref actorData);
			ResHeroCfgInfo dataByKey2 = GameDataMgr.heroDatabin.GetDataByKey((uint)actorData.TheActorMeta.ConfigId);
			actorData.TheResInfo.Name = StringHelper.UTF8BytesToString(ref dataByKey2.szName);
			actorData.TheResInfo.ResPath = StringHelper.UTF8BytesToString(ref dataByKey2.szCharacterInfo);
			return true;
		}
        public bool GetCallActorServerData(ref ActorMeta actorMeta, ref ActorServerData actorData)
        {
            actorData.TheActorMeta = actorMeta;
            ListView <COMDT_CHOICEHERO> inSearchList = null;

            if (!this._serverCachedInfo.TryGetValue(actorMeta.PlayerId, out inSearchList))
            {
                return(false);
            }
            int configId = actorMeta.HostConfigId;

            this.ConvertServerHeroInfo(ref actorData, this.Find(inSearchList, (COMDT_CHOICEHERO hero) => (ulong)hero.stBaseInfo.stCommonInfo.dwHeroID == (ulong)((long)configId)));
            return(true);
        }
Example #14
0
        protected virtual bool BuildOrganPerStarLvData(ref ActorMeta actorMeta, ActorStarLv starLv, ref ActorPerStarLvData perStarLvData)
        {
            ResOrganCfgInfo dataCfgInfoByCurLevelDiff = OrganDataHelper.GetDataCfgInfoByCurLevelDiff(perStarLvData.TheActorMeta.ConfigId);

            if (dataCfgInfoByCurLevelDiff == null)
            {
                base.ErrorMissingOrganConfig((uint)perStarLvData.TheActorMeta.ConfigId);
                return(false);
            }
            perStarLvData.PerLvHp  = dataCfgInfoByCurLevelDiff.iHPLvlup;
            perStarLvData.PerLvAd  = dataCfgInfoByCurLevelDiff.iATTLvlup;
            perStarLvData.PerLvAp  = dataCfgInfoByCurLevelDiff.iINTLvlup;
            perStarLvData.PerLvDef = dataCfgInfoByCurLevelDiff.iDEFLvlup;
            perStarLvData.PerLvRes = dataCfgInfoByCurLevelDiff.iRESLvlup;
            return(true);
        }
Example #15
0
        public override int Fast_GetActorServerDataBornIndex(ref ActorMeta actorMeta)
        {
            ListView <COMDT_CHOICEHERO> view = null;

            if (this._serverCachedInfo.TryGetValue(actorMeta.PlayerId, out view) && (view.Count >= 1))
            {
                for (int i = 0; i < view.Count; i++)
                {
                    if (view[i].stBaseInfo.stCommonInfo.dwHeroID == actorMeta.ConfigId)
                    {
                        return(view[i].stHeroExtral.iHeroPos);
                    }
                }
            }
            return(0);
        }
Example #16
0
        protected virtual bool BuildHeroPerStarLvData(ref ActorMeta actorMeta, ActorStarLv starLv, ref ActorPerStarLvData perStarLvData)
        {
            ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey((uint)perStarLvData.TheActorMeta.ConfigId);

            if (dataByKey == null)
            {
                base.ErrorMissingHeroConfig((uint)perStarLvData.TheActorMeta.ConfigId);
                return(false);
            }
            perStarLvData.PerLvHp  = (int)dataByKey.iHpGrowth;
            perStarLvData.PerLvAd  = (int)dataByKey.iAtkGrowth;
            perStarLvData.PerLvAp  = (int)dataByKey.iSpellGrowth;
            perStarLvData.PerLvDef = (int)dataByKey.iDefGrowth;
            perStarLvData.PerLvRes = (int)dataByKey.iResistGrowth;
            return(true);
        }
        protected virtual bool BuildHeroSkillData(ref ActorMeta actorMeta, ActorSkillSlot skillSlot, ref ActorStaticSkillData skillData)
        {
            ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey((uint)skillData.TheActorMeta.ConfigId);

            if (dataByKey == null)
            {
                base.ErrorMissingHeroConfig((uint)skillData.TheActorMeta.ConfigId);
                return(false);
            }
            if (skillSlot >= (ActorSkillSlot)dataByKey.astSkill.Length)
            {
                return(false);
            }
            skillData.PassiveSkillId = dataByKey.astSkill[(int)skillSlot].iPassiveSkillID;
            skillData.SkillId        = dataByKey.astSkill[(int)skillSlot].iSkillID;
            return(skillData.SkillId > 0);
        }
Example #18
0
        public override int Fast_GetActorServerDataBornIndex(ref ActorMeta actorMeta)
        {
            ListView <COMDT_CHOICEHERO> listView = null;

            if (!this._serverCachedInfo.TryGetValue(actorMeta.PlayerId, ref listView) || listView.get_Count() < 1)
            {
                return(0);
            }
            for (int i = 0; i < listView.get_Count(); i++)
            {
                if ((ulong)listView.get_Item(i).stBaseInfo.stCommonInfo.dwHeroID == (ulong)((long)actorMeta.ConfigId))
                {
                    return(listView.get_Item(i).stHeroExtral.iHeroPos);
                }
            }
            return(0);
        }
        protected virtual bool BuildOrganSkillData(ref ActorMeta actorMeta, ActorSkillSlot skillSlot, ref ActorStaticSkillData skillData)
        {
            ResOrganCfgInfo dataCfgInfoByCurLevelDiff = OrganDataHelper.GetDataCfgInfoByCurLevelDiff(skillData.TheActorMeta.ConfigId);

            if (dataCfgInfoByCurLevelDiff == null)
            {
                base.ErrorMissingOrganConfig((uint)skillData.TheActorMeta.ConfigId);
                return(false);
            }
            if (skillSlot >= (ActorSkillSlot)dataCfgInfoByCurLevelDiff.SkillIDs.Length)
            {
                return(false);
            }
            skillData.SkillId        = dataCfgInfoByCurLevelDiff.SkillIDs[(int)skillSlot];
            skillData.PassiveSkillId = 0;
            return(skillData.SkillId > 0);
        }
Example #20
0
        protected virtual bool BuildMonsterSkillData(ref ActorMeta actorMeta, ActorSkillSlot skillSlot, ref ActorStaticSkillData skillData)
        {
            int index = (int)skillSlot;
            ResMonsterCfgInfo dataCfgInfo = MonsterDataHelper.GetDataCfgInfo(skillData.TheActorMeta.ConfigId, skillData.TheActorMeta.Difficuty);

            if (dataCfgInfo == null)
            {
                base.ErrorMissingMonsterConfig((uint)skillData.TheActorMeta.ConfigId);
                return(false);
            }
            if (index >= dataCfgInfo.SkillIDs.Length)
            {
                return(false);
            }
            skillData.SkillId        = dataCfgInfo.SkillIDs[index];
            skillData.PassiveSkillId = dataCfgInfo.PassiveSkillID[index];
            return((skillData.SkillId > 0) || (skillData.PassiveSkillId > 0));
        }
Example #21
0
        protected override bool BuildOrganData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            ResOrganCfgInfo dataCfgInfoByCurLevelDiff = OrganDataHelper.GetDataCfgInfoByCurLevelDiff(actorData.TheActorMeta.ConfigId);

            if (dataCfgInfoByCurLevelDiff == null)
            {
                base.ErrorMissingOrganConfig((uint)actorData.TheActorMeta.ConfigId);
                return(false);
            }
            actorData.TheBaseAttribute.EpType                           = 1;
            actorData.TheBaseAttribute.BaseHp                           = dataCfgInfoByCurLevelDiff.iBaseHP;
            actorData.TheBaseAttribute.PerLvHp                          = dataCfgInfoByCurLevelDiff.iHPLvlup;
            actorData.TheBaseAttribute.BaseAd                           = dataCfgInfoByCurLevelDiff.iBaseATT;
            actorData.TheBaseAttribute.PerLvAd                          = dataCfgInfoByCurLevelDiff.iATTLvlup;
            actorData.TheBaseAttribute.BaseAp                           = dataCfgInfoByCurLevelDiff.iBaseINT;
            actorData.TheBaseAttribute.PerLvAp                          = dataCfgInfoByCurLevelDiff.iINTLvlup;
            actorData.TheBaseAttribute.BaseAtkSpeed                     = 0;
            actorData.TheBaseAttribute.PerLvAtkSpeed                    = dataCfgInfoByCurLevelDiff.iAtkSpdAddLvlup;
            actorData.TheBaseAttribute.BaseDef                          = dataCfgInfoByCurLevelDiff.iBaseDEF;
            actorData.TheBaseAttribute.PerLvDef                         = dataCfgInfoByCurLevelDiff.iDEFLvlup;
            actorData.TheBaseAttribute.BaseRes                          = dataCfgInfoByCurLevelDiff.iBaseRES;
            actorData.TheBaseAttribute.PerLvRes                         = dataCfgInfoByCurLevelDiff.iRESLvlup;
            actorData.TheBaseAttribute.BaseHpRecover                    = dataCfgInfoByCurLevelDiff.iBaseHPAdd;
            actorData.TheBaseAttribute.PerLvHpRecover                   = dataCfgInfoByCurLevelDiff.iHPAddLvlup;
            actorData.TheBaseAttribute.CriticalChance                   = 0;
            actorData.TheBaseAttribute.CriticalDamage                   = 0;
            actorData.TheBaseAttribute.Sight                            = dataCfgInfoByCurLevelDiff.iSightR;
            actorData.TheBaseAttribute.MoveSpeed                        = dataCfgInfoByCurLevelDiff.iBaseSpeed;
            actorData.TheBaseAttribute.SoulExpGained                    = dataCfgInfoByCurLevelDiff.iSoulExp;
            actorData.TheBaseAttribute.GoldCoinInBattleGained           = dataCfgInfoByCurLevelDiff.wGoldCoinInBattle;
            actorData.TheBaseAttribute.GoldCoinInBattleGainedFloatRange = 0;
            actorData.TheBaseAttribute.DynamicProperty                  = dataCfgInfoByCurLevelDiff.dwDynamicPropertyCfg;
            actorData.TheBaseAttribute.ClashMark                        = dataCfgInfoByCurLevelDiff.dwClashMark;
            actorData.TheResInfo.Name    = StringHelper.UTF8BytesToString(ref dataCfgInfoByCurLevelDiff.szName);
            actorData.TheResInfo.ResPath = StringHelper.UTF8BytesToString(ref dataCfgInfoByCurLevelDiff.szCharacterInfo);
            actorData.TheOrganOnlyInfo.PhyArmorHurtRate = dataCfgInfoByCurLevelDiff.iPhyArmorHurtRate;
            actorData.TheOrganOnlyInfo.AttackRouteID    = dataCfgInfoByCurLevelDiff.iAktRouteID;
            actorData.TheOrganOnlyInfo.DeadEnemySoldier = dataCfgInfoByCurLevelDiff.iDeadEnemySoldier;
            actorData.TheOrganOnlyInfo.NoEnemyAddPhyDef = dataCfgInfoByCurLevelDiff.iNoEnemyAddPhyDef;
            actorData.TheOrganOnlyInfo.NoEnemyAddMgcDef = dataCfgInfoByCurLevelDiff.iNoEnemyAddMgcDef;
            actorData.TheOrganOnlyInfo.HorizonRadius    = dataCfgInfoByCurLevelDiff.iHorizonRadius;
            actorData.ProviderType = GameActorDataProviderType.StaticLobbyDataProvider;
            return(true);
        }
Example #22
0
        public override bool GetActorServerCommonSkillData(ref ActorMeta actorMeta, out uint skillID)
        {
            skillID = 0u;
            ListView <COMDT_CHOICEHERO> inSearchList = null;

            if (!this._serverCachedInfo.TryGetValue(actorMeta.PlayerId, ref inSearchList))
            {
                return(false);
            }
            int configId = actorMeta.ConfigId;
            COMDT_CHOICEHERO cOMDT_CHOICEHERO = this.Find(inSearchList, (COMDT_CHOICEHERO hero) => (ulong)hero.stBaseInfo.stCommonInfo.dwHeroID == (ulong)((long)configId));

            if (cOMDT_CHOICEHERO != null)
            {
                skillID = cOMDT_CHOICEHERO.stBaseInfo.stCommonInfo.stSkill.dwSelSkillID;
                return(true);
            }
            return(false);
        }
        protected override bool BuildMonsterData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            ResMonsterCfgInfo dataCfgInfo = MonsterDataHelper.GetDataCfgInfo(actorData.TheActorMeta.ConfigId, (int)actorData.TheActorMeta.Difficuty);

            if (dataCfgInfo == null)
            {
                dataCfgInfo = MonsterDataHelper.GetDataCfgInfo(actorData.TheActorMeta.ConfigId, 1);
            }
            if (dataCfgInfo == null)
            {
                base.ErrorMissingMonsterConfig((uint)actorData.TheActorMeta.ConfigId);
                return(false);
            }
            actorData.TheBaseAttribute.EpType                           = 1u;
            actorData.TheBaseAttribute.BaseHp                           = dataCfgInfo.iBaseHP;
            actorData.TheBaseAttribute.PerLvHp                          = 0;
            actorData.TheBaseAttribute.BaseAd                           = dataCfgInfo.iBaseATT;
            actorData.TheBaseAttribute.PerLvAd                          = 0;
            actorData.TheBaseAttribute.BaseAp                           = dataCfgInfo.iBaseINT;
            actorData.TheBaseAttribute.PerLvAp                          = 0;
            actorData.TheBaseAttribute.BaseAtkSpeed                     = 0;
            actorData.TheBaseAttribute.PerLvAtkSpeed                    = 0;
            actorData.TheBaseAttribute.BaseDef                          = dataCfgInfo.iBaseDEF;
            actorData.TheBaseAttribute.PerLvDef                         = 0;
            actorData.TheBaseAttribute.BaseRes                          = dataCfgInfo.iBaseRES;
            actorData.TheBaseAttribute.PerLvRes                         = 0;
            actorData.TheBaseAttribute.BaseHpRecover                    = dataCfgInfo.iBaseHPAdd;
            actorData.TheBaseAttribute.PerLvHpRecover                   = 0;
            actorData.TheBaseAttribute.CriticalChance                   = 0;
            actorData.TheBaseAttribute.CriticalDamage                   = 0;
            actorData.TheBaseAttribute.Sight                            = dataCfgInfo.iSightR;
            actorData.TheBaseAttribute.MoveSpeed                        = dataCfgInfo.iBaseSpeed;
            actorData.TheBaseAttribute.SoulExpGained                    = dataCfgInfo.iSoulExp;
            actorData.TheBaseAttribute.GoldCoinInBattleGained           = (int)dataCfgInfo.wStartingGoldCoinInBattle;
            actorData.TheBaseAttribute.GoldCoinInBattleGainedFloatRange = (int)dataCfgInfo.bGoldCoinInBattleRange;
            actorData.TheBaseAttribute.DynamicProperty                  = dataCfgInfo.dwDynamicPropertyCfg;
            actorData.TheBaseAttribute.ClashMark                        = dataCfgInfo.dwClashMark;
            actorData.TheResInfo.Name    = StringHelper.UTF8BytesToString(ref dataCfgInfo.szName);
            actorData.TheResInfo.ResPath = StringHelper.UTF8BytesToString(ref dataCfgInfo.szCharacterInfo);
            actorData.ProviderType       = GameActorDataProviderType.StaticLobbyDataProvider;
            return(true);
        }
        protected virtual bool BuildMonsterSkillData(ref ActorMeta actorMeta, ActorSkillSlot skillSlot, ref ActorStaticSkillData skillData)
        {
            ResMonsterCfgInfo dataCfgInfo = MonsterDataHelper.GetDataCfgInfo(skillData.TheActorMeta.ConfigId, (int)skillData.TheActorMeta.Difficuty);

            if (dataCfgInfo == null)
            {
                dataCfgInfo = MonsterDataHelper.GetDataCfgInfo(skillData.TheActorMeta.ConfigId, 1);
            }
            if (dataCfgInfo == null)
            {
                base.ErrorMissingMonsterConfig((uint)skillData.TheActorMeta.ConfigId);
                return(false);
            }
            if (skillSlot >= (ActorSkillSlot)dataCfgInfo.SkillIDs.Length)
            {
                return(false);
            }
            skillData.SkillId        = dataCfgInfo.SkillIDs[(int)skillSlot];
            skillData.PassiveSkillId = dataCfgInfo.PassiveSkillID[(int)skillSlot];
            return(skillData.SkillId > 0 || skillData.PassiveSkillId > 0);
        }
Example #25
0
 protected virtual bool BuildOrganData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
 {
     return(false);
 }
Example #26
0
 protected virtual bool BuildMonsterPerStarLvData(ref ActorMeta actorMeta, ActorStarLv starLv, ref ActorPerStarLvData perStarLvData)
 {
     return(false);
 }
 public virtual bool GetActorServerRuneData(ref ActorMeta actorMeta, ActorRunelSlot runeSlot, ref ActorServerRuneData runeData)
 {
     return(false);
 }
 public virtual bool GetActorStaticData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
 {
     return(false);
 }
 public virtual bool GetActorStaticPerStarLvData(ref ActorMeta actorMeta, ActorStarLv starLv, ref ActorPerStarLvData perStarLvData)
 {
     return(false);
 }
 public virtual bool GetActorStaticSkillData(ref ActorMeta actorMeta, ActorSkillSlot skillSlot, ref ActorStaticSkillData skillData)
 {
     return(false);
 }