From 3e0ceaf4e569ea1f57a14de2f6135d1f1a50d080 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期三, 27 八月 2025 13:47:31 +0800
Subject: [PATCH] Merge branch 'clh' into liuyang
---
SourceCode/Bond/Servo/CRecipeList.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/CRecipeList.cpp b/SourceCode/Bond/Servo/CRecipeList.cpp
index 62306a3..01eec82 100644
--- a/SourceCode/Bond/Servo/CRecipeList.cpp
+++ b/SourceCode/Bond/Servo/CRecipeList.cpp
@@ -26,7 +26,7 @@
return m_nUnitNo;
}
- int CRecipeList::addRecipePacket(int totalGroup, int currentGroup, const char* pszData, size_t size)
+ int CRecipeList::addRecipePacket(int totalCount, int totalGroup, int currentGroup, const char* pszData, size_t size)
{
if (m_nToatlGroupCount == 0) m_nToatlGroupCount = totalGroup;
if (m_nToatlGroupCount != totalGroup) {
@@ -47,7 +47,9 @@
for (int i = 0; i < size; i += 4) {
int index = CToolUnits::toInt16(&pszData[i]);
short id = CToolUnits::toInt16(&pszData[i + 2]);
- addRecipe(index, id);
+ if (index != 0 && id != 0) {
+ addRecipe(index, id);
+ }
}
if (m_nCurrentGroupCount == m_nToatlGroupCount) {
@@ -67,7 +69,7 @@
}
m_ids[index] = id;
- return 0;
+ return (int)m_ids.size();
}
std::map<int, short>& CRecipeList::getIds()
--
Gitblit v1.9.3