From b61fe6ed796dfeb1a7ed718d8099d6edb05f36f6 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 22 一月 2019 19:16:12 +0800
Subject: [PATCH] 6001 【后端】【1.5.100】七日巡礼增加条件

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py                                |    3 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py               |   15 +++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py                               |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py                               |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGodWeapon.py                          |   15 +++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py                          |   64 ++++++++++++++++++---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py   |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py |   27 +++++++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py                              |    3 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                                        |   11 +++
 10 files changed, 117 insertions(+), 27 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 0f289db..ea1a7a4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -5254,7 +5254,16 @@
 Def_WPAct_XMZZ, #仙魔之争 18
 Def_WPAct_FamilyWar,  #仙魔联赛 19
 Def_WPAct_Login,  #每日登录 20
-) = range(1, 20+1)
+Def_WPAct_Horse,  #激活某只坐骑 21
+Def_WPAct_Pet,  #激活某只灵宠 22
+Def_WPAct_Dogz,  #出战某只神兽 23
+Def_WPAct_Stone,  #宝石总等级 24
+Def_WPAct_GodWeapon,  #神兵总等级 25
+Def_WPAct_Rune,  #穿戴某品质符印 26
+) = range(1, 26+1)
+
+#可提前完成的周狂欢活动
+AheadFinishWPActList = [Def_WPAct_Horse, Def_WPAct_Pet, Def_WPAct_Dogz, Def_WPAct_Rune]
 
 # 套装枚举,普通套装,强化套装
 (EquipSuitType_Normal,
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
index d66627e..cc6f62a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
@@ -28,6 +28,7 @@
 import NetPackCommon
 import DataRecordPack
 import PlayerSuccess
+import PlayerWeekParty
 import ShareDefine
 
 
@@ -242,6 +243,14 @@
     #同步客户端
     Sycn_StoneHoleInfo(curPlayer, [equipIndex])
     
+    totalStoneLV = GetTotalStoneLV(curPlayer)
+    # 记录开服活动宝石总等级
+    OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_StoneLV, totalStoneLV)
+    PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Stone, totalStoneLV, False, True)
+    return
+
+def GetTotalStoneLV(curPlayer):
+    ##宝石总等级
     totalStoneLV = 0
     holeIndexList = GetAllEquipPlaceHoleIndex()
     gameData = GameWorld.GetGameData()
@@ -258,11 +267,7 @@
                 continue
             gemLV = curGem.GetEffectByIndex(0).GetEffectValue(1)
             totalStoneLV += gemLV
-            
-    # 记录开服活动宝石总等级
-    OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_StoneLV, totalStoneLV)
-    return
-
+    return totalStoneLV
 
 #// A3 06 宝石升级 #tagCMEquipStoneUpgrade
 #struct    tagCMEquipStoneUpgrade
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py
index 9d45cd4..08ad17e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py
@@ -104,7 +104,7 @@
     #通关符印塔成就
     PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_PassRuneTower, 1, [passlv])
     PlayerBillboard.UpdateRuneTowerBillboard(curPlayer)
-    PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Tower, passlv, False)
+    PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Tower, passlv, False, True)
     GameWorld.DebugLog(' 更新符印塔已通关数 %s' % passlv)
     return
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py
index 77a8376..e0f375e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py
@@ -49,6 +49,7 @@
 FBDict_BossTotalHP = 'FBDict_BossTotalHP'  #BOSS血量
 FBDict_LastHurtTick = 'FBDict_LastHurtTick'  #上次伤害时间
 FBDict_HasGiveAward = 'FBDict_HasGiveAward'  # 是否有给奖励
