xdh
2019-05-09 df2af1331d39ad7da3f833931c01e2391f575988
6705 【后端】【2.0】天星塔功能
13个文件已修改
1 文件已重命名
1个文件已删除
1个文件已添加
1427 ■■■■■ 已修改文件
PySysDB/PySysDBPY.h 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/KillScreenNPC.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetSkyTower.py 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py 413 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py 667 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -29,6 +29,7 @@
    DWORD        NeedLV;    //需要等级
    DWORD        NeedItemID;    //需要道具ID
    WORD        NeedItemCnt;    //消耗的道具数量
    list        NeedEquip;    //需要8部位装备条件阶级|品质|是否套装
    list        AddAttrType;    //境界加成属性类型    
    list        AddAttrNum;    //境界加成属性值
    DWORD        BossID;    //渡劫bossid
@@ -1893,4 +1894,15 @@
    DWORD        _ElementSkillID;    //专精技能ID
    DWORD        MainSkillID;    //主技能ID
    DWORD        NeedLV;    //选择需要等级
};
//天星塔表
struct tagSkyTower
{
    DWORD        _FloorID;    //层
    DWORD        BossID;    //bossID
    dict        Reward;    //奖励
    WORD        NeedLV;    //要求等级
    DWORD        FightPower;    //推荐战力
};
ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
@@ -585,7 +585,6 @@
            ShareDefine.Def_BT_FCCostGold               : 5,             #消费排行榜(仙界盛典)
            ShareDefine.Def_BT_NewFCCostGold            : 5,             #消费排行榜(仙界盛典)
            ShareDefine.Def_BT_FBHelpBattle             : 100,           #助战次数榜
            ShareDefine.Def_BT_ZhuXianTower             : 100,           #诛仙塔榜
            }
#排行榜保存类型(和BillboardType匹配), 默认保存, 如果不保存,可配置进去
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -29573,6 +29573,58 @@
#------------------------------------------------------
# B2 13 天星塔通关层数 #tagMCSkyTowerInfo
class  tagMCSkyTowerInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("Floor", c_int),    # 已通关层
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB2
        self.SubCmd = 0x13
        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 = 0xB2
        self.SubCmd = 0x13
        self.Floor = 0
        return
    def GetLength(self):
        return sizeof(tagMCSkyTowerInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B2 13 天星塔通关层数 //tagMCSkyTowerInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                Floor:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Floor
                                )
        return DumpString
m_NAtagMCSkyTowerInfo=tagMCSkyTowerInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSkyTowerInfo.Cmd,m_NAtagMCSkyTowerInfo.SubCmd))] = m_NAtagMCSkyTowerInfo
#------------------------------------------------------
#B2 02 推送提醒设置通知 #tagMCPushNotificationsSetting
class  tagMCPushNotificationsSetting(Structure):
@@ -29693,62 +29745,6 @@
m_NAtagMCZhuXianBossCnt=tagMCZhuXianBossCnt()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianBossCnt.Cmd,m_NAtagMCZhuXianBossCnt.SubCmd))] = m_NAtagMCZhuXianBossCnt
#------------------------------------------------------
# B2 13 诛仙塔通关层数 #tagMCZhuXianTowerInfo
class  tagMCZhuXianTowerInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("Floor", c_int),    # 已通关层
                  ("LastFloor", c_int),    # 上次挑战层
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB2
        self.SubCmd = 0x13
        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 = 0xB2
        self.SubCmd = 0x13
        self.Floor = 0
        self.LastFloor = 0
        return
    def GetLength(self):
        return sizeof(tagMCZhuXianTowerInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                Floor:%d,
                                LastFloor:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Floor,
                                self.LastFloor
                                )
        return DumpString
m_NAtagMCZhuXianTowerInfo=tagMCZhuXianTowerInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianTowerInfo.Cmd,m_NAtagMCZhuXianTowerInfo.SubCmd))] = m_NAtagMCZhuXianTowerInfo
#------------------------------------------------------
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -642,11 +642,10 @@
    Def_BT_Campaign_Recharge,                 #累计充值(开服活动榜)
    Def_BT_Campaign_PetLV,                    #灵宠等级(开服活动榜)
    
    Def_BT_ZhuXianTower,                      #诛仙塔榜
    Def_BT_NewFCCostGold,                     #消费排行榜(新仙界盛典)
    
    Def_BT_Max,                               #排行榜最大类型
) = range(0, 24 + 2)
) = range(0, 23 + 2)
    
