修复条件响应器bug

main
pengjunwu 2024-01-05 16:58:00 +08:00
parent 5532fbebdc
commit 8c104d2166
1 changed files with 3 additions and 2 deletions

View File

@ -230,12 +230,13 @@ namespace Framework.Condition
{
if (id == INVALID_ALLOC_ID)
return;
foreach (var infoList in _dicConditionInfos.Values)
foreach (var kv in _dicConditionInfos)
{
var infoList = kv.Value;
for (int i = infoList.Count - 1; i >= 0; i--)
{
var conditionInfo = infoList[i];
if (conditionInfo.id == id)
if (conditionInfo.id == id || conditionInfo.id == INVALID_ALLOC_ID)
{
infoList.RemoveAt(i);
ReturnAConditionInfo(conditionInfo);