From dd3d1998f3a219118b9c24af1763a96e1fef85d1 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 28 一月 2019 17:45:23 +0800
Subject: [PATCH] 6112 【后端】【1.5.200】诛仙塔优化
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 30 +++++++++-----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py | 6 +++
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 30 +++++++++-----
3 files changed, 44 insertions(+), 22 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 09ea263..1f6d43c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -4719,7 +4719,7 @@
class tagGCFeastRedPacketDay(Structure):
RedPacketCount = 0 #(BYTE RedPacketCount)
- RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包ID列表
+ RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包表ID列表
data = None
def __init__(self):
@@ -25479,6 +25479,7 @@
("TaskType", c_ubyte), #任务类型
("TaskData", c_int), #任务数据
("CurTimes", c_ushort), #当前完成次数
+ ("RedPackState", c_ubyte), #红包是否已发放
]
def __init__(self):
@@ -25494,6 +25495,7 @@
self.TaskType = 0
self.TaskData = 0
self.CurTimes = 0
+ self.RedPackState = 0
return
def GetLength(self):
@@ -25506,19 +25508,21 @@
DumpString = '''// AB 26 节日红包任务进度信息 //tagMCFeastRedPackTaskInfo:
TaskType:%d,
TaskData:%d,
- CurTimes:%d
+ CurTimes:%d,
+ RedPackState:%d
'''\
%(
self.TaskType,
self.TaskData,
- self.CurTimes
+ self.CurTimes,
+ self.RedPackState
)
return DumpString
class tagMCFeastRedPackTaskInfo(Structure):
Head = tagHead()
- FeastDay = 0 #(BYTE FeastDay)//节日第几天
+ FeastDayIndex = 0 #(BYTE FeastDayIndex)//节日天索引,从0开始
TaskCount = 0 #(BYTE TaskCount)//今日任务数
TaskProgressList = list() #(vector<tagMCFeastRedPackTaskProgress> TaskProgressList)// 任务进度信息列表
data = None
@@ -25532,7 +25536,7 @@
def ReadData(self, _lpData, _pos=0, _Len=0):
self.Clear()
_pos = self.Head.ReadData(_lpData, _pos)
- self.FeastDay,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.FeastDayIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.TaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.TaskCount):
temTaskProgressList = tagMCFeastRedPackTaskProgress()
@@ -25545,7 +25549,7 @@
self.Head.Clear()
self.Head.Cmd = 0xAB
self.Head.SubCmd = 0x26
- self.FeastDay = 0
+ self.FeastDayIndex = 0
self.TaskCount = 0
self.TaskProgressList = list()
return
@@ -25563,7 +25567,7 @@
def GetBuffer(self):
data = ''
data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.FeastDay)
+ data = CommFunc.WriteBYTE(data, self.FeastDayIndex)
data = CommFunc.WriteBYTE(data, self.TaskCount)
for i in range(self.TaskCount):
data = CommFunc.WriteString(data, self.TaskProgressList[i].GetLength(), self.TaskProgressList[i].GetBuffer())
@@ -25572,13 +25576,13 @@
def OutputString(self):
DumpString = '''
Head:%s,
- FeastDay:%d,
+ FeastDayIndex:%d,
TaskCount:%d,
TaskProgressList:%s
'''\
%(
self.Head.OutputString(),
- self.FeastDay,
+ self.FeastDayIndex,
self.TaskCount,
"..."
)
@@ -28624,6 +28628,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("Floor", c_int), # 已通关层
+ ("LastFloor", c_int), # 上次挑战层
]
def __init__(self):
@@ -28641,6 +28646,7 @@
self.Cmd = 0xB2
self.SubCmd = 0x13
self.Floor = 0
+ self.LastFloor = 0
return
def GetLength(self):
@@ -28653,12 +28659,14 @@
DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo:
Cmd:%s,
SubCmd:%s,
- Floor:%d
+ Floor:%d,
+ LastFloor:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.Floor
+ self.Floor,
+ self.LastFloor
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 09ea263..1f6d43c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -4719,7 +4719,7 @@
class tagGCFeastRedPacketDay(Structure):
RedPacketCount = 0 #(BYTE RedPacketCount)
- RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包ID列表
+ RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包表ID列表
data = None
def __init__(self):
@@ -25479,6 +25479,7 @@
("TaskType", c_ubyte), #任务类型
("TaskData", c_int), #任务数据
("CurTimes", c_ushort), #当前完成次数
+ ("RedPackState", c_ubyte), #红包是否已发放
]
def __init__(self):
@@ -25494,6 +25495,7 @@
self.TaskType = 0
self.TaskData = 0
self.CurTimes = 0
+ self.RedPackState = 0
return
def GetLength(self):
@@ -25506,19 +25508,21 @@
DumpString = '''// AB 26 节日红包任务进度信息 //tagMCFeastRedPackTaskInfo:
TaskType:%d,
TaskData:%d,
- CurTimes:%d
+ CurTimes:%d,
+ RedPackState:%d
'''\
%(
self.TaskType,
self.TaskData,
- self.CurTimes
+ self.CurTimes,
+ self.RedPackState
)
return DumpString
class tagMCFeastRedPackTaskInfo(Structure):
Head = tagHead()
- FeastDay = 0 #(BYTE FeastDay)//节日第几天
+ FeastDayIndex = 0 #(BYTE FeastDayIndex)//节日天索引,从0开始
TaskCount = 0 #(BYTE TaskCount)//今日任务数
TaskProgressList = list() #(vector<tagMCFeastRedPackTaskProgress> TaskProgressList)// 任务进度信息列表
data = None
@@ -25532,7 +25536,7 @@
def ReadData(self, _lpData, _pos=0, _Len=0):
self.Clear()
_pos = self.Head.ReadData(_lpData, _pos)
- self.FeastDay,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.FeastDayIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.TaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.TaskCount):
temTaskProgressList = tagMCFeastRedPackTaskProgress()
@@ -25545,7 +25549,7 @@
self.Head.Clear()
self.Head.Cmd = 0xAB
self.Head.SubCmd = 0x26
- self.FeastDay = 0
+ self.FeastDayIndex = 0
self.TaskCount = 0
self.TaskProgressList = list()
return
@@ -25563,7 +25567,7 @@
def GetBuffer(self):
data = ''
data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.FeastDay)
+ data = CommFunc.WriteBYTE(data, self.FeastDayIndex)
data = CommFunc.WriteBYTE(data, self.TaskCount)
for i in range(self.TaskCount):
data = CommFunc.WriteString(data, self.TaskProgressList[i].GetLength(), self.TaskProgressList[i].GetBuffer())
@@ -25572,13 +25576,13 @@
def OutputString(self):
DumpString = '''
Head:%s,
- FeastDay:%d,
+ FeastDayIndex:%d,
TaskCount:%d,
TaskProgressList:%s
'''\
%(
self.Head.OutputString(),
- self.FeastDay,
+ self.FeastDayIndex,
self.TaskCount,
"..."
)
@@ -28624,6 +28628,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("Floor", c_int), # 已通关层
+ ("LastFloor", c_int), # 上次挑战层
]
def __init__(self):
@@ -28641,6 +28646,7 @@
self.Cmd = 0xB2
self.SubCmd = 0x13
self.Floor = 0
+ self.LastFloor = 0
return
def GetLength(self):
@@ -28653,12 +28659,14 @@
DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo:
Cmd:%s,
SubCmd:%s,
- Floor:%d
+ Floor:%d,
+ LastFloor:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.Floor
+ self.Floor,
+ self.LastFloor
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py
index addf56a..25009e7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianTower.py
@@ -88,6 +88,7 @@
ttInfo = ChPyNetSendPack.tagMCZhuXianTowerInfo()
ttInfo.Clear()
ttInfo.Floor = __GetZhuXianTowerCurPassLV(curPlayer)
+ ttInfo.LastFloor = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ZhuXianTowerLastFloor)
NetPackCommon.SendFakePack(curPlayer, ttInfo)
return
@@ -341,6 +342,11 @@
FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttWaitStart, prepareTick)
FBCommon.SetFBStep(FB_State_FightPrepare, tick)
+ lastFloor = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ZhuXianTowerLastFloor)
+ if fbLevel != lastFloor:
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ZhuXianTowerLastFloor, fbLevel)
+ SyncZhuXianLevelInfo(curPlayer) # 同步信息
+
DoFBHelp(curPlayer, tick)
GameWorld.DebugLog("StartFBLevel, fbLevel=%s,totalHP=%s" % (fbLevel, totalHP), curPlayer.GetPlayerID())
return
--
Gitblit v1.8.0