#职业对应战力排行榜类型
JobFightPowerBillboardDict = {
@@ -658,7 +657,7 @@
#排行榜Value1存储境界信息的榜单列表
BTValue1_OfficialRankList = [Def_BT_FightPower, Def_BT_FightPower_Warrior, Def_BT_FightPower_Wizard, Def_BT_FightPower_Assassin, 
                             Def_BT_LV, Def_BT_FightPower_Horse, Def_BT_FightPower_Pet, Def_BT_TrialTower, Def_BT_OffLineEfficient,
                             Def_BT_FBHelpBattle, Def_BT_ZhuXianTower,
                             Def_BT_FBHelpBattle,
                             ]
##---比率---
@@ -1459,7 +1458,7 @@
DailyActionID_HelpBattleCheckIn, # 助战登记  20
DailyActionID_CrossReamPK, # 跨服PK  21
DailyActionID_FamilyBoss1, # 仙盟BOSS  22
DailyActionID_FamilyBoss2, # 废弃  23
DailyActionID_SkyTower, # 天星塔  23
DailyActionID_HorsePetBoss, # 骑宠BOSS  24
DailyActionID_FairyDomain, # 缥缈仙域  25
) = range(1, 25 + 1)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -1768,8 +1768,8 @@
Def_FBMapID_SealDemonEx = 52020
#诛仙BOSS
Def_FBMapID_ZhuXianBoss = 31380
#诛仙塔
Def_FBMapID_ZhuXianTower = 31370
#天星塔
Def_FBMapID_SkyTower = 31370
#仙魔之争
Def_FBMapID_XMZZ = 31010
#神兽副本
@@ -1906,7 +1906,7 @@
                'CrossGrassland':[Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian], #草园
                'GatherSoul':[Def_FBMapID_GatherSoul],#聚魂副本
                'ZhuXianBoss':[Def_FBMapID_ZhuXianBoss],#诛仙BOSS
                'ZhuXianTower':[Def_FBMapID_ZhuXianTower],#诛仙塔
                'SkyTower':[Def_FBMapID_SkyTower],#天星塔
                'AllFamilyBoss':[Def_FBMapID_AllFamilyBoss],#多仙盟BOSS
                'HorsePetBoss':[Def_FBMapID_HorsePetBoss],#骑宠BOSS
                'FairyTreasure':[Def_FBMapID_FairyTreasure],#缥缈宝藏
@@ -3603,6 +3603,8 @@
Def_Player_Dict_ZhuXianTowerPassLV = "ZhuXianTowerPassLV"  # 诛仙塔已通关层数
Def_Player_Dict_ZhuXianTowerLastFloor = "ZhuXianTowerLastFloor"  # 诛仙塔上次挑战层数
Def_Player_Dict_ZhuXianTowerCostTime = "ZhuXianTowerCostTime"  # 诛仙塔通关时间
#天星塔
Def_Player_Dict_SkyTowerFloor = "SkyTowerFloor"  # 天星塔已通关层数
#古神禁地
Def_Player_Dict_GodArea_Anger = "GodArea_Anger"  # 古神禁地怒气值
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -29573,6 +29573,58 @@
#------------------------------------------------------
# B2 13 天星塔通关层数 #tagMCSkyTowerInfo
class  tagMCSkyTowerInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("Floor", c_int),    # 已通关层
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB2
        self.SubCmd = 0x13
        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 = 0xB2
        self.SubCmd = 0x13
        self.Floor = 0
        return
    def GetLength(self):
        return sizeof(tagMCSkyTowerInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B2 13 天星塔通关层数 //tagMCSkyTowerInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                Floor:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Floor
                                )
        return DumpString
