From 5bd5c3fa2b8a50fd352a895c3e87a3254c705ee7 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 26 六月 2019 10:35:30 +0800
Subject: [PATCH] 4254 【BUG】【2.0】【主干】封魔坛、世界Boss资源找回次数错误
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py | 54 +++++++++++++-----------------------------------------
1 files changed, 13 insertions(+), 41 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
index bbc269a..3eac024 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
@@ -38,42 +38,6 @@
# @param curPlayer 玩家
# @return None
def PlayerRuneLogin(curPlayer):
- if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_RuneSource):
- GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_RuneSource, 1)
- runeHoleCnt = IpyGameDataPY.GetFuncCfg("RuneUnlock", 4)
- for RuneNum in xrange(1, runeHoleCnt + 1):
- RuneData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Rune_Data % RuneNum, 0)
- if not RuneData:
- continue
- RuneItemID = ItemControler.GetRuneItemID(RuneData)
- ipyData = IpyGameDataPY.GetIpyGameDataNotLog('RuneCompound', RuneItemID)
- if not ipyData:
- continue
- RuneSource = ItemControler.GetRuneItemSource(RuneData)
- if RuneSource != ChConfig.Item_Source_Compound:
- RuneItemPlusLV = ItemControler.GetRuneItemPlusLV(RuneData)
- RuneIsLock = ItemControler.GetRuneItemIsLock(RuneData)
- updRuneData = ItemControler.GetRuneItemKeyData(RuneItemID, RuneItemPlusLV, RuneIsLock, ChConfig.Item_Source_Compound)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Rune_Data % RuneNum, updRuneData)
- GameWorld.Log('上线修复双属性符印来源 RuneNum=%s,oldRuneData=%s,updRuneData=%s'%(RuneNum, RuneData, updRuneData))
- packIndex = ShareDefine.rptRune
- for place in xrange(ItemCommon.GetVPackCnt(packIndex)):
- RuneData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_VPackItem % (packIndex, place))
- if not RuneData:
- continue
- RuneItemID = ItemControler.GetRuneItemID(RuneData)
- ipyData = IpyGameDataPY.GetIpyGameDataNotLog('RuneCompound', RuneItemID)
- if not ipyData:
- continue
- RuneSource = ItemControler.GetRuneItemSource(RuneData)
- if RuneSource != ChConfig.Item_Source_Compound:
- RuneItemPlusLV = ItemControler.GetRuneItemPlusLV(RuneData)
- RuneIsLock = ItemControler.GetRuneItemIsLock(RuneData)
- updRuneData = ItemControler.GetRuneItemKeyData(RuneItemID, RuneItemPlusLV, RuneIsLock, ChConfig.Item_Source_Compound)
- ItemControler.SetVPackItemKeyData(curPlayer, ShareDefine.rptRune, place, updRuneData)
- GameWorld.Log('上线修复双属性符印来源 place=%s,oldRuneData=%s,updRuneData=%s'%(place, RuneData, updRuneData))
-
-
DoUnlockRuneHole(curPlayer, False)
Sync_RuneInfo(curPlayer)
return
@@ -245,7 +209,9 @@
if not srcIpyData:
GameWorld.DebugLog("该符印没有配置属性! 无法镶嵌! itemID=%s" % srcRuneItemID, curPlayer.GetPlayerID())
return True
- srcRuneAttrType = srcIpyData.GetAttrType()
+ srcRuneAttrTypeList = srcIpyData.GetAttrType()
+ srcRuneAttrTypeCntDict = {attrType:1 for attrType in srcRuneAttrTypeList}
+ maxSameAttrRuneCnt = IpyGameDataPY.GetFuncCfg('RuneUnlock', 5)
# 判断是否已有镶嵌该属性类型
doubleCnt = 0 #双属性符印个数
for RuneNum in xrange(1, maxRuneHole + 1):
@@ -259,13 +225,19 @@
if not ipyData:
continue
attrTypeList = ipyData.GetAttrType()
- if srcRuneAttrType == attrTypeList:
- GameWorld.DebugLog("已有镶嵌该属性类型! 无法镶嵌! RuneHoleNum=%s,srcRuneAttrType=%s" % (RuneNum, srcRuneAttrType), curPlayer.GetPlayerID())
- return True
+ for attrType in attrTypeList:
+ if attrType in srcRuneAttrTypeCntDict:
+ srcRuneAttrTypeCntDict[attrType] += 1
+ if srcRuneAttrTypeCntDict[attrType] > maxSameAttrRuneCnt:
+ GameWorld.DebugLog(
+ "该属性类型已镶嵌数量超过%s! 无法镶嵌! ,attrType=%s" % (maxSameAttrRuneCnt, attrType),
+ curPlayer.GetPlayerID())
+ return
+
if len(attrTypeList) > 1:
doubleCnt +=1
- if len(srcRuneAttrType) > 1 and doubleCnt >= __GetCanInlayDoubleAttrRuneCnt(curPlayer):
+ if len(srcRuneAttrTypeList) > 1 and doubleCnt >= __GetCanInlayDoubleAttrRuneCnt(curPlayer):
GameWorld.DebugLog("当前可镶嵌双属性符印个数已达上限%s! 无法镶嵌! itemID=%s" % (doubleCnt, srcRuneItemID), curPlayer.GetPlayerID())
return True
--
Gitblit v1.8.0