ceshi 2 bug处理ok

This commit is contained in:
wenhe committed 2026-09-23 16:58:44 +08:00
1 parent b768ff1555
commit faa3a22631
8 files changed
+314 -52

No files matched your search

@@ -331,8 +331,8 @@ class FurnitureService(BlueFoxServerSystem):
retItemName = record["itemName"]
retAux = record.get("aux", 0)
# 给玩家箭
self.giveItem(playerId, retItemName, retCount, retAux)
# 掉落物形式返回箭(根因C)
self._dropItemDict(dim, pos, {"itemName": retItemName, "count": retCount, "auxValue": retAux})
# 替换方块
if recipe.get("target"):
@@ -371,9 +371,10 @@ class FurnitureService(BlueFoxServerSystem):
poppedName = stackNames.pop() # 后放先取, 弹最后一件
if stack:
topItem = stack.pop()
self.giveItemObj(playerId, topItem)
self._dropItemObj(dim, pos, topItem) # 掉落物返还(根因C)
else:
self.giveItem(playerId, poppedName)
self._dropItemDict(dim, pos,
{"itemName": poppedName, "count": 1, "auxValue": 0})
# 计算剩余 -> 目标方块, 并保存剩余记录(保证后续取回一致)
target = self._rackTarget(stackNames)
self.replaceBlock(pos, dim, target, playerId)
@@ -477,9 +478,15 @@ class FurnitureService(BlueFoxServerSystem):
if recipe.get("dropItem"):
self.dropItems(dim, pos, recipe["dropItem"])
# ---- 给玩家背包物品(水槽取水/取脏盘子/盘子架取回) ----
# ---- 掉落物形式(水槽取水/取脏盘子/盘子架取回等) ----
# 【根因C】获得物品一律改掉落物形式, 不再直接塞进背包
if recipe.get("giveItem"):
self.giveItem(playerId, recipe["giveItem"])
_gItem = recipe["giveItem"]
if isinstance(_gItem, dict):
self._dropItemDict(dim, pos, _gItem)
else:
self._dropItemDict(dim, pos,
{"itemName": _gItem, "count": recipe.get("giveCount", 1), "auxValue": 0})
# ---- 转换成功提示 ----
if recipe.get("tip"):