m_NAtagMCSkyTowerInfo=tagMCSkyTowerInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSkyTowerInfo.Cmd,m_NAtagMCSkyTowerInfo.SubCmd))] = m_NAtagMCSkyTowerInfo
#------------------------------------------------------
#B2 02 推送提醒设置通知 #tagMCPushNotificationsSetting
class  tagMCPushNotificationsSetting(Structure):
@@ -29693,62 +29745,6 @@
m_NAtagMCZhuXianBossCnt=tagMCZhuXianBossCnt()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianBossCnt.Cmd,m_NAtagMCZhuXianBossCnt.SubCmd))] = m_NAtagMCZhuXianBossCnt
#------------------------------------------------------
# B2 13 诛仙塔通关层数 #tagMCZhuXianTowerInfo
class  tagMCZhuXianTowerInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("Floor", c_int),    # 已通关层
                  ("LastFloor", c_int),    # 上次挑战层
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB2
        self.SubCmd = 0x13
        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 = 0xB2
        self.SubCmd = 0x13
        self.Floor = 0
        self.LastFloor = 0
        return
    def GetLength(self):
        return sizeof(tagMCZhuXianTowerInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                Floor:%d,
                                LastFloor:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Floor,
                                self.LastFloor
                                )
        return DumpString
m_NAtagMCZhuXianTowerInfo=tagMCZhuXianTowerInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianTowerInfo.Cmd,m_NAtagMCZhuXianTowerInfo.SubCmd))] = m_NAtagMCZhuXianTowerInfo
#------------------------------------------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1682,12 +1682,12 @@
    RunQuestEvent(curPlayer, "on_trialtowercnt", cnt, Def_RunQuestType_Normal)
    return
## 通关诛仙塔第X层
## 通关天星塔第X层
#  @param curPlayer 玩家实例
#  @param eventName 
#  @return None
def EventRespons_ZhuXianTowerPass(curPlayer, cnt):
    RunQuestEvent(curPlayer, "zhuxiantowerpass", cnt, Def_RunQuestType_Normal)
def EventRespons_SkyTowerCnt(curPlayer, cnt):
    RunQuestEvent(curPlayer, "skytowerpass", cnt, Def_RunQuestType_Normal)
    return
##护送X次美女 
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -2572,16 +2572,16 @@
    maxPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV) # 历史最大过关数
    return QuestRunnerValue.GetEval(conditionType, maxPassLV, conditionValue)
##通关诛仙塔第X层
##通关天星塔第X层
# @param curPlayer 玩家实例
# @param curMission 任务实例
# @param curConditionNode 节点信息
# @return 返回值, 是否判断成功
# @remarks <Check_Zhuxiantower type="类型" value="值"/>
def ConditionType_Check_Zhuxiantower(curPlayer, curMission, curConditionNode):
# @remarks <Check_Skytower type="类型" value="值"/>
def ConditionType_Check_Skytower(curPlayer, curMission, curConditionNode):
    conditionValue = GameWorld.ToIntDef(curConditionNode.GetAttribute("value"), 0)
    conditionType = curConditionNode.GetAttribute("type")
    maxPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ZhuXianTowerPassLV) # 历史最大过关数
    maxPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor) # 历史最大过关数
    return QuestRunnerValue.GetEval(conditionType, maxPassLV, conditionValue)
def ConditionType_Get_Player_Coin(curPlayer, curMission, curConditionNode):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/KillScreenNPC.py
@@ -23,7 +23,6 @@
import AttackCommon
import GameObj
import NPCCommon
import GameLogic_ZhuXianTower
## GM命令执行入口
@@ -33,11 +32,6 @@
#  @remarks 函数详细说明.
def OnExec(curPlayer, playerList):
    if curPlayer.GetMapID() == ChConfig.Def_FBMapID_ZhuXianTower:
        #诛仙塔击杀怪
        GameWorld.GetGameFB().SetGameFBDict(GameLogic_ZhuXianTower.FBDict_RemainHP, 1)
        return
    isMapAllNPC = 0
    if len(playerList) > 0:
        isMapAllNPC = playerList[0]
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetSkyTower.py
File was renamed from ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetZhuXianTower.py
@@ -4,23 +4,21 @@
#
#-------------------------------------------------------------------------------
#
##@package GM.Commands.SetZhuXianTower
##@package GM.Commands.SetSkyTower
#
# @todo:诛仙塔过关数设置
# @todo:天星塔过关数设置
# @author xdh
# @date 2019-01-21 16:10
# @version 1.0
#
#
# 详细描述: 诛仙塔过关数设置
# 详细描述: 天星塔过关数设置
#
#---------------------------------------------------------------------
#"""Version = 2019-01-21 16:10"""
#---------------------------------------------------------------------
import GameLogic_ZhuXianTower
import ShareDefine
import PlayerBillboard
import GameLogic_SkyTower
import GameWorld
#---------------------------------------------------------------------
#全局变量
@@ -36,8 +34,8 @@
    if len(cmdList) != 1:
        return
    fbLevel = cmdList[0]
    GameLogic_ZhuXianTower.SetZhuXianTowerCurPassLV(curPlayer, fbLevel, 100)
    GameLogic_SkyTower.SetSkyTowerCurfloorID(curPlayer, fbLevel)
    GameLogic_ZhuXianTower.SyncZhuXianLevelInfo(curPlayer)
    GameWorld.DebugAnswer(curPlayer, "诛仙塔过关数设置 floor=%s!"%fbLevel)
    GameLogic_SkyTower.SyncSkyTowerInfo(curPlayer)
    GameWorld.DebugAnswer(curPlayer, "天星塔过关数设置 floor=%s!"%fbLevel)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