+FBDict_HasAddCnt = 'FBDict_HasAddCnt'  # 是否有扣次数
 
 # 副本通用配置
 (
@@ -191,7 +192,14 @@
 # @remarks 玩家主动离开副本.
 def DoExitFB(curPlayer, tick):
     # 玩家退出默认关闭副本
-    #GameWorldProcess.CloseFB(tick)
+    gameFB = GameWorld.GetGameFB()
+    fbStep = gameFB.GetFBStep()
+    if fbStep == FB_State_FreeTime:
+        #退出时,若s级则补发奖励
+        curStar = gameFB.GetGameFBDictByKey(FBDict_FBStar)
+        if curStar == Def_MaxStar:
+            __GiveFBPassPrize(curPlayer)
+        GameWorldProcess.CloseFB(tick)
     return
 
 
@@ -317,6 +325,12 @@
     gameFB.SetGameFBDict(FBDict_BossTotalHP, totalHP * 1000)
     gameFB.SetGameFBDict(FBDict_Speed, 1000)  #速度默认1000
     gameFB.SetGameFBDict(FBDict_RemainHP, totalHP * 1000)
+    gameFB.SetGameFBDict(FBDict_IsReduceing, 0)
+    gameFB.SetGameFBDict(FBDict_LastHurtTick, 0)
+    gameFB.SetGameFBDict(FBDict_HasGiveAward, 0)
+    gameFB.SetGameFBDict(FBDict_StartTick, 0)
+    gameFB.SetGameFBDict(FBDict_FBStar, 0)
+    
     prepareTick = __GetZhuXianCfg()[Def_PrepareTime] * 1000
     FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttAddUpTime, prepareTick)
     FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttWaitStart, prepareTick)
@@ -407,7 +421,8 @@
     # 给过关奖励
     prizeItemList = __GiveFBPassPrize(curPlayer, False)
     
-    prizeDict = {FBCommon.Over_costTime:costTime, FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(prizeItemList)}
+    prizeDict = {FBCommon.Over_costTime:costTime, FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(prizeItemList),
+                 FBCommon.Over_grade:curStar}
     __SendZhuXianTowerOverInfo(curPlayer, fbLevel, True if prizeItemList else False, prizeDict)
     
     #任务
@@ -463,8 +478,10 @@
         for itemID, itemCnt, isBind in prizeItemList:
             ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem],
                                             event=["ZhuXianTower", False, {}])
-            
-    FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_ZhuXianTower, 1)
+    #本次副本里第一次给奖励时扣次数
+    if not gameFB.GetGameFBDictByKey(FBDict_HasAddCnt):
+        FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_ZhuXianTower, 1)
+        gameFB.SetGameFBDict(FBDict_HasAddCnt, 1)
         
     gameFB.SetGameFBDict(FBDict_HasGiveAward, 1)
     
@@ -562,7 +579,7 @@
         #领取奖励
         if fbStep != FB_State_FreeTime:
             return
-        __GiveFBPassPrize(curPlayer, False)
+        __GiveFBPassPrize(curPlayer)
     return
 
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
index 599161a..810b06f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
@@ -30,6 +30,7 @@
 import SkillShell
 import PlayerSuccess
 import DataRecordPack
+import PlayerWeekParty
 
 import time
 
@@ -291,6 +292,7 @@
                 GameWorld.DebugLog("神兽有装备未穿戴,无法助战!dogzID=%s,packIndex=%s" % (dogzID, i), playerID)
                 return
         PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DogzBattle, 1, [dogzID])
+        PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Dogz, dogzID, False)
         
     isFight = True if batteState else False
     GameWorld.DebugLog("神兽助战状态变更!dogzID=%s,isFight=%s" % (dogzID, isFight), playerID)
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 3e80fe5..25a6bb7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGodWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGodWeapon.py
@@ -32,7 +32,7 @@
 import GameFuncComm
 import SkillCommon
 import BuffSkill
-import ItemControler
+import PlayerWeekParty
 #import EventReport
 import IpyGameDataPY
 import PassiveBuffEffMng
@@ -88,15 +88,20 @@
         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)
-        
-    # 开服活动数据
-    OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_GodWeaponLV, totalLV)
-    return
+    return totalLV
 
 ## 神器开启
 #  @return: 是否激活成功
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
index f801725..38dc780 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
@@ -40,6 +40,7 @@
 import PlayerMagicWeapon
 import PassiveBuffEffMng
 import CrossPlayerData
