From 54b3ca452de08e8cf5723a0715cc0c3853c2df3a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 01 十二月 2018 16:35:48 +0800
Subject: [PATCH] 2549 【BUG】【1.3】玩家登录时过天处理离线期间所获得的助战仙缘币异常
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py | 48 ++++++++++++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 18 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 b5f88c4..487b97e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -507,8 +507,8 @@
treasureIpyData = ipyDataMgr.GetTreasureByIndex(i)
magicWeaponID = treasureIpyData.GetID()
isActive = GetIsActiveMagicWeapon(curPlayer, magicWeaponID)
- if not isActive:
- continue
+# if not isActive:
+# continue
allAttrDict = {}
#=======================================================================
# #铸炼属性
@@ -519,22 +519,32 @@
# 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:
+ #等级属性
+ 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)
+
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:
@@ -1142,9 +1152,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