New file
@@ -0,0 +1,413 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#
##@package GameWorldLogic.FBProcess.GameLogic_SkyTower
#
# @todo:天星塔
# @author xdh
# @date 2019-05-09
# @version 1.0
# 详细描述: 天星塔
#
#---------------------------------------------------------------------
#"""Version = 2019-05-09 11:00"""
#---------------------------------------------------------------------
import FBCommon
import GameWorld
import IPY_GameWorld
import PlayerControl
import NPCCustomRefresh
import ChPyNetSendPack
import ItemControler
import EventShell
import NetPackCommon
import ShareDefine
import IpyGameDataPY
import ChConfig
import ChPlayer
import PlayerActivity
g_runeTypeDict = {}
FBDict_Level = 'FBDict_Level'   # 副本关卡
# 副本通用配置
(
Def_PrepareTime, # 每关准备时间,秒
Def_FightTime, # 每关战斗时间,秒
Def_ExitTime, # 退出时间, 秒
Def_DayPrizeMaxCnt, #每日奖励最多累积几天(配0则无限)
) = range(4)
# 副本状态
(
FB_State_Open, # 副本开启
FB_State_FightPrepare, # 战斗准备时间
FB_State_Fighting, # 战斗
FB_State_FreeTime, # 活动结束准备(胜利/失败)
FB_State_Close, # 关闭副本
) = range(5)
## 天星塔配置
def __GetTrialCfg(): return FBCommon.GetFBLineStepTime(ChConfig.Def_FBMapID_SkyTower)
def GetTowerIpyData(floor):
    return IpyGameDataPY.GetIpyGameData('SkyTower', floor)
def OnFBPlayerLogin(curPlayer):
    SyncSkyTowerInfo(curPlayer)
    return
## 同步天星塔关卡信息
#  @floorID 为0时默认全部同步,> 0时仅同步该关卡
def SyncSkyTowerInfo(curPlayer):
    ttInfo = ChPyNetSendPack.tagMCSkyTowerInfo()
    ttInfo.Clear()
    ttInfo.floorID = __GetSkyTowerCurFloor(curPlayer)
    NetPackCommon.SendFakePack(curPlayer, ttInfo)
    return
## 获取当前已通关关卡
def __GetSkyTowerCurFloor(curPlayer):
    return curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor)
## 更新当前已通关关卡
def SetSkyTowerCurfloorID(curPlayer, floorID):
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_SkyTowerFloor, floorID)
    #任务
    EventShell.EventRespons_SkyTowerCnt(curPlayer, floorID)
    GameWorld.DebugLog(' 更新天星塔已通关数 %s' % floorID)
    return
## 是否可进入
#  @param curPlayer
#  @param mapID 地图ID
#  @param lineId 分线ID
#  @param tick
#  @return 是否可进入
def OnEnterFBEvent(curPlayer, mapID, lineId, tick):
    return True
## 检查可否进行挑战
def __CheckCanChallenge(curPlayer, floorID):
    playerID = curPlayer.GetPlayerID()
    ipyData = GetTowerIpyData(floorID)
    if not ipyData:
        GameWorld.ErrLog("天星塔关卡(%s)不存在" % (floorID), playerID)
        return False
    # 是否已过关
    if floorID <= __GetSkyTowerCurFloor(curPlayer):
        GameWorld.DebugLog("天星塔本关(%s)已过关, 无法挑战!" % floorID, playerID)
        return False
    if curPlayer.GetLV() < ipyData.GetNeedLV():
        GameWorld.DebugLog("天星塔本关  等级不足%s, 无法挑战!" % ipyData.GetNeedLV(), playerID)
        return False
    return True
