public _DBC_CHARACTER_ACTION_SET GetActionSet(string strFileName, uint dwID) { bool bFind = false; COMMON_DBC <_DBC_CHARACTER_ACTION_SET> pActionDBCFile = new COMMON_DBC <_DBC_CHARACTER_ACTION_SET>(); if (!m_mapActionSet.ContainsKey(strFileName)) { string strPathName = m_strResPath + strFileName; bool bResult = pActionDBCFile.OpenFromTXT(strPathName, DBStruct.GetResources); if (bResult) { m_mapActionSet.Add(strFileName, pActionDBCFile); bFind = m_mapActionSet.ContainsKey(strFileName); } } if (!bFind) { return(null); } pActionDBCFile = (COMMON_DBC <_DBC_CHARACTER_ACTION_SET>)m_mapActionSet[strFileName]; _DBC_CHARACTER_ACTION_SET pActionSet = (_DBC_CHARACTER_ACTION_SET)pActionDBCFile.Search_Index_EQU((int)dwID); return(pActionSet); }
public virtual string GetCharActionNameByActionSetID(int nActionSetID) { int nCalcWeaponType = (int)ENUM_WEAPON_TYPE.WEAPON_TYPE_NPC; if (m_pCharActionSetFile != null && nActionSetID != -1 && nCalcWeaponType >= 0 && nCalcWeaponType < DBC_DEFINE.MAX_WEAPON_TYPE_NUMBER) { _DBC_CHARACTER_ACTION_SET pActionSet = m_pCharActionSetFile.Search_Index_EQU(nActionSetID); if (pActionSet != null) { return(pActionSet.pWeapon_Set[nCalcWeaponType]); } } return(null); }