+import PlayerWeekParty
 #---------------------------------------------------------------------
 
 #---------------------------------------------------------------------
@@ -926,6 +927,8 @@
     sumLV = GetHorseSumLV(curPlayer)
     OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_HorseLV, sumLV)
     PlayerMagicWeapon.SetMWPrivilegeData(curPlayer, ChConfig.MWPrivilege_Horse, sumLV)
+    PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Horse, horseID, False)
+    
     playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
     itemRideHorse = playerEquip.GetAt(ShareDefine.retHorse)
     #无指定道具
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
index 04a1995..bafdac8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
@@ -37,7 +37,7 @@
 import GameMap
 import OpenServerCampaign
 import PlayerMagicWeapon
-import PassiveBuffEffMng
+import PlayerWeekParty
 import CalcNoLineEffect
 import CrossPlayerData
 import CalcLineEffect
@@ -506,6 +506,7 @@
     
     # 开服活动数据
     OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_PetLV, GetTotalPetLV(curPlayer))
+    PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Pet, petNPCID, False)
     return True
 
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
index 8880a52..8d5137f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
@@ -30,6 +30,7 @@
 import IPY_GameWorld
 import OpenServerCampaign
 import DataRecordPack
+import PlayerWeekParty
 
 g_runeLVExpDict = {}
 
@@ -399,6 +400,7 @@
         runeItemPlusLV = ItemControler.GetRuneItemPlusLV(runeData) + 1 #客户端1开始
         totalLV += runeItemPlusLV
         PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_InlayRune, 1, [itemColor])
+        PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Rune, itemColor, False)
     PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_RuneLvUp, totalLV)
     # 开服活动数据
     OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_RuneLV, totalLV)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
index a5b411e..4dcdaaf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
@@ -25,6 +25,8 @@
 import PlayerControl
 import ItemControler
 import ChPyNetSendPack
+import Operate_EquipStone
+import PlayerGodWeapon
 import NetPackCommon
 import ShareDefine
 import PyGameData
@@ -61,18 +63,22 @@
     state = actWeekPartyInfo.get(ShareDefine.ActKey_State, 0)
     cfgID = actWeekPartyInfo.get(ShareDefine.ActKey_CfgID, 0)
     passlv = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
-    isOk = AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Tower, passlv, False)
-    AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Login, 1)
-    
-    playerWeekPartyID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyID, 0, ChConfig.Def_PDictType_WeekParty)  # 玩家身上的活动ID
-    if not isOk and state:
+    if state:
+        #每天都要触发
+        AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Tower, passlv, False, True, False)
+        AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Login, 1, False, False)
+        AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Stone, Operate_EquipStone.GetTotalStoneLV(curPlayer), False, True, False)
+        AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_GodWeapon, PlayerGodWeapon.GetGodWeaponTotalLV(curPlayer), False, True, False)
         SyncWeekPartyPlayerInfo(curPlayer)
+    playerWeekPartyID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyID, 0, ChConfig.Def_PDictType_WeekParty)  # 玩家身上的活动ID
     # 活动ID 相同的话不处理
     if cfgID == playerWeekPartyID:
         #GameWorld.DebugLog("周狂欢活动ID不变,不处理!", curPlayer.GetPlayerID())
         return
+    CheckWeekPartyActionCnt(curPlayer)
     # 未领取的奖励邮件发放
-    __SendWeekPartyMail(curPlayer, playerWeekPartyID)
+    if playerWeekPartyID:
+        __SendWeekPartyMail(curPlayer, playerWeekPartyID)
     
     if not cfgID:
         GameWorld.DebugLog('    周狂欢活动重置!')
@@ -130,7 +136,7 @@
     return
 
 