##副本玩家进入点
# @param curPlayer 玩家实例
# @param mapID 地图ID
# @param lineId 分线ID
# @param ipyEnterPosInfo 功能线路IPY配置坐标信息
# @param tick 时间戳
# @return posX, posY, 随机半径(可选)
def OnGetFBEnterPos(curPlayer, mapID, lineId, ipyEnterPosInfo, tick):
    return ipyEnterPosInfo
## 是否可以进入
#  @param ask 请求信息
#  @param tick
#  @return 回复是否通过请求
def OnChangeMapAsk(ask, tick):
    return IPY_GameWorld.cmeAccept
## 进副本
#  @param curPlayer
#  @param tick
#  @return None
def DoEnterFB(curPlayer, tick):
    # 不做处理,有副本行为客户端发包选择挑战关卡
    #EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_SkyTower, 0, ChConfig.CME_Log_Start)
    return
## 副本时间到关闭
#  @param tick 当前时间
#  @return None
#  @remarks 函数详细说明.
def OnCloseFB(tick):
    return
##玩家退出副本.
# @param curPlayer 玩家实例
# @param tick 时间戳
# @return 返回值无意义
# @remarks 玩家主动离开副本.
def DoExitFB(curPlayer, tick):
    # 玩家退出默认关闭副本
    #GameWorldProcess.CloseFB(tick)
    return
##副本总逻辑计时器
# @param tick 时间戳
# @return 无意义
# @remarks 副本总逻辑计时器
def OnProcess(tick):
    gameFB = GameWorld.GetGameFB()
    fbStep = gameFB.GetFBStep()
    if fbStep == FB_State_FightPrepare:
        __DoLogic_FightPrepare(tick)
    elif fbStep == FB_State_Fighting:
        __DoLogic_Fighting(tick)
    elif fbStep == FB_State_FreeTime:
        __DoLogic_FreeTime(tick)
    elif fbStep == FB_State_Close:
        pass
    return
## 获取BossID
def __GetSkyTowerBossID(floorID= -1):
    gameFB = GameWorld.GetGameFB()
    if floorID == -1:
        floorID = gameFB.GetGameFBDictByKey(FBDict_Level)
    ipyData = GetTowerIpyData(floorID)
    if not ipyData:
        GameWorld.ErrLog("__GetSkyTowerBossID() can not find %s in SkyTowerNPC.txt" % floorID)
        return 0
    return ipyData.GetBossID()
##战斗准备时间
# @param tick  时钟
# @return 无意义
def __DoLogic_FightPrepare(tick):
    gameFB = GameWorld.GetGameFB()
    trialCfg = __GetTrialCfg()
    if tick - gameFB.GetFBStepTick() < trialCfg[Def_PrepareTime] * 1000:
        return
    bossID = __GetSkyTowerBossID()
    if not bossID:
        FBCommon.DoLogic_FBKickAllPlayer()
        return
    FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttTowerTake, trialCfg[Def_FightTime] * 1000)
    NPCCustomRefresh.SetNPCRefresh(FBCommon.GetFBLineRefreshNPC(ChConfig.Def_FBMapID_SkyTower, 0), [bossID])
    #转入战斗
    FBCommon.SetFBStep(FB_State_Fighting, tick)
    return
## 开始副本关卡
def StartfloorID(curPlayer, floorID, tick):
    PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_SkyTower)
    if curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
        GameWorld.DebugLog("复活玩家...", curPlayer.GetPlayerID())
        ChPlayer.PlayerRebornByType(curPlayer, ChConfig.rebornType_City, tick)
    curPlayer.SetHP(curPlayer.GetMaxHP())
    FBCommon.ClearFBNPC()
    gameFB = GameWorld.GetGameFB()
    gameFB.SetGameFBDict(FBDict_Level, floorID)
    prepareTick = __GetTrialCfg()[Def_PrepareTime] * 1000
    FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttWaitStart, prepareTick)
    FBCommon.SetFBStep(FB_State_FightPrepare, tick)
    helpDict = {FBCommon.Help_wheel:floorID}
    FBCommon.Notify_FBHelp(curPlayer, helpDict)
    GameWorld.DebugLog("StartfloorID, floorID=%s, helpDict=%s"
                       % (floorID, str(helpDict)), curPlayer.GetPlayerID())
    return
