/// <summary> /// 填充基础建筑信息 /// </summary> private static void CalcStageBuildInfo(s_stagebuildInfo I, ref BuildInfo Info) { if (I == null || Info == null) { return; } //获取技能 Info.m_Skill = GetSkill(Info.BuildType, Info.Quality); s_buildstarInfo StarInfo = GetBuildStar(Info.BuildType, Info.StarLevel); s_buildqualityInfo QualityInfo = GetBuildQuality(Info.BuildType, Info.Quality); int originalStar = buildingM.GetMinBuildStar(Info.BuildType); s_buildstarInfo oriInfo = buildingM.GetBuildStar(Info.BuildType, originalStar); //建筑物三围 //Info.m_Solidity = CalcSolidity(I, StarInfo, oriInfo, QualityInfo, Info.Level); //Info.m_Intensity = CalcIntensity(I, StarInfo, oriInfo, QualityInfo, Info.Level); //Info.m_Tenacity = CalcTenacity(I, StarInfo, oriInfo, QualityInfo, Info.Level); Info.m_hp = I.hp; Info.m_phyattack = I.phy_attack; Info.m_magicattack = I.magic_attack; Info.m_phydefend = I.physicaldefend; Info.m_magicdefend = I.magicdefend; Info.m_DefensePower = CalcDefendPower(Info.Quality, Info.StarLevel, Info.Level); Info.m_bear = I.bear; }
/// <summary> /// 获取建筑数据 /// </summary> /// <param name="Type">建筑类型</param> /// <param name="Level">建筑等级</param> /// <param name="Quality">建筑品质</param> /// <param name="Star">建筑星级</param> /// <returns>建筑数据,null 获取失败</returns> private static BuildInfo GetStageBuildInfo(int id, int Level, int Quality, int Star) { //获取基础建筑信息 s_stagebuildInfo BaseInfo = GetStageBuildInfo(id); if (BaseInfo == null) { NGUIUtil.DebugLog("获取不到该类型的建筑数据:" + id); return(null); } BuildInfo Info = new BuildInfo(); Info.ID = id; Info.BuildType = BaseInfo.type; Info.Level = BaseInfo.level; Info.Quality = BaseInfo.quality; Info.StarLevel = BaseInfo.starlevel; Info.m_name = BaseInfo.name; Info.m_modeltype = BaseInfo.modeltype; Info.m_damage = BaseInfo.damage; Info.m_RoomType = (RoomType)BaseInfo.resource; Info.m_Desc = BaseInfo.description; Info.m_data0 = BaseInfo.data0; Info.m_Shape = GetShapeType(BaseInfo.shapeid); Info.m_bear = BaseInfo.bear; Info.m_wood = BaseInfo.dropwood; Info.Mana = BaseInfo.dead_mana; //计算升级,升星,升阶 数据。 CalcStageBuildInfo(BaseInfo, ref Info); //返回结果 return(Info); }
public static int GetStageBuildMana(int id) { s_stagebuildInfo buildInfo = GetStageBuildInfo(id); if (buildInfo != null) { return(buildInfo.dead_mana); } return(0); }
/// <summary> /// 填充基础建筑信息 /// </summary> private static void FillStageBuildInfo(s_stagebuildInfo I, ref BuildInfo Info) { if (I == null || Info == null) { return; } Info.m_name = I.name; Info.m_modeltype = I.modeltype; Info.m_damage = I.damage; Info.m_RoomType = (RoomType)I.resource; //Info.m_RoomKind = I.kindtype; Info.m_Desc = I.description; Info.m_data0 = I.data0; //Info.m_data1 = I.data1; Info.m_Shape = GetShapeType(I.shapeid); Info.m_bear = I.bear; }