hxp
2025-10-09 e4a5fbde4c804262a7cfd17d89d427b4ff36accb
225 【付费内容】功能基金-服务端
9个文件已修改
122 ■■■■ 已修改文件
PySysDB/PySysDBPY.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Lianqi.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Arena.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLianqi.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -3185,9 +3185,9 @@
    list        AwardItemList;    //物品奖励[[物品ID,个数,是否拍品], ...]
};
//战令表
//战令表/基金
struct tagZhanling
struct Zhanling
{
    BYTE        _ZhanlingType;    //战令类型
    DWORD        _NeedValue;    //所需值
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Lianqi.py
@@ -17,7 +17,7 @@
import GameWorld
import PlayerControl
import PlayerZhanling
#import PlayerZhanling
import PlayerActLianqi
import IpyGameDataPY
import ChConfig
@@ -49,7 +49,7 @@
    
    value1 = msgList[0]
    if value1 == 0:
        PlayerZhanling.ResetZhanling(curPlayer, PlayerZhanling.ZhanlingType_Lianqi)
        #PlayerZhanling.ResetZhanling(curPlayer, PlayerZhanling.ZhanlingType_Lianqi)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianqiScore, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianqiScoreHighest, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianqiLVAwardMax, 0)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py
@@ -35,7 +35,7 @@
        GameWorld.DebugAnswer(curPlayer, "重置奖励: Zhanling 0 类型")
        GameWorld.DebugAnswer(curPlayer, "设置战令: Zhanling 类型 是否激活普通   高级")
        GameWorld.DebugAnswer(curPlayer, "设置进度: Zhanling v 类型  进度值")
        GameWorld.DebugAnswer(curPlayer, "设置登录: Zhanling d 登录战令已登录天数")
        #GameWorld.DebugAnswer(curPlayer, "设置登录: Zhanling d 登录战令已登录天数")
        return
    
    value = msgList[0]
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Arena.py
@@ -22,6 +22,7 @@
import PlayerControl
import IpyGameDataPY
import PlayerBillboard
import PlayerZhanling
import ItemControler
import PlayerArena
import PyGameData
@@ -137,6 +138,8 @@
    
    # 战斗结束系统强制刷新匹配
    PlayerArena.DoArenaMatchRefresh(curPlayer, True, isSys=True)
    PlayerZhanling.AddZhanlingValue(curPlayer, PlayerZhanling.ZhanlingType_ArenaCnt, 1)
    return
def __updArenaBatRecord(curPlayer, turnFight, tagPlayerID, isWin, atkAddScore, defDecScore):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -57,7 +57,7 @@
import NPCRealmRefresh
import PlayerActLogin
import PlayerActTask
import PlayerZhanling
#import PlayerZhanling
import IpyGameDataPY
import PlayerGubao
import PlayerState
@@ -941,7 +941,7 @@
        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)
        #PlayerZhanling.AddZhanlingValue(curPlayer, PlayerZhanling.ZhanlingType_Huanjingge, 1)
        PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_WorldBoss, 1)
        
    elif limitIndex == ShareDefine.Def_Boss_Func_Home:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLianqi.py
@@ -21,7 +21,7 @@
import NetPackCommon
import ChPyNetSendPack
import CrossRealmPlayer
import PlayerZhanling
#import PlayerZhanling
import ItemControler
import ItemCommon
import GameWorld
@@ -68,7 +68,7 @@
        GameWorld.DebugLog("跨服炼器活动ID不变,不处理!cfgID=%s,actID=%s" % (cfgID, actID), playerID)  
        return
    GameWorld.DebugLog("跨服炼器活动重置! cfgID=%s,actID=%s,playerActID=%s,state=%s" % (cfgID, actID, playerActID, state), playerID)
    PlayerZhanling.ResetZhanling(curPlayer, PlayerZhanling.ZhanlingType_Lianqi)
    #PlayerZhanling.ResetZhanling(curPlayer, PlayerZhanling.ZhanlingType_Lianqi)
    
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CA_LianqiID, actID)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianqiScore, 0)
@@ -463,7 +463,7 @@
    curScore = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LianqiScore)
    GameWorld.DebugLog("炼器活动积分增加: curScore=%s,addScore=%s,actLV=%s" % (curScore, addScore, actLV), curPlayer.GetPlayerID())
    SetLianqiScore(curPlayer, curScore + addScore, actLV)
    PlayerZhanling.AddZhanlingValue(curPlayer, PlayerZhanling.ZhanlingType_Lianqi, addScore)
    #PlayerZhanling.AddZhanlingValue(curPlayer, PlayerZhanling.ZhanlingType_Lianqi, addScore)
    return
