From 835c5fad7ad4e723c34be7f5fc073eeb7104e3f4 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 27 四月 2019 11:14:44 +0800
Subject: [PATCH] 6628 【2.0】【后端】查看玩家装备和查看玩家战力功能

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGodWeapon.py |   70 ++++++++++++++---------------------
 1 files changed, 28 insertions(+), 42 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGodWeapon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGodWeapon.py
index ec9f240..6182d28 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGodWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGodWeapon.py
@@ -32,10 +32,11 @@
 import GameFuncComm
 import SkillCommon
 import BuffSkill
-import ItemControler
+import PlayerWeekParty
 #import EventReport
 import IpyGameDataPY
 import PassiveBuffEffMng
+import OpenServerCampaign
 
 import random
 
@@ -52,41 +53,26 @@
         return
     Sync_GodWeaponLVInfo(curPlayer)
     
-    #老号相关神兵场景特效等级同步支持
-    if curPlayer.GetExAttr15() == 0:
-        playerID = curPlayer.GetPlayerID()
-        ipyDataMgr = IpyGameDataPY.IPY_Data()
-        maxType = ipyDataMgr.GetGodWeaponByIndex(ipyDataMgr.GetGodWeaponCount()-1).GetType()
-        for setWeaponType in xrange(1, maxType + 1):
-            setLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % setWeaponType)
-            if not setLV:
-                continue
-            SetGodWeaponLV(curPlayer, setWeaponType, setLV)
-            
-            giveSkillList = []
-            for attrLV in xrange(1, setLV + 1):
-                godWeaponData = IpyGameDataPY.GetIpyGameData('GodWeapon', setWeaponType, attrLV)
-                if godWeaponData:
-                    giveSkillID = GodWeaponLVUP(curPlayer, godWeaponData, attrLV)
-                    if giveSkillID:
-                        giveSkillList.append(giveSkillID)
-            GameWorld.Log("老号设置神兵场景等级: setWeaponType=%s,setLV=%s, giveSkillList=%s" % (setWeaponType, setLV, giveSkillList), playerID)
-            
     return
 
 def SetGodWeaponLV(curPlayer, weaponType, lv):
     ## 设置神兵等级,同步设置场景神兵等级
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GodWeaponLV % weaponType, lv)
-    sceneEffectsDict = {Def_GodWeaponType_HP:[lambda curObj, value:curObj.SetExAttr15(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_1],
-                        Def_GodWeaponType_Atk:[lambda curObj, value:curObj.SetExAttr16(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_2],
-                        Def_GodWeaponType_SuperHit:[lambda curObj, value:curObj.SetExAttr17(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_3],
-                        Def_GodWeaponType_Def:[lambda curObj, value:curObj.SetExAttr18(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_4],
-                        }
-    if weaponType in sceneEffectsDict:
-        setFunc, notifyType = sceneEffectsDict[weaponType]
-        setFunc(curPlayer, lv)
-        curPlayer.SendPropertyRefresh(notifyType, lv, False)
+            
+    totalLV = GetGodWeaponTotalLV(curPlayer)
+    # 开服活动数据
+    OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_GodWeaponLV, totalLV)
+    PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_GodWeapon, totalLV, False, True)
     return
+
+def GetGodWeaponTotalLV(curPlayer):
+    ##获取神兵总等级
+    totalLV = 0
+    ipyDataMgr = IpyGameDataPY.IPY_Data()
+    maxType = ipyDataMgr.GetGodWeaponByIndex(ipyDataMgr.GetGodWeaponCount()-1).GetType()
+    for gwType in xrange(1, maxType + 1):
+        totalLV += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % gwType)
+    return totalLV
 
 ## 神器开启
 #  @return: 是否激活成功
@@ -133,8 +119,10 @@
             PlayerControl.CalcAttrDict_Type(attrID, attrValueList[i], allAttrList)
         
         fightPowerEx += IpyGameDataPY.GetFuncEvalCfg('MagicExterior').get(str(gwType), 0)
-        # 附加战力
-        curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_GodWeapon, fightPowerEx)
+        
+        
+    # 附加战力
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_GodWeapon, fightPowerEx)
     GameWorld.DebugLog("神兵属性:%s" % allAttrList)
     # 保存计算值
     PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_GodWeapon, allAttrList)   
@@ -316,17 +304,15 @@
             PlayerControl.WorldNotify(0, sysMark, [curPlayer.GetName(), weaponType])
             
         #{1:[100,200,300,400],2:[100,200,300,400],3:[100,200,300,400]}
-        notifyDict = IpyGameDataPY.GetFuncEvalCfg('GodLv', 1, {})
-        if weaponType in notifyDict:
-            for notifyLV in notifyDict[weaponType]:
-                if beforeAttrLV < notifyLV and attrLV >= notifyLV:
-                    PlayerControl.WorldNotify(0, 'GodWeaponLv', [curPlayer.GetName(), weaponType, notifyLV])
+        #=======================================================================
+        # notifyDict = IpyGameDataPY.GetFuncEvalCfg('GodLv', 1, {})
+        # if weaponType in notifyDict:
+        #    for notifyLV in notifyDict[weaponType]:
+        #        if beforeAttrLV < notifyLV and attrLV >= notifyLV:
+        #            PlayerControl.WorldNotify(0, 'GodWeaponLv', [curPlayer.GetName(), weaponType, notifyLV])
+        #=======================================================================
                 
-        # 神兵特效激活广播
-        godWeaponEffectData = IpyGameDataPY.GetIpyGameDataByCondition('GodWeaponEffect', {'GWType':weaponType, "Level":attrLV}, False, False)
-        if godWeaponEffectData:
-            PlayerControl.WorldNotify(0, godWeaponEffectData.GetNotifyCode(), [curPlayer.GetName(), attrLV])
-        
+
         totalExp = godWeaponData.GetExp()
         
         

--
Gitblit v1.8.0