##战斗时间
# @param tick  时钟
# @return 无意义
def __DoLogic_Fighting(tick):
    gameFB = GameWorld.GetGameFB()
    #判断时间结束
    if tick - gameFB.GetFBStepTick() < __GetTrialCfg()[Def_FightTime] * 1000:
        return
    floorID = gameFB.GetGameFBDictByKey(FBDict_Level)
    playerManager = GameWorld.GetMapCopyPlayerManager()
    for index in xrange(playerManager.GetPlayerCount()):
        curPlayer = playerManager.GetPlayerByIndex(index)
        if not curPlayer:
            continue
        __SendSkyTowerOverInfo(curPlayer, floorID, False)
    #游戏结束
    __SetFBToFreeTime(tick)
    return
##设置副本进入离开状态
# @param tick  时钟
# @return 无意义
def __SetFBToFreeTime(tick):
    FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttLeaveMap, __GetTrialCfg()[Def_ExitTime] * 1000)
    FBCommon.SetFBStep(FB_State_FreeTime, tick)
    return
##比赛结束的空闲时间
# @param tick  时钟
# @return 无意义
# @remarks 比赛结束的空闲时间
def __DoLogic_FreeTime(tick):
    if tick - GameWorld.GetGameFB().GetFBStepTick() < __GetTrialCfg()[Def_ExitTime] * 1000:
        return
    #FBCommon.DoLogic_FBKickAllPlayer()
    return
## 杀怪
#  @param curPlayer
#  @param curNPC 被杀的怪
#  @param tick
#  @return None
def DoFB_Player_KillNPC(curPlayer, curNPC, tick):
    gameFB = GameWorld.GetGameFB()
    if gameFB.GetFBStep() != FB_State_Fighting:
        return
    bossID = __GetSkyTowerBossID()
    if bossID != curNPC.GetNPCID():
        return
    floorID = gameFB.GetGameFBDictByKey(FBDict_Level)
    # 过关全服广播
    ipyData = GetTowerIpyData(floorID)
    if not ipyData:
        return
    if ipyData.GetIsNotify():
        IPY_Data = IpyGameDataPY.IPY_Data()
        maxLevel = IPY_Data.GetRuneTowerByIndex(IPY_Data.GetRuneTowerCount()-1).GetID()
        sysMark = 'RuneTowerInfo_1' if floorID == maxLevel else 'GeRen_liubo_471172'
        PlayerControl.WorldNotify(0, sysMark,
                                  [curPlayer.GetPlayerName(), floorID / 100])
    #更新关卡
    SetSkyTowerCurfloorID(curPlayer, floorID)
    # 给过关奖励
    prizeDict = __GiveFBPassPrize(curPlayer, floorID)
    # 过关时间
    costTime = tick - GameWorld.GetGameFB().GetFBStepTick()
    prizeDict[FBCommon.Over_costTime] = costTime
    __SendSkyTowerOverInfo(curPlayer, floorID, True, prizeDict)
    SyncSkyTowerInfo(curPlayer) # 同步最新关卡信息
    __SetFBToFreeTime(tick)
    #每日任务
    PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_Tower)
    return
## 给过关奖励
def __GiveFBPassPrize(curPlayer, ipyData):
    giveItemDict = ipyData.GetReward()
    giveItemList = [[itemID, itemCnt, 0] for itemID, itemCnt in giveItemDict.items()]
    event = ["SKYTower", False, {}]
    ItemControler.GivePlayerItemOrMail(curPlayer, giveItemList, None, event)
    prizeDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(giveItemList)}
    return prizeDict
## 发送挑战结果信息
def __SendSkyTowerOverInfo(curPlayer, floorID, isPass, overDict={}):
    overDict[FBCommon.Over_dataMapID] = ChConfig.Def_FBMapID_SkyTower
    overDict[FBCommon.Over_wheel] = floorID
    overDict[FBCommon.Over_isPass] = int(isPass)
    GameWorld.DebugLog("__SendSkyTowerOverInfo overDict=%s" % (str(overDict)), curPlayer.GetPlayerID())
    FBCommon.Notify_FB_Over(curPlayer, overDict)
    return
## 检查是否可攻击, 主判定不可攻击的情况,其他逻辑由外层决定
#  @param attacker 攻击方
#  @param defender 防守方
#  @return bool
def CheckCanAttackTagObjInFB(attacker, defender):
    gameFB = GameWorld.GetGameFB()
    if gameFB.GetFBStep() != FB_State_Fighting:
        return False
    return True
