public void CollectDataFromDBC(DBC_Row node) { m_AddHpMax = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddHpMax", 0, false), out m_HpMaxType); m_AddRageMax = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddRageMax", 0, false), out m_HpMaxType); m_AddNpMax = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddNpMax", 0, false), out m_NpMaxType); m_AddEpMax = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddEpMax", 0, false), out m_EpMaxType); m_AddCrgMax = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddCrgMax", 0, false), out m_CrgMaxType); m_AddAd = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddAd", 0, false), out m_AdType); m_AddDp = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddDp", 0, false), out m_DpType); m_AddRps = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddRps", 0, false), out m_RpsType); m_AddCrg = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddCrg", 0, false), out m_CrgType); m_AddCht = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddCht", 0, false), out m_ChtType); m_AddRange = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddRange", 0, false), out m_RangeType); m_AddDps = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddDps", 0, false), out m_DpsType); m_AddDamRange = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddDamRange", 0, false), out m_DamRangeType); m_AddCri = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddCri", 0, false), out m_CriType); m_AddPow = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddPow", 0, false), out m_PowType); m_AddAndp = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddAndp", 0, false), out m_AndpType); m_AddHpRecover = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddHpRecover", 0, false), out m_HpRecoverType); m_AddNpRecover = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddNpRecover", 0, false), out m_NpRecoverType); m_AddEpRecover = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddEpRecover", 0, false), out m_EpRecoverType); m_AddAp = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddAp", 0, false), out m_ApType); m_AddTay = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddTay", 0, false), out m_TayType); m_AddSpd = CalcRealValue(DBCUtil.ExtractNumeric <int>(node, "AddSpd", 0, false), out m_SpdType); }
public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); m_Description = DBCUtil.ExtractString(node, "Description", "", true); m_AttrData.CollectDataFromDBC(node); return(true); }
public bool CollectDataFromDBC(DBC_Row node) { m_Level = DBCUtil.ExtractNumeric <int>(node, "Level", 0, true); m_ConsumeExp = DBCUtil.ExtractNumeric <int>(node, "ConsumeExp", 0, true); m_RebornTime = DBCUtil.ExtractNumeric <int>(node, "RebornTime", 0, true); return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); m_Type = DBCUtil.ExtractNumeric <int>(node, "Type", 0, true); m_IntroTime = DBCUtil.ExtractNumeric <int>(node, "IntroTime", 0, true); m_ScenePath = DBCUtil.ExtractString(node, "ScenePath", "", true); m_UnitFile = DBCUtil.ExtractString(node, "UnitFile", "", true); m_ObstacleFile = DBCUtil.ExtractString(node, "ObstacleFile", "", true); m_SceneLogicFile = DBCUtil.ExtractString(node, "SceneLogicFile", "", true); m_BlockInfoFile = DBCUtil.ExtractString(node, "BlockInfoFile", "", true); m_ClientSceneFile = DBCUtil.ExtractString(node, "ClientSceneFile", "", true); m_TiledDataScale = DBCUtil.ExtractNumeric <float>(node, "TiledDataScale", 0, true); List <float> coords = DBCUtil.ExtractNumericList <float>(node, "ReachableSet", 0, false); if (coords.Count > 0) { m_ReachableSet = new Vector3[coords.Count / 2]; for (int i = 0; i < coords.Count - 1; i += 2) { m_ReachableSet[i / 2] = new Vector3(coords[i], 0, coords[i + 1]); } } else { m_ReachableSet = null; } return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { ImpactId = DBCUtil.ExtractNumeric <int>(node, "Id", -1, true); ImpactLogicId = DBCUtil.ExtractNumeric <int>(node, "LogicId", -1, true); ImpactDescription = DBCUtil.ExtractString(node, "Description", "", false); ImpactType = DBCUtil.ExtractNumeric <int>(node, "ImpactType", -1, true); ImpactTime = DBCUtil.ExtractNumeric <int>(node, "ImpactTime", -1, true); BuffDataId = DBCUtil.ExtractNumeric <int>(node, "BuffDataId", -1, false); MaxRank = DBCUtil.ExtractNumeric <int>(node, "MaxRank", -1, false); Effect = DBCUtil.ExtractString(node, "Effect", "", false); ActionId = DBCUtil.ExtractNumeric <int>(node, "ActionId", -1, false); IsDeadDisappear = DBCUtil.ExtractBool(node, "IsDeadDisappear", false, false); CanBeCancel = DBCUtil.ExtractBool(node, "CanBeCancel", false, false); IsAbsorbHurt = DBCUtil.ExtractBool(node, "IsAbsorbHurt", false, false); IsReflect = DBCUtil.ExtractBool(node, "IsReflect", false, false); IsDamageDisappear = DBCUtil.ExtractBool(node, "IsDamageDisappear", false, false); IsFightDisappear = DBCUtil.ExtractBool(node, "IsFightDisappear", false, false); IsShootDisappear = DBCUtil.ExtractBool(node, "IsShootDisappear", false, false); IsSkillDisappear = DBCUtil.ExtractBool(node, "IsSkillDisappear", false, false); ParamNum = DBCUtil.ExtractNumeric <int>(node, "ParamNum", 0, false); ExtraParams.Clear(); if (ParamNum > 0) { for (int i = 0; i < ParamNum; ++i) { string key = "Param" + i.ToString(); ExtraParams.Insert(i, DBCUtil.ExtractString(node, key, "", false)); } } return(true); }
public float AOERange; // 技能AOE范围 /** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { SkillId = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); SkillDataFile = DBCUtil.ExtractString(node, "LogicDataFile", "", true); SkillIcon = DBCUtil.ExtractString(node, "Icon", "", true); SkillDescription = DBCUtil.ExtractString(node, "Description", "", true); SkillTrueDescription = DBCUtil.ExtractString(node, "TrueDescription", "", true); ActivateLevel = DBCUtil.ExtractNumeric <int>(node, "ActivateLevel", 0, true); SkillPassivity = (Passivity)DBCUtil.ExtractNumeric <int>(node, "Passivity", 0, true); SkillCoefficient = DBCUtil.ExtractNumeric <float>(node, "SkillCoefficient", 0, true); TargetType = (TargType)DBCUtil.ExtractNumeric <int>(node, "TargetType", 0, true); TargetSelectType = (TargSelectType)DBCUtil.ExtractNumeric <int>(node, "TargetSelectType", 0, true); CoolDownTime = DBCUtil.ExtractNumeric <float>(node, "CD", 0, true); CostHp = DBCUtil.ExtractNumeric <int>(node, "CostHp", 0, false); CostEnergy = DBCUtil.ExtractNumeric <int>(node, "CostEnergy", 0, false); CostEnergyCore = DBCUtil.ExtractNumeric <int>(node, "CostEnergyCore", 0, false); CostItemId = DBCUtil.ExtractNumeric <int>(node, "CostItemId", 0, false); RangeIndicatorType = (RangeType)DBCUtil.ExtractNumeric <int>(node, "RangeIndicatorType", 0, false); SkillRangeAsset = DBCUtil.ExtractString(node, "SkillRangeAsset", "", false); AOERangeAsset = DBCUtil.ExtractString(node, "AOERangeAsset", "", false); SkillAssetStdRange = DBCUtil.ExtractNumeric <float>(node, "SkillAssetStdRange", 0, false); AOEAssetStdRange = DBCUtil.ExtractNumeric <float>(node, "AOEAssetStdRange", 0, false); SkillRange = DBCUtil.ExtractNumeric <float>(node, "SkillRange", 0, false); AOERange = DBCUtil.ExtractNumeric <float>(node, "AOERange", 0, false); return(true); }
/** * @brief 私有提取函数 * * @return */ private List <Data_ActionInfo> ExtractAction(DBC_Row node, string prefix) { List <Data_ActionInfo> data = new List <Data_ActionInfo>(); List <string> childList = DBCUtil.ExtractNodeByPrefix(node, prefix); if (childList.Count == 0) { return(data); } foreach (string child in childList) { if (string.IsNullOrEmpty(child)) { continue; } string outModelPath; string outSoundId; if (!_ParseModelPath(child, out outModelPath, out outSoundId)) { string info = "[Err]:ActionConfigProvider.ExtractAction anim name error:" + child; throw new Exception(info); } Data_ActionInfo action = new Data_ActionInfo(); action.m_AnimName = m_ActionPrefix + outModelPath; action.m_SoundId = outSoundId; data.Add(action); } return(data); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); m_AttrData.CollectDataFromDBC(node); return(true); }
public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "ID", 0, true); m_Critical = (int)(DBCUtil.ExtractNumeric <float>(node, "Critical", 0, true) * c_IntRate); m_C = (int)(DBCUtil.ExtractNumeric <float>(node, "C", 0, true) * c_IntRate * 10); return(true); }
public bool CollectDataFromDBC(DBC_Row node) { m_EquipmentId = DBCUtil.ExtractNumeric <int>(node, "EquipmentId", 0, true); m_EquipmentName = DBCUtil.ExtractString(node, "EquipmentName", "", true); m_UiModel = DBCUtil.ExtractString(node, "UiModel", "", false); m_AttrData.CollectDataFromDBC(node); return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { m_WeaponId = DBCUtil.ExtractNumeric <int>(node, "Id", -1, true); m_WeaponName = DBCUtil.ExtractString(node, "Name", "", true); m_ResourceName = DBCUtil.ExtractString(node, "ResourceName", "", false); m_WeaponType = DBCUtil.ExtractNumeric <int>(node, "WeaponType", -1, false); m_EquipmentId = DBCUtil.ExtractNumeric <int>(node, "EquipmentId", -1, false); return(true); }
public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); m_UsagerId = DBCUtil.ExtractNumeric <int>(node, "UsagerId", 0, true); m_WeaponId = DBCUtil.ExtractNumeric <int>(node, "WeaponId", 0, true); string pos = DBCUtil.ExtractString(node, "MuzzlePos", "0 0 0", true); m_MuzzlePos = Converter.ConvertVector3D(pos); return(true); }
public bool CollectDataFromDBC(DBC_Row node) { m_LevelupId = DBCUtil.ExtractNumeric <int>(node, "LevelupId", 0, true); m_EquipmentId = DBCUtil.ExtractNumeric <int>(node, "EquipmentId", 0, true); m_EquipmentName = DBCUtil.ExtractString(node, "EquipmentName", "", true); m_Type = DBCUtil.ExtractNumeric <int>(node, "Type", 0, true); m_Level = DBCUtil.ExtractNumeric <int>(node, "Level", 0, true); m_UiModel = DBCUtil.ExtractString(node, "UiModel", "", false); m_ConsumeItem = DBCUtil.ExtractNumeric <int>(node, "ConsumeItem", 0, false); m_ConsumeMoney = DBCUtil.ExtractNumeric <int>(node, "ConsumeMoney", 0, false); m_ConsumeYuanbao = DBCUtil.ExtractNumeric <int>(node, "ConsumeYuanbao", 0, false); m_AttrData.CollectDataFromDBC(node); return(true); }
public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); m_LogicId = DBCUtil.ExtractNumeric <int>(node, "LogicId", 0, true); m_ParamNum = DBCUtil.ExtractNumeric <int>(node, "ParamNum", 0, true); if (m_ParamNum > 0) { m_Params = new string[m_ParamNum]; for (int i = 0; i < m_ParamNum; ++i) { m_Params[i] = DBCUtil.ExtractString(node, "Param" + i, "", false); } } return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); m_LinkId = DBCUtil.ExtractNumeric <int>(node, "LinkId", 0, true); m_CampId = DBCUtil.ExtractNumeric <int>(node, "CampId", 0, true); m_Pos = Converter.ConvertVector3D(DBCUtil.ExtractString(node, "Pos", "0.0,0.0,0.0", true)); m_RotAngle = DBCUtil.ExtractNumeric <float>(node, "RotAngle", 0.0f, true) * (float)Math.PI / 180; m_IsEnable = DBCUtil.ExtractBool(node, "IsEnable", false, true); m_AiLogic = DBCUtil.ExtractNumeric <int>(node, "AiLogic", 0, false); for (int i = 0; i < c_MaxAiParamNum; ++i) { m_AiParam[i] = DBCUtil.ExtractString(node, "AiParam" + i, "", false); } return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { ActionId = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); ActionLogicId = DBCUtil.ExtractNumeric <int>(node, "LogicId", 0, true); BreakLevel = DBCUtil.ExtractNumeric <int>(node, "BreakLevel", 0, true); CallbackSection = DBCUtil.ExtractNumeric <int>(node, "CallbackSection", 0, true); CallbackPoint = DBCUtil.ExtractNumeric <float>(node, "CallbackPoint", 0, true); SectionNumber = DBCUtil.ExtractNumeric <int>(node, "SectionNum", 0, true); EffectNum = DBCUtil.ExtractNumeric <int>(node, "EffectNum", 0, true); EffectList.Clear(); for (int i = 0; i < EffectNum; i++) { string keySuffix = i.ToString(); ActionEffectInfo effect_info = new ActionEffectInfo(); effect_info.EffectTime = DBCUtil.ExtractNumeric <float>(node, "EffectTime" + keySuffix, 0, false); effect_info.SkeletonNodeName = DBCUtil.ExtractString(node, "SkeletonNodeName" + keySuffix, "", false); effect_info.EffectName = DBCUtil.ExtractString(node, "EffectName" + keySuffix, "", false); EffectList.Insert(i, effect_info); } for (int i = 0; i < SectionNumber; i++) { string keySuffix = i.ToString(); ActionSection actionSection = new ActionSection(); actionSection.ActionType = DBCUtil.ExtractNumeric <int>(node, "ActionType" + keySuffix, -1, true); actionSection.WapMode = DBCUtil.ExtractString(node, "WapMode" + keySuffix, "ONCE", false); actionSection.IsUpperBody = DBCUtil.ExtractBool(node, "IsUpperBody" + keySuffix, false, false); actionSection.PlaySpeed = DBCUtil.ExtractNumeric <float>(node, "PlaySpeed" + keySuffix, 1.0f, false); actionSection.PlayTime = DBCUtil.ExtractNumeric <float>(node, "PlayTime" + keySuffix, 0, false); actionSection.MoveSpeed = DBCUtil.ExtractNumeric <float>(node, "MoveSpeed" + keySuffix, 0, false); actionSection.MoveTowards = DBCUtil.ExtractNumeric <int>(node, "MoveTowards" + keySuffix, 0, false); SectionList.Insert(i, actionSection); } ParamNum = DBCUtil.ExtractNumeric <int>(node, "ParamNum", 0, false); if (ParamNum > 0) { for (int i = 0; i < ParamNum; ++i) { string key = "Param" + i.ToString(); ExtraParams.Insert(i, DBCUtil.ExtractString(node, key, "", false)); } } return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", -1, true); m_Ground = DBCUtil.ExtractString(node, "Ground", "", true); m_BeginArea = DBCUtil.ExtractString(node, "BeginArea", "", true); m_EndArea = DBCUtil.ExtractString(node, "EndArea", "", true); m_TriggerDir = DBCUtil.ExtractNumeric <float>(node, "TriggerDir", -1, true); m_PushObjDeltaTime = DBCUtil.ExtractNumeric <float>(node, "PushObjDeltaTime", -1, true); m_PushGroundDeltaTime = DBCUtil.ExtractNumeric <float>(node, "PushGroundDeltaTime", -1, true); m_OffsetAngle = DBCUtil.ExtractNumeric <float>(node, "OffsetAngle", -1, true); m_ObjOffsetDis = DBCUtil.ExtractNumeric <float>(node, "ObjOffsetDis", -1, true); m_GroundOffsetDis = DBCUtil.ExtractNumeric <float>(node, "GroundOffsetDis", -1, true); m_ObjLifeTime = DBCUtil.ExtractNumeric <float>(node, "ObjLifeTime", -1, true); m_GroundLifeTime = DBCUtil.ExtractNumeric <float>(node, "GroundLifeTime", -1, true); m_Speed = DBCUtil.ExtractNumeric <float>(node, "Speed", -1, true); m_MaxSpeed = DBCUtil.ExtractNumeric <float>(node, "MaxSpeed", -1, true); m_Acceleration = DBCUtil.ExtractNumeric <float>(node, "Acceleration", -1, true); ObjNum = DBCUtil.ExtractNumeric <int>(node, "ObjNum", 0, false); ObjList.Clear(); if (ObjNum > 0) { for (int i = 0; i < ObjNum; ++i) { string key = "Obj" + i.ToString(); ObjList.Insert(i, DBCUtil.ExtractString(node, key, "", false)); } } ParamNum = DBCUtil.ExtractNumeric <int>(node, "ParamNum", 0, false); ExtraParams.Clear(); if (ParamNum > 0) { for (int i = 0; i < ParamNum; ++i) { string key = "Param" + i.ToString(); ExtraParams.Insert(i, DBCUtil.ExtractString(node, key, "", false)); } } return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { Id = DBCUtil.ExtractNumeric <int>(node, "Id", -1, true); Name = DBCUtil.ExtractString(node, "Name", "", true); IsMusic = DBCUtil.ExtractBool(node, "IsMusic", false, true); Priority = DBCUtil.ExtractNumeric <int>(node, "Priority", 1, false); Volume = DBCUtil.ExtractNumeric <float>(node, "Volume", 1.0f, false); IsLoop = DBCUtil.ExtractBool(node, "IsLoop", false, false); Position = Converter.ConvertVector3D(DBCUtil.ExtractString(node, "Position", "0,0,0", false)); ParamNum = DBCUtil.ExtractNumeric <int>(node, "ParamNum", 0, false); ExtraParams.Clear(); if (ParamNum > 0) { for (int i = 0; i < ParamNum; ++i) { string key = "Param" + i.ToString(); ExtraParams.Insert(i, DBCUtil.ExtractString(node, key, "", false)); } } return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { SoundId = DBCUtil.ExtractNumeric <int>(node, "Id", -1, true); SoundDescription = DBCUtil.ExtractString(node, "Description", "", false); for (int i = 0; i < skillSoundCount; ++i) { string NodeName = "Sound" + i.ToString(); m_SoundList.Add(DBCUtil.ExtractString(node, NodeName, "", false)); } ParamNum = DBCUtil.ExtractNumeric <int>(node, "ParamNum", 0, false); ExtraParams.Clear(); if (ParamNum > 0) { for (int i = 0; i < ParamNum; ++i) { string key = "Param" + i.ToString(); ExtraParams.Insert(i, DBCUtil.ExtractString(node, key, "", false)); } } return(true); }
public bool CollectDataFromDBC(DBC_Row node) { m_ItemId = DBCUtil.ExtractNumeric <int>(node, "ItemId", 0, true); m_ItemName = DBCUtil.ExtractString(node, "ItemName", "", true); m_ItemTrueName = DBCUtil.ExtractString(node, "ItemTrueName", "", true); m_ItemType = DBCUtil.ExtractString(node, "ItemType", "", true); m_IsLobbyItem = DBCUtil.ExtractBool(node, "IsLobbyItem", false, true); m_Grade = DBCUtil.ExtractNumeric <int>(node, "Grade", 0, true); m_UseLogicId = DBCUtil.ExtractNumeric <int>(node, "UseLogicId", 0, true); List <string> strList = DBCUtil.ExtractStringList(node, "UseResultData", "", true); if (strList.Count > 0) { m_UseResultData = strList.ToArray(); } List <int> list = DBCUtil.ExtractNumericList <int>(node, "AddBuffOnEquiping", 0, true); if (list.Count > 0) { m_AddBuffOnEquiping = list.ToArray(); } list = DBCUtil.ExtractNumericList <int>(node, "AddSkillOnEquiping", 0, true); if (list.Count > 0) { m_AddSkillOnEquiping = list.ToArray(); } m_ShowInShop = (0 != DBCUtil.ExtractNumeric <int>(node, "ShowInShop", 0, true)); m_Model = DBCUtil.ExtractString(node, "Model", "", true); m_UiModel = DBCUtil.ExtractString(node, "UiModel", "", true); m_MaxStack = DBCUtil.ExtractNumeric <int>(node, "MaxStack", 1, true); list = DBCUtil.ExtractNumericList <int>(node, "ConsumeItems", 0, true); if (list.Count > 0) { m_ConsumeItems = list.ToArray(); } else { m_ConsumeItems = new int[] { 0, 0, 0 }; } m_ConsumeMoney = DBCUtil.ExtractNumeric <int>(node, "ConsumeMoney", 0, true); list = DBCUtil.ExtractNumericList <int>(node, "PropertyRank", 0, true); if (list.Count > 0) { m_PropertyRank = list.ToArray(); } else { m_PropertyRank = new int[] { 0, 0, 0, 0, 0 }; } m_AddExp = DBCUtil.ExtractNumeric <int>(node, "AddExp", 0, true); m_AddMoney = DBCUtil.ExtractNumeric <int>(node, "AddMoney", 0, true); m_AddBuff = DBCUtil.ExtractNumeric <int>(node, "AddBuffer", 0, true); m_Introduce = DBCUtil.ExtractString(node, "Introduce", "", true); m_ItemSkillFirst = DBCUtil.ExtractNumeric <int>(node, "ItemSkillFirst", 0, true); m_ItemSkillSecond = DBCUtil.ExtractNumeric <int>(node, "ItemSkillSecond", 0, true); m_ItemSkillThird = DBCUtil.ExtractNumeric <int>(node, "ItemSkillThird", 0, true); m_NormalIcon = DBCUtil.ExtractString(node, "NormalIcon", "", true); m_BigIcon = DBCUtil.ExtractString(node, "BigIcon", "", true); m_AttrData.CollectDataFromDBC(node); return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); m_Name = DBCUtil.ExtractString(node, "Name", "", true); m_Scale = DBCUtil.ExtractNumeric <float>(node, "Scale", 1.0f, true); m_AiLogic = DBCUtil.ExtractNumeric <int>(node, "AiLogic", 0, false); m_AttrData.CollectDataFromDBC(node); m_ViewRange = DBCUtil.ExtractNumeric <float>(node, "ViewRange", -1, true); m_ReleaseTime = DBCUtil.ExtractNumeric <long>(node, "ReleaseTime", 0, false); m_HeadUiPos = DBCUtil.ExtractNumeric <int>(node, "HeadUiPos", 0, false); m_CostType = DBCUtil.ExtractNumeric <int>(node, "CostType", 0, false); m_ShootBuffLifeTime = DBCUtil.ExtractNumeric <float>(node, "ShootBuffLifeTime", 1.0f, false); m_NoGunRunEnterTimeMs = DBCUtil.ExtractNumeric <long>(node, "NoGunRunEnterTimeMs", 2000, false); m_SkillList_1 = DBCUtil.ExtractNumericList <int>(node, "Skill_1", 0, false); m_SkillList_2 = DBCUtil.ExtractNumericList <int>(node, "Skill_2", 0, false); m_SkillList_3 = DBCUtil.ExtractNumericList <int>(node, "Skill_3", 0, false); m_SkillList_4 = DBCUtil.ExtractNumericList <int>(node, "Skill_4", 0, false); m_SkillList_5 = DBCUtil.ExtractNumericList <int>(node, "Skill_5", 0, false); m_SkillList_6 = DBCUtil.ExtractNumericList <int>(node, "Skill_6", 0, false); m_RollSkill = DBCUtil.ExtractNumeric <int>(node, "RollSkill", 0, false); m_WeaponList = DBCUtil.ExtractNumericList <int>(node, "WeaponList", 0, false); m_ActionList = DBCUtil.ExtractNumericList <int>(node, "ActionId", 0, false); m_Model = DBCUtil.ExtractString(node, "Model", "", false); m_DeathModel = DBCUtil.ExtractString(node, "DeathModel", "", false); m_ActionFile = DBCUtil.ExtractString(node, "ActionFile", "", false); m_AnimPath = DBCUtil.ExtractString(node, "AnimPath", "", false); m_Radius = DBCUtil.ExtractNumeric <float>(node, "Radius", 1.0f, false); m_AvoidanceRadius = DBCUtil.ExtractNumeric <int>(node, "AvoidanceRadius", 1, false); m_GunEndRelativePos = Converter.ConvertVector3D(DBCUtil.ExtractString(node, "GunEndRelativePos", "0.0,0.0,0.0", false)); List <int> list = DBCUtil.ExtractNumericList <int>(node, "RecommendEquipment", 0, false); if (list.Count == 6) { m_RecommendEquipment = list.ToArray(); } else { m_RecommendEquipment = new int[] { 0, 0, 0, 0, 0, 0 }; } list = DBCUtil.ExtractNumericList <int>(node, "AiEquipment", 0, false); if (list.Count == 6) { m_AiEquipment = list.ToArray(); } else { m_AiEquipment = new int[] { 0, 0, 0, 0, 0, 0 } }; list = DBCUtil.ExtractNumericList <int>(node, "AiAttackSkill", 0, false); if (list.Count > 0) { m_AiAttackSkill = list.ToArray(); } list = DBCUtil.ExtractNumericList <int>(node, "AiMoveSkill", 0, false); if (list.Count > 0) { m_AiMoveSkill = list.ToArray(); } list = DBCUtil.ExtractNumericList <int>(node, "AiControlSkill", 0, false); if (list.Count > 0) { m_AiControlSkill = list.ToArray(); } list = DBCUtil.ExtractNumericList <int>(node, "AiSelfAssitSkill", 0, false); if (list.Count > 0) { m_AiSelfAssitSkill = list.ToArray(); } list = DBCUtil.ExtractNumericList <int>(node, "AiTeamAssitSkill", 0, false); if (list.Count > 0) { m_AiTeamAssitSkill = list.ToArray(); } return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true); m_Name = DBCUtil.ExtractString(node, "Name", "", true); m_NpcType = DBCUtil.ExtractNumeric <int>(node, "NpcType", 0, true); m_Level = DBCUtil.ExtractNumeric <int>(node, "Level", 0, true); m_Scale = DBCUtil.ExtractNumeric <float>(node, "Scale", 1.0f, true); m_DropCount = DBCUtil.ExtractNumeric <int>(node, "DropCount", 0, false); m_DropExp = DBCUtil.ExtractNumeric <int>(node, "DropExp", 0, false); m_DropMoney = DBCUtil.ExtractNumeric <int>(node, "DropMoney", 0, false); List <int> list = DBCUtil.ExtractNumericList <int>(node, "DropProbabilities", 0, false); if (list.Count > 0) { m_DropProbabilities = list.ToArray(); } list = DBCUtil.ExtractNumericList <int>(node, "DropNpcs", 0, false); if (list.Count > 0) { m_DropNpcs = list.ToArray(); } list = DBCUtil.ExtractNumericList <int>(node, "InteractSourceActions", 0, false); if (list.Count > 0) { m_InteractSourceActions = list.ToArray(); } else { m_InteractSourceActions = new int[] { 0, 0 }; } list = DBCUtil.ExtractNumericList <int>(node, "InteractTargetActions", 0, false); if (list.Count > 0) { m_InteractTargetActions = list.ToArray(); } else { m_InteractTargetActions = new int[] { 0, 0 }; } m_InteractionLogic = DBCUtil.ExtractNumeric <int>(node, "InteractionLogic", 0, false); List <string> strList = DBCUtil.ExtractStringList(node, "InteractResultData", "", false); if (strList.Count > 0) { m_InteractResultData = strList.ToArray(); } m_AttrData.CollectDataFromDBC(node); m_ViewRange = DBCUtil.ExtractNumeric <float>(node, "ViewRange", -1, true); m_GohomeRange = DBCUtil.ExtractNumeric <float>(node, "GohomeRange", -1, true); m_ReleaseTime = DBCUtil.ExtractNumeric <long>(node, "ReleaseTime", 0, true); m_HeadUiPos = DBCUtil.ExtractNumeric <int>(node, "HeadUiPos", 0, true); m_SkillList = DBCUtil.ExtractNumericList <int>(node, "SkillList", 0, false); m_ActionList = DBCUtil.ExtractNumericList <int>(node, "ActionId", 0, false); m_Model = DBCUtil.ExtractString(node, "Model", "", false); m_DeathModel = DBCUtil.ExtractString(node, "DeathModel", "", false); m_DeathEffect = DBCUtil.ExtractString(node, "DeathEffect", "", false); m_DeathSound = DBCUtil.ExtractString(node, "DeathSound", "", false); m_DeadType = DBCUtil.ExtractNumeric <int>(node, "DeadType", 0, false); m_Barrage = DBCUtil.ExtractNumeric <int>(node, "Barrage", 0, false); m_AvoidanceRadius = DBCUtil.ExtractNumeric <int>(node, "AvoidanceRadius", 1, false); m_CanMove = DBCUtil.ExtractBool(node, "CanMove", false, false); m_CanRotate = DBCUtil.ExtractBool(node, "CanRotate", true, false); m_IsRange = DBCUtil.ExtractBool(node, "IsRange", false, false); m_IsShine = DBCUtil.ExtractBool(node, "IsShine", false, false); m_isBlaze = DBCUtil.ExtractBool(node, "IsBlaze", false, false); m_IsHurtComa = DBCUtil.ExtractBool(node, "IsHurtComa", false, false); m_BornTimeMs = DBCUtil.ExtractNumeric <int>(node, "BornTimeMs", 0, false); m_BornEffect = DBCUtil.ExtractString(node, "BornEffect", "", false); m_IsAttachControler = DBCUtil.ExtractBool(node, "IsAttachControler", false, false); m_AttachNodeName = DBCUtil.ExtractString(node, "AttachNodeName", "", false); m_GunEndRelativePos = Converter.ConvertVector3D(DBCUtil.ExtractString(node, "GunEndRelativePos", "0.0,0.0,0.0", false)); m_WeaponList = DBCUtil.ExtractNumericList <int>(node, "WeaponId", 0, false); string shapeType = DBCUtil.ExtractString(node, "ShapeType", "", true); int shapeParamNum = DBCUtil.ExtractNumeric <int>(node, "ShapeParamNum", 0, true); if (shapeParamNum > 0) { string[] shapeParams = new string[shapeParamNum]; for (int i = 0; i < shapeParamNum; ++i) { shapeParams[i] = DBCUtil.ExtractString(node, "ShapeParam" + i, "", false); } if (0 == string.Compare("Circle", shapeType, true)) { m_Shape = new Circle(new Vector3(0, 0, 0), float.Parse(shapeParams[0])); } else if (0 == string.Compare("Line", shapeType, true)) { Vector3 start = Converter.ConvertVector3D(shapeParams[0]); Vector3 end = Converter.ConvertVector3D(shapeParams[1]); m_Shape = new Line(start, end); } else if (0 == string.Compare("Rect", shapeType, true)) { float width = float.Parse(shapeParams[0]); float height = float.Parse(shapeParams[1]); m_Shape = new Rect(width, height); } else if (0 == string.Compare("Polygon", shapeType, true)) { Polygon polygon = new Polygon(); foreach (string s in shapeParams) { Vector3 pt = Converter.ConvertVector3D(s); polygon.AddVertex(pt); } m_Shape = polygon; } } return(true); }
/** * @brief 提取数据 * * @param node * * @return */ public bool CollectDataFromDBC(DBC_Row node) { m_ModelId = DBCUtil.ExtractNumeric <int>(node, "ModelId", 0, true); m_AnimSetType = DBCUtil.ExtractNumeric <int>(node, "AnimSetType", 0, false); m_NoGunStdSpeed = DBCUtil.ExtractNumeric <float>(node, "NoGunStdSpeed", 3.0f, false); m_ForwardStdSpeed = DBCUtil.ExtractNumeric <float>(node, "ForwardStdSpeed", 3.0f, true); m_BackStdSpeed = DBCUtil.ExtractNumeric <float>(node, "BackStdSpeed", 3.0f, true); m_LeftRightStdSpeed = DBCUtil.ExtractNumeric <float>(node, "LeftRightStdSpeed", 3.0f, true); m_LeftRightForwardStdSpeed = DBCUtil.ExtractNumeric <float>(node, "LeftRightForwardStdSpeed", 3.0f, true); m_LeftRightBackStdSpeed = DBCUtil.ExtractNumeric <float>(node, "LeftRightBackStdSpeed", 3.0f, true); m_SlowStdSpeed = DBCUtil.ExtractNumeric <float>(node, "SlowStdSpeed", 3.0f, false); m_FastStdSpeed = DBCUtil.ExtractNumeric <float>(node, "FastStdSpeed", 3.0f, false); m_IsUpperDepart = DBCUtil.ExtractBool(node, "IsUpperDepart", false, false); m_ActionPrefix = DBCUtil.ExtractString(node, "ActionPrefix", "", false); m_ActionContainer = new Dictionary <Animation_Type, List <Data_ActionInfo> >(); m_ActionContainer[Animation_Type.AT_SLEEP] = ExtractAction(node, "Sleep"); m_ActionContainer[Animation_Type.AT_Stand] = ExtractAction(node, "Stand_0"); m_ActionContainer[Animation_Type.AT_Hold] = ExtractAction(node, "Hold_0"); m_ActionContainer[Animation_Type.AT_RIDE] = ExtractAction(node, "Ride_0"); m_ActionContainer[Animation_Type.AT_Idle0] = ExtractAction(node, "Idle_0"); m_ActionContainer[Animation_Type.AT_Idle1] = ExtractAction(node, "Idle_1"); m_ActionContainer[Animation_Type.AT_Idle2] = ExtractAction(node, "Idle_2"); m_ActionContainer[Animation_Type.AT_SlowMove] = ExtractAction(node, "SlowMove"); m_ActionContainer[Animation_Type.AT_FastMove] = ExtractAction(node, "FastMove"); m_ActionContainer[Animation_Type.AT_NoGunRun] = ExtractAction(node, "NoGunRun"); m_ActionContainer[Animation_Type.AT_NoGunStand] = ExtractAction(node, "NoGunStand"); m_ActionContainer[Animation_Type.AT_RunForward] = ExtractAction(node, "RunForward_0"); m_ActionContainer[Animation_Type.AT_RunBackward] = ExtractAction(node, "RunBackward_0"); m_ActionContainer[Animation_Type.AT_RunLeft] = ExtractAction(node, "RunLeft_0"); m_ActionContainer[Animation_Type.AT_RunRight] = ExtractAction(node, "RunRight_0"); m_ActionContainer[Animation_Type.AT_RunForwardLeft] = ExtractAction(node, "RunForwardLeft_0"); m_ActionContainer[Animation_Type.AT_RunForwardRight] = ExtractAction(node, "RunForwardRight_0"); m_ActionContainer[Animation_Type.AT_RunBackwardLeft] = ExtractAction(node, "RunBackwardLeft_0"); m_ActionContainer[Animation_Type.AT_RunBackwardRight] = ExtractAction(node, "RunBackwardRight_0"); m_ActionContainer[Animation_Type.AT_EquipWeapon] = ExtractAction(node, "EquipWeapon"); m_ActionContainer[Animation_Type.AT_UnequipWeapon] = ExtractAction(node, "UnequipWeapon"); m_ActionContainer[Animation_Type.AT_Reload] = ExtractAction(node, "Reload"); m_ActionContainer[Animation_Type.AT_JumpBegin] = ExtractAction(node, "JumpBegin"); m_ActionContainer[Animation_Type.AT_Jumping] = ExtractAction(node, "Jumping"); m_ActionContainer[Animation_Type.AT_JumpEnd] = ExtractAction(node, "JumpEnd"); m_ActionContainer[Animation_Type.AT_Born] = ExtractAction(node, "Born"); m_ActionContainer[Animation_Type.AT_Attack] = ExtractAction(node, "Attack_"); m_ActionContainer[Animation_Type.AT_Hurt] = ExtractAction(node, "Hurt"); m_ActionContainer[Animation_Type.AT_Dead] = ExtractAction(node, "Dead"); m_ActionContainer[Animation_Type.AT_PostDead] = ExtractAction(node, "PostDead"); m_ActionContainer[Animation_Type.AT_HitHigh] = ExtractAction(node, "HitHigh"); m_ActionContainer[Animation_Type.AT_GetUp1] = ExtractAction(node, "GetUp_0"); m_ActionContainer[Animation_Type.AT_GetUp2] = ExtractAction(node, "GetUp_1"); m_ActionContainer[Animation_Type.AT_SkillSection1] = ExtractAction(node, "SkillSection01"); m_ActionContainer[Animation_Type.AT_SkillSection2] = ExtractAction(node, "SkillSection02"); m_ActionContainer[Animation_Type.AT_SkillSection3] = ExtractAction(node, "SkillSection03"); m_ActionContainer[Animation_Type.AT_SkillSection4] = ExtractAction(node, "SkillSection04"); m_ActionContainer[Animation_Type.AT_SkillSection5] = ExtractAction(node, "SkillSection05"); m_ActionContainer[Animation_Type.AT_SkillSection6] = ExtractAction(node, "SkillSection06"); m_ActionContainer[Animation_Type.AT_SkillSection7] = ExtractAction(node, "SkillSection07"); m_ActionContainer[Animation_Type.AT_SkillSection8] = ExtractAction(node, "SkillSection08"); m_ActionContainer[Animation_Type.AT_SkillSection9] = ExtractAction(node, "SkillSection09"); m_ActionContainer[Animation_Type.AT_SkillSection10] = ExtractAction(node, "SkillSection10"); m_ActionContainer[Animation_Type.AT_SkillSection11] = ExtractAction(node, "SkillSection11"); m_ActionContainer[Animation_Type.AT_SkillSection12] = ExtractAction(node, "SkillSection12"); m_ActionContainer[Animation_Type.AT_SkillSection13] = ExtractAction(node, "SkillSection13"); m_ActionContainer[Animation_Type.AT_SkillSection14] = ExtractAction(node, "SkillSection14"); m_ActionContainer[Animation_Type.AT_SkillSection15] = ExtractAction(node, "SkillSection15"); m_ActionContainer[Animation_Type.AT_SkillSection16] = ExtractAction(node, "SkillSection16"); m_ActionContainer[Animation_Type.AT_SkillSection17] = ExtractAction(node, "SkillSection17"); m_ActionContainer[Animation_Type.AT_SkillSection18] = ExtractAction(node, "SkillSection18"); m_ActionContainer[Animation_Type.AT_SkillSection19] = ExtractAction(node, "SkillSection19"); m_ActionContainer[Animation_Type.AT_SkillSection20] = ExtractAction(node, "SkillSection20"); return(true); }