From f78b5c4fb02a016c43398f512a302b8c24d62698 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期三, 26 十二月 2018 18:16:13 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py index 78b0270..1caf2ff 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py @@ -543,8 +543,9 @@ addAttr[int(attid)] = attnum * totalSignNum GameWorld.AddDictValue(allAttrDict, addAttr) #王者法宝属性 - kingAwardMark = 1 - kingMWIpyData = IpyGameDataPY.GetIpyGameDataNotLog('MagicWeaponOfKing', magicWeaponID, kingAwardMark) + seasonID = IpyGameDataPY.GetFuncEvalCfg('MagicWeaponOfKing', 1, {}).get(magicWeaponID, 0) + kingAwardLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_SeasonAwardLV % seasonID) + kingMWIpyData = IpyGameDataPY.GetIpyGameDataNotLog('MagicWeaponOfKing', magicWeaponID, kingAwardLV) if kingMWIpyData and GetIsWearMagicWeapon(curPlayer, magicWeaponID): attrDict = kingMWIpyData.GetAddAttr() GameWorld.AddDictValue(allAttrDict, attrDict) @@ -933,7 +934,8 @@ curUpExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponUpExp % mwID) state = GetIsClickMagicWeapon(curPlayer, mwID) FBPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % mwID) - if not mwLv and not curUpExp and not state and not FBPassLV: + isWear = GetIsWearMagicWeapon(curPlayer, mwID) + if not mwLv and not curUpExp and not state and not FBPassLV and not isWear: continue pack = ChPyNetSendPack.tagMCMagicWeaponInfo() pack.MWID = mwID @@ -941,6 +943,7 @@ pack.Exp = curUpExp pack.State = state pack.FBPassLV = FBPassLV + pack.IsWear = isWear sendPack.InfoList.append(pack) sendPack.Count = len(sendPack.InfoList) if sendPack.Count: @@ -1116,18 +1119,27 @@ mwID = clientData.MWID if not GetIsActiveMagicWeapon(curPlayer, mwID): return - - SetMagicWeaponWearState(curPlayer, mwID, clientData.State) + isWear = clientData.State + if isWear: + maxCnt = IpyGameDataPY.GetFuncCfg('MagicWeaponOfKing', 2) + hasWearCnt = 0 + for mid in IpyGameDataPY.GetFuncEvalCfg('MagicWeaponOfKing', 1, {}): + if hasWearCnt >= maxCnt: + return + if GetIsWearMagicWeapon(curPlayer, mid): + hasWearCnt +=1 + + SetMagicWeaponWearState(curPlayer, mwID, isWear) Sycn_MagicWeaponLV(curPlayer, mwID) return def GetIsWearMagicWeapon(curPlayer, mwID): #获取法宝是否佩戴 - return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsClick, mwID % 100, True, [mwID / 100]) + return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID % 100, True, [mwID / 100]) def SetMagicWeaponWearState(curPlayer, mwID, state): #设置法宝是否佩戴 - GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsClick, mwID % 100, state, True, [mwID / 100]) + GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID % 100, state, True, [mwID / 100]) return #// A5 12 激活法宝之魂 #tagCMActiveMWSoul -- Gitblit v1.8.0