From 23b3fbb321e68c78fa4ceda608de44ea1a8fd585 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 13 三月 2019 17:25:16 +0800
Subject: [PATCH] 6328 【后端】优化代码eval - 二进制流 不能直接输出
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBourseTube.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBourseTube.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBourseTube.py
index 45929c5..1844440 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBourseTube.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBourseTube.py
@@ -65,7 +65,12 @@
if clientData.PriceCount <= 0:
GameWorld.DebugLog("Bourse### PlayerSellBourseItem PriceCount <= 0"%itemIndex)
return
-
+ if clientData.Count > curItem.GetCount():
+ GameWorld.Log(' Bourse### 客户端发的物品数量大于实际数量!!')
+ sellCount = min(clientData.Count, curItem.GetCount())
+ if sellCount <= 0:
+ return
+
password = clientData.Pwd
#判断vip权限
if password and not PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_BoursePwd):
@@ -76,7 +81,7 @@
sendPack = ChMapToGamePyPack.tagMGCheckAddPlayerBourseItem()
sendPack.PlayerID = curPlayer.GetPlayerID()
sendPack.ItemIndex = itemIndex
- sendPack.Count = clientData.Count
+ sendPack.Count = sellCount
sendPack.PriceType = clientData.PriceType
sendPack.PriceCount = clientData.PriceCount
sendPack.Pwd = password
--
Gitblit v1.8.0