def SetLianqiScore(curPlayer, setScore, actLV=0):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py
@@ -20,7 +20,7 @@
import ShareDefine
import PlayerControl
import IpyGameDataPY
import PlayerZhanling
#import PlayerZhanling
import ChPyNetSendPack
import ItemControler
import IPY_GameWorld
@@ -109,8 +109,8 @@
        if ipyData:
            if ipyData.GetAwardExCTGID():
                PlayerCoin.DoResetCTGCountByIDList(curPlayer, "ActLoginNew", [ipyData.GetAwardExCTGID()])
            if ipyData.GetActZhanlingType():
                PlayerZhanling.ResetZhanling(curPlayer, ipyData.GetActZhanlingType())
            #if ipyData.GetActZhanlingType():
            #    PlayerZhanling.ResetZhanling(curPlayer, ipyData.GetActZhanlingType())
        Sync_ActLoginActionInfo(curPlayer, actNum)
        Sync_ActLoginPlayerInfo(curPlayer, actNum)
    return True
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
@@ -409,6 +409,10 @@
        totalStar += star
    return totalLV, totalStar
def GetGubaoTotalCnt(curPlayer):
    ## 获取古宝激活总数
    return 0
def RefreshGubaoAttr(curPlayer):
    #CalcGubaoAttr(curPlayer)
    PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
@@ -16,7 +16,6 @@
#-------------------------------------------------------------------------------
import GameWorld
import ShareDefine
import NetPackCommon
import IpyGameDataPY
import PlayerControl
@@ -26,35 +25,30 @@
import PlayerGubao
import PlayerCoin
import ChConfig
import ObjPool
import time
# 战令类型
ZhanlingTypeList = (
ZhanlingType_LV, # 等级 1
ZhanlingType_Realm, # 境界 2
ZhanlingType_SkyTower, # 天星塔 3
ZhanlingType_GubaoStar, # 古宝总星数 4
ZhanlingType_Login, # 登录 5
ZhanlingType_GatherTheSoulLV, # 聚魂 6
ZhanlingType_7, # 骑宠养成 7
ZhanlingType_8, # 古宝养成 8
ZhanlingType_Xianyuan, # 仙缘 9
ZhanlingType_Huanjingge, # 幻境阁 10
ZhanlingType_Lianqi, # 炼器 11
) = range(1, 1 + 11)
ZhanlingType_LV, # 主公等级 1
ZhanlingType_TreeLV, # 祝福等级 2
ZhanlingType_MainLevel, # 主线关卡 3
ZhanlingType_GubaoCnt, # 古宝数量 4
ZhanlingType_ArenaCnt, # 演武场次数 5
) = range(1, 1 + 5)
# 用Value1记录进度的战令类型
ZhanlingValue1TypeList = [ZhanlingType_Huanjingge, ZhanlingType_Lianqi]
ZhanlingValue1TypeList = [ZhanlingType_ArenaCnt]
def OnPlayerLogin(curPlayer):
    for zhanlingType in ZhanlingTypeList:
        CheckZhanlingAllFinish(curPlayer, zhanlingType) # 因为是后面加的功能,为了处理线上玩家及兼容之后可能修改配置等,故上线默认检查一次
        if zhanlingType == ZhanlingType_Login:
            value1 = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType)
            if not value1:
                firstLoginTime = int(time.time())
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType, firstLoginTime)
                GameWorld.DebugLog("设置登录战令首次登录时间: %s" % firstLoginTime, curPlayer.GetPlayerID())
        CheckZhanlingAllFinish(curPlayer, zhanlingType) # 为了处理线上玩家及兼容之后可能修改配置等,故上线默认检查一次
        #if zhanlingType == ZhanlingType_Login:
        #    value1 = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType)
        #    if not value1:
        #        firstLoginTime = int(time.time())
        #        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType, firstLoginTime)
        #        GameWorld.DebugLog("设置登录战令首次登录时间: %s" % firstLoginTime, curPlayer.GetPlayerID())
        SyncZhanlingInfo(curPlayer, zhanlingType)
    return
@@ -119,16 +113,13 @@
    updStateH = GameWorld.SetBitValue(stateH, zhanlingType, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingState, updState)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingStateH, updStateH)
    if zhanlingType == ZhanlingType_Xianyuan:
        backValue = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_XianyuanScore)
        PlayerControl.SetMoney(curPlayer, ShareDefine.TYPE_Price_XianyuanScore, 0)
    elif zhanlingType in ZhanlingValue1TypeList:
    if zhanlingType in ZhanlingValue1TypeList:
        backValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType, 0)
    elif zhanlingType == ZhanlingType_Login:
        firstLoginTime = int(time.time())
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType, firstLoginTime)
        GameWorld.DebugLog("重置登录战令首次登录时间: %s" % firstLoginTime, curPlayer.GetPlayerID())
    #elif zhanlingType == ZhanlingType_Login:
    #    firstLoginTime = int(time.time())
    #    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType, firstLoginTime)
    #    GameWorld.DebugLog("重置登录战令首次登录时间: %s" % firstLoginTime, curPlayer.GetPlayerID())
    GameWorld.Log("重置战令: zhanlingType=%s,backValue=%s,state=(%s to %s) stateH=(%s to %s)" 
                  % (zhanlingType, backValue, state, updState, stateH, updStateH), curPlayer.GetPlayerID())
    