##玩家死亡.
# @param curPlayer:死亡的玩家
# @param tick 时间戳
# @return 返回值无意义
# @remarks 玩家主动离开副本.
def DoPlayerDead(curPlayer):
    gameFB = GameWorld.GetGameFB()
    floorID = gameFB.GetGameFBDictByKey(FBDict_Level)
    __SendSkyTowerOverInfo(curPlayer, floorID, False)
    tick = GameWorld.GetGameWorld().GetTick()
    #游戏结束
    __SetFBToFreeTime(tick)
    return
## 是否副本复活
#  @param None
#  @return 是否副本复活
def OnPlayerReborn():
    return True
## 副本行为
#  @param curPlayer 玩家
#  @param actionType 行为类型
#  @param actionInfo 行为信息
#  @param tick 当前时间
#  @return None
def DoFBAction(curPlayer, actionType, actionInfo, tick):
    # 默认为选择关卡,由客户端决定,进场及副本选关通用此行为
    if actionInfo <= 0:
        return
    gameFB = GameWorld.GetGameFB()
    fbStep = gameFB.GetFBStep()
    if fbStep in [FB_State_FightPrepare, FB_State_Fighting]:
        GameWorld.DebugLog("准备或战斗中, 无法变更关卡!")
        return
    floorID = actionInfo
    if not __CheckCanChallenge(curPlayer, floorID):
        FBCommon.DoLogic_FBKickAllPlayer()
        return
    StartfloorID(curPlayer, floorID, tick)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py
File was deleted
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -54,6 +54,7 @@
                        ("DWORD", "NeedLV", 0),
                        ("DWORD", "NeedItemID", 0),
                        ("WORD", "NeedItemCnt", 0),
                        ("list", "NeedEquip", 0),
                        ("list", "AddAttrType", 0),
                        ("list", "AddAttrNum", 0),
                        ("DWORD", "BossID", 0),
@@ -1461,6 +1462,14 @@
                        ("DWORD", "MainSkillID", 0),
                        ("DWORD", "NeedLV", 0),
                        ),
                "SkyTower":(
                        ("DWORD", "FloorID", 1),
                        ("DWORD", "BossID", 0),
                        ("dict", "Reward", 0),
                        ("WORD", "NeedLV", 0),
                        ("DWORD", "FightPower", 0),
                        ),
                }
@@ -1508,6 +1517,7 @@
        self.NeedLV = 0
        self.NeedItemID = 0
        self.NeedItemCnt = 0
        self.NeedEquip = []
        self.AddAttrType = []
        self.AddAttrNum = []
        self.BossID = 0
@@ -1520,6 +1530,7 @@
    def GetNeedLV(self): return self.NeedLV # 需要等级
    def GetNeedItemID(self): return self.NeedItemID # 需要道具ID
    def GetNeedItemCnt(self): return self.NeedItemCnt # 消耗的道具数量
    def GetNeedEquip(self): return self.NeedEquip # 需要8部位装备条件阶级|品质|是否套装
    def GetAddAttrType(self): return self.AddAttrType # 境界加成属性类型
    def GetAddAttrNum(self): return self.AddAttrNum # 境界加成属性值
    def GetBossID(self): return self.BossID # 渡劫bossid
@@ -4472,6 +4483,23 @@
    def GetElementSkillID(self): return self.ElementSkillID # 专精技能ID
    def GetMainSkillID(self): return self.MainSkillID # 主技能ID
    def GetNeedLV(self): return self.NeedLV # 选择需要等级
# 天星塔表
class IPY_SkyTower():
    def __init__(self):
        self.FloorID = 0
        self.BossID = 0
        self.Reward = {}
        self.NeedLV = 0
        self.FightPower = 0
        return
    def GetFloorID(self): return self.FloorID # 层
    def GetBossID(self): return self.BossID # bossID
    def GetReward(self): return self.Reward # 奖励
    def GetNeedLV(self): return self.NeedLV # 要求等级
    def GetFightPower(self): return self.FightPower # 推荐战力
