From 7712ee7c2ae0a55610a18d962e9d51faf0372609 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 17 七月 2019 11:15:44 +0800
Subject: [PATCH] 8101 【主干】【后端】全民冲榜的神兵排行榜改成升星排行榜(榜单GM命令说明增加升星榜25)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py | 87 ++++++++++++++-----------------------------
1 files changed, 28 insertions(+), 59 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 0de7a49..ce3dc08 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
@@ -30,6 +30,7 @@
import IPY_GameWorld
import OpenServerCampaign
import DataRecordPack
+import PlayerWeekParty
g_runeLVExpDict = {}
@@ -37,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
@@ -134,6 +99,9 @@
qualityPerDict = IpyGameDataPY.GetFuncEvalCfg(keyStr, 2, {})
if itemColor in qualityPerDict:
value *= float(qualityPerDict[itemColor])
+ extraValueDict = IpyGameDataPY.GetFuncEvalCfg(keyStr, 4, {})
+ value += extraValueDict.get(itemColor, 0)
+
if isSpecial:
specialPer = IpyGameDataPY.GetFuncCfg(keyStr, 3)
if specialPer:
@@ -202,21 +170,10 @@
## 获取符印是否已解锁
def GetIsOpenByRuneID(curPlayer, itemid):
- itemData = GameWorld.GetGameData().GetItemByTypeID(itemid)
- if not itemData:
- return
- curPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
- curEff = itemData.GetEffectByIndex(0)
- curRuneType = curEff.GetEffectID()
- floorCnt = IpyGameDataPY.GetFuncCfg('TowerRuneType', 2)
- towerRuneTypeDict = IpyGameDataPY.GetFuncEvalCfg('TowerRuneType')
- floorList = [int(i) for i in towerRuneTypeDict]
- floorList.sort()
- for floor in floorList:
- typeList = towerRuneTypeDict[str(floor)]
- if curRuneType in typeList:
- floorkey = (int(floor) - 1)*100+ floorCnt if int(floor) > 1 else 0
- return curPassLV >= floorkey
+ ipyData = GetRuneIpyData(itemid)
+ if ipyData:
+ curPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
+ return curPassLV >= ipyData.GetTowerID()
# 没配置限制层数解锁的默认解锁
return True
@@ -252,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):
@@ -266,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
@@ -407,9 +372,10 @@
runeItemPlusLV = ItemControler.GetRuneItemPlusLV(runeData) + 1 #客户端1开始
totalLV += runeItemPlusLV
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_InlayRune, 1, [itemColor])
+ PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Rune, itemColor, False)
PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_RuneLvUp, totalLV)
# 开服活动数据
- OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_RuneLV, totalLV)
+ #OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_RuneLV, totalLV)
return
#// A5 66 符印分解 #tagCMRuneDecompose
@@ -434,8 +400,7 @@
totalMJ = 0
packIndex = ShareDefine.rptRune
placeList = xrange(ItemCommon.GetVPackCnt(packIndex)) if (isAll or clientData.QualityCnt > 0) else clientData.PlaceIndexList
- wmpIpyData = PlayerMagicWeapon.GetMagicWeaponPrivilege(curPlayer, ChConfig.MWPrivilege_RuneDecompose)
- addPer = int(wmpIpyData.GetEffectValue()) if wmpIpyData else 0
+ addPer = 0
for place in placeList:
RuneData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_VPackItem % (packIndex, place))
if not RuneData:
@@ -605,7 +570,11 @@
ItemCommon.DelVPackItem(curPlayer, ShareDefine.rptRune, indexList1, ChConfig.ItemDel_Rune)
if indexList2:
for index in indexList2:
+ srcRuneData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Rune_Data % index, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Rune_Data % index, 0)
+ dataDict = {'doType':'RuneCompound', 'srcRuneData':srcRuneData, 'desRuneData':0}
+ DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_Rune, dataDict)
+
Sync_RuneInfo(curPlayer)
RefreshRuneAttr(curPlayer)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
--
Gitblit v1.8.0