From faf986a85304e980f9eb621b4e788fc942441d7f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 15 一月 2019 22:29:40 +0800
Subject: [PATCH] 5722 【后端】【1.5】跨服BOSS开发(增加跨服地图中进入副本限制提示、组队相关操作提示、传送限制提示)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GatherSoul.py | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GatherSoul.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GatherSoul.py
index c94c618..8c624ad 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GatherSoul.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GatherSoul.py
@@ -153,6 +153,7 @@
else:
return
DoFBHelp(curPlayer, tick)
+ curPlayer.SetFaction(ShareDefine.CampType_Justice)
return
@@ -570,20 +571,34 @@
curPlayer = FBCommon.GetCurSingleFBPlayer()
if not curPlayer:
#奖励直接发邮件
- PlayerControl.SendMailByKey('JHBagFull2', [ownerID], totalItemList)
+ if totalItemList:
+ PlayerControl.SendMailByKey('JHBagFull2', [ownerID], totalItemList)
GameWorldProcess.CloseFB(tick)
return
- needSpace = len(totalItemList)
- emptySpace = ItemCommon.GetItemPackSpace(curPlayer, ShareDefine.rptGatherSoul, needSpace)
- isSendMail = int(needSpace > emptySpace) # 是否发送邮件
- if isSendMail:
- PlayerControl.SendMailByKey('JHBagFull2', [curPlayer.GetPlayerID()], totalItemList)
- GameWorld.DebugLog("背包空间不够,发送邮件: mailItemList=%s" % str(totalItemList), curPlayer.GetPlayerID())
- else:
+ if totalItemList:
+ needPackSpaceDict = {}
for itemID, itemCnt, isBind in totalItemList:
- ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [ShareDefine.rptGatherSoul],
- event=["GatherSoulFB", False, {}])
+ curItem = GameWorld.GetGameData().GetItemByTypeID(itemID)
+ if not curItem:
+ return
+ packType = ChConfig.GetItemPackType(curItem.GetType())
+ needSpace = ItemControler.GetItemNeedPackCount(packType, curItem, itemCnt)
+ needPackSpaceDict[packType] = needPackSpaceDict.get(packType, 0) + needSpace
+
+ isSendMail = False #是否背包不足
+ for packType, needSpace in needPackSpaceDict.items():
+ if needSpace > ItemCommon.GetItemPackSpace(curPlayer, packType, needSpace):
+ isSendMail = True
+ break
+
+ if isSendMail:
+ PlayerControl.SendMailByKey('JHBagFull2', [curPlayer.GetPlayerID()], totalItemList)
+ GameWorld.DebugLog("背包空间不够,发送邮件: mailItemList=%s" % str(totalItemList), curPlayer.GetPlayerID())
+ else:
+ for itemID, itemCnt, isBind in totalItemList:
+ ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [],
+ event=["GatherSoulFB", False, {}])
fbCfg = GetGatherSoulFBCfg()
costTime = tick - GameWorld.GetGameWorld().GetOpenFBTick()
--
Gitblit v1.8.0