change combine action logic to dictionary
This commit is contained in:
@@ -111,7 +111,7 @@ public class CECModelStaticData
|
||||
private string m_strSkinModelPath = string.Empty;
|
||||
private bool m_bAutoUpdate = true;
|
||||
private bool m_bActMapped;
|
||||
public CombinedActionSO m_ActionMap;
|
||||
public Dictionary<string, A3DCombinedAction> m_ActionMap = new Dictionary<string, A3DCombinedAction>();
|
||||
private uint m_dwVersion;
|
||||
private string m_strHook = string.Empty;
|
||||
private string m_strCCName = string.Empty;
|
||||
@@ -166,7 +166,10 @@ public class CECModelStaticData
|
||||
|
||||
public bool LoadData(CombinedActionSO combinedAction)
|
||||
{
|
||||
m_ActionMap = combinedAction;
|
||||
foreach(var action in combinedAction.CombinedActionData)
|
||||
{
|
||||
m_ActionMap[action.m_strName] = action;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -222,7 +225,7 @@ public class CECModelStaticData
|
||||
|
||||
public CoGfxMap GetCoGfxMap() => m_CoGfxMap;
|
||||
|
||||
public CombinedActionSO GetCombinedAction() => m_ActionMap;
|
||||
public Dictionary<string, A3DCombinedAction> GetCombinedAction() => m_ActionMap;
|
||||
|
||||
public string GetPhysFileName() => m_strPhysFileName;
|
||||
|
||||
@@ -681,8 +684,7 @@ public class CECModel
|
||||
{
|
||||
return null;
|
||||
}
|
||||
CombinedActionSO ActionMap = m_pMapModel.m_ActionMap;
|
||||
return ActionMap.GetActionByName(szActName);
|
||||
return m_pMapModel.m_ActionMap.TryGetValue(szActName, out A3DCombinedAction combinedAction) ? combinedAction : null;
|
||||
}
|
||||
//Final trigger function
|
||||
public bool QueueAction(int nChannel, string szActName, int nTransTime, uint dwUserData, bool bForceStopPrevAct, bool bCheckTailDup, bool bNoFx, bool bResetSpeed, bool bResetActFlag, CECAttackEvent attackEvent=null, uint dwNewFlagMode=0){
|
||||
|
||||
Reference in New Issue
Block a user