From 061310cd9cb46af344fa429b5f3f605f7bbb5046 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 19 十一月 2018 19:21:40 +0800
Subject: [PATCH] 4740 子 【开发】【1.3】通过多倍修行点额外获得的修行点有上限限制(每日)
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py | 1
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py | 7 ++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py | 24 +++++++-----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 19 +++++++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 7 ++-
PySysDB/PySysDBPY.h | 1
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 19 +++++++--
PySysDB/PySysDBG.h | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 1
9 files changed, 58 insertions(+), 22 deletions(-)
diff --git a/PySysDB/PySysDBG.h b/PySysDB/PySysDBG.h
index d3a3ae1..d8c671f 100644
--- a/PySysDB/PySysDBG.h
+++ b/PySysDB/PySysDBG.h
@@ -329,6 +329,7 @@
dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
WORD Multiple; //倍数
WORD LVLimit; //限制等级
+ DWORD PointLimit; //限制额外修行点
};
//限时抢购表
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index d8533b7..9ae2877 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1238,6 +1238,7 @@
DWORD _CfgID; //配置ID
WORD Multiple; //倍数
WORD LVLimit; //限制等级
+ DWORD PointLimit; //限制额外修行点
};
//宗门试炼兑换表
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index eab7e6f..76a608e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -5197,6 +5197,7 @@
EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
Multiple = 0 #(BYTE Multiple)// 倍数
LimitLV = 0 #(WORD LimitLV)// 限制等级
+ LimitPoint = 0 #(DWORD LimitPoint)// 限制获得修行点
data = None
def __init__(self):
@@ -5212,6 +5213,7 @@
self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
self.Multiple,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.LimitPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -5223,6 +5225,7 @@
self.EndtDate = ""
self.Multiple = 0
self.LimitLV = 0
+ self.LimitPoint = 0
return
def GetLength(self):
@@ -5232,6 +5235,7 @@
length += 10
length += 1
length += 2
+ length += 4
return length
@@ -5242,6 +5246,7 @@
data = CommFunc.WriteString(data, 10, self.EndtDate)
data = CommFunc.WriteBYTE(data, self.Multiple)
data = CommFunc.WriteWORD(data, self.LimitLV)
+ data = CommFunc.WriteDWORD(data, self.LimitPoint)
return data
def OutputString(self):
@@ -5250,14 +5255,16 @@
StartDate:%s,
EndtDate:%s,
Multiple:%d,
- LimitLV:%d
+ LimitLV:%d,
+ LimitPoint:%d
'''\
%(
self.Head.OutputString(),
self.StartDate,
self.EndtDate,
self.Multiple,
- self.LimitLV
+ self.LimitLV,
+ self.LimitPoint
)
return DumpString
@@ -11089,6 +11096,7 @@
("RealmPoint", c_int), # 可领取修行点
("StageIndex", c_ubyte), # 当前阶段索引
("AwardRecord", c_int), # 领奖记录 按位存储
+ ("ExtraPoint", c_int), # 多倍活动获得的额外修行点
]
def __init__(self):
@@ -11109,6 +11117,7 @@
self.RealmPoint = 0
self.StageIndex = 0
self.AwardRecord = 0
+ self.ExtraPoint = 0
return
def GetLength(self):
@@ -11124,7 +11133,8 @@
CurValue:%d,
RealmPoint:%d,
StageIndex:%d,
- AwardRecord:%d
+ AwardRecord:%d,
+ ExtraPoint:%d
'''\
%(
self.Cmd,
@@ -11132,7 +11142,8 @@
self.CurValue,
self.RealmPoint,
self.StageIndex,
- self.AwardRecord
+ self.AwardRecord,
+ self.ExtraPoint
)
return DumpString
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index ca3a496..70ac533 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -539,6 +539,7 @@
multiRealmPointInfo.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
multiRealmPointInfo.Multiple = ipyData.GetMultiple()
multiRealmPointInfo.LimitLV = ipyData.GetLVLimit()
+ multiRealmPointInfo.LimitPoint = ipyData.GetPointLimit()
if not curPlayer:
# 全服广播在线玩家
playerManager = GameWorld.GetPlayerManager()
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
index 0f0d821..73b4329 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -287,6 +287,7 @@
("dict", "NotifyInfoEnd", 0),
("WORD", "Multiple", 0),
("WORD", "LVLimit", 0),
+ ("DWORD", "PointLimit", 0),
),
"ActFlashSale":(
@@ -868,7 +869,8 @@
self.NotifyInfoStart = {}
self.NotifyInfoEnd = {}
self.Multiple = 0
- self.LVLimit = 0
+ self.LVLimit = 0
+ self.PointLimit = 0
return
def GetCfgID(self): return self.CfgID # 配置ID
@@ -881,7 +883,8 @@
def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
def GetMultiple(self): return self.Multiple # 倍数
- def GetLVLimit(self): return self.LVLimit # 限制等级
+ def GetLVLimit(self): return self.LVLimit # 限制等级
+ def GetPointLimit(self): return self.PointLimit # 限制额外修行点
# 限时抢购表
class IPY_ActFlashSale():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 9a7a963..0b8801e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3725,6 +3725,7 @@
Def_PDict_ActivityAwardRecord = "ActivityAwardRecord" # 活跃度奖励领取记录,按二进制位标识
Def_PDict_Activity_AwardStage = "Activity_AwardStage" # 当前活跃奖励阶段
Def_PDict_Activity_RealmPoint = "Activity_RealmPoint" # 当前可领修行点
+Def_PDict_Activity_ExtraRealmPoint = "Activity_ExtraRealmPoint" # 多倍活动额外获得的修行点
# 每日活动
Def_PDict_DailyActionDayTimes = "DailyActionDayTimes_%s" # 每日活动今日完成次数 参数每日活动ID
Def_PDict_DailyActionWeekTimes = "DailyActionWeekTimes_%s" # 每日活动本周完成次数 参数每日活动ID
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index eab7e6f..76a608e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -5197,6 +5197,7 @@
EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
Multiple = 0 #(BYTE Multiple)// 倍数
LimitLV = 0 #(WORD LimitLV)// 限制等级
+ LimitPoint = 0 #(DWORD LimitPoint)// 限制获得修行点
data = None
def __init__(self):
@@ -5212,6 +5213,7 @@
self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
self.Multiple,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.LimitPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -5223,6 +5225,7 @@
self.EndtDate = ""
self.Multiple = 0
self.LimitLV = 0
+ self.LimitPoint = 0
return
def GetLength(self):
@@ -5232,6 +5235,7 @@
length += 10
length += 1
length += 2
+ length += 4
return length
@@ -5242,6 +5246,7 @@
data = CommFunc.WriteString(data, 10, self.EndtDate)
data = CommFunc.WriteBYTE(data, self.Multiple)
data = CommFunc.WriteWORD(data, self.LimitLV)
+ data = CommFunc.WriteDWORD(data, self.LimitPoint)
return data
def OutputString(self):
@@ -5250,14 +5255,16 @@
StartDate:%s,
EndtDate:%s,
Multiple:%d,
- LimitLV:%d
+ LimitLV:%d,
+ LimitPoint:%d
'''\
%(
self.Head.OutputString(),
self.StartDate,
self.EndtDate,
self.Multiple,
- self.LimitLV
+ self.LimitLV,
+ self.LimitPoint
)
return DumpString
@@ -11089,6 +11096,7 @@
("RealmPoint", c_int), # 可领取修行点
("StageIndex", c_ubyte), # 当前阶段索引
("AwardRecord", c_int), # 领奖记录 按位存储
+ ("ExtraPoint", c_int), # 多倍活动获得的额外修行点
]
def __init__(self):
@@ -11109,6 +11117,7 @@
self.RealmPoint = 0
self.StageIndex = 0
self.AwardRecord = 0
+ self.ExtraPoint = 0
return
def GetLength(self):
@@ -11124,7 +11133,8 @@
CurValue:%d,
RealmPoint:%d,
StageIndex:%d,
- AwardRecord:%d
+ AwardRecord:%d,
+ ExtraPoint:%d
'''\
%(
self.Cmd,
@@ -11132,7 +11142,8 @@
self.CurValue,
self.RealmPoint,
self.StageIndex,
- self.AwardRecord
+ self.AwardRecord,
+ self.ExtraPoint
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 43efa2d..88ab5e5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -988,6 +988,7 @@
("DWORD", "CfgID", 1),
("WORD", "Multiple", 0),
("WORD", "LVLimit", 0),
+ ("DWORD", "PointLimit", 0),
),
"TrialExchange":(
@@ -3104,12 +3105,14 @@
def __init__(self):
self.CfgID = 0
self.Multiple = 0
- self.LVLimit = 0
+ self.LVLimit = 0
+ self.PointLimit = 0
return
def GetCfgID(self): return self.CfgID # 配置ID
def GetMultiple(self): return self.Multiple # 倍数
- def GetLVLimit(self): return self.LVLimit # 限制等级
+ def GetLVLimit(self): return self.LVLimit # 限制等级
+ def GetPointLimit(self): return self.PointLimit # 限制额外修行点
# 宗门试炼兑换表
class IPY_TrialExchange():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
index 632f29d..33bb1cc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -232,30 +232,33 @@
multiple = 1
if addValue:
#__SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, nuwTotalPoint)
- multiple = __GetActionAddPer(curPlayer)
- addValue *= multiple
+ 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
realmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
__SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint, realmPoint+addValue)
SyncDailyActivityInfo(curPlayer)
- GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s"
- % (activityNum, addPbCnt, addValue, multiple), curPlayer.GetPlayerID())
+ GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s, addExtraPoint=%s,curExtraPoint=%s"
+ % (activityNum, addPbCnt, addValue, multiple, addExtraPoint, curExtraPoint), curPlayer.GetPlayerID())
return
def __GetActionAddPer(curPlayer):
- multiple = 1
+ multiple, extraPointLimit = 1, 0 #倍数、额外可获得修行点上限
actRealmPointInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_RealmPoint, {})# 多倍修行点活动
if not actRealmPointInfo:
- return multiple
+ return multiple, extraPointLimit
if not actRealmPointInfo.get(ShareDefine.ActKey_State):
- return multiple
+ return multiple, extraPointLimit
actRealmPointIpyData = IpyGameDataPY.GetIpyGameData("ActRealmPoint", actRealmPointInfo.get(ShareDefine.ActKey_CfgID, 0))
if not actRealmPointIpyData:
- return multiple
+ return multiple, extraPointLimit
if curPlayer.GetLV() < actRealmPointIpyData.GetLVLimit():
- return multiple
- return actRealmPointIpyData.GetMultiple()
+ return multiple, extraPointLimit
+ return actRealmPointIpyData.GetMultiple(), actRealmPointIpyData.GetPointLimit()
## 同步活跃度信息
# @param curPlayer
@@ -268,6 +271,7 @@
sendPack.StageIndex = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AwardStage)
sendPack.AwardRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord)
sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
+ sendPack.ExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
NetPackCommon.SendFakePack(curPlayer, sendPack)
return
--
Gitblit v1.8.0