-def AddWeekPartyActionCnt(curPlayer, actionID, addCnt=1, isAdd=True):
+def AddWeekPartyActionCnt(curPlayer, actionID, addCnt=1, isAdd=True, isCompatible=False, isSync=True):
     '''增加周狂欢相关活动完成次数'''
     #判断活动是否开启
     if not addCnt:
@@ -148,7 +154,7 @@
     dayIndex = actWeekPartyInfo.get(ShareDefine.ActKey_DayIndex, 0)
     if dayIndex >= len(templateIDList):
         return
-    if actionID == ChConfig.Def_WPAct_GiftBag:
+    if actionID in ChConfig.AheadFinishWPActList:
         isFind = False
         for day, dayTidList in enumerate(templateIDList[dayIndex:]):
             findTid = 0
@@ -189,6 +195,8 @@
             return
         updTimes = curTimes + addCnt
     else:
+        if not isCompatible and addCnt != totalTimes:
+            return
         updTimes = min(addCnt, totalTimes)
     realAddCnt = updTimes - curTimes
     if realAddCnt <= 0:
@@ -201,10 +209,48 @@
     updPoint = curPoint + addPoint
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyPoint % dayIndex, updPoint, ChConfig.Def_PDictType_WeekParty)
     GameWorld.DebugLog('   增加周狂欢相关活动完成次数 dayIndex=%s, findTid=%s, realAddCnt=%s,addPoint=%s' % (dayIndex, findTid, realAddCnt, addPoint))
-    SyncWeekPartyPlayerInfo(curPlayer, dayIndex, findTid)
+    if isSync:
+        SyncWeekPartyPlayerInfo(curPlayer, dayIndex, findTid)
     return True
 
 
+def CheckWeekPartyActionCnt(curPlayer):
+    ipyDataMgr = IpyGameDataPY.IPY_Data()
+    for actionType in ChConfig.AheadFinishWPActList:
+        if actionType == ChConfig.Def_WPAct_Horse:
+            for i in xrange(ipyDataMgr.GetHorseCount()):
+                ipyData = ipyDataMgr.GetHorseByIndex(i)
+                index = ipyData.GetHorseID()
+                lv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Horser_LV % index, 0, ChConfig.Def_PDictType_Horse)
+                if lv:
+                    AddWeekPartyActionCnt(curPlayer, actionType, index, False)
+        elif actionType == ChConfig.Def_WPAct_Pet:
+            petDataPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptPet)
+            for petDataIndex in range(petDataPack.GetCount()):
+                petItem = petDataPack.GetAt(petDataIndex)
+                if petItem.IsEmpty():
+                    continue
+                petNPCID = petItem.GetUserAttr(ShareDefine.Def_IudetPet_NPCID)
+                AddWeekPartyActionCnt(curPlayer, actionType, petNPCID, False)
+        elif actionType == ChConfig.Def_WPAct_Dogz:
+            for i in xrange(ipyDataMgr.GetDogzCount()):
+                ipyData = ipyDataMgr.GetDogzByIndex(i)
+                if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_DogzFightState, i):
+                    AddWeekPartyActionCnt(curPlayer, actionType, ipyData.GetDogzID(), False)
+        elif actionType == ChConfig.Def_WPAct_Rune:
+            runeHoleCnt = IpyGameDataPY.GetFuncCfg("RuneUnlock", 4)
+            for holeNum in xrange(1, runeHoleCnt + 1):
+                runeData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Rune_Data % holeNum, 0)
+                if not runeData:
+                    continue
+                runeItemID = ItemControler.GetRuneItemID(runeData)
+                itemData = GameWorld.GetGameData().GetItemByTypeID(runeItemID)
+                if not itemData:
+                    continue
+                itemColor = itemData.GetItemColor()
+                AddWeekPartyActionCnt(curPlayer, actionType, itemColor, False)
+    return
+
 def GetWeekPartyActionAward(curPlayer, day, templateID):
     '''领取周狂欢活动奖励'''
     templateID = GameWorld.ToIntDef(templateID, 0)

--
Gitblit v1.8.0