237 【福利内容】每日任务/每周任务/章节奖励-服务端(每日任务、每周奖励;)
24个文件已修改
1个文件已删除
2242 ■■■■ 已修改文件
PySysDB/PySysDBPY.h 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 204 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 340 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ActivityPlace.py 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddActivity.py 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Arena.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 165 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py 1088 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldRush.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -1249,25 +1249,6 @@
    DWORD        ADMapID;    //对应副本ID,默认给该副本1次次数
};
//日常活动表
struct tagDailyAction
{
    DWORD        _DailyID;    //活动ID
    dict        OpenTimeDict;    //开启时间
    DWORD        Duration;    //持续时间, 0为不限制
    DWORD        DayTimes;    //每日次数, 0为不限制
    DWORD        DayBuyTimes;    //每日可购买次数
    BYTE        BuyTimesPrivilegeID;    //购买次数VIP权限ID
    BYTE        MoneyType;    //货币类型
    list        BuyNeedMoney;    //购买次数需要仙玉
    DWORD        DayItemAddTimes;    //每日可用物品增加次数
    DWORD        DayItemID;    //增加次数的物品ID
    BYTE        DayResetType;    //每日次数重置类型; 0-不重置,1-0点,2-5点
    DWORD        WeekTimes;    //每周次数, 0为不限制
    BYTE        WeekResetType;    //每周次数重置类型; 0-不重置,1-0点,2-5点
};
//装备评分属性系数表
struct tagEquipGSParam
@@ -1478,50 +1459,24 @@
    list        MailItemPrize;        //活动更新时发送邮件奖励物品
};
//任务列表
//每日任务表
struct tagTaskList
struct DailyTask
{
    DWORD        _TaskID;    //任务ID
    WORD        TaskID;    //任务ID
    BYTE        _TaskType;    //任务类型
    list        TaskConds;    //任务条件[...]
    DWORD        NeedValue;    //所需任务值
    BYTE        AwardLiveness;    //奖励活跃度
};
//日常任务表
//每日活跃奖励表
struct tagDailyQuest
struct DailyLivenessReward
{
    DWORD        _ID;    //ID
    BYTE        RelatedType;    //关联类型
    DWORD        RelatedID;    //关联ID
    WORD        UnLockFuncID;    //解锁功能ID
    BYTE        OnceActivityTime;    //增加活跃所需次数
    BYTE        OnceActivity;    //单次活跃值
    WORD        TotalActiveValue;    //总活跃
};
//日常活跃奖励表
struct tagDailyLivenessReward
{
    BYTE        _ID;    //ID
    WORD        Liveness;    //所需活跃度
    list        StageLV;    //阶段等级
    list        ItemID;    //物品ID
    list        ItemCount;    //物品数量
    list        ItemBind;    //是否绑定
};
//日常活跃放置表
struct tagActivityPlaceReward
{
    BYTE        _ID;    //ID
    BYTE        PlaceCount;    //放置定制次数
    WORD        PlaceMaxLV;    //最大等级
    list        FixedItemRewardList;    //固定奖励 [[物品ID, 个数], ...]
    BYTE        RandItemCountA;    //饼图奖励次数A
    list        RandItemRewardListA;    //饼图奖励库A [[饼图概率,物品ID], ...]  物品ID支持0
    BYTE        RandItemCountB;    //饼图奖励次数B
    list        RandItemRewardListB;    //饼图奖励库B [[饼图概率,物品ID], ...]  物品ID支持0
    BYTE        _AwardID;    //奖励ID
    WORD        NeedLiveness;    //所需活跃度
    list        AwardItemList;    //奖励物品列表 [[物品ID,个数], ...]
};
//BOSS信息表
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -1141,30 +1141,6 @@
PacketSubCMD_1=0x08
PacketCallFunc_1=OnStartLuckyTreasure
;日常活动
[PlayerActivity]
ScriptName = Player\PlayerActivity.py
Writer = xdh
Releaser = xdh
RegType = 0
RegisterPackCount = 4
PacketCMD_1=0xA5
PacketSubCMD_1=0x25
PacketCallFunc_1=OnDailyActionBuyCnt
PacketCMD_2=0xB0
PacketSubCMD_2=0x27
PacketCallFunc_2=OnActivityPlaceStart
PacketCMD_3=0xB0
PacketSubCMD_3=0x28
PacketCallFunc_3=OnActivityPlaceQuickFinish
PacketCMD_4=0xB0
PacketSubCMD_4=0x29
PacketCallFunc_4=OnActivityPlaceQuery
;转盘活动
[PlayerActTurntable]
ScriptName = Player\PlayerActTurntable.py
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
@@ -21,6 +21,7 @@
import ChConfig
import PlayerTask
import PlayerActivity
import PlayerViewCache
import ChPyNetSendPack
import NetPackCommon
@@ -1652,7 +1653,8 @@
    
    # 暂时只算主线小怪
    if curPlayer and turnFight.mapID == ChConfig.Def_FBMapID_Main and gameObj.GetFaction() != ChConfig.Def_FactionA:
        PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_KillNPC, 1)
        PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_KillNPC, 1)
        PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_KillNPC, 1)
    return True
