From b961d09f3d47773bc0ae6faaeda880ef4791419f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 12 三月 2019 09:53:37 +0800
Subject: [PATCH] 6307 【后端】【2.0】多套装备开发单(强化配置修改)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index b99b32d..d2a1be6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -31,7 +31,7 @@
import PlayerFamily
import PlayerActivity
import PlayerSuccess
-import PlayerMagicWeapon
+import GameFuncComm
import PyGameData
import PlayerVip
import GameObj
@@ -582,7 +582,7 @@
return
def GetJsonItemList(itemList):
- ## [[itemID,itemCount,isBind], curItem] -> [{"ItemID":101, "Count":10, "IsBind":1, "IsSuite":1, "UserData":"自定义属性字符串"}]
+ ## [[itemID,itemCount,isAuctionItem], curItem] -> [{"ItemID":101, "Count":10, "IsAuctionItem":1, "UserData":"自定义属性字符串"}]
jsonItemList = []
for itemInfo in itemList:
itemDict = {}
@@ -593,7 +593,7 @@
if infolen > 1:
itemDict['Count'] = itemInfo[1]
if infolen > 2:
- itemDict['IsBind'] = int(itemInfo[2])
+ itemDict['IsAuctionItem'] = int(itemInfo[2])
elif isinstance(itemInfo, int):
itemDict['ItemID'] = itemInfo
else: #物品实例
@@ -601,8 +601,8 @@
continue
itemDict['ItemID'] = itemInfo.GetItemTypeID()
itemDict['Count'] = itemInfo.GetCount()
- itemDict['IsBind'] = int(itemInfo.GetIsBind())
- itemDict['IsSuite'] = int(itemInfo.GetIsSuite())
+ itemDict['IsAuctionItem'] = 0 if itemInfo.GetIsBind() else 1
+ #itemDict['IsSuite'] = int(itemInfo.GetIsSuite())
itemDict['UserData'] = itemInfo.GetUserData()
jsonItemList.append(itemDict)
return jsonItemList
@@ -630,7 +630,7 @@
#---------------------------------------------------------------------
def SyncDynamicBarrierState(barrierPointList, state, curPlayer=None):
'''同步动态障碍物是否有效性
- @param barrierPointList: 障碍物点列表 [[aPosX,aPosY,bPosX,bPosY], [aPosX,aPosY,bPosX,bPosY], ...]
+ @param barrierPointList: 障碍物点列表 [[aPosX,aPosY,bPosX,bPosY,angle可选], [aPosX,aPosY,bPosX,bPosY,angle可选], ...]
@param state: 是否有效
@param curPlayer: 指定通知目标玩家,为None时广播本地图所有玩家
'''
@@ -638,12 +638,15 @@
barrierStatePack.Clear()
barrierStatePack.State = state
barrierStatePack.BarrierList = []
- for aPosX, aPosY, bPosX, bPosY in barrierPointList:
+ for posInfo in barrierPointList:
+ aPosX, aPosY, bPosX, bPosY = posInfo[:4]
+ angle = posInfo[4] if len(posInfo) > 4 else 0
barrier = ChPyNetSendPack.tagMCDynamicBarrier()
barrier.APosX = aPosX
barrier.APosY = aPosY
barrier.BPosX = bPosX
barrier.BPosY = bPosY
+ barrier.Angle = angle
barrierStatePack.BarrierList.append(barrier)
barrierStatePack.Count = len(barrierStatePack.BarrierList)
if curPlayer:
@@ -1691,6 +1694,13 @@
newEnterCnt = max(0, dayTimes - (maxCnt - enterCnt))
PlayerControl.NomalDictSetProperty(curPlayer, enterCntKey, newEnterCnt)
GameWorld.DebugLog(" 特殊副本已进入次数更新: newEnterCnt=%s" % newEnterCnt)
+ elif mapID == ChConfig.Def_FBMapID_ZhuXianBoss:
+ if GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_ZhuXianBoss):
+ curCnt = min(maxCnt - enterCnt + IpyGameDataPY.GetFuncCfg('ZhuXianBossCntCfg'), IpyGameDataPY.GetFuncCfg('ZhuXianBossCntCfg', 2))
+ if curCnt > dayTimes:
+ PlayerControl.NomalDictSetProperty(curPlayer, itemAddCntKey, curCnt - dayTimes)
+ elif curCnt < dayTimes:
+ PlayerControl.NomalDictSetProperty(curPlayer, enterCntKey, dayTimes - curCnt)
mapIDInfo.append(mapID)
@@ -1756,6 +1766,9 @@
if mapID == ChConfig.Def_FBMapID_SealDemon and maxDayTimes and maxCnt - enterCnt >= maxDayTimes:
GameWorld.DebugLog('当前次数已满,无需购买。。')
return
+ if mapID == ChConfig.Def_FBMapID_ZhuXianBoss and maxCnt - enterCnt >= IpyGameDataPY.GetFuncCfg('ZhuXianBossCntCfg', 2):
+ return
+
if hasBuyCnt >= canBuyCnt:
GameWorld.DebugLog("购买次数已经用完mapID=%s"%mapID)
return
--
Gitblit v1.8.0