def Log(msg, playerID=0, par=0):
@@ -4795,6 +4823,8 @@
        self.ipyFBBuyBuffLen = len(self.ipyFBBuyBuffCache)
        self.ipySkillElementCache = self.__LoadFileData("SkillElement", IPY_SkillElement)
        self.ipySkillElementLen = len(self.ipySkillElementCache)
        self.ipySkyTowerCache = self.__LoadFileData("SkyTower", IPY_SkyTower)
        self.ipySkyTowerLen = len(self.ipySkyTowerCache)
        Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
        Log("IPY_DataMgr InitOK!")
        return
@@ -5259,6 +5289,8 @@
    def GetFBBuyBuffByIndex(self, index): return self.ipyFBBuyBuffCache[index]
    def GetSkillElementCount(self): return self.ipySkillElementLen
    def GetSkillElementByIndex(self, index): return self.ipySkillElementCache[index]
    def GetSkyTowerCount(self): return self.ipySkyTowerLen
    def GetSkyTowerByIndex(self, index): return self.ipySkyTowerCache[index]
IPYData = IPY_DataMgr()
def IPY_Data(): return IPYData
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
@@ -50,7 +50,6 @@
    
    if isAll:
        UpdateRuneTowerBillboard(curPlayer)
        UpdateZhuXianTowerBillboard(curPlayer)
        
        #UpdateTJGBillboard(curPlayer, minuteExp) 脱机效率可不更新
        
@@ -177,13 +176,6 @@
    ##更新玩家符印塔排行榜
    passLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
    UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_TrialTower, passLV) 
    return
def UpdateZhuXianTowerBillboard(curPlayer):
    ##诛仙塔榜(通关时长没有的默认50秒)
    costTime = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ZhuXianTowerCostTime, 50)
    passLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ZhuXianTowerPassLV)
    UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_ZhuXianTower, passLV, 10000-costTime)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
@@ -126,6 +126,26 @@
        if not canLvUp:
            GameWorld.DebugLog('    副本未过关,不能升级境界')
            return
    #等级判断
    if curPlayer.GetLV() < realmIpyData.GetNeedLV():
        return
    #装备判断
    needEquip = realmIpyData.GetNeedEquip()
    if needEquip and len(needEquip) == 3:
        classLV, color, isSuite = needEquip
        equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
        for place in ChConfig.EquipPlace_Base:
            ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, place)
            if not ipyData:
                return
            gridIndex = ipyData.GetGridIndex()
            curEquip = equipPack.GetAt(gridIndex)
            if not ItemCommon.CheckItemCanUse(curEquip):
                return
            if curEquip.GetItemColor() < color:
                return
            if isSuite and not curEquip.GetSuiteID():
                return
    
    needItemID = realmIpyData.GetNeedItemID()
    needItemCount = realmIpyData.GetNeedItemCnt()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -642,11 +642,10 @@
    Def_BT_Campaign_Recharge,                 #累计充值(开服活动榜)
    Def_BT_Campaign_PetLV,                    #灵宠等级(开服活动榜)
    
    Def_BT_ZhuXianTower,                      #诛仙塔榜
    Def_BT_NewFCCostGold,                     #消费排行榜(新仙界盛典)
    
    Def_BT_Max,                               #排行榜最大类型
) = range(0, 24 + 2)
) = range(0, 23 + 2)
    
#职业对应战力排行榜类型
JobFightPowerBillboardDict = {
@@ -658,7 +657,7 @@
#排行榜Value1存储境界信息的榜单列表
BTValue1_OfficialRankList = [Def_BT_FightPower, Def_BT_FightPower_Warrior, Def_BT_FightPower_Wizard, Def_BT_FightPower_Assassin, 
                             Def_BT_LV, Def_BT_FightPower_Horse, Def_BT_FightPower_Pet, Def_BT_TrialTower, Def_BT_OffLineEfficient,
                             Def_BT_FBHelpBattle, Def_BT_ZhuXianTower,
                             Def_BT_FBHelpBattle,
                             ]
##---比率---
@@ -1459,7 +1458,7 @@
DailyActionID_HelpBattleCheckIn, # 助战登记  20
DailyActionID_CrossReamPK, # 跨服PK  21
DailyActionID_FamilyBoss1, # 仙盟BOSS  22
DailyActionID_FamilyBoss2, # 废弃  23
DailyActionID_SkyTower, # 天星塔  23
DailyActionID_HorsePetBoss, # 骑宠BOSS  24
DailyActionID_FairyDomain, # 缥缈仙域  25
) = range(1, 25 + 1)