def OnTurnAllOver(guid):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3796,36 +3796,6 @@
Def_PDict_FightPower_List = [Def_PDict_FightPower_Total, Def_PDict_FightPower_TotalEx]
# 每日活跃度
Def_PDict_Activity_FinishCnt = "Activity_FinishCnt_%s"  # 活跃度类型对应完成次数
Def_PDict_Activity_AddTotal = "Activity_AddTotal_%s"  # 活跃度类型对应获得活跃度总
Def_PDict_Activity_TotalPoint = "Activity_TotalPoint"  # 当前总活跃值(不可消耗)
Def_PDict_ActivityAwardRecord = "ActivityAwardRecord"  # 活跃度奖励领取记录,按二进制位标识
Def_PDict_Activity_AwardStage = "Activity_AwardStage"  # 当前活跃奖励阶段,对应不同境界段
Def_PDict_Activity_ExtraRealmPoint = "Activity_ExtraRealmPoint"  # 多倍活动额外获得的修行点
# 活跃放置
Def_PDict_ActivityCountTotal = "ActivityCountTotal"  # 累计活跃放置修炼次数
Def_PDict_ActivityCanCostTotalPoint = "ActivityCanCostTotalPoint"  # 当前总活跃值(可消耗)
Def_PDict_ActivityPlaceStartTime = "ActivityPlaceStartTime" # 活跃放置开始time值
Def_PDict_ActivityPlaceRemainCount = "ActivityPlaceRemainCount" # 活跃放置剩余进行次数
Def_PDict_ActivityPlaceRewardCount = "ActivityPlaceRewardCount" # 活跃放置本次启动已累计奖励次数
Def_PDict_ActivityPlaceRewardTotalCount = "ActivityPlaceRewardTotalCount" # 活跃放置历史总共累计奖励次数
Def_PDict_ActivityPlaceRewardItem = "ActivityPlaceItem" # 奖励物品个数
Def_PDict_ActivityPlaceRewardItemID = "ActivityPlaceItemID_%s" # 奖励物品ID,参数(index)
Def_PDict_ActivityPlaceRewardItemCount = "ActivityPlaceItemCount_%s" # 奖励物品个数,参数(index)
Def_PDict_ActivityPlaceExpCount = "ActivityPlaceExpCount" # 活跃放置获得exp次数
Def_PDict_ActivityPlaceTodayExp = "ActivityPlaceTodayExp" # 活跃放置今日获得exp
Def_PDict_ActivityPlaceTodayExpPoint = "ActivityPlaceTodayExpPoint" # 活跃放置昨日获得exp 扩展值
Def_PDict_ActivityPlaceYestorDayExp = "ActivityPlaceYestorDayExp" # 活跃放置昨日获得exp
Def_PDict_ActivityPlaceYestorDayExpPoint = "ActivityPlaceYestorDayExpP" # 活跃放置昨日获得exp 扩展值
# 每日活动
Def_PDict_DailyActionDayTimes = "DailyActionDayTimes_%s"  # 每日活动今日完成次数 参数每日活动ID
Def_PDict_DailyActionDayBuyTimes = "DADayBuyTimes_%s"  # 每日活动今日购买次数 参数每日活动ID
Def_PDict_DailyActionDayItemTimes = "DADayItemTimes_%s"  # 每日活动今日物品增加次数 参数每日活动ID
Def_PDict_DailyActionWeekTimes = "DailyActionWeekTimes_%s"  # 每日活动本周完成次数 参数每日活动ID
# 投资理财
Def_PDict_InvestTime = "InvestTime_%s"  # 投资时的时间,参数为投资类型
Def_PDict_InvestProgress = "InvestProgress_%s_%s"  # 投资可领奖进度值,参数为(投资类型, key编号)
@@ -3967,6 +3937,13 @@
Def_PDict_TaskID = "TaskID_%s" # 当前进行中的任务ID,参数(任务组)
Def_PDict_TaskValue = "TaskValue_%s" # 当前进行中的任务进度,参数(任务组)
Def_PDict_TaskState = "TaskState_%s" # 当前进行中的任务状态 0-无;1-进行中;2-已完成,参数(任务组)
#每日任务,按任务类型累加进度
Def_PDict_DailyTaskValue = "DTaskV_%s_%s" # 任务类型进度,参数(任务类型, 条件信息)
Def_PDict_DailyTaskState = "DTaskState" # 每日任务是否已领取奖励,按任务ID二进制位存储是否已领取
Def_PDict_ActivityTotal = "ActivityTotal"  # 今日累计获得活跃度
Def_PDict_ActivityAward = "ActivityAward"  # 活跃度奖励领取记录,按二进制位标识
Def_PDict_ActivityWeek = "ActivityWeek"  # 每周活跃奖励第x轮,默认0第1轮
#淘金
Def_PDict_GoldRushCampState = "GoldRushCampState" # 已解锁营地状态,按营地ID二进制位运算判断是否已解锁
@@ -4361,7 +4338,7 @@
Def_Cost_LuckyTreasure, #幸运鉴宝
Def_Cost_MysteryShopRefresh, # 神秘商店刷新
Def_Cost_AuctionBid, # 拍卖行竞价
Def_Cost_BuyDailyActionCnt, # 购买活动次数 45
Def_Cost_45, # 购买活动次数 45
Def_Cost_46, # 副本买buff
Def_Cost_CreatFamily, # 创建仙盟
Def_Cost_BuyKillBossCnt, #购买boss次数
@@ -4458,7 +4435,6 @@
Def_Cost_LuckyTreasure:"LuckyTreasure",
Def_Cost_MysteryShopRefresh:"MysteryShopRefresh",
Def_Cost_AuctionBid:"AuctionBid",
Def_Cost_BuyDailyActionCnt:"BuyDailyActionCnt",
Def_Cost_CreatFamily:"CreatFamily",
Def_Cost_BuyKillBossCnt:"BuyKillBossCnt",
Def_Cost_EquipStar:"EquipStar",
@@ -4972,7 +4948,7 @@
# 游戏功能奖励定义
(
Def_RewardType_Activity,  # 活跃度奖励 0
Def_RewardType_1,  # 1
Def_RewardType_DailyTask,  # 每日任务奖励 1
Def_RewardType_ChampionFamilyDailyReward,  # 仙盟联赛冠军仙盟每日俸禄奖励 2
Def_RewardType_XMZZWinCnt,  # 仙魔之争胜利场数奖励 3
Def_RewardType_FamilyDayAward,  # 仙盟每日福利奖励 4
@@ -5304,6 +5280,15 @@
TTLTaskType_CrossBoss, # 跨服boss击杀x次 18
) = range(1, 1 + 18)
# 每日任务类型
DailyTaskList = (
DailyTask_KillNPC, # 击败X只怪物 1
DailyTask_EquipDecompose, # 分解装备x次 2
DailyTask_HeroCall, # 武将招募 3
DailyTask_Arena, # 演武场 4
DailyTask_GoldRush, # 淘金 5
) = range(1, 1 + 5)
# 任务类型定义
TaskTypeList = (
TaskType_MainLevel, # 主线过关到xxx 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -5280,62 +5280,6 @@
#------------------------------------------------------
# A5 25 购买日常活动次数 #tagCMBuyDailyActionCnt
class  tagCMBuyDailyActionCnt(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("ActionID", c_int),    # ID
                  ("AddType", c_ubyte),    # 0-花仙玉 1-用物品
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA5
        self.SubCmd = 0x25
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xA5
        self.SubCmd = 0x25
        self.ActionID = 0
        self.AddType = 0
        return
    def GetLength(self):
        return sizeof(tagCMBuyDailyActionCnt)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A5 25 购买日常活动次数 //tagCMBuyDailyActionCnt:
                                Cmd:%s,
                                SubCmd:%s,
                                ActionID:%d,
                                AddType:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.ActionID,
                                self.AddType
                                )
        return DumpString
m_NAtagCMBuyDailyActionCnt=tagCMBuyDailyActionCnt()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyDailyActionCnt.Cmd,m_NAtagCMBuyDailyActionCnt.SubCmd))] = m_NAtagCMBuyDailyActionCnt
#------------------------------------------------------
#A5 75 购买副本进入次数#tagCMBuyEnterCount
class  tagCMBuyEnterCount(Structure):
@@ -11781,154 +11725,6 @@
m_NAtagCMMixCampaignAward=tagCMMixCampaignAward()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMMixCampaignAward.Cmd,m_NAtagCMMixCampaignAward.SubCmd))] = m_NAtagCMMixCampaignAward
#------------------------------------------------------
# B0 29 活跃放置明细查询 #tagCMActivityPlaceQuery
class  tagCMActivityPlaceQuery(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB0
        self.SubCmd = 0x29
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xB0
        self.SubCmd = 0x29
        return
    def GetLength(self):
        return sizeof(tagCMActivityPlaceQuery)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B0 29 活跃放置明细查询 //tagCMActivityPlaceQuery:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagCMActivityPlaceQuery=tagCMActivityPlaceQuery()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActivityPlaceQuery.Cmd,m_NAtagCMActivityPlaceQuery.SubCmd))] = m_NAtagCMActivityPlaceQuery
#------------------------------------------------------
# B0 28 活跃放置快速完成 #tagCMActivityPlaceQuickFinish
class  tagCMActivityPlaceQuickFinish(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("FinishCount", c_ubyte),    #完成次数
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB0
        self.SubCmd = 0x28
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xB0
        self.SubCmd = 0x28
        self.FinishCount = 0
        return
    def GetLength(self):
        return sizeof(tagCMActivityPlaceQuickFinish)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B0 28 活跃放置快速完成 //tagCMActivityPlaceQuickFinish:
                                Cmd:%s,
                                SubCmd:%s,
                                FinishCount:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.FinishCount
                                )
        return DumpString
m_NAtagCMActivityPlaceQuickFinish=tagCMActivityPlaceQuickFinish()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActivityPlaceQuickFinish.Cmd,m_NAtagCMActivityPlaceQuickFinish.SubCmd))] = m_NAtagCMActivityPlaceQuickFinish
#------------------------------------------------------
# B0 27 活跃放置启动 #tagCMActivityPlaceStart
class  tagCMActivityPlaceStart(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB0
        self.SubCmd = 0x27
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xB0
        self.SubCmd = 0x27
        return
    def GetLength(self):
        return sizeof(tagCMActivityPlaceStart)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B0 27 活跃放置启动 //tagCMActivityPlaceStart:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagCMActivityPlaceStart=tagCMActivityPlaceStart()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActivityPlaceStart.Cmd,m_NAtagCMActivityPlaceStart.SubCmd))] = m_NAtagCMActivityPlaceStart
#------------------------------------------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -4207,194 +4207,6 @@
#------------------------------------------------------
# A3 15 日常活动次数通知 #tagMCDailyActionCnt
class  tagMCDailyActionInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("ActionID", c_int),    # ID
                  ("DayFinishCnt", c_ushort),    # 今日已完成次数
                  ("DayBuyTimes", c_ubyte),    # 今日购买次数
                  ("DayItemTimes", c_ubyte),    # 今日物品增加次数
                  ("WeekFinishCnt", c_int),    # 本周已完成次数
                  ]
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.ActionID = 0
        self.DayFinishCnt = 0
        self.DayBuyTimes = 0
        self.DayItemTimes = 0
        self.WeekFinishCnt = 0
        return
    def GetLength(self):
        return sizeof(tagMCDailyActionInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A3 15 日常活动次数通知 //tagMCDailyActionCnt:
                                ActionID:%d,
                                DayFinishCnt:%d,
                                DayBuyTimes:%d,
                                DayItemTimes:%d,
                                WeekFinishCnt:%d
                                '''\
                                %(
                                self.ActionID,
                                self.DayFinishCnt,
                                self.DayBuyTimes,
                                self.DayItemTimes,
                                self.WeekFinishCnt
                                )
        return DumpString
class  tagMCDailyActionCnt(Structure):
    Head = tagHead()
    Count = 0    #(BYTE Count)// 个数
    ActionInfo = list()    #(vector<tagMCDailyActionInfo> ActionInfo)// 活动信息
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x15
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.Count):
            temActionInfo = tagMCDailyActionInfo()
            _pos = temActionInfo.ReadData(_lpData, _pos)
            self.ActionInfo.append(temActionInfo)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x15
        self.Count = 0
        self.ActionInfo = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        for i in range(self.Count):
            length += self.ActionInfo[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteString(data, self.ActionInfo[i].GetLength(), self.ActionInfo[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Count:%d,
                                ActionInfo:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Count,
                                "..."
                                )
        return DumpString
m_NAtagMCDailyActionCnt=tagMCDailyActionCnt()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDailyActionCnt.Head.Cmd,m_NAtagMCDailyActionCnt.Head.SubCmd))] = m_NAtagMCDailyActionCnt
#------------------------------------------------------
#A3 33 玩家每日活跃度 #tagMCDailyActivityInfoList
class  tagMCDailyActivityInfoList(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("CurValue", c_int),    # 当前总活跃度
                  ("RealmPoint", c_int),    # 可领取修行点
                  ("StageIndex", c_ubyte),    # 当前阶段索引
                  ("AwardRecord", c_int),    # 领奖记录 按位存储
                  ("ExtraPoint", c_int),    # 多倍活动获得的额外修行点
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA3
        self.SubCmd = 0x33
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xA3
        self.SubCmd = 0x33
        self.CurValue = 0
        self.RealmPoint = 0
        self.StageIndex = 0
        self.AwardRecord = 0
        self.ExtraPoint = 0
        return
    def GetLength(self):
        return sizeof(tagMCDailyActivityInfoList)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''//A3 33 玩家每日活跃度 //tagMCDailyActivityInfoList:
                                Cmd:%s,
                                SubCmd:%s,
                                CurValue:%d,
                                RealmPoint:%d,
                                StageIndex:%d,
                                AwardRecord:%d,
                                ExtraPoint:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.CurValue,
                                self.RealmPoint,
                                self.StageIndex,
                                self.AwardRecord,
                                self.ExtraPoint
                                )
        return DumpString
m_NAtagMCDailyActivityInfoList=tagMCDailyActivityInfoList()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDailyActivityInfoList.Cmd,m_NAtagMCDailyActivityInfoList.SubCmd))] = m_NAtagMCDailyActivityInfoList
#------------------------------------------------------
#A3 0D 玩家签到信息记录 # tagSCDaySignInfo
class  tagSCDaySignInfo(Structure):
@@ -35812,6 +35624,158 @@
#------------------------------------------------------
# B1 09 每日活跃任务信息 #tagSCDailyTaskInfo
class  tagSCDailyTask(Structure):
    TaskType = 0    #(BYTE TaskType)// 任务类型
    CLen = 0    #(BYTE CLen)
    Conds = list()    #(vector<DWORD> Conds)// 条件列表
    CurValue = 0    #(DWORD CurValue)// 进度值,相同任务类型条件的进度值共享
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.TaskType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.CLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.CLen):
            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
            self.Conds.append(value)
        self.CurValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.TaskType = 0
        self.CLen = 0
        self.Conds = list()
        self.CurValue = 0
        return
    def GetLength(self):
        length = 0
        length += 1
        length += 1
        length += 4 * self.CLen
        length += 4
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteBYTE(data, self.TaskType)
        data = CommFunc.WriteBYTE(data, self.CLen)
        for i in range(self.CLen):
            data = CommFunc.WriteDWORD(data, self.Conds[i])
        data = CommFunc.WriteDWORD(data, self.CurValue)
        return data
    def OutputString(self):
        DumpString = '''
                                TaskType:%d,
                                CLen:%d,
                                Conds:%s,
                                CurValue:%d
                                '''\
                                %(
                                self.TaskType,
                                self.CLen,
                                "...",
                                self.CurValue
                                )
        return DumpString
class  tagSCDailyTaskInfo(Structure):
    Head = tagHead()
    ActivityTotal = 0    #(DWORD ActivityTotal)// 今日累计获得活跃度
    ActivityAward = 0    #(DWORD ActivityAward)// 累计活跃领奖记录,按活跃ID奖励二进制位存储是否已领取
    DailyTaskState = 0    #(DWORD DailyTaskState)// 今日任务是否已领取奖励,按任务ID二进制位存储是否已领取
    TaskCount = 0    #(BYTE TaskCount)
    TaskList = list()    #(vector<tagSCDailyTask> TaskList)// 差异更新的任务信息
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xB1
        self.Head.SubCmd = 0x09
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.ActivityTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.ActivityAward,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.DailyTaskState,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.TaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.TaskCount):
            temTaskList = tagSCDailyTask()
            _pos = temTaskList.ReadData(_lpData, _pos)
            self.TaskList.append(temTaskList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xB1
        self.Head.SubCmd = 0x09
        self.ActivityTotal = 0
        self.ActivityAward = 0
        self.DailyTaskState = 0
        self.TaskCount = 0
        self.TaskList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 4
        length += 4
        length += 4
        length += 1
        for i in range(self.TaskCount):
            length += self.TaskList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteDWORD(data, self.ActivityTotal)
        data = CommFunc.WriteDWORD(data, self.ActivityAward)
        data = CommFunc.WriteDWORD(data, self.DailyTaskState)
        data = CommFunc.WriteBYTE(data, self.TaskCount)
        for i in range(self.TaskCount):
            data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                ActivityTotal:%d,
                                ActivityAward:%d,
                                DailyTaskState:%d,
                                TaskCount:%d,
                                TaskList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.ActivityTotal,
                                self.ActivityAward,
                                self.DailyTaskState,
                                self.TaskCount,
                                "..."
                                )
        return DumpString
m_NAtagSCDailyTaskInfo=tagSCDailyTaskInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCDailyTaskInfo.Head.Cmd,m_NAtagSCDailyTaskInfo.Head.SubCmd))] = m_NAtagSCDailyTaskInfo
#------------------------------------------------------
# B1 23 每日掉落战利品信息 #tagSCDropBootyInfo
class  tagSCDropBooty(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ActivityPlace.py
File was deleted
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddActivity.py
@@ -17,20 +17,24 @@
import GameWorld
import PlayerActivity
import ChConfig
#逻辑实现
## GM命令执行入口
#  @param curPlayer 当前玩家
#  @param msgList 参数列表 [npcID]
#  @return None
#  @remarks 函数详细说明.
def OnExec(curPlayer, msgList):
    if not msgList:
        GameWorld.DebugAnswer(curPlayer, "AddActivity 增加活跃度 是否可溢出")
        GameWorld.DebugAnswer(curPlayer, "增加活跃: AddActivity 活跃度")
        GameWorld.DebugAnswer(curPlayer, "每日任务: AddActivity t 任务类型 进度 [条件 ...]")
        return
    addValue = msgList[0]
    isLVUp = msgList[1] if len(msgList) > 1 else 0
    PlayerActivity.DoAddActivity(curPlayer, addValue, isLVUp=isLVUp)
    if addValue == "t":
        taskType = msgList[1] if len(msgList) > 1 else 0
        taskValue = msgList[2] if len(msgList) > 2 else 0
        conds = msgList[3:]
        if taskType not in ChConfig.DailyTaskList:
            return
        PlayerActivity.SetDailyTaskValue(curPlayer, taskType, conds, taskValue)
        PlayerActivity.SyncDailyTaskInfo(curPlayer, taskType, conds)
        GameWorld.DebugAnswer(curPlayer, "设置每日任务进度:%s, TypeC=%s,%s" % (taskValue, taskType, conds))
        return
    updValue = PlayerActivity.DoAddActivity(curPlayer, addValue)
    GameWorld.DebugAnswer(curPlayer, "增加活跃:%s, 当前活跃:%s" % (addValue, updValue))
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -1549,7 +1549,6 @@
        addCount = updCnt-enterCnt
        PlayerControl.NomalDictSetProperty(curPlayer, enterCntKey, updCnt)
        
        #PlayerActivity.OnEnterFBActivity(curPlayer, fbID, updCnt, addCountEx)
        #PlayerSuccess.AddEnterFBSuccess(curPlayer, fbID, addCountEx)
        updValue = updCnt
    GameWorld.DebugLog("    AddEnterFBCount fbID=%s, addCount=%s, lineBit=%s, enterCnt=%s,updValue=%s" 
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Arena.py
@@ -21,6 +21,7 @@
import ShareDefine
import PlayerControl
import IpyGameDataPY
import PlayerActivity
import PlayerBillboard
import PlayerZhanling
import ItemControler
@@ -142,6 +143,7 @@
    
    PlayerZhanling.AddZhanlingValue(curPlayer, PlayerZhanling.ZhanlingType_ArenaCnt, 1)
    PlayerGubao.AddGubaoSpecEffLayer(curPlayer, PlayerGubao.GubaoEffType_Arena, 1)
    PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_Arena, 1)
    return
def __updArenaBatRecord(curPlayer, turnFight, tagPlayerID, isWin, atkAddScore, defDecScore):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
@@ -21,6 +21,7 @@
import ShareDefine
import IpyGameDataPY
import PlayerControl
import PlayerActivity
import ChPyNetSendPack
import ItemControler
import IPY_GameWorld
@@ -482,6 +483,7 @@
            
    PlayerControl.GiveMoney(curPlayer, moneyType, moneyTotal, "DecomposeMainEquip", isSysHint=False)
    PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_EquipDecompose, decomposeCnt)
    PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_EquipDecompose, decomposeCnt)
    return
def __doPickupMainItem(curPlayer, itemIndexList):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1023,22 +1023,6 @@
                        ("DWORD", "ADMapID", 0),
                        ),
                "DailyAction":(
                        ("DWORD", "DailyID", 1),
                        ("dict", "OpenTimeDict", 0),
                        ("DWORD", "Duration", 0),
                        ("DWORD", "DayTimes", 0),
                        ("DWORD", "DayBuyTimes", 0),
                        ("BYTE", "BuyTimesPrivilegeID", 0),
                        ("BYTE", "MoneyType", 0),
                        ("list", "BuyNeedMoney", 0),
                        ("DWORD", "DayItemAddTimes", 0),
                        ("DWORD", "DayItemID", 0),
                        ("BYTE", "DayResetType", 0),
                        ("DWORD", "WeekTimes", 0),
                        ("BYTE", "WeekResetType", 0),
                        ),
                "EquipGSParam":(
                        ("BYTE", "ClassLV", 1),
                        ("BYTE", "EquipColor", 1),
@@ -1213,38 +1197,18 @@
                        ("list", "MailItemPrize", 0),
                        ),
                "TaskList":(
                        ("DWORD", "TaskID", 1),
                        ),
                "DailyQuest":(
                        ("DWORD", "ID", 1),
                        ("BYTE", "RelatedType", 0),
                        ("DWORD", "RelatedID", 0),
                        ("WORD", "UnLockFuncID", 0),
                        ("BYTE", "OnceActivityTime", 0),
                        ("BYTE", "OnceActivity", 0),
                        ("WORD", "TotalActiveValue", 0),
                "DailyTask":(
                        ("WORD", "TaskID", 0),
                        ("BYTE", "TaskType", 1),
                        ("list", "TaskConds", 0),
                        ("DWORD", "NeedValue", 0),
                        ("BYTE", "AwardLiveness", 0),
                        ),
                "DailyLivenessReward":(
                        ("BYTE", "ID", 1),
                        ("WORD", "Liveness", 0),
                        ("list", "StageLV", 0),
                        ("list", "ItemID", 0),
                        ("list", "ItemCount", 0),
                        ("list", "ItemBind", 0),
                        ),
                "ActivityPlaceReward":(
                        ("BYTE", "ID", 1),
                        ("BYTE", "PlaceCount", 0),
                        ("WORD", "PlaceMaxLV", 0),
                        ("list", "FixedItemRewardList", 0),
                        ("BYTE", "RandItemCountA", 0),
                        ("list", "RandItemRewardListA", 0),
                        ("BYTE", "RandItemCountB", 0),
                        ("list", "RandItemRewardListB", 0),
                        ("BYTE", "AwardID", 1),
                        ("WORD", "NeedLiveness", 0),
                        ("list", "AwardItemList", 0),
                        ),
                "BOSSInfo":(
@@ -3950,27 +3914,6 @@
    def GetADAwardItemList(self): return self.attrTuple[2] # 广告奖励物品列表 list
    def GetADMapID(self): return self.attrTuple[3] # 对应副本ID,默认给该副本1次次数 DWORD
# 日常活动表
class IPY_DailyAction():
    def __init__(self):
        self.attrTuple = None
        return
    def GetDailyID(self): return self.attrTuple[0] # 活动ID DWORD
    def GetOpenTimeDict(self): return self.attrTuple[1] # 开启时间 dict
    def GetDuration(self): return self.attrTuple[2] # 持续时间, 0为不限制 DWORD
    def GetDayTimes(self): return self.attrTuple[3] # 每日次数, 0为不限制 DWORD
    def GetDayBuyTimes(self): return self.attrTuple[4] # 每日可购买次数 DWORD
    def GetBuyTimesPrivilegeID(self): return self.attrTuple[5] # 购买次数VIP权限ID BYTE
    def GetMoneyType(self): return self.attrTuple[6] # 货币类型 BYTE
    def GetBuyNeedMoney(self): return self.attrTuple[7] # 购买次数需要仙玉 list
    def GetDayItemAddTimes(self): return self.attrTuple[8] # 每日可用物品增加次数 DWORD
    def GetDayItemID(self): return self.attrTuple[9] # 增加次数的物品ID DWORD
    def GetDayResetType(self): return self.attrTuple[10] # 每日次数重置类型; 0-不重置,1-0点,2-5点 BYTE
    def GetWeekTimes(self): return self.attrTuple[11] # 每周次数, 0为不限制 DWORD
    def GetWeekResetType(self): return self.attrTuple[12] # 每周次数重置类型; 0-不重置,1-0点,2-5点 BYTE
# 装备评分属性系数表
class IPY_EquipGSParam():
    
@@ -4205,59 +4148,29 @@
    def GetMailKey(self): return self.attrTuple[9] # 活动更新时发送邮件key char
    def GetMailItemPrize(self): return self.attrTuple[10] # 活动更新时发送邮件奖励物品 list
# 任务列表
class IPY_TaskList():
# 每日任务表
class IPY_DailyTask():
    
    def __init__(self):
        self.attrTuple = None
        return
        
    def GetTaskID(self): return self.attrTuple[0] # 任务ID DWORD
    def GetTaskID(self): return self.attrTuple[0] # 任务ID WORD
    def GetTaskType(self): return self.attrTuple[1] # 任务类型 BYTE
    def GetTaskConds(self): return self.attrTuple[2] # 任务条件[...] list
    def GetNeedValue(self): return self.attrTuple[3] # 所需任务值 DWORD
    def GetAwardLiveness(self): return self.attrTuple[4] # 奖励活跃度 BYTE
# 日常任务表
class IPY_DailyQuest():
    def __init__(self):
        self.attrTuple = None
        return
    def GetID(self): return self.attrTuple[0] # ID DWORD
    def GetRelatedType(self): return self.attrTuple[1] # 关联类型 BYTE
    def GetRelatedID(self): return self.attrTuple[2] # 关联ID DWORD
    def GetUnLockFuncID(self): return self.attrTuple[3] # 解锁功能ID WORD
    def GetOnceActivityTime(self): return self.attrTuple[4] # 增加活跃所需次数 BYTE
    def GetOnceActivity(self): return self.attrTuple[5] # 单次活跃值 BYTE
    def GetTotalActiveValue(self): return self.attrTuple[6] # 总活跃 WORD
# 日常活跃奖励表
# 每日活跃奖励表
class IPY_DailyLivenessReward():
    
    def __init__(self):
        self.attrTuple = None
        return
        
    def GetID(self): return self.attrTuple[0] # ID BYTE
    def GetLiveness(self): return self.attrTuple[1] # 所需活跃度 WORD
    def GetStageLV(self): return self.attrTuple[2] # 阶段等级 list
    def GetItemID(self): return self.attrTuple[3] # 物品ID list
    def GetItemCount(self): return self.attrTuple[4] # 物品数量 list
    def GetItemBind(self): return self.attrTuple[5] # 是否绑定 list
# 日常活跃放置表
class IPY_ActivityPlaceReward():
    def __init__(self):
        self.attrTuple = None
        return
    def GetID(self): return self.attrTuple[0] # ID BYTE
    def GetPlaceCount(self): return self.attrTuple[1] # 放置定制次数 BYTE
    def GetPlaceMaxLV(self): return self.attrTuple[2] # 最大等级 WORD
    def GetFixedItemRewardList(self): return self.attrTuple[3] # 固定奖励 [[物品ID, 个数], ...] list
    def GetRandItemCountA(self): return self.attrTuple[4] # 饼图奖励次数A BYTE
    def GetRandItemRewardListA(self): return self.attrTuple[5] # 饼图奖励库A [[饼图概率,物品ID], ...]  物品ID支持0 list
    def GetRandItemCountB(self): return self.attrTuple[6] # 饼图奖励次数B BYTE
    def GetRandItemRewardListB(self): return self.attrTuple[7] # 饼图奖励库B [[饼图概率,物品ID], ...]  物品ID支持0 list
    def GetAwardID(self): return self.attrTuple[0] # 奖励ID BYTE
    def GetNeedLiveness(self): return self.attrTuple[1] # 所需活跃度 WORD
    def GetAwardItemList(self): return self.attrTuple[2] # 奖励物品列表 [[物品ID,个数], ...] list
# BOSS信息表
class IPY_BOSSInfo():
@@ -6378,7 +6291,6 @@
        self.__LoadFileData("FBLine", onlyCheck)
        self.__LoadFileData("Tianzi", onlyCheck)
        self.__LoadFileData("ADAward", onlyCheck)
        self.__LoadFileData("DailyAction", onlyCheck)
        self.__LoadFileData("EquipGSParam", onlyCheck)
        self.__LoadFileData("Success", onlyCheck)
        self.__LoadFileData("TongTianLV", onlyCheck)
@@ -6391,10 +6303,8 @@
        self.__LoadFileData("VipPrivilege", onlyCheck)
        self.__LoadFileData("Store", onlyCheck)
        self.__LoadFileData("ActSpringSale", onlyCheck)
        self.__LoadFileData("TaskList", onlyCheck)
        self.__LoadFileData("DailyQuest", onlyCheck)
        self.__LoadFileData("DailyTask", onlyCheck)
        self.__LoadFileData("DailyLivenessReward", onlyCheck)
        self.__LoadFileData("ActivityPlaceReward", onlyCheck)
        self.__LoadFileData("BOSSInfo", onlyCheck)
        self.__LoadFileData("BOSSFirstKill", onlyCheck)
        self.__LoadFileData("FamilyRedPack", onlyCheck)
@@ -7393,13 +7303,6 @@
        self.CheckLoadData("ADAward")
        return self.ipyADAwardCache[index]
    def GetDailyActionCount(self):
        self.CheckLoadData("DailyAction")
        return self.ipyDailyActionLen
    def GetDailyActionByIndex(self, index):
        self.CheckLoadData("DailyAction")
        return self.ipyDailyActionCache[index]
    def GetEquipGSParamCount(self):
        self.CheckLoadData("EquipGSParam")
        return self.ipyEquipGSParamLen
@@ -7484,19 +7387,12 @@
        self.CheckLoadData("ActSpringSale")
        return self.ipyActSpringSaleCache[index]
    def GetTaskListCount(self):
        self.CheckLoadData("TaskList")
        return self.ipyTaskListLen
    def GetTaskListByIndex(self, index):
        self.CheckLoadData("TaskList")
        return self.ipyTaskListCache[index]
    def GetDailyQuestCount(self):
        self.CheckLoadData("DailyQuest")
        return self.ipyDailyQuestLen
    def GetDailyQuestByIndex(self, index):
        self.CheckLoadData("DailyQuest")
        return self.ipyDailyQuestCache[index]
    def GetDailyTaskCount(self):
        self.CheckLoadData("DailyTask")
        return self.ipyDailyTaskLen
    def GetDailyTaskByIndex(self, index):
        self.CheckLoadData("DailyTask")
        return self.ipyDailyTaskCache[index]
    def GetDailyLivenessRewardCount(self):
        self.CheckLoadData("DailyLivenessReward")
@@ -7504,13 +7400,6 @@
    def GetDailyLivenessRewardByIndex(self, index):
        self.CheckLoadData("DailyLivenessReward")
        return self.ipyDailyLivenessRewardCache[index]
    def GetActivityPlaceRewardCount(self):
        self.CheckLoadData("ActivityPlaceReward")
        return self.ipyActivityPlaceRewardLen
    def GetActivityPlaceRewardByIndex(self, index):
        self.CheckLoadData("ActivityPlaceReward")
        return self.ipyActivityPlaceRewardCache[index]
    def GetBOSSInfoCount(self):
        self.CheckLoadData("BOSSInfo")
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py
@@ -36,7 +36,6 @@
import NPCCommon
import time
import math
import PlayerActivity
import GameObj
import SkillShell
import FBLogic
@@ -128,8 +127,6 @@
        return None
    
    callFunc(atkObj, curNPC, skill, tick)
    PlayerActivity.OnAttackNPCActivity(atkObj, curNPC)
    return
def OnCheckCanDie(atkObj, curNPC, skill, tick):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -40,7 +40,6 @@
import DataRecordPack
import NetPackCommon
import FBCommon
import PlayerActivity
import PlayerSuccess
import PlayerPrestigeSys
import GY_Query_BossFirstKill
@@ -905,73 +904,6 @@
    return
def OnPlayerKillBoss(curPlayer, npcID, mapID, isCrossServer):
    npcData = GameWorld.GetGameData().FindNPCDataByID(npcID)
    if not npcData:
        return
    killBossCntLimitDict = IpyGameDataPY.GetFuncCfg('KillBossCntLimit', 1)
    limitIndex = GameWorld.GetDictValueByKey(killBossCntLimitDict, npcID)
    if limitIndex != None:
        totalKey = ChConfig.Def_PDict_Boss_KillCntTotal % limitIndex
        totalCnt = min(curPlayer.NomalDictGetProperty(totalKey, 0) + 1, ChConfig.Def_UpperLimit_DWord)
        PlayerControl.NomalDictSetProperty(curPlayer, totalKey, totalCnt)
        #今日杀怪次数+1
        key = ChConfig.Def_PDict_Boss_KillCnt % limitIndex
        newCnt = curPlayer.NomalDictGetProperty(key, 0) + 1
        PlayerControl.NomalDictSetProperty(curPlayer, key, newCnt)
        GameWorld.DebugLog("更新击杀Boss次数: index=%s, todayCnt=%s, totalCnt=%s" % (limitIndex, newCnt, totalCnt), curPlayer.GetPlayerID())
        dataDict = {"objID":npcID, "bossID":npcID, "touchCnt":newCnt, "totalCnt":totalCnt,
                    "AccID":curPlayer.GetAccID(), "PlayerID":curPlayer.GetPlayerID()}
        DataRecordPack.SendEventPack("AddKillBossCnt", dataDict, curPlayer)
        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_KillBoss, 1, [limitIndex])
        PlayerState.SetBossStateExit(curPlayer)
    if isCrossServer:
        return
    if limitIndex == ShareDefine.Def_Boss_Func_World:
        # 世界BOSS击杀成就
        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_KillWorldBoss, 1)
        # 每日活动
        PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_WorldBOSS)
        PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_WorldBOSS, 1)
        PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_WorldBOSS, 1)
        PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_WorldBoss, 1)
        PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_WorldBOSS, 1)
        PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_WorldBoss, 1)
        #PlayerZhanling.AddZhanlingValue(curPlayer, PlayerZhanling.ZhanlingType_Huanjingge, 1)
        PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_WorldBoss, 1)
    elif limitIndex == ShareDefine.Def_Boss_Func_Home:
        #BOSS之家
        # BOSS之家BOSS击杀成就
        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_KillBossHomeBoss, 1)
        # 每日活动
        PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_BOSSHome)
        PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_BOSSHome, 1)
        PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_BOSSHome, 1)
        PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_BossHome, 1)
        PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_BossHome, 1)
#    if mapID == ChConfig.Def_FBMapID_CrossPenglai:
#        #跨服蓬莱仙境
#        PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_CrossPenglai)
#        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_KillCrossPenglaiBoss, 1)
#        PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_CrossPenglaiBoss, 1)
#    elif mapID == ChConfig.Def_FBMapID_CrossDemonLand:
#        #跨服魔化之地
#        PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_CrossDemonLand)
#        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_KillCrossDemonLandBoss, 1)
#        PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_CrossDemonLandBoss, 1)
#    if mapID in [ChConfig.Def_FBMapID_CrossPenglai, ChConfig.Def_FBMapID_CrossDemonLand]:
#        PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_CrossBoss, 1)
    # 个人首杀记录
    ipyData = IpyGameDataPY.GetIpyGameDataNotLog("BOSSFirstKill", npcID)
    if ipyData:
        GY_Query_BossFirstKill.SetPlayerFirstKillBoss(curPlayer, npcID)
    #Boss投资
    PlayerGoldInvest.OnKillBoss(curPlayer, npcID)
    return
    
#################################################
@@ -3200,7 +3132,6 @@
            FBLogic.DoFB_DropOwner(curPlayer , curNPC)
        else:
            if GetNPCLV(curNPC) >= curPlayer.GetLV() - IpyGameDataPY.GetFuncCfg('DailyQuestKillMonster'):
                PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_KillNPC)
                PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_KillNPC)
            PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_KillSpecificNPC, 1, [npcID])
        #PlayerPrestigeSys.AddRealmTaskValue(curPlayer, PlayerPrestigeSys.RealmTaskType_KillNPC, 1)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -554,9 +554,6 @@
    # 采集NPC次数通知
    #NPCCommon.SyncCollNPCTime(curPlayer)
    
    # 每日活跃度
    PlayerActivity.OnLogin(curPlayer)
    # 副本进入时间
    FBCommon.FBOnLogin(curPlayer)
    
@@ -753,6 +750,7 @@
        PlayerTalk.OnPlayerLogin(curPlayer)
        SyncADCntInfo(curPlayer)
        UpdatePlayerName.OnPlayerLogin(curPlayer)
        PlayerActivity.OnPlayerLogin(curPlayer)
        
        # 上线查询一次充值订单
        curPlayer.SendDBQueryRecharge()
@@ -3269,9 +3267,9 @@
    # 活跃度奖励
    if rewardType == ChConfig.Def_RewardType_Activity:
        PlayerActivity.GetActivityAward(curPlayer, dataEx)
    # 活跃放置奖励
    elif rewardType == ChConfig.Def_RewardType_ActivityPlace:
        PlayerActivity.GetActivityPlaceReward(curPlayer)
    # 每日任务奖励
    elif rewardType == ChConfig.Def_RewardType_DailyTask:
        PlayerActivity.GetDailyTaskAward(curPlayer, dataEx)
    # 仙树免费减时
    elif rewardType == ChConfig.Def_RewardType_TreeFreeTime:
        PlayerTree.FreeReduceTreeLVTime(curPlayer)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -2,974 +2,194 @@
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#
##@package Player.PlayerActivity
#
# @todo:玩家每日活跃度
# @author xdh
# @date 2014-07-14
# @todo:日常活跃任务
# @author hxp
# @date 2025-10-16
# @version 1.0
#
# 详细描述: 玩家每日活跃度、每日活动
#---------------------------------------------------------------------
#"""Version = 2017-02-25 11:30"""
#---------------------------------------------------------------------
# 详细描述: 日常活跃任务
#
#-------------------------------------------------------------------------------
#"""Version = 2025-10-16 19:30"""
#-------------------------------------------------------------------------------
import ChConfig
import ChPyNetSendPack
import NetPackCommon
import ShareDefine
import GameWorld
import ItemCommon
import IPY_GameWorld
import NetPackCommon
import PlayerControl
import ChPyNetSendPack
import PlayerZhanling
import ItemControler
import IpyGameDataPY
import PyGameData
import GameFuncComm
import PlayerPet
import datetime
import time
import FormulaControl
import PlayerBossReborn
import PlayerTongTianLing
import PlayerActTask
import PlayerSuccess
import GameWorld
import DBDataMgr
import ObjPool
#关联类型
(
RelatedType_1,  # 1关联日常活动表
RelatedType_2,  # 2关联副本总表
) = range(1, 3)
def OnWeek(curPlayer, onWeekType):
    actionIDInfo = []
def OnDay(curPlayer):
    CheckResetWeekActivity(curPlayer)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityTotal, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityAward, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DailyTaskState, 0)
    syncTaskCondList = []
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    for i in xrange(ipyDataMgr.GetDailyActionCount()):
        ipyData = ipyDataMgr.GetDailyActionByIndex(i)
        weekTimesLimit = ipyData.GetWeekTimes()
        if not weekTimesLimit:
    for index in range(ipyDataMgr.GetDailyTaskCount()):
        ipyData = ipyDataMgr.GetDailyTaskByIndex(index)
        taskType = ipyData.GetTaskType()
        conds = ipyData.GetTaskConds()
        tcList = [taskType, conds]
        if tcList in syncTaskCondList:
            continue
        # 重置类型不同的不处理
        if ipyData.GetWeekResetType() != onWeekType:
        if not GetDailyTaskValue(curPlayer, taskType, conds):
            continue
        key = ChConfig.Def_PDict_DailyActionWeekTimes % ipyData.GetDailyID()
        __SetPDictValue(curPlayer, key, 0)
        actionIDInfo.append(ipyData.GetDailyID())
    if actionIDInfo:
        SyncDailyActionInfo(curPlayer, actionIDInfo)
        SetDailyTaskValue(curPlayer, taskType, conds, 0)
        syncTaskCondList.append(tcList)
    SyncDailyTaskInfo(curPlayer, isAll=True)
    return
## OnDay
#  @param curPlayer 玩家实例
#  @return
def OnDay(curPlayer, onEventType):
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    if onEventType == ShareDefine.Def_OnEventTypeEx:
        # 重置完成次数
        for i in xrange(ipyDataMgr.GetDailyQuestCount()):
            ipyData = ipyDataMgr.GetDailyQuestByIndex(i)
            key = ChConfig.Def_PDict_Activity_FinishCnt % ipyData.GetID()
            curPBCnt = __GetPDictValue(curPlayer, key)  #单次进度值
            if curPBCnt:
                __SetPDictValue(curPlayer, key, 0)
            key = ChConfig.Def_PDict_Activity_AddTotal % ipyData.GetID()
            if __GetPDictValue(curPlayer, key):
                __SetPDictValue(curPlayer, key, 0)
        #总活跃度重置
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, 0)
        # 重置领奖记录
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord, 0)
        #重置额外获得修行点数
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint, 0)
        #重新计算奖励阶段
        __CalcAwardStage(curPlayer)
        SyncDailyActivityInfo(curPlayer)
        # 记录昨日活跃吸纳经验
        todayExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceTodayExp)
        todayExpPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceTodayExpPoint)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceTodayExp, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceTodayExpPoint, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceYestorDayExp, todayExp)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceYestorDayExpPoint, todayExpPoint)
        #活跃放置
        Sync_ActivityPlaceInfo(curPlayer)
    #else:
    #    SendDayActionMail(curPlayer)
    #日常活动重置
    actionIDInfo = []
    for i in xrange(ipyDataMgr.GetDailyActionCount()):
        ipyData = ipyDataMgr.GetDailyActionByIndex(i)
        dayTimesLimit = GetMaxDayTimes(ipyData)  #ipyData.GetDayTimes()
        if not dayTimesLimit:
            continue
        # 重置类型不同的不处理
        if ipyData.GetDayResetType() != onEventType:
            continue
        dailyID = ipyData.GetDailyID()
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_DailyActionDayTimes % dailyID, 0)
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_DailyActionDayBuyTimes % dailyID, 0)
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_DailyActionDayItemTimes % dailyID, 0)
        actionIDInfo.append(ipyData.GetDailyID())
    if actionIDInfo:
        SyncDailyActionInfo(curPlayer, actionIDInfo)
def OnPlayerLogin(curPlayer):
    CheckResetWeekActivity(curPlayer)
    SyncDailyTaskInfo(curPlayer, isAll=True)
    return
def SendDayActionMail(curPlayer):
    ##发送每日活动邮件
    #if curPlayer.GetLV() >= IpyGameDataPY.GetFuncCfg('DailyQuestMailLvLimit'):
    #    PlayerControl.SendMailByKey('TodayDailyTask', [curPlayer.GetID()], [])
def CheckResetWeekActivity(curPlayer):
    ## 检查重置每周活跃奖励战令
    playerActivityWeek = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityWeek)
    serverDay = DBDataMgr.GetEventTrigMgr().GetValue(ShareDefine.Def_ServerDay) + 1
    nowActivityWeek = (serverDay - 1) / 7 # 暂定7天一轮,按开服天算
    GameWorld.DebugLog("检查重置周活跃奖励战令! serverDay=%s,nowActivityWeek=%s,playerActivityWeek=%s"
                       % (serverDay, nowActivityWeek, playerActivityWeek), curPlayer.GetPlayerID())
    if nowActivityWeek and playerActivityWeek != nowActivityWeek:
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityWeek, nowActivityWeek)
        PlayerZhanling.ResetZhanling(curPlayer, PlayerZhanling.ZhanlingType_WeekActivity)
    return
def AddDailyTaskValue(curPlayer, taskType, addValue=1, conds=[]):
    ## 增加任务进度
    ipyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("DailyTask", taskType)
    if not ipyDataList:
        return
    maxValue = 0
    for ipyData in ipyDataList:
        taskConds = ipyData.GetTaskConds()
        if conds or taskConds:
            # 可按任务类型扩展不同的条件验证方式
            if taskConds != conds:
                continue
        needValue = ipyData.GetNeedValue()
        maxValue = max(maxValue, needValue)
    curValue = GetDailyTaskValue(curPlayer, taskType, conds)
    if curValue >= maxValue:
        return
    updValue = min(curValue + addValue, maxValue)
    SetDailyTaskValue(curPlayer, taskType, conds, updValue)
    SyncDailyTaskInfo(curPlayer, taskType, conds)
    return
#重新计算奖励阶段
def __CalcAwardStage(curPlayer):
    realmLV = curPlayer.GetOfficialRank()
    ipyData = IpyGameDataPY.IPY_Data().GetDailyLivenessRewardByIndex(0)
def GetDailyTaskValue(curPlayer, taskType, conds=[]):
    ##获取完成度
    condition = "" if not conds else str(conds).replace(" ", "")[1:-1]
    return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyTaskValue % (taskType, condition))
def SetDailyTaskValue(curPlayer, taskType, conds, value):
    ##设置完成度
    condition = "" if not conds else str(conds).replace(" ", "")[1:-1]
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DailyTaskValue % (taskType, condition), value)
    GameWorld.DebugLog("更新每日任务进度值: taskType=%s,conds=%s,value=%s" % (taskType, condition, value), curPlayer.GetPlayerID())
    return
def GetDailyTaskAward(curPlayer, taskID):
    playerID = curPlayer.GetPlayerID()
    ipyData = IpyGameDataPY.GetIpyGameDataByCondition("DailyTask", {"TaskID":taskID})
    if not ipyData:
        return
    stageLVList = ipyData.GetStageLV()
    curStage = 0
    for i, lv in enumerate(stageLVList):
        if realmLV < lv:
            break
        if realmLV >= lv:
            curStage = i
    __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AwardStage, curStage)
    GameWorld.DebugLog('    重新计算活跃奖励阶段 curStage=%s,realmLV=%s' % (curStage, realmLV))
    return
## OnLogin
#  @param curPlayer 玩家实例
#  @return
def OnLogin(curPlayer):
    # 同步完成度及领奖记录
    SyncDailyActivityInfo(curPlayer)
    #同步日常活动次数
    SyncDailyActionInfo(curPlayer)
    #活跃放置
    Sync_ActivityPlaceInfo(curPlayer)
    return
## 获取活跃度玩家数据库字典信息值
#  @param curPlayer 玩家实例
#  @param key 字典key
#  @param defaultValue 默认值
#  @return
def __GetPDictValue(curPlayer, key, defaultValue=0):
    return curPlayer.NomalDictGetProperty(key, defaultValue)
## 设置活跃度玩家数据库字典信息值
#  @param curPlayer 玩家实例
#  @param key 字典key
#  @param value 设置的值
#  @return
def __SetPDictValue(curPlayer, key, value):
    PlayerControl.NomalDictSetProperty(curPlayer, key, value)
    return
## 扣除货币获得活跃度
#  @param curPlayer 玩家实例
#  @param type_Price
#  @param price
#  @return
def OnPayMoneyActivity(curPlayer, type_Price, price):
    #金子支付
#    if type_Price == IPY_GameWorld.TYPE_Price_Gold_Money:
#        AddActivityFinishCnt(curPlayer, ShareDefine.ActivityNum_UseGoldCnt)
#    #金票支付
#    elif type_Price == IPY_GameWorld.TYPE_Price_Gold_Paper:
#        AddActivityFinishCnt(curPlayer, ShareDefine.ActivityNum_UseGoldPaperCnt)
    return
## 摸NPC获得活跃度
#  @param atkObj
#  @param curNPC
#  @return
def OnAttackNPCActivity(atkObj, curNPC):
    atkObjType = atkObj.GetGameObjType()
    
    # 不是玩家暂不处理
    if atkObjType != IPY_GameWorld.gotPlayer:
        return
    # 击杀boss
#    if curNPC.GetIsBoss():
#        canAddBossIDList = ReadChConfig.GetEvalChConfig("Activity_BossID")
#
#        if curNPC.GetNPCID() in canAddBossIDList:
#            AddActivityFinishCnt(atkObj, ShareDefine.ActivityNum_KillBoss)
    return
## 增加完成活跃度次数
#  @param curPlayer 玩家实例
#  @param activityNum 活跃度编号
#  @param finishCnt 已完成次数
#  @param addCnt 增加次数,默认1
#  @return
def AddActivityFinishCnt(curPlayer, activityNum, finishCnt, addCnt):
    dailyQuestData = IpyGameDataPY.GetIpyGameDataNotLog('DailyQuest', activityNum)
    if not dailyQuestData:
    taskState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyTaskState)
    if taskState&pow(2, taskID):
        GameWorld.DebugLog("每日任务已经领取过奖励! taskID=%s,taskState=%s" % (taskID, taskState), playerID)
        return
    
    maxActiveValue = dailyQuestData.GetTotalActiveValue()
    onceActivity = dailyQuestData.GetOnceActivity()
    onceActivityTime = dailyQuestData.GetOnceActivityTime()
    if not onceActivity:
        return
    curAddTotal = None
    if maxActiveValue:
        if dailyQuestData.GetRelatedType() == RelatedType_1 and dailyQuestData.GetRelatedID() in [ShareDefine.DailyActionID_CrossBattlefield]:
            curAddTotal = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AddTotal % activityNum)  #单次进度值
            if curAddTotal >= maxActiveValue:
                GameWorld.DebugLog("活跃度可完成次数已达到上限,activityNum=%s,curAddTotal=%s >= %s" % (activityNum, curAddTotal, maxActiveValue))
                return
        else:
            if finishCnt > maxActiveValue / onceActivity * onceActivityTime:
                #GameWorld.DebugLog("活跃度可完成次数已达到上限,activityNum=%s" % (activityNum))
                return
    key = ChConfig.Def_PDict_Activity_FinishCnt % activityNum
    curPBCnt = __GetPDictValue(curPlayer, key)  #单次进度值
    addValue = (addCnt + curPBCnt) / onceActivityTime * onceActivity  #增加的活跃度
    addPbCnt = (addCnt + curPBCnt) % onceActivityTime
    __SetPDictValue(curPlayer, key, addPbCnt)
    if curAddTotal != None:
        curAddTotal += addValue
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AddTotal % activityNum, curAddTotal)
    #
    DoAddActivity(curPlayer, addValue, True)
    return
def DoAddActivityByLV(curPlayer, befLV, aftLV):
    ##升级增加活跃点
    perLVAddPoint = IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint', 3)
    skillTypeID, perAddLV, addPoint, maxPoint = IpyGameDataPY.GetFuncEvalCfg('ImmortalDomainActivePoint', 4)
    learnSkillList, passiveSkillList = PlayerPet.GetPetLearnSkill(curPlayer)
    addValue = (aftLV-befLV)*perLVAddPoint
    if skillTypeID in passiveSkillList:
        for lv in xrange(befLV+1, aftLV+1):
            addValue += min(((lv-1)/perAddLV+1) * addPoint, maxPoint)
    DoAddActivity(curPlayer, addValue, False, True)
    return
def AddActivityByLVOnLearnSkill(curPlayer, skillID):
    ## 获得技能时,处理增加升级获得活跃点效果
    skillTypeID, perAddLV, addPoint, maxPoint = IpyGameDataPY.GetFuncEvalCfg('ImmortalDomainActivePoint', 4)
    if skillID != skillTypeID:
        return
    curLV = curPlayer.GetLV()
    addValue = 0
    for lv in xrange(2, curLV+1):
        addValue += min(((lv-1)/perAddLV+1) * addPoint, maxPoint)
    DoAddActivity(curPlayer, addValue, False, True)
    return
def DoAddActivity(curPlayer, addValue, isMultiple=False, isLVUp=False):
    if not addValue:
        return
    multiple = 1
    addExtraPoint = 0
    if isMultiple:
        multiple, extraPointLimit = __GetActionAddPer(curPlayer)
        curExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
        addExtraPoint = max(0, min(addValue * (multiple - 1),
                                   extraPointLimit - curExtraPoint)) if extraPointLimit else addValue * (multiple - 1)
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint, curExtraPoint + addExtraPoint)
        addValue = addValue + addExtraPoint
    curTotalPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
    __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, curTotalPoint + addValue)
    __AddCanCostActivityPoint(curPlayer, addValue, isLVUp)
    PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_Activity, addValue)
    PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_Activity, addValue)
    #PlayerControl.NotifyCode(curPlayer, "GetActivity", [addValue])
    SyncDailyActivityInfo(curPlayer)
    GameWorld.DebugLog("增加活跃度,addValue=%s,multiple=%s,addExtraPoint=%s,isLVUp=%s"
                       % (addValue, multiple, addExtraPoint, isLVUp), curPlayer.GetPlayerID())
    return
def __GetActionAddPer(curPlayer):
    multiple, extraPointLimit = 1, 0  #倍数、额外可获得修行点上限
    actRealmPointInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_RealmPoint, {})  # 多倍修行点活动
    if not actRealmPointInfo:
        return multiple, extraPointLimit
    if not actRealmPointInfo.get(ShareDefine.ActKey_State):
        return multiple, extraPointLimit
    actRealmPointIpyData = IpyGameDataPY.GetIpyGameData("ActRealmPoint", actRealmPointInfo.get(ShareDefine.ActKey_CfgID, 0))
    if not actRealmPointIpyData:
        return multiple, extraPointLimit
    if curPlayer.GetLV() < actRealmPointIpyData.GetLVLimit():
        return multiple, extraPointLimit
    return actRealmPointIpyData.GetMultiple(), actRealmPointIpyData.GetPointLimit()
def __AddCanCostActivityPoint(curPlayer, addValue, isLVUp):
    # 增加可消耗的活跃点
    curPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
    if isLVUp:
        updPoint = min(ChConfig.Def_UpperLimit_DWord, curPoint + addValue)
    else:
        maxPoint = IpyGameDataPY.GetFuncCfg('ActivityPlace', 1)
        if maxPoint and curPoint >= maxPoint:
            GameWorld.DebugLog("可消耗的活跃点超出上限,不增加! curPoint=%s,maxPoint=%s" % (curPoint, maxPoint))
            return
        updPoint = curPoint + addValue
    __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint, updPoint)
    return
def CostActivityPoint(curPlayer, costPoint, isOnlyCheck=False):
    # 消耗活跃点
    curPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
    if curPoint < costPoint:
        return
    if not isOnlyCheck:
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint,
                        curPoint - costPoint)
        SyncDailyActivityInfo(curPlayer)
    return True
## 同步活跃度信息
#  @param curPlayer
#  @param syncNum 默认-1时全部同步
#  @return None
def SyncDailyActivityInfo(curPlayer):
    sendPack = ChPyNetSendPack.tagMCDailyActivityInfoList()
    sendPack.Clear()
    sendPack.CurValue = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
    sendPack.StageIndex = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AwardStage)
    sendPack.AwardRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord)
    sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
    sendPack.ExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
    NetPackCommon.SendFakePack(curPlayer, sendPack)
    return
## 领取活跃度奖励
#  @param curPlayer
#  @param awardIndex
#  @return None
def GetActivityAward(curPlayer, awardIndex):
    rewardCount = IpyGameDataPY.IPY_Data().GetDailyLivenessRewardCount()
    if awardIndex < 0 or awardIndex >= rewardCount:
        GameWorld.ErrLog("活跃度奖励索引不合法,index=%s,Len=%s" % (awardIndex, rewardCount))
    taskType = ipyData.GetTaskType()
    conds = ipyData.GetTaskConds()
    needValue = ipyData.GetNeedValue()
    curValue = GetDailyTaskValue(curPlayer, taskType, conds)
    if curValue < needValue:
        GameWorld.DebugLog("每日任务进度不足,无法领奖! taskID=%s,taskType=%s,conds=%s,curValue=%s < %s" % (taskID, taskType, conds, curValue, needValue), playerID)
        return
    
    # 判断是否已领取
    getAwardRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord)
    if getAwardRecord & pow(2, awardIndex):
        GameWorld.Log("已经领取过该活跃度奖励,index=%s" % (awardIndex))
    updState = taskState|pow(2, taskID)
    GameWorld.DebugLog("每日任务领奖! taskID=%s,updState=%s" % (taskID, updState), playerID)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DailyTaskState, updState)
    DoAddActivity(curPlayer, ipyData.GetAwardLiveness())
    return
def DoAddActivity(curPlayer, addValue):
    ## 增加活跃值
    updValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityTotal) + addValue
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityTotal, updValue)
    SyncDailyTaskInfo(curPlayer)
    GameWorld.DebugLog("增加活跃度: addValue=%s,updValue=%s" % (addValue, updValue), curPlayer.GetPlayerID())
    PlayerZhanling.AddZhanlingValue(curPlayer, PlayerZhanling.ZhanlingType_WeekActivity, addValue)
    return updValue
def GetActivityAward(curPlayer, awardID):
    ## 领取活跃度奖励
    playerID = curPlayer.GetPlayerID()
    ipyData = IpyGameDataPY.GetIpyGameData("DailyLivenessReward", awardID)
    if not ipyData:
        return
    
    ipyData = IpyGameDataPY.IPY_Data().GetDailyLivenessRewardByIndex(awardIndex)
    needActivity = ipyData.GetLiveness()
    totalActivity = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
    awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityAward)
    if awardState&pow(2, awardID):
        GameWorld.DebugLog("活跃奖励ID已领取! awardID=%s,awardState=%s" % (awardID, awardState), playerID)
        return
    needActivity = ipyData.GetNeedLiveness()
    activityTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityTotal)
    # 判断活跃度
    if totalActivity < needActivity:
        GameWorld.Log("领奖活跃度不足,index=%s,needActivity=%s,totalActivity=%s"
                      % (awardIndex, needActivity, totalActivity))
    if activityTotal < needActivity:
        GameWorld.DebugLog("领奖活跃度不足! awardID=%s,activityTotal=%s < %s" % (awardID, activityTotal, needActivity), playerID)
        return
    
    awardStage = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AwardStage)
    itemIDList = ipyData.GetItemID()
    itemCntList = ipyData.GetItemCount()
    itemIsBindList = ipyData.GetItemBind()
    if awardStage >= len(itemIDList) or awardStage >= len(itemCntList) or awardStage >= len(itemIsBindList):
        return
    itemID = itemIDList[awardStage]
    itemCnt = itemCntList[awardStage]
    isBind = itemIsBindList[awardStage]
    # 检查背包
    packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
    if 1 > packSpace:
        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
        return
    # 给物品
    ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
    # 更新已领取成功标记
    updAwardRecord = getAwardRecord | (1 << awardIndex)
    __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord, updAwardRecord)
    SyncDailyActivityInfo(curPlayer)
    GameWorld.DebugLog("领取活跃度奖励OK!awardStage=%s, index=%s,needActivity=%s,totalActivity=%s,awardRecord=%s"
                       % (awardStage, awardIndex, needActivity, totalActivity, updAwardRecord))
    awardItemList = ipyData.GetAwardItemList()
    updState = awardState|pow(2, awardID)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityAward, updState)
    GameWorld.DebugLog("领奖活跃度! awardID=%s,updState=%s,awardItemList=%s" % (awardID, updState, awardItemList), playerID)
    ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList, event=["ActivityAward", False, {}])
    SyncDailyTaskInfo(curPlayer)
    return
def GetActivityNum(relatedType, relatedID):
    ## 获取日常任务ID(活跃ID)
    ipyData = IpyGameDataPY.GetIpyGameDataByCondition('DailyQuest', {"RelatedID":relatedID, "RelatedType":relatedType}, False, False)
    if not ipyData:
        return 0
    return ipyData.GetID()
#########################################日常活动###########################################
def GetDailyActionOpenEndTime(dailyID):
    ## 获取日常活动开启结束时间点
    ipyData = IpyGameDataPY.GetIpyGameData('DailyAction', dailyID)
    if not ipyData:
        return
    openTimeDict = ipyData.GetOpenTimeDict()
    duration = ipyData.GetDuration()
    if not openTimeDict or not duration:
        return
    allOpenTimeList = openTimeDict.values()
    if not allOpenTimeList:
        return
    openTimeList = allOpenTimeList[0] # 这边默认为每日的开启时间段一样,直接取第一日
    if len(openTimeList) == 1:
        openHour, openMinute = openTimeList[0]
    else:
        #openHour, openMinute =
        # 每天多个时间段的再说,暂时没用到
        return
    curDateTime = GameWorld.GetCurrentTime()
    openTimeStr = "%d-%d-%d %02d:%02d:00" % (curDateTime.year, curDateTime.month, curDateTime.day, openHour, openMinute)
    openDateTime = datetime.datetime.strptime(openTimeStr, ChConfig.TYPE_Time_Format)
    endDateTime = openDateTime + datetime.timedelta(minutes=duration)
    return openDateTime, endDateTime
def GetDailyActionRemainSeconds(dailyID):
    ## 获取日常活动当前剩余秒数
    openEndTimeInfo = GetDailyActionOpenEndTime(dailyID)
    if not openEndTimeInfo:
        return 0
    openDateTime, endDateTime = openEndTimeInfo
    curDateTime = GameWorld.GetCurrentTime()
    if curDateTime < openDateTime or curDateTime >= endDateTime:
        return 0
    remainDateTime = endDateTime - curDateTime
    return remainDateTime.seconds
def AddDailyActionFinishCnt(curPlayer, dailyID, addCnt=1):
    ##增加日常活动完成次数
    ipyData = IpyGameDataPY.GetIpyGameData('DailyAction', dailyID)
    if not ipyData:
        return
    # 由GameServer决定
    # 目前跨服PK暂不需要判断,因为跨服PK次数结算在本服,玩家可能上次未结算离线,等非匹配期间上线,也需要加上,所以暂不判断
    if dailyID not in [ShareDefine.DailyActionID_CrossReamPK, ShareDefine.DailyActionID_CrossBattlefield]:
        if not GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % dailyID):
            GameWorld.DebugLog("日常活动未开启!dailyID=%s" % dailyID)
            return
    dayTimesLimit = GetMaxDayTimes(ipyData)  #ipyData.GetDayTimes()
    weekTimesLimit = ipyData.GetWeekTimes()
    if not dayTimesLimit and not weekTimesLimit:
        return
    #对应的日常任务表ID
    activityNum = GetActivityNum(RelatedType_1, dailyID)
    dailyQuestData = IpyGameDataPY.GetIpyGameDataNotLog('DailyQuest', activityNum)
    unLimitCnt = dailyQuestData and not dailyQuestData.GetTotalActiveValue()
    funcID = dailyQuestData.GetUnLockFuncID() if dailyQuestData else 0
    #封魔坛活跃不判断功能开启 特殊处理
    if funcID and dailyID != ShareDefine.DailyActionID_SealDemon and not GameFuncComm.GetFuncCanUse(curPlayer, funcID) :
        return
def SyncDailyTaskInfo(curPlayer, taskType=0, conds=[], isAll=False):
    clientPack = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagSCDailyTaskInfo)
    clientPack.ActivityTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityTotal)
    clientPack.ActivityAward = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityAward)
    clientPack.DailyTaskState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyTaskState)
    syncTaskCondList = []
    if isAll:
        ipyDataMgr = IpyGameDataPY.IPY_Data()
        for index in range(ipyDataMgr.GetDailyTaskCount()):
            ipyData = ipyDataMgr.GetDailyTaskByIndex(index)
            taskType = ipyData.GetTaskType()
            conds = ipyData.GetTaskConds()
            tcList = [taskType, conds]
            if tcList in syncTaskCondList:
                continue
            syncTaskCondList.append(tcList)
    elif taskType:
        syncTaskCondList = [[taskType, conds]]
        
    updDayTimes = 0
    if dayTimesLimit:
        key = ChConfig.Def_PDict_DailyActionDayTimes % dailyID
        curDayTimes = curPlayer.NomalDictGetProperty(key)
        curDayBuyTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyActionDayBuyTimes % dailyID)
        curDayItemTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyActionDayItemTimes % dailyID)
        if not unLimitCnt and curDayTimes >= dayTimesLimit + curDayBuyTimes + curDayItemTimes:
            return
        updDayTimes = curDayTimes + addCnt if unLimitCnt else min(dayTimesLimit + curDayBuyTimes + curDayItemTimes, curDayTimes + addCnt)
        addCnt = updDayTimes - curDayTimes
        PlayerControl.NomalDictSetProperty(curPlayer, key, updDayTimes)
        GameWorld.DebugLog('增加日常活动完成次数 dailyID=%s, curDayTimes=%s, updDayTimes=%s' % (dailyID, curDayTimes, updDayTimes))
    updWeekTimes = 0
    if weekTimesLimit:
        key = ChConfig.Def_PDict_DailyActionWeekTimes % dailyID
        curWeekTimes = curPlayer.NomalDictGetProperty(key)
        if not unLimitCnt and curWeekTimes >= weekTimesLimit:
            return
        updWeekTimes = curWeekTimes + addCnt if unLimitCnt else min(weekTimesLimit, curWeekTimes + addCnt)
        addCnt = updWeekTimes - curWeekTimes
        PlayerControl.NomalDictSetProperty(curPlayer, key, updWeekTimes)
        GameWorld.DebugLog('增加日常活动完成次数 dailyID=%s, curWeekTimes=%s, updWeekTimes=%s' % (dailyID, curWeekTimes, updWeekTimes))
    SyncDailyActionInfo(curPlayer, [dailyID])
    #对应的日常任务表ID
    updTimes = updDayTimes or updWeekTimes
    if addCnt and updTimes and dailyQuestData:
        AddActivityFinishCnt(curPlayer, activityNum, updTimes, addCnt)
    return True
def GetDailyActionFinishCnt(curPlayer, dailyID):
    key = ChConfig.Def_PDict_DailyActionDayTimes % dailyID
    curDayTimes = __GetPDictValue(curPlayer, key)
    ipyData = IpyGameDataPY.GetIpyGameData('DailyAction', dailyID)
    if not ipyData:
        return 0, 0
    dayTimesLimit = GetMaxDayTimes(ipyData)  #ipyData.GetDayTimes()
    return curDayTimes, dayTimesLimit
def GetDailyActionrRemainCnt(curPlayer, dailyID):
    ##获取活动剩余次数
    curDayTimes = __GetPDictValue(curPlayer, ChConfig.Def_PDict_DailyActionDayTimes % dailyID)
    curDayBuyTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyActionDayBuyTimes % dailyID)
    curDayItemTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyActionDayItemTimes % dailyID)
    ipyData = IpyGameDataPY.GetIpyGameData('DailyAction', dailyID)
    dayTimesLimit = GetMaxDayTimes(ipyData)
    return max(0, dayTimesLimit+curDayBuyTimes+curDayItemTimes-curDayTimes)
def GetMaxDayTimes(ipyData):
    dayTimesLimit = ipyData.GetDayTimes()
    if ipyData.GetDailyID() == ShareDefine.DailyActionID_TowerSD:
        dayTimesLimit += IpyGameDataPY.GetFuncCfg('RuneTowerSweepBuy')
    return dayTimesLimit
#// A5 25 购买日常活动次数 #tagCMBuyDailyActionCnt
#
#struct    tagCMBuyDailyActionCnt
#{
#    tagHead        Head;
#    DWORD    ActionID;    // ID
#    BYTE    AddType;    // 0-花仙玉 1-用物品
#};
def OnDailyActionBuyCnt(index, clientData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    dailyID = clientData.ActionID
    addType = clientData.AddType  #0花仙玉 1使用物品
    ipyData = IpyGameDataPY.GetIpyGameData('DailyAction', dailyID)
    if not ipyData:
        return
    curDayTimes = __GetPDictValue(curPlayer, ChConfig.Def_PDict_DailyActionDayTimes % dailyID)
    curDayBuyTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyActionDayBuyTimes % dailyID)
    curDayItemTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyActionDayItemTimes % dailyID)
    if curDayBuyTimes + curDayItemTimes - curDayTimes >= 0:
        GameWorld.DebugLog('剩余次数已达上限,不可增加!')
        return
    if addType == 0:
        dayBuyTimesLimit = ipyData.GetDayBuyTimes()
        moneyType = ipyData.GetMoneyType()
        buyNeedMoneyList = ipyData.GetBuyNeedMoney()
        if not dayBuyTimesLimit or not buyNeedMoneyList:
            GameWorld.DebugLog("无法购买! dayBuyTimesLimit=%s,buyNeedMoneyList=%s" % (dayBuyTimesLimit, buyNeedMoneyList))
            return
        if curDayBuyTimes >= dayBuyTimesLimit:
            GameWorld.DebugLog('今日购买次数已达上限,不可增加!')
            return
        buyNeedMoney = buyNeedMoneyList[curDayBuyTimes] if len(buyNeedMoneyList) > curDayBuyTimes else buyNeedMoneyList[-1]
        if not PlayerControl.PayMoney(curPlayer, moneyType, buyNeedMoney, ChConfig.Def_Cost_BuyDailyActionCnt, {'dailyID':dailyID, 'curDayBuyTimes':curDayBuyTimes}):
            return
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DailyActionDayBuyTimes % dailyID, curDayBuyTimes + 1)
    elif addType == 1:
        dayItemAddTimesLimit = ipyData.GetDayItemAddTimes()
        dayItemID = ipyData.GetDayItemID()
        if not dayItemAddTimesLimit or not dayItemID:
            return
        if curDayItemTimes >= dayItemAddTimesLimit:
            GameWorld.DebugLog('今日使用物品增加次数已达上限,不可增加!')
            return
        itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
        enough, indexList, hasBind, lackCnt = ItemCommon.GetItem_FromPack_ByID_ExEx(dayItemID, itemPack, 1)
        if not enough:
            return
        ItemCommon.ReduceItem(curPlayer, itemPack, indexList, 1, False, "DailyActionCnt")
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DailyActionDayItemTimes % dailyID, curDayItemTimes + 1)
    else:
        return
    SyncDailyActionInfo(curPlayer, [dailyID])
    clientPack.TaskList = []
    for taskType, conds in syncTaskCondList:
        task = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagSCDailyTask)
        task.TaskType = taskType
        task.Conds = conds
        task.CLen = len(task.Conds)
        task.CurValue = GetDailyTaskValue(curPlayer, taskType, conds)
        clientPack.TaskList.append(task)
    clientPack.TaskCount = len(clientPack.TaskList)
    NetPackCommon.SendFakePack(curPlayer, clientPack)
    return
## 同步活跃度信息
#  @param curPlayer
#  @param syncNum 默认-1时全部同步
#  @return None
def SyncDailyActionInfo(curPlayer, syncNumList=[]):
    sendPack = ChPyNetSendPack.tagMCDailyActionCnt()
    sendPack.Clear()
    sendPack.ActionInfo = []
    syncNumList = syncNumList if syncNumList else ShareDefine.DailyActionIDList
    for activityNum in syncNumList:
        activityInfo = ChPyNetSendPack.tagMCDailyActionInfo()
        activityInfo.Clear()
        activityInfo.ActionID = activityNum
        activityInfo.DayFinishCnt = __GetPDictValue(curPlayer, ChConfig.Def_PDict_DailyActionDayTimes % activityNum)
        activityInfo.DayBuyTimes = __GetPDictValue(curPlayer, ChConfig.Def_PDict_DailyActionDayBuyTimes % activityNum)
        activityInfo.DayItemTimes = __GetPDictValue(curPlayer, ChConfig.Def_PDict_DailyActionDayItemTimes % activityNum)
        activityInfo.WeekFinishCnt = __GetPDictValue(curPlayer, ChConfig.Def_PDict_DailyActionWeekTimes % activityNum)
        sendPack.ActionInfo.append(activityInfo)
    sendPack.Count = len(sendPack.ActionInfo)
    NetPackCommon.SendFakePack(curPlayer, sendPack)
    return
##################################副本类增加活跃##########################################
## 参加副本获得活跃度
#  @param curPlayer 玩家实例
#  @param tick
#  @return
def OnEnterFBActivity(curPlayer, mapID, curDayTimes, addCount):
    activityNum = GetActivityNum(RelatedType_2, mapID)
    if activityNum:
        AddActivityFinishCnt(curPlayer, activityNum, curDayTimes, addCount)
    return
################################## 活跃放置 ##############################################
#// B0 29 活跃放置明细查询 #tagCMActivityPlaceQuery
#
#struct    tagCMActivityPlaceQuery
#{
#    tagHead        Head;
#};
def OnActivityPlaceQuery(index, clientData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    Sync_ActivityPlaceInfo(curPlayer)
    return
#// B0 27 活跃放置启动 #tagCMActivityPlaceStart
#
#struct    tagCMActivityPlaceStart
#{
#    tagHead        Head;
#};
def OnActivityPlaceStart(index, clientData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    maxRewardCount = IpyGameDataPY.GetFuncCfg("ActivityPlace", 4) # 最大累计放置奖励次数
    remainCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRemainCount)
    rewardCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardCount)
    maxCanStartCount = maxRewardCount - remainCount - rewardCount
    if maxCanStartCount <= 0:
        GameWorld.DebugLog("活跃放置奖励累计次数已达上限,无法启动!remainCount=%s + rewardCount=%s >= maxRewardCount=%s"
                           % (remainCount, rewardCount, maxRewardCount))
        return
    costPoint = IpyGameDataPY.GetFuncCfg("ActivityPlace", 2) # 单次放置消耗的活跃点数
    canUseActivityPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityCanCostTotalPoint)
    pointCanUseCount = canUseActivityPoint / costPoint
    startCount = min(maxCanStartCount, pointCanUseCount)
    if startCount <= 0:
        GameWorld.DebugLog("可用活跃不足,无法添加次数启动!canUseActivityPoint=%s,costPoint=%s" % (canUseActivityPoint, costPoint))
        return
    updRemainCount = remainCount + startCount
    GameWorld.DebugLog("添加活跃放置次数: startCount=%s,rewardCount=%s,remainCount=%s,updRemainCount=%s"
                       % (startCount, rewardCount, remainCount, updRemainCount))
    costPointTotal = costPoint * startCount
    CostActivityPoint(curPlayer, costPointTotal)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRemainCount, updRemainCount)
    if not remainCount:
        curTime = int(time.time())
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceStartTime, curTime)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceExpCount, 0)
        GameWorld.DebugLog("    没有剩余次数,更新启动时间: %s" % curTime)
    Sync_ActivityPlaceInfo(curPlayer)
    return
#// B0 28 活跃放置快速完成 #tagCMActivityPlaceQuickFinish
#
#struct    tagCMActivityPlaceQuickFinish
#{
#    tagHead        Head;
#    BYTE        FinishCount;    //完成次数
#};
def OnActivityPlaceQuickFinish(index, clientData, tick):
    ## 经验改为实时获取,暂屏蔽快速完成
    return
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    finishCount = clientData.FinishCount
    remainCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRemainCount)
    if not remainCount:
        GameWorld.DebugLog("没有剩余活跃放置次数,无法快速完成!")
        return
    finishCount = min(finishCount, remainCount)
    if not finishCount:
        return
    costItemID, costGoldParper = IpyGameDataPY.GetFuncEvalCfg("ActivityPlace", 5)
    costItemCount = finishCount # 每次扣一个
    costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, costItemID, costItemCount)
    lackCnt = costItemCount - bindCnt - unBindCnt
    delItemCount = costItemCount
    if lackCnt > 0:
        costGoldParperTotal = costGoldParper * lackCnt
        if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costGoldParperTotal, ChConfig.Def_Cost_ActivityPlace):
            return
        delItemCount -= lackCnt
    if delItemCount > 0:
        ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, delItemCount, ChConfig.ItemDel_ActivityPlace)
    __DoActivityPlaceRewardEnd(curPlayer, finishCount, isQuick=True)
    return
def ProcessActivityPlace(curPlayer):
    ## 活跃放置定时处理
    remainCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRemainCount)
    if remainCount <= 0:
        #GameWorld.DebugLog("没有剩余放置次数不处理!")
        return
    curTime = int(time.time())
    startTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceStartTime)
    if not startTime:
        startTime = curTime
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceStartTime, curTime)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceExpCount, 0)
    needSeconds = IpyGameDataPY.GetFuncCfg("ActivityPlace", 3) # 单次放置奖励持续时间,秒
    expSeconds = IpyGameDataPY.GetFuncCfg("ActivityPlaceExp", 1) # 活跃放置获得经验多少秒一次
    passTime = curTime - startTime
    endCount = passTime / needSeconds
    endCount = min(endCount, remainCount)
    expCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceExpCount)
    maxExpCount = needSeconds / expSeconds # 单次放置最多可获得经验次数
    # 由于结算时重置了开启下次的时间及经验次数,所以如果有需要结算,则溢出时间不计,放置多算经验次数
    if endCount >= 1:
        maxExpCount *= endCount
    canGetExpCount = min(maxExpCount, passTime / expSeconds)
    addExpCount = canGetExpCount - expCount
    if addExpCount > 0:
        #GameWorld.DebugLog("活跃放置定时处理 : curTime=%s,startTime=%s,passTime=%s,endCount=%s,expCount=%s,canGetExpCount=%s,maxExpCount=%s,addExpCount=%s"
        #                   % (curTime, startTime, passTime, endCount, expCount, canGetExpCount, maxExpCount, addExpCount))
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceExpCount, expCount + addExpCount)
        lv = curPlayer.GetLV()
        reExp = PlayerControl.GetPlayerReExp(curPlayer)
        expLV, expFormat = 0, ""
        lvFormatList = IpyGameDataPY.GetFuncEvalCfg("ActivityPlaceExp", 2) # [[小于等于等级, "公式"],...]
        for eLV, eFormat in lvFormatList:
            if lv <= eLV:
                expLV, expFormat = eLV, eFormat
                break
        if not expLV:
            expLV, expFormat = lvFormatList[-1]
        addExp = eval(FormulaControl.GetCompileFormula("ActivityPlaceExp_%s" % expLV, expFormat)) * expSeconds * addExpCount
        playerControl = PlayerControl.PlayerControl(curPlayer)
        addExp = playerControl.AddExp(addExp, ShareDefine.Def_ViewExpType_Activity)
        todayExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceTodayExp)
        todayExpPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceTodayExpPoint)
        todayTotalExp = todayExpPoint * ChConfig.Def_PerPointValue + todayExp + addExp
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceTodayExp, todayTotalExp % ChConfig.Def_PerPointValue)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceTodayExpPoint, todayTotalExp / ChConfig.Def_PerPointValue)
        #GameWorld.DebugLog("passTime=%s,canGetExpCount=%s,expCount=%s,addExpCount=%s,addExp=%s,todayTotalExp=%s"
        #                   % (passTime, canGetExpCount, expCount, addExpCount, addExp, todayTotalExp))
    if endCount > 0:
        __DoActivityPlaceRewardEnd(curPlayer, endCount)
    return
def __DoActivityPlaceRewardEnd(curPlayer, endCount, isQuick=False):
    ## 放置活跃奖励结算
    remainCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRemainCount)
    endCount = min(endCount, remainCount)
    if endCount <= 0:
        return
    countDataDict = {}
    lvDataDict = {}
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    for index in xrange(ipyDataMgr.GetActivityPlaceRewardCount()):
        ipyData = ipyDataMgr.GetActivityPlaceRewardByIndex(index)
        placeCount = ipyData.GetPlaceCount()
        placeMaxLV = ipyData.GetPlaceMaxLV()
        if placeCount:
            countDataDict[placeCount] = ipyData
        else:
            lvDataDict[placeMaxLV] = ipyData
    lvRewardIpyData = None
    playerLV = curPlayer.GetLV()
    lvList = sorted(lvDataDict.keys())
    for lv in lvList:
        if playerLV <= lv:
            lvRewardIpyData = lvDataDict[lv]
            break
    if not lvRewardIpyData:
        lvRewardIpyData = lvDataDict[lvList[-1]]
    maxAppointCount = max(countDataDict) # 最大定制奖励次数
    rewardCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardCount)
    rewardTotalCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardTotalCount)
    rewardItemDict = {}
    GameWorld.DebugLog("结算放置活跃奖励: remainCount=%s,rewardCount=%s,endCount=%s,maxAppointCount=%s" % (remainCount, rewardCount, endCount, maxAppointCount))
    for _ in xrange(endCount):
        rewardIpyData = None
        # 加奖励次数
        remainCount -= 1
        rewardCount += 1
        if rewardTotalCount < maxAppointCount:
            rewardTotalCount += 1
            if rewardTotalCount in countDataDict:
                rewardIpyData = countDataDict[rewardTotalCount]
                #GameWorld.DebugLog("    取定制次数奖励: rewardTotalCount=%s" % rewardTotalCount)
        if not rewardIpyData:
            rewardIpyData = lvRewardIpyData
            #GameWorld.DebugLog("    取等级奖励: maxLV=%s" % rewardIpyData.GetPlaceMaxLV())
        # 固定奖励
        for itemID, itemCount in rewardIpyData.GetFixedItemRewardList():
            rewardItemDict[itemID] = rewardItemDict.get(itemID, 0) + itemCount
        # 饼图库A
        for _ in xrange(rewardIpyData.GetRandItemCountA()):
            itemID = GameWorld.GetResultByRandomList(rewardIpyData.GetRandItemRewardListA())
            if itemID:
                rewardItemDict[itemID] = rewardItemDict.get(itemID, 0) + 1
        # 饼图库B
        for _ in xrange(rewardIpyData.GetRandItemCountB()):
            itemID = GameWorld.GetResultByRandomList(rewardIpyData.GetRandItemRewardListB())
            if itemID:
                rewardItemDict[itemID] = rewardItemDict.get(itemID, 0) + 1
        GameWorld.DebugLog("    remainCount=%s,rewardCount=%s,rewardTotalCount=%s, %s" % (remainCount, rewardCount, rewardTotalCount, rewardItemDict))
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRemainCount, remainCount)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardCount, rewardCount)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardTotalCount, rewardTotalCount)
    if remainCount > 0:
        nextStartTime = int(time.time())
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceStartTime, nextStartTime)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceExpCount, 0)
        GameWorld.DebugLog("    还有剩余次数,更新启动时间: %s" % (nextStartTime))
    # 存储奖励
    rewardItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItem)
    for i in xrange(rewardItemCount):
        itemID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItemID % i)
        if itemID not in rewardItemDict:
            continue
        addCount = rewardItemDict.pop(itemID)
        itemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItemCount % i)
        updCount = itemCount + addCount
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardItemCount % i, updCount)
        #GameWorld.DebugLog("    更新探索奖励: itemID=%s,itemCount=%s,addCount=%s,updCount=%s" % (itemID, itemCount, addCount, updCount))
    for itemID, itemCount in rewardItemDict.items():
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardItemID % rewardItemCount, itemID)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardItemCount % rewardItemCount, itemCount)
        rewardItemCount += 1
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardItem, rewardItemCount)
        #GameWorld.DebugLog("    新增探索奖励: itemID=%s,itemCount=%s,rewardItemCount=%s" % (itemID, itemCount, rewardItemCount))
    if isQuick:
        PlayerControl.NotifyCode(curPlayer, "ActivityPlaceQuickFinishOK")
    Sync_ActivityPlaceInfo(curPlayer)
    PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_ActivityPlace, endCount)
    return
def GetActivityPlaceReward(curPlayer):
    ## 领取活跃放置奖励
    rewardItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItem)
    if not rewardItemCount:
        GameWorld.DebugLog("没有活跃放置奖励,无法领取!")
        return
    rewardCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardCount)
    isAppointItem = 0
    rewardItemList = []
    for i in xrange(rewardItemCount):
        itemID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItemID % i)
        itemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItemCount % i)
        if not itemID or not itemCount:
            break
        rewardItemList.append([itemID, itemCount, isAppointItem])
        # 领取后需要重置为0
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardItemID % i, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardItemCount % i, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardItem, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardCount, 0)
    totalCount = min(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityCountTotal) + rewardCount, ChConfig.Def_UpperLimit_DWord)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityCountTotal, totalCount)
    GameWorld.DebugLog("领取活跃放置奖励: totalCount=%s,rewardCount=%s,rewardItemCount=%s,rewardItemList=%s" % (totalCount, rewardCount, rewardItemCount, rewardItemList))
    ItemControler.GivePlayerItemOrMail(curPlayer, rewardItemList, event=["ActivityPlace", False, {}])
    PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_ActivityPlace, rewardCount)
    Sync_ActivityPlaceInfo(curPlayer)
    return
def Sync_ActivityPlaceInfo(curPlayer):
    ## 同步活跃放置信息
    rewardItemInfo = []
    rewardItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItem)
    for i in xrange(rewardItemCount):
        itemID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItemID % i)
        itemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItemCount % i)
        rewardItemInfo.append([itemID, itemCount])
    placeInfo = ChPyNetSendPack.tagMCActivityPlaceInfo()
    placeInfo.StartTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceStartTime)
    placeInfo.PlaceCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRemainCount)
    placeInfo.RewardCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardCount)
    placeInfo.RewardInfo = str(rewardItemInfo)
    placeInfo.RewardLen = len(placeInfo.RewardInfo)
    placeInfo.TodayExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceTodayExp)
    placeInfo.TodayExpPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceTodayExpPoint)
    placeInfo.YestordayExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceYestorDayExp)
    placeInfo.YestordayExpPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceYestorDayExpPoint)
    placeInfo.TotalCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityCountTotal)
    NetPackCommon.SendFakePack(curPlayer, placeInfo)
    return
#########################################################################################
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -37,7 +37,6 @@
import NetPackCommon
import DataRecordPack
import PlayerPrestigeSys
import PlayerActivity
import FBCommon
import PassiveBuffEffMng
import EventReport
@@ -2776,9 +2775,7 @@
    #银票支付
    elif type_Price == IPY_GameWorld.TYPE_Price_Silver_Paper:
        __PayMoneyAfterBySilverPaper(curPlayer, price)
    #活跃度处理
    PlayerActivity.OnPayMoneyActivity(curPlayer, type_Price, price)
    #转盘活动
    PlayerActTurntable.OnPlayerUseGold(curPlayer, type_Price, price)
    #轮回殿
@@ -3515,7 +3512,6 @@
                PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_LVUp, aftLV - befLV)
                PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_LV)
                PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_HeroLV, aftLV)
                PlayerActivity.DoAddActivityByLV(curPlayer, befLV, aftLV)
                
            #if aftFreePoint > befFreePoint:
            #    curPlayer.SetFreePoint(aftFreePoint)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py
@@ -19,7 +19,6 @@
import PlayerControl
import NetPackCommon
import IpyGameDataPY
import PlayerActivity
import ChPyNetSendPack
import CrossRealmPlayer
import PlayerTongTianLing
@@ -85,8 +84,7 @@
def IsCrossRealmPKMatchState():
    ## 跨服PK匹配赛是否开启
    return GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossDailyActionState \
                                                          % ShareDefine.DailyActionID_CrossReamPK) == ChConfig.Def_Action_Open
    return False
def GetCrossPKDanAwardIpyData(seasonID, awardDanLV, isLog):
    ## 获取跨服段位奖励配置信息
@@ -357,7 +355,6 @@
            todayWinCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TodayWinCount) + 1
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayWinCount, todayWinCount)
            GameWorld.Log("    增加今日已获胜次数: todayWinCount=%s" % todayWinCount, playerID)
        PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_CrossReamPK)
        PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_CrossPK, 1)
        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_CrossPK, 1)
        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_CrossPK, 1)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -77,7 +77,6 @@
import PlayerDailyGiftbag
import PlayerOfflineSupport
import PlayerFeastRedPacket
import PlayerCrossYaomoBoss
import PlayerLuckyCloudBuy
import PlayerLuckyTreasure
import PlayerTongTianLing
@@ -287,6 +286,7 @@
        PlayerXiangong.PlayerOnDay(curPlayer)
        PlayerControl.PayCoinOnDay(curPlayer)
        ChPlayer.PlayerOnDay(curPlayer)
        PlayerActivity.OnDay(curPlayer)
        
    # 特殊时间点X点过天
    elif onEventType == ShareDefine.Def_OnEventTypeEx:
@@ -310,9 +310,6 @@
        
    # 以下为支持两种重置模式切换配置的
    FBCommon.FBOnDay(curPlayer, onEventType)
    #日常活动OnDay
    PlayerActivity.OnDay(curPlayer, onEventType)
        
    # 商店物品购买兑换OnDay
    FunctionNPCCommon.ShopItemOnDay(curPlayer, onEventType)
@@ -420,9 +417,6 @@
        
    # 以下为支持两种重置模式切换配置的
    FBCommon.FBOnWeek(curPlayer, onEventType)
    #日常活动OnWeek
    PlayerActivity.OnWeek(curPlayer, onEventType)
    
    # 商店物品购买兑换OnDay
    FunctionNPCCommon.ShopItemOnWeek(curPlayer, onEventType)
@@ -1080,11 +1074,6 @@
    # 跨服PK
    elif key == ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID:
        PlayerCrossRealmPK.OnCrossRealmPKSeasonChange(value)
    # 跨服妖魔boss
    elif key == ShareDefine.Def_Notify_WorldKey_CrossDailyActionState % ShareDefine.CrossDailyActionID_YaomoBoss:
        if gameWorldMgr.GetGameWorldDictByKey(key) != value:
            PlayerCrossYaomoBoss.OnYaomoBossStateChange(value, tick)
            
    #通用设置
    befValue = gameWorldMgr.GetGameWorldDictByKey(key)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldRush.py
@@ -21,6 +21,7 @@
import IpyGameDataPY
import ItemControler
import ChPyNetSendPack
import PlayerActivity
import PlayerControl
import GameFuncComm
import PlayerGubao
@@ -502,6 +503,7 @@
        syncCampIDList.append(campID)
        GameWorld.DebugLog("淘金结束: campID=%s,goldID=%s,放入淘金仓库index=%s,panningCnt=%s" % (campID, goldID, index, panningCnt))
        PlayerGubao.AddGubaoSpecEffLayer(curPlayer, PlayerGubao.GubaoEffType_GoldRush, 1)
        PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_GoldRush, 1)
        
    if not syncCampIDList:
        return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
@@ -39,7 +39,6 @@
import PassiveBuffEffMng
import CrossPlayerData
import CalcLineEffect
import PlayerActivity
import ChPyNetSendPack
import NetPackCommon
import PlayerActLunhuidian
@@ -744,8 +743,6 @@
            #广播
            sysMark = sysMarkList[i] if i < len(sysMarkList) else 'PetUpLv'
            PlayerControl.WorldNotify(0, sysMark, [playerName, petNPCID, limitPetClassLV, skillid])
            #增加升级活跃点效果
            PlayerActivity.AddActivityByLVOnLearnSkill(curPlayer, skillid)
            
        if not learnSkillList and updClassLV + 1 == maxClassLV:
            PlayerControl.WorldNotify(0, 'PetUpLvMax', [playerName, petNPCID])
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
@@ -1031,9 +1031,7 @@
    
    #恶意攻击时间处理
    #AttackCommon.ProcessMaliciousAttackPlayer(curPlayer, tick)
    #活跃放置
    #PlayerActivity.ProcessActivityPlace(curPlayer)
    #炼器
    #PlayerActLianqi.OnProcess(curPlayer)
    #仙盟攻城战
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -23,12 +23,9 @@
import PlayerControl
import ItemControler
import NetPackCommon
import PlayerBossReborn
import PlayerFeastTravel
import PlayerActLunhuidian
import PlayerActYunshi
import PlayerActTask
import PlayerGubao
import PlayerActivity
import ItemCommon
import PlayerHero
import PyGameData
@@ -397,18 +394,20 @@
    if addScoreType and addScore:
        PlayerControl.GiveMoney(curPlayer, addScoreType, addScore * treasureCount)
        
    if treasureType == TreasureType_Rune:
        PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_RuneTreasure, treasureCount)
        PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_RuneTreasure, treasureCount)
        PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureRune, treasureCount)
    elif treasureType == TreasureType_Jipin:
        PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_Treasure, treasureCount)
        PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_Treasure, treasureCount)
        PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureJipin, treasureCount)
    elif treasureType == TreasureType_Jueshi:
        PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_JSTreasure, treasureCount)
        PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_JSTreasure, treasureCount)
        PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureJueshi, treasureCount)
    if treasureType in [TreasureType_HeroComm, TreasureType_HeroHigh, TreasureType_HeroScore]:
        PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_HeroCall, treasureCount)
    #if treasureType == TreasureType_Rune:
    #    PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_RuneTreasure, treasureCount)
    #    PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_RuneTreasure, treasureCount)
    #    PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureRune, treasureCount)
    #elif treasureType == TreasureType_Jipin:
    #    PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_Treasure, treasureCount)
    #    PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_Treasure, treasureCount)
    #    PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureJipin, treasureCount)
    #elif treasureType == TreasureType_Jueshi:
    #    PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_JSTreasure, treasureCount)
    #    PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_JSTreasure, treasureCount)
    #    PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureJueshi, treasureCount)
    #elif treasureType == TreasureType_Gubao:
    #    PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureGubao, treasureCount)
        
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
@@ -35,10 +35,11 @@
ZhanlingType_MainLevel, # 主线关卡 3
ZhanlingType_GubaoCnt, # 古宝数量 4
ZhanlingType_ArenaCnt, # 演武场次数 5
) = range(1, 1 + 5)
ZhanlingType_WeekActivity, # 周活跃 6
) = range(1, 1 + 6)
# 用Value1记录进度的战令类型
ZhanlingValue1TypeList = [ZhanlingType_ArenaCnt]
ZhanlingValue1TypeList = [ZhanlingType_ArenaCnt, ZhanlingType_WeekActivity]
def OnPlayerLogin(curPlayer):
    for zhanlingType in ZhanlingTypeList:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -187,8 +187,6 @@
Def_Notify_WorldKey_OperationActionInfo = "OperationActionInfo_%s" # 运营活动信息,参数为运营活动名
Def_Notify_WorldKey_CrossActInfo = "CrossActInfo_%s" # 跨服运营活动信息,参数为运营活动名
Def_Notify_WorldKey_ActionBossRebornSign = "ActBossSign_%s" # 活动boss重生标记,参数为日常活动ID 或 运营活动名
Def_Notify_WorldKey_DailyActionState = "DailyActionState_%s" # 日常活动状态,参数为日常活动ID
Def_Notify_WorldKey_CrossDailyActionState = "CrossDailyActionState_%s" # 跨服日常活动状态,参数为日常活动ID
Def_Notify_WorldKey_FBEnterTimeLimiitMapID = "FBEnterTimeLimiitMapID" # 进入副本有时间限制的地图ID列表
Def_Notify_WorldKey_FBCanEnter = "FBCanEnter_%s" # 副本是否可进入,参数为副本DataMapID
Def_Notify_WorldKey_FBFuncState = "FBFuncState_%s" # 副本状态,参数为副本DataMapID
@@ -1168,7 +1166,6 @@
CrossServerMsg_ChampionshipOfficial = "ChampionshipOfficial"  # 跨服排位争霸赛官职信息
CrossServerMsg_ChampionshipDailyOfficial = "ChampionshipDailyOfficial"  # 跨服排位争霸赛每日官职信息
CrossServerMsg_ActAllRechargeInfo = "ActAllRechargeInfo"# 跨服全民充值信息
CrossServerMsg_CrossDailyActionState = "CrossDailyActionState" # 跨服日常任务状态信息
CrossServerMsg_CrossYaomoBossHurtInfo = "CrossYaomoBossHurtInfo" # 跨服妖魔boss玩家伤害信息
CrossServerMsg_FamilyFlagwarOver = "FamilyFlagwarOver"  # 逐鹿万界结算信息
CrossServerMsg_Worship = "Worship"  # 膜拜信息
@@ -1459,59 +1456,6 @@
Def_UserAction_Money_Use = 0    # 货币消费
Def_UserAction_Money_Get = 1    # 货币产出
#------------------------------------------------------------------------
# 难度定义
DifficultyList = (
Difficulty_Common, # 普通
Difficulty_Elite, # 精英
Difficulty_Hero, # 英雄
) = range(3)
# 每日活动编号定义
DailyActionIDList = (
DailyActionID_DailyRunMission, # 赏金跑环任务
DailyActionID_FamilyRunMission, # 战盟跑环任务
DailyActionID_EquipPlus, # 强化
DailyActionID_FieldFight, # 野外挂机
DailyActionID_OfflineFight, # 脱机挂机
DailyActionID_RefineStove, # 炼丹材料消耗 6(废弃)
DailyActionID_Dice, # 我要太极
DailyActionID_Pray, # 祈愿
DailyActionID_WorldBOSS, # 世界BOSS
DailyActionID_SealDemon, # 封魔坛 10
DailyActionID_TowerSD, # 符印塔扫荡
DailyActionID_XXX12, # 废弃12
DailyActionID_Tower, # 符印塔
DailyActionID_MagicWeapon, # 法宝集魂
DailyActionID_FBHelp, # 助战副本 15
DailyActionID_BOSSHome, # BOSS之家
DailyActionID_FamilyRobBoss, # 仙盟抢boss
DailyActionID_KillNPC, # 野外怪物
DailyActionID_IceLode, # 冰晶矿脉
DailyActionID_HelpBattleCheckIn, # 助战登记  20
DailyActionID_CrossReamPK, # 跨服PK  21
DailyActionID_FamilyBoss1, # 仙盟BOSS  22
DailyActionID_SkyTower, # 天星塔  23
DailyActionID_HorsePetBoss, # 骑宠BOSS  24
DailyActionID_FairyDomain, # 缥缈仙域  25
DailyActionID_AuctionItem, # 拍卖行上架/竞拍  26
DailyActionID_LeiFaBoss, # 雷罚boss 27
DailyActionID_CrossPenglai, # 跨服蓬莱仙境Boss 28
DailyActionID_FamilyChuanGong, # 仙盟传功 29
DailyActionID_FamilyParty, # 仙盟宴会 30
DailyActionID_31, # 活跃修炼 31
DailyActionID_SkyTreasureBox, # 天降宝箱 32
DailyActionID_Arena, # 竞技场 33
DailyActionID_CrossDemonLand, # 跨服魔化之地Boss 34
DailyActionID_CrossBattlefield, # 跨服战场 35
DailyActionID_FamilySit, # 跨服战场 36
) = range(1, 36 + 1)
# 跨服每日活动编号定义, 从150开始
CrossDailyActionIDList = (
CrossDailyActionID_YaomoBoss, # 妖魔boss 150
CrossDailyActionID_FamilyWarFlag, # 跨服仙盟夺旗战/逐鹿万界 151
) = range(150, 150 + 2)
# 成就类型定义
SuccessTypeList = (