From 92126566b642cdb2be53291c8e8e64c7a623782e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 22 一月 2019 20:38:34 +0800
Subject: [PATCH] 5931 【后端】【1.5.100】诛仙装备开发(学习神技广播)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py | 30 +++++++++++++++++++++++-------
1 files changed, 23 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..83f6c91 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)
@@ -919,12 +920,14 @@
def Sycn_MagicWeaponLV(curPlayer, mwID= -1):
#通知法宝等级信息
if mwID == -1:
+ isAll = True
needCalList = []
ipyDataMgr = IpyGameDataPY.IPY_Data()
for i in xrange(ipyDataMgr.GetTreasureCount()):
ipyData = ipyDataMgr.GetTreasureByIndex(i)
needCalList.append(ipyData.GetID())
else:
+ isAll = False
needCalList = [mwID]
sendPack = ChPyNetSendPack.tagMCMagicWeaponLVInfo()
sendPack.InfoList = []
@@ -933,7 +936,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 isAll and not mwLv and not curUpExp and not state and not FBPassLV and not isWear:
continue
pack = ChPyNetSendPack.tagMCMagicWeaponInfo()
pack.MWID = mwID
@@ -941,6 +945,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 +1121,29 @@
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)
+ CalcMagicWeaponAttr(curPlayer)
+ PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
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