@@ -171,19 +162,22 @@
        
        if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ZhanlingRewardFree, rewardIndex, True, [zhanlingType]):
            rewardItemList = ipyData.GetFreeRewardItemList()
            for itemID, itemCount, _ in rewardItemList:
            for itemInfo in rewardItemList:
                itemID, itemCount = itemInfo[:2]
                ungetItemDict[itemID] = ungetItemDict.get(itemID, 0) + itemCount
            GameWorld.DebugLog("    战令补发免费奖励: rewardIndex=%s,needValue=%s,%s, %s" % (rewardIndex, needValue, rewardItemList, ungetItemDict), playerID)
                
        if activeState and not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ZhanlingReward, rewardIndex, True, [zhanlingType]):
            rewardItemList = ipyData.GetZLRewardItemList()
            for itemID, itemCount, _ in rewardItemList:
            for itemInfo in rewardItemList:
                itemID, itemCount = itemInfo[:2]
                ungetItemDict[itemID] = ungetItemDict.get(itemID, 0) + itemCount
            GameWorld.DebugLog("    战令补发普通奖励: rewardIndex=%s,needValue=%s,%s, %s" % (rewardIndex, needValue, rewardItemList, ungetItemDict), playerID)
                
        if activeStateH and not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ZhanlingRewardH, rewardIndex, True, [zhanlingType]):
            rewardItemList = ipyData.GetZLRewardItemListH()
            for itemID, itemCount, _ in rewardItemList:
            for itemInfo in rewardItemList:
                itemID, itemCount = itemInfo[:2]
                ungetItemDict[itemID] = ungetItemDict.get(itemID, 0) + itemCount
            GameWorld.DebugLog("    战令补发高级奖励: rewardIndex=%s,needValue=%s,%s, %s" % (rewardIndex, needValue, rewardItemList, ungetItemDict), playerID)
            
@@ -230,17 +224,18 @@
    curValue = 0
    if zhanlingType == ZhanlingType_LV:
        curValue = curPlayer.GetLV()
    elif zhanlingType == ZhanlingType_Realm:
        curValue = curPlayer.GetOfficialRank()
    elif zhanlingType == ZhanlingType_GubaoStar:
        _, curValue = PlayerGubao.GetGubaoTotalLVStar(curPlayer)
    elif zhanlingType == ZhanlingType_Login:
        firstLoginTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType)
        if not firstLoginTime:
            return
        curValue = GameWorld.GetDiff_Day(int(time.time()), firstLoginTime) + 1
    elif zhanlingType == ZhanlingType_Xianyuan:
        curValue = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_XianyuanScore)
    elif zhanlingType == ZhanlingType_TreeLV:
        curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreeLV)
    elif zhanlingType == ZhanlingType_MainLevel:
        lvID = needValue
        curValue = lvID if PlayerControl.IsMainLevelPass(curPlayer, lvID) else 0
    elif zhanlingType == ZhanlingType_GubaoCnt:
        curValue = PlayerGubao.GetGubaoTotalCnt(curPlayer)
    #elif zhanlingType == ZhanlingType_Login:
    #    firstLoginTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType)
    #    if not firstLoginTime:
    #        return
    #    curValue = GameWorld.GetDiff_Day(int(time.time()), firstLoginTime) + 1
    elif zhanlingType in ZhanlingValue1TypeList:
        curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType)
    else:
@@ -286,7 +281,9 @@
    GameWorld.DebugLog("领取战令奖励: zhanlingType=%s,needValue=%s,rewardType=%s,itemList=%s" % (zhanlingType, needValue, rewardType, itemList), playerID)
    
    # 给物品
    for itemID, itemCount, isAuctionItem in itemList:
    isAuctionItem = 0
    for itemInfo in itemList:
        itemID, itemCount = itemInfo[:2]
        ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
    ItemControler.NotifyGiveAwardInfo(curPlayer, itemList, "Zhanling")
    
@@ -334,7 +331,7 @@
    rewardList = []
    for ipyData in ipyDataList:
        rewardIndex = ipyData.GetRewardIndex()
        reward = ChPyNetSendPack.tagMCZhanling()
        reward = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagMCZhanling)
        reward.Clear()
        reward.NeedValue = ipyData.GetNeedValue()
        reward.FreeRewardState = 1 if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ZhanlingRewardFree, rewardIndex, True, [zhanlingType]) else 0
@@ -342,7 +339,7 @@
        reward.ZLRewardStateH = 1 if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ZhanlingRewardH, rewardIndex, True, [zhanlingType]) else 0
        rewardList.append(reward)
        
    clientPack = ChPyNetSendPack.tagMCZhanlingInfo()
    clientPack = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagMCZhanlingInfo)
    clientPack.Clear()
    clientPack.ZhanlingType = zhanlingType
    clientPack.IsActivite = 1 if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingState)&pow(2, zhanlingType) else 0