From 394b8050a9e6daab7fdf19cb2066279da8db64fb Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 20 十一月 2018 15:01:51 +0800
Subject: [PATCH] 4748 子 【开发】【1.3】封魔坛新增自动进入功能(VIP特权),双倍挑战修改
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 8 ++++++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py | 15 ++++++++++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 1 -
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 8 ++++++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 4 +++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 4 ++++
6 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 76a608e..d75c677 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -24669,6 +24669,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("IsDouble", c_ubyte), #是否双倍
+ ("OldDouble", c_ubyte), #是否曾经允许双倍
]
def __init__(self):
@@ -24686,6 +24687,7 @@
self.Cmd = 0xB2
self.SubCmd = 0x01
self.IsDouble = 0
+ self.OldDouble = 0
return
def GetLength(self):
@@ -24698,12 +24700,14 @@
DumpString = '''// B2 01 通知封魔坛双倍击杀状态 //tagMCFMTDoubleState:
Cmd:%s,
SubCmd:%s,
- IsDouble:%d
+ IsDouble:%d,
+ OldDouble:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.IsDouble
+ self.IsDouble,
+ self.OldDouble
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 0b8801e..07bb7b7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3589,6 +3589,7 @@
#封魔坛
Def_Player_Dict_FMTDouble = "FMTDouble" # 封魔坛是否双倍
+Def_Player_Dict_FMTOldDouble = "FMTOldDouble" # 封魔坛是否曾经可以双倍
#极品白拿
Def_PDict_FreeGoodsOpenTime = "FreeGoodsOpenTime" #极品白拿开启时间
@@ -4479,7 +4480,8 @@
Def_VerFix_ChatBubbleBox, # 1.2版本购买VIP礼包可获得激活气泡框道具,针对已购买过VIP礼包的老号处理;
Def_VerFix_CTGDoublePrize, # 1.2版本开放首充双倍,重置老号充值ID对应累计充值次数;
Def_VerFix_RuneSource, # 修复老号双属性符印的获取途径;
-) = range(3)
+Def_VerFix_FMTDouble, # 1.3版本VIP特权变更,记录切换版本前的VIP特权(封魔坛双倍挑战);
+) = range(4)
##==================================================================================================
#游戏消费点类型定义
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 76a608e..d75c677 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -24669,6 +24669,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("IsDouble", c_ubyte), #是否双倍
+ ("OldDouble", c_ubyte), #是否曾经允许双倍
]
def __init__(self):
@@ -24686,6 +24687,7 @@
self.Cmd = 0xB2
self.SubCmd = 0x01
self.IsDouble = 0
+ self.OldDouble = 0
return
def GetLength(self):
@@ -24698,12 +24700,14 @@
DumpString = '''// B2 01 通知封魔坛双倍击杀状态 //tagMCFMTDoubleState:
Cmd:%s,
SubCmd:%s,
- IsDouble:%d
+ IsDouble:%d,
+ OldDouble:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.IsDouble
+ self.IsDouble,
+ self.OldDouble
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index 8b8ebcd..afaf44b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -1894,6 +1894,10 @@
return
encourageCost = eval(ipyData.GetMoneyCount())
+ if curMapID == ChConfig.Def_FBMapID_SealDemon:
+ isDouble = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FMTDouble)
+ if isDouble: #封魔坛双倍挑战则鼓舞双倍花费
+ encourageCost *= 2
costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, encourageType, encourageCost)
if not costMoneyList:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py
index 7fc9b3d..17c5a8e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py
@@ -48,6 +48,18 @@
g_npcHurtDict = {}
+
+def OnFBPlayerOnLogin(curPlayer):
+ if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_FMTDouble):
+ GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_FMTDouble, 1)
+ needViplv = IpyGameDataPY.GetFuncCfg('DemonJarSpecial')
+ if curPlayer.GetVIPLv() >= needViplv:
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FMTOldDouble, 1)
+ GameWorld.DebugLog('1.3版本前可以双倍挑战')
+ NotifyFMTDouble(curPlayer)
+ return
+
+
## 是否能够通过活动查询进入
# @param curPlayer 玩家实例
# @param mapID 地图ID
@@ -702,7 +714,7 @@
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(playerIndex)
if GameWorld.GetMap().GetMapID() == ChConfig.Def_FBMapID_SealDemon:
return
- if not PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_FMTDouble):
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FMTOldDouble) and not PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_FMTDouble):
return
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FMTDouble, clientData.IsDouble)
NotifyFMTDouble(curPlayer)
@@ -711,6 +723,7 @@
def NotifyFMTDouble(curPlayer):
packData = ChPyNetSendPack.tagMCFMTDoubleState()
packData.IsDouble = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FMTDouble)
+ packData.OldDouble = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FMTOldDouble)
NetPackCommon.SendFakePack(curPlayer, packData)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index c4d6f05..173b225 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -524,7 +524,6 @@
#仙魔之争
GameLogic_XMZZ.OnXMZZLogin(curPlayer)
PlayerOnlinePrize.OnPlayerLogin(curPlayer)
- GameLogic_SealDemon.NotifyFMTDouble(curPlayer)
#装备分解
PlayerEquipDecompose.PlayerLogin(curPlayer)
#防沉迷
--
Gitblit v1.8.0