|
|
@@ -355,8 +355,8 @@ function TreasureChestLogic_Open(human, nBoxType, nBoxNum)
|
|
|
local szText = "[TreasureChestLogic_Open] 玩家请求打开宝箱 nBoxType = "..nBoxType.." nBoxNum = "..nBoxNum
|
|
|
TreasureChestLogic_WriteLog(human, szText)
|
|
|
|
|
|
- if nBoxNum >= TREASURECHEST_OPEN_NUM then
|
|
|
- szText = szText .. " 失败不正确的打开数量"
|
|
|
+ if nBoxNum >= TREASURECHEST_OPEN_NUM or 0 >= nBoxNum then
|
|
|
+ szText = szText .. " 失败不正确的打开数量 nBoxNum "..nBoxNum
|
|
|
TreasureChestLogic_WriteLog(human, szText)
|
|
|
return
|
|
|
end
|
|
|
@@ -372,7 +372,7 @@ function TreasureChestLogic_Open(human, nBoxType, nBoxNum)
|
|
|
|
|
|
local nGoodsID = tBoxTypeConf[nBoxType].nItemID
|
|
|
local nGoodsNum = TreasureChestLogic_GetGoodsNum(human, nGoodsID)
|
|
|
- if nBoxNum > nGoodsNum then
|
|
|
+ if nBoxNum > nGoodsNum or 0 >= nGoodsNum then
|
|
|
print("[TreasureChestLogic_Open] 玩家拥有宝箱数量不足 nBoxType = "
|
|
|
..nBoxType.." nBoxNum = "..nBoxNum.." nGoodsNum = "..nGoodsNum)
|
|
|
|