From 84f9abc7067dde4e6b504a1ba2e9f0600a6de46b Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 12 三月 2019 20:58:56 +0800
Subject: [PATCH] 4042 【后端】【2.0】邮件包含附件时不能删除邮件 - 服务端添加防范
---
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