From 6feb3406bd4edf15e443f5d58f06229d5ee8733c Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 24 十二月 2018 14:13:53 +0800
Subject: [PATCH] 5571 【1.4】集市物品卖出提示邮件新增VIP玩家模板
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py | 68 +++++++++++++++++++++++-----------
1 files changed, 46 insertions(+), 22 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 90e1ef6..672f459 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -500,15 +500,16 @@
allAttrList1 = [{} for _ in range(4)] #人族法宝
allAttrList2 = [{} for _ in range(4)] #魔族法宝
allAttrList3 = [{} for _ in range(4)] #仙族法宝
-
+ mwTypeMfpTypeDict = {1:ShareDefine.Def_MFPType_MagicWeapon1,2:ShareDefine.Def_MFPType_MagicWeapon2,3:ShareDefine.Def_MFPType_MagicWeapon3}
+ addPowerDict = {} #额外战力
signDayMWID = IpyGameDataPY.GetFuncCfg('MWSignDayAttr', 2)
ipyDataMgr = IpyGameDataPY.IPY_Data()
for i in xrange(ipyDataMgr.GetTreasureCount()):
treasureIpyData = ipyDataMgr.GetTreasureByIndex(i)
magicWeaponID = treasureIpyData.GetID()
isActive = GetIsActiveMagicWeapon(curPlayer, magicWeaponID)
- if not isActive:
- continue
+# if not isActive:
+# continue
allAttrDict = {}
#=======================================================================
# #铸炼属性
@@ -519,27 +520,42 @@
# GameWorld.AddDictValue(allAttrDict, attrDict)
#=======================================================================
treasureType = treasureIpyData.GetTreasureType()
- #等级属性
- curMWLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponLV % magicWeaponID)
- for lv in xrange(curMWLV+1):
- upIpyData = IpyGameDataPY.GetIpyGameDataNotLog('TreasureUp', magicWeaponID, lv)
- if upIpyData:
- attrDict = upIpyData.GetAddAttr()
- GameWorld.AddDictValue(allAttrDict, attrDict)
-
- if magicWeaponID == signDayMWID:
- #签到属性
- totalSignNum = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalSignNum) # 总签到天数
- addAttr = {}
- for attid, attnum in IpyGameDataPY.GetFuncEvalCfg('MWSignDayAttr', 1, {}).items():
- addAttr[int(attid)] = attnum * totalSignNum
- GameWorld.AddDictValue(allAttrDict, addAttr)
+ if isActive:
+ mfpType = mwTypeMfpTypeDict.get(treasureType, ShareDefine.Def_MFPType_Role)
+ #等级属性
+ curMWLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponLV % magicWeaponID)
+ for lv in xrange(curMWLV+1):
+ upIpyData = IpyGameDataPY.GetIpyGameDataNotLog('TreasureUp', magicWeaponID, lv)
+ if upIpyData:
+ attrDict = upIpyData.GetAddAttr()
+ GameWorld.AddDictValue(allAttrDict, attrDict)
+ addPowerDict[mfpType] = addPowerDict.get(mfpType, 0) + upIpyData.GetPowerEx()
+
+ if magicWeaponID == signDayMWID:
+ #签到属性
+ totalSignNum = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalSignNum) # 总签到天数
+ addAttr = {}
+ for attid, attnum in IpyGameDataPY.GetFuncEvalCfg('MWSignDayAttr', 1, {}).items():
+ addAttr[int(attid)] = attnum * totalSignNum
+ GameWorld.AddDictValue(allAttrDict, addAttr)
+
fbpasslv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % magicWeaponID)
+ #老号已激活的魔族法宝没有关卡属性,直接设置满关卡
+ if isActive and not fbpasslv:
+ ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('MagicWeaponFB', {'MWID':magicWeaponID}, True, False)
+ if ipyDataList:
+ maxLevel = ipyDataList[-1].GetLevel()
+ fbpasslv = maxLevel
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWFBPassLevel % magicWeaponID, maxLevel)
+ GameWorld.Log('老号已激活的魔族法宝没有关卡属性,直接设置满关卡 magicWeaponID=%s,maxLevel=%s'%(magicWeaponID, maxLevel), curPlayer.GetID())
if fbpasslv: #副本关卡属性
fbipyData = IpyGameDataPY.GetIpyGameData('MagicWeaponFB', magicWeaponID, fbpasslv)
if fbipyData:
- attrDict = fbipyData.AttrDict()
- GameWorld.AddDictValue(allAttrDict, attrDict)
+ attrDict = fbipyData.GetAttrDict()
+ for effID, value in attrDict.items():
+ effID = int(effID)
+ allAttrDict[effID] = allAttrDict.get(effID, 0) + value
+
for effID, value in allAttrDict.items():
if treasureType == 1:
@@ -557,7 +573,6 @@
PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_MagicWeapon3, allAttrList3)
#技能解锁战力
nextSkillDict = GetPotentialsSkillInfo(curPlayer)
- addPowerDict = {}
for skillID, info in nextSkillDict.items():
needSkilllv, nextSkillID, addPower = info
skillManager = curPlayer.GetSkillManager()
@@ -961,6 +976,13 @@
privilegeIpyData = IpyGameDataPY.GetIpyGameDataNotLog('TreasurePrivilege', privilege)
if not privilegeIpyData:
return
+ curGotValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulGotValue % privilege)
+ singleValue = privilegeIpyData.GetSingleValue()
+ if singleValue and curGotValue % singleValue:
+ fixGotValue = curGotValue/singleValue*singleValue
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWSoulGotValue % privilege, fixGotValue)
+ GameWorld.Log('玩家法宝之魂已领的数据不是单次进度的倍数,修复! privilege=%s,curGotValue=%s, fixGotValue=%s'%(privilege, curGotValue, fixGotValue))
+
curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulCurValue % privilege)
newData = curValue + data if isAdd else data
maxValue = privilegeIpyData.GetMaxValue()
@@ -1132,9 +1154,11 @@
return
def UptateMWFBPasslv(curPlayer, mwID, passLV):
- GameWorld.Log('更新关卡 mwID=%s,level=%s'%(mwID, passLV))
+ GameWorld.Log('更新关卡 mwID=%s,level=%s'%(mwID, passLV), curPlayer.GetID())
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWFBPassLevel % mwID, passLV)
CalcMagicWeaponAttr(curPlayer)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
Sycn_MagicWeaponLV(curPlayer, mwID)
+
+ EventShell.EventRespons_MagicWeaponFBPassLV(curPlayer, mwID, passLV)
return
\ No newline at end of file
--
Gitblit v1.8.0