From 789490b7d362160f7fca4580df6176498e1eb271 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 15 十一月 2024 15:19:13 +0800
Subject: [PATCH] 10302 【越南】【英语】【砍树】【tqxbqy】【btgotq】仙缘-服务端
---
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py | 28 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py | 61 +++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 38 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py | 7
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 38 ++
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldMineArea.py | 9
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 56 +++-
PySysDB/PySysDBPY.h | 12 +
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMineArea.py | 18 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py | 47 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py | 49 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py | 97 +++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py | 106 ++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py | 8
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py | 7
PySysDB/PySysDBG.h | 9
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 21 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py | 9
30 files changed, 563 insertions(+), 104 deletions(-)
diff --git a/PySysDB/PySysDBG.h b/PySysDB/PySysDBG.h
index 0d0fe41..c5c3980 100644
--- a/PySysDB/PySysDBG.h
+++ b/PySysDB/PySysDBG.h
@@ -1215,9 +1215,6 @@
BYTE ActNum; //活动分组编号, 活动类型 * 10 + 不同界面编号
char StartDate; //开启日期
char EndDate; //结束日期
- dict NotifyInfoStart; //全服提示信息 - 相对开始时间
- dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
- list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
BYTE IsDayReset; //是否每天重置
BYTE ResetType; //重置类型,0-0点重置;1-5点重置
};
@@ -1232,9 +1229,6 @@
BYTE ActNum; //活动分组编号, 活动类型 * 10 + 不同界面编号
char StartDate; //开启日期
char EndDate; //结束日期
- dict NotifyInfoStart; //全服提示信息 - 相对开始时间
- dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
- list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
BYTE IsDayReset; //是否每天重置
BYTE ResetType; //重置类型,0-0点重置;1-5点重置
};
@@ -1249,9 +1243,6 @@
BYTE ActNum; //活动分组编号, 活动类型 * 10 + 不同界面编号
char StartDate; //开启日期
char EndDate; //结束日期
- dict NotifyInfoStart; //全服提示信息 - 相对开始时间
- dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
- list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
};
//登录奖励时间表
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 003bac0..d42e417 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -2704,6 +2704,9 @@
DWORD _CfgID; //配置ID
char StartDate; //开启日期
char EndDate; //结束日期
+ WORD RelateFuncID; //关联功能ID
+ BYTE FuncActDays; //功能活动天数
+ BYTE FuncLoop; //功能是否循环
WORD LVLimit; //限制等级
BYTE IsDayReset; //是否每天重置
BYTE ResetType; //重置类型,0-0点重置;1-5点重置
@@ -2720,6 +2723,9 @@
DWORD _CfgID; //配置ID
char StartDate; //开启日期
char EndDate; //结束日期
+ WORD RelateFuncID; //关联功能ID
+ BYTE FuncActDays; //功能活动天数
+ BYTE FuncLoop; //功能是否循环
WORD LVLimit; //限制等级
BYTE IsDayReset; //是否每天重置
BYTE ResetType; //重置类型,0-0点重置;1-5点重置
@@ -2745,9 +2751,14 @@
DWORD _CfgID; //配置ID
char StartDate; //开启日期
char EndDate; //结束日期
+ WORD RelateFuncID; //关联功能ID
+ BYTE FuncActDays; //功能活动天数
+ BYTE FuncLoop; //功能是否循环
WORD LVLimit; //限制等级
list RepSignCostMoneyInfo; //补签消耗货币类型数量
BYTE TemplateID; //登录奖励模板编号
+ WORD AwardExCTGID; //扩展奖励礼包充值ID
+ WORD ActZhanlingType; //关联活动战令类型
};
//登录活动奖励模板表新
@@ -2757,6 +2768,7 @@
BYTE _TemplateID; //模板ID
BYTE DayNum; //第X天从1开始
list LoginAwardItemList; //奖励列表[[物品ID,个数,是否拍品], ...]
+ list LoginAwardItemListEx; //扩展奖励列表[[物品ID,个数,是否拍品], ...]
};
//登录奖励时间表
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 2c3f608..491dae1 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -38104,6 +38104,8 @@
DayNum = 0 #(BYTE DayNum)//天编号,从1开始,过期未签到领取的天可消耗货币补签领取
Count = 0 #(BYTE Count)// 奖励物品数
AwardItemList = list() #(vector<tagMCActLoginNewItem> AwardItemList)// 奖励物品列表
+ CountEx = 0 #(BYTE CountEx)// 额外奖励物品数
+ AwardItemListEx = list() #(vector<tagMCActLoginNewItem> AwardItemListEx)// 额外奖励物品列表
data = None
def __init__(self):
@@ -38118,12 +38120,19 @@
temAwardItemList = tagMCActLoginNewItem()
_pos = temAwardItemList.ReadData(_lpData, _pos)
self.AwardItemList.append(temAwardItemList)
+ self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.CountEx):
+ temAwardItemListEx = tagMCActLoginNewItem()
+ _pos = temAwardItemListEx.ReadData(_lpData, _pos)
+ self.AwardItemListEx.append(temAwardItemListEx)
return _pos
def Clear(self):
self.DayNum = 0
self.Count = 0
self.AwardItemList = list()
+ self.CountEx = 0
+ self.AwardItemListEx = list()
return
def GetLength(self):
@@ -38132,6 +38141,9 @@
length += 1
for i in range(self.Count):
length += self.AwardItemList[i].GetLength()
+ length += 1
+ for i in range(self.CountEx):
+ length += self.AwardItemListEx[i].GetLength()
return length
@@ -38141,17 +38153,24 @@
data = CommFunc.WriteBYTE(data, self.Count)
for i in range(self.Count):
data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.CountEx)
+ for i in range(self.CountEx):
+ data = CommFunc.WriteString(data, self.AwardItemListEx[i].GetLength(), self.AwardItemListEx[i].GetBuffer())
return data
def OutputString(self):
DumpString = '''
DayNum:%d,
Count:%d,
- AwardItemList:%s
+ AwardItemList:%s,
+ CountEx:%d,
+ AwardItemListEx:%s
'''\
%(
self.DayNum,
self.Count,
+ "...",
+ self.CountEx,
"..."
)
return DumpString
@@ -38165,6 +38184,7 @@
LimitLV = 0 #(WORD LimitLV)// 限制等级
RepSignMoneyType = 0 #(BYTE RepSignMoneyType)// 补签消耗货币类型
RepSignMoneyValue = 0 #(DWORD RepSignMoneyValue)// 补签消耗货币值
+ AwardExCTGID = 0 #(WORD AwardExCTGID)// 扩展奖励礼包充值ID,大于0时代表可以购买礼包每日登录可领取额外奖励
DayCount = 0 #(BYTE DayCount)
AwardDayList = list() #(vector<tagMCActLoginNewDay> AwardDayList)// 奖励天列表
data = None
@@ -38184,6 +38204,7 @@
self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.RepSignMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.RepSignMoneyValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.AwardExCTGID,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.DayCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.DayCount):
temAwardDayList = tagMCActLoginNewDay()
@@ -38202,6 +38223,7 @@
self.LimitLV = 0
self.RepSignMoneyType = 0
self.RepSignMoneyValue = 0
+ self.AwardExCTGID = 0
self.DayCount = 0
self.AwardDayList = list()
return
@@ -38215,6 +38237,7 @@
length += 2
length += 1
length += 4
+ length += 2
length += 1
for i in range(self.DayCount):
length += self.AwardDayList[i].GetLength()
@@ -38230,6 +38253,7 @@
data = CommFunc.WriteWORD(data, self.LimitLV)
data = CommFunc.WriteBYTE(data, self.RepSignMoneyType)
data = CommFunc.WriteDWORD(data, self.RepSignMoneyValue)
+ data = CommFunc.WriteWORD(data, self.AwardExCTGID)
data = CommFunc.WriteBYTE(data, self.DayCount)
for i in range(self.DayCount):
data = CommFunc.WriteString(data, self.AwardDayList[i].GetLength(), self.AwardDayList[i].GetBuffer())
@@ -38244,6 +38268,7 @@
LimitLV:%d,
RepSignMoneyType:%d,
RepSignMoneyValue:%d,
+ AwardExCTGID:%d,
DayCount:%d,
AwardDayList:%s
'''\
@@ -38255,6 +38280,7 @@
self.LimitLV,
self.RepSignMoneyType,
self.RepSignMoneyValue,
+ self.AwardExCTGID,
self.DayCount,
"..."
)
@@ -38274,7 +38300,8 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("ActNum", c_ubyte), # 活动编号
- ("LoginAward", c_int), # 是否已领取,按天索引0代表第1天记录当天是否已领取
+ ("LoginAward", c_int), # 普通奖励领取记录,按天对应二进制位记录是否已领取
+ ("LoginAwardEx", c_int), # 额外奖励领取记录,按天对应二进制位记录是否已领取
]
def __init__(self):
@@ -38293,6 +38320,7 @@
self.SubCmd = 0x70
self.ActNum = 0
self.LoginAward = 0
+ self.LoginAwardEx = 0
return
def GetLength(self):
@@ -38306,13 +38334,15 @@
Cmd:%s,
SubCmd:%s,
ActNum:%d,
- LoginAward:%d
+ LoginAward:%d,
+ LoginAwardEx:%d
'''\
%(
self.Cmd,
self.SubCmd,
self.ActNum,
- self.LoginAward
+ self.LoginAward,
+ self.LoginAwardEx
)
return DumpString
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldMineArea.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldMineArea.py
index 85cc3ce..ff7dc79 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldMineArea.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldMineArea.py
@@ -869,7 +869,7 @@
robPlayerID = mineItemData.RobPlayerID
# 赶走抢夺者
if robPlayerID and robPlayerID == tagPlayerID:
- __DoCancelPull(tagPlayerID, areaPlayerID, itemIndex)
+ __DoCancelPull(tagPlayerID, areaPlayerID, itemIndex, "out")
# 帮助的发奖
if funcLineID == 0:
@@ -926,7 +926,7 @@
return
if workerCount <= 0:
if not isPreview:
- __DoCancelPull(playerID, areaPlayerID, itemIndex)
+ __DoCancelPull(playerID, areaPlayerID, itemIndex, "cancel")
return
GameWorld.DebugLog("请求福地拉物品! areaPlayerID=%s,itemIndex=%s,workerCount=%s,workerState=%s,workerTotal=%s,isPreview=%s"
% (areaPlayerID, itemIndex, workerCount, workerState, workerTotal, isPreview), playerID)
@@ -1019,7 +1019,7 @@
SyncMineAreaItemInfo(areaPlayerID, [itemIndex], notifyPlayerIDListEx)
return
-def __DoCancelPull(playerID, areaPlayerID, itemIndex):
+def __DoCancelPull(playerID, areaPlayerID, itemIndex, reason=""):
## 取消拉取
mineItemMgr = PyDataManager.GetDBPyMineAreaItemManager()
mineItemData = mineItemMgr.GetMineItem(areaPlayerID, itemIndex)
@@ -1054,6 +1054,9 @@
__RefreshMineItemSpeed(mineItemData, True)
SyncMineAreaItemInfo(areaPlayerID, [itemIndex], notifyPlayerIDListEx)
+ curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
+ if curPlayer:
+ MapServer_QueryPlayerResult(curPlayer, "MineAreaCancelPull", [areaPlayerID, reason])
return
def __DoMineItemRefresh(areaPlayerID, areaPlayer=None, isSys=False, isSuper=False, isNotify=True, refreshIndexList=None, setPosition=None, setItemLV=None, setMineID=None):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
index 1eb464e..716a2af 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -975,9 +975,6 @@
("BYTE", "ActNum", 0),
("char", "StartDate", 0),
("char", "EndDate", 0),
- ("dict", "NotifyInfoStart", 0),
- ("dict", "NotifyInfoEnd", 0),
- ("list", "NotifyInfoLoop", 0),
("BYTE", "IsDayReset", 0),
("BYTE", "ResetType", 0),
),
@@ -989,9 +986,6 @@
("BYTE", "ActNum", 0),
("char", "StartDate", 0),
("char", "EndDate", 0),
- ("dict", "NotifyInfoStart", 0),
- ("dict", "NotifyInfoEnd", 0),
- ("list", "NotifyInfoLoop", 0),
("BYTE", "IsDayReset", 0),
("BYTE", "ResetType", 0),
),
@@ -1003,9 +997,6 @@
("BYTE", "ActNum", 0),
("char", "StartDate", 0),
("char", "EndDate", 0),
- ("dict", "NotifyInfoStart", 0),
- ("dict", "NotifyInfoEnd", 0),
- ("list", "NotifyInfoLoop", 0),
),
"ActLoginAward":(
@@ -2613,11 +2604,8 @@
def GetActNum(self): return self.attrTuple[3] # 活动分组编号, 活动类型 * 10 + 不同界面编号 BYTE
def GetStartDate(self): return self.attrTuple[4] # 开启日期 char
def GetEndDate(self): return self.attrTuple[5] # 结束日期 char
- def GetNotifyInfoStart(self): return self.attrTuple[6] # 全服提示信息 - 相对开始时间 dict
- def GetNotifyInfoEnd(self): return self.attrTuple[7] # 全服提示信息 - 相对结束时间 dict
- def GetNotifyInfoLoop(self): return self.attrTuple[8] # 全服提示信息 - 循环广播[间隔分钟, 广播key] list
- def GetIsDayReset(self): return self.attrTuple[9] # 是否每天重置 BYTE
- def GetResetType(self): return self.attrTuple[10] # 重置类型,0-0点重置;1-5点重置 BYTE
+ def GetIsDayReset(self): return self.attrTuple[6] # 是否每天重置 BYTE
+ def GetResetType(self): return self.attrTuple[7] # 重置类型,0-0点重置;1-5点重置 BYTE
# 任务活动时间表
class IPY_ActTask():
@@ -2632,11 +2620,8 @@
def GetActNum(self): return self.attrTuple[3] # 活动分组编号, 活动类型 * 10 + 不同界面编号 BYTE
def GetStartDate(self): return self.attrTuple[4] # 开启日期 char
def GetEndDate(self): return self.attrTuple[5] # 结束日期 char
- def GetNotifyInfoStart(self): return self.attrTuple[6] # 全服提示信息 - 相对开始时间 dict
- def GetNotifyInfoEnd(self): return self.attrTuple[7] # 全服提示信息 - 相对结束时间 dict
- def GetNotifyInfoLoop(self): return self.attrTuple[8] # 全服提示信息 - 循环广播[间隔分钟, 广播key] list
- def GetIsDayReset(self): return self.attrTuple[9] # 是否每天重置 BYTE
- def GetResetType(self): return self.attrTuple[10] # 重置类型,0-0点重置;1-5点重置 BYTE
+ def GetIsDayReset(self): return self.attrTuple[6] # 是否每天重置 BYTE
+ def GetResetType(self): return self.attrTuple[7] # 重置类型,0-0点重置;1-5点重置 BYTE
# 登录活动奖励时间表新
class IPY_ActLoginNew():
@@ -2650,10 +2635,7 @@
def GetServerGroupIDList(self): return self.attrTuple[2] # 服务器ID列表 list
def GetActNum(self): return self.attrTuple[3] # 活动分组编号, 活动类型 * 10 + 不同界面编号 BYTE
def GetStartDate(self): return self.attrTuple[4] # 开启日期 char
- def GetEndDate(self): return self.attrTuple[5] # 结束日期 char
- def GetNotifyInfoStart(self): return self.attrTuple[6] # 全服提示信息 - 相对开始时间 dict
- def GetNotifyInfoEnd(self): return self.attrTuple[7] # 全服提示信息 - 相对结束时间 dict
- def GetNotifyInfoLoop(self): return self.attrTuple[8] # 全服提示信息 - 循环广播[间隔分钟, 广播key] list
+ def GetEndDate(self): return self.attrTuple[5] # 结束日期 char
# 登录奖励时间表
class IPY_ActLoginAward():
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 0fca079..f97d5d3 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -1156,7 +1156,9 @@
CDBPlayerRefresh_TiandaoFruit, # 天道果 267
CDBPlayerRefresh_Tuijinbi, # 推金币 268
CDBPlayerRefresh_PayCoinDay, # 代币时效 269
-) = range(146, 270)
+CDBPlayerRefresh_XianyuanScore, # 仙缘积分 270
+CDBPlayerRefresh_HuanjinggeScore, # 幻境阁积分 271
+) = range(146, 272)
TYPE_Price_Gold_Paper_Money = 5 # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
@@ -1192,6 +1194,9 @@
TYPE_Price_HorsePetTrainScore = 45 # 骑宠养成积分
TYPE_Price_GubaoTrainScore = 46 # 古宝养成积分
TYPE_Price_TiandaoFruit = 47 # 天道果
+TYPE_Price_Tuijinbi = 48 # 推金币
+TYPE_Price_XianyuanScore = 49 # 仙缘积分
+TYPE_Price_HuanjinggeScore = 50 # 幻境阁积分
TYPE_Price_PayCoinDay = 98 # 代币时效,每日过天重置
TYPE_Price_PayCoin = 99 # 代币
@@ -1201,6 +1206,7 @@
16:"助战积分", 18:"荣誉", 19:"Boss积分", 23:"符印精华", 24:"符印碎片", 25:"寻宝积分", 26:"集市额度", 27:"丹精", 28:"魂尘",
29:"聚魂碎片", 30:"核心环", 31:"功能特权令", 32:"环保值", 33:"GM令", 34:"古神币", 35:"功德点",
39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 46:"古宝养成积分", 47:"天道果",
+ 49:"仙缘积分", 50:"幻境阁积分",
98:"代币时效", 99:"代币"
}
@@ -1241,6 +1247,8 @@
TYPE_Price_HorsePetTrainScore:CDBPlayerRefresh_HorsePetTrainScore,
TYPE_Price_GubaoTrainScore:CDBPlayerRefresh_GubaoTrainScore,
TYPE_Price_TiandaoFruit:CDBPlayerRefresh_TiandaoFruit,
+ TYPE_Price_XianyuanScore:CDBPlayerRefresh_XianyuanScore,
+ TYPE_Price_HuanjinggeScore:CDBPlayerRefresh_HuanjinggeScore,
TYPE_Price_PayCoinDay:CDBPlayerRefresh_PayCoinDay,
}
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 432d841..59a09fc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4189,6 +4189,7 @@
#登录活动新
Def_PDict_ActLoginNewID = "ActLoginNewID_%s" # 玩家身上的活动ID,唯一标识,取活动开始日期time值,参数:(活动编号)
Def_PDict_ActLoginNewAward = "ActLoginNewAward_%s" # 登录活动奖励记录,按位记录登录天是否已领取,参数:(活动编号)
+Def_PDict_ActLoginNewAwardEx = "ActLoginNewAwardEx_%s" # 登录活动额外奖励记录,按位记录登录天是否已领取,参数:(活动编号)
#任务活动
Def_PDict_ActTaskID = "ActTaskID_%s" # 玩家身上的活动ID,唯一标识,取活动开始日期time值,参数:(活动编号)
@@ -6208,7 +6209,25 @@
ActTaskType_HorseTrainItem3, # 消耗X个坐骑培养3道具 13
ActTaskType_PetTrainItem3, # 消耗X个灵宠培养3道具 14
ActTaskType_HorsePetActScore, # 获得X点骑宠养成积分 15
-) = range(1, 1 + 15)
+ActTaskType_KillNPC, # 杀怪x次 16
+ActTaskType_TreasureJipin, # 极品寻宝达到x次 17
+ActTaskType_TreasureRune, # 符印寻宝达到x次 18
+ActTaskType_TreasureJueshi, # 绝世寻宝达到x次 19
+ActTaskType_TreasureGatherTheSoul, # 猎魔寻宝达到x次 20
+ActTaskType_GubaoLVUp, # 古宝升级X次 21
+ActTaskType_GubaoStarUp, # 古宝升星X次 22
+ActTaskType_Sign, # 签到X次 23
+ActTaskType_MoneyPray, # 灵石祈愿X次 24
+ActTaskType_ExpPray, # 修为祈愿X次 25
+ActTaskType_Arena, # 竞技场挑战X次 26
+ActTaskType_MineAreaEndSelf, # 福地完成采集自己道具X次 27
+ActTaskType_MineAreaEndOther, # 福地完成采集他人道具X次 28
+ActTaskType_FruitStoveEatTimes, # 服用丹药X次 29
+ActTaskType_SkyTower, # 天星塔X次 30
+ActTaskType_FMT, # 封魔坛X次 31
+ActTaskType_EquipPlus, # 装备强化X次 32
+ActTaskType_EquipWash, # 装备洗炼X次 33
+) = range(1, 1 + 33)
# 套装枚举,普通套装,强化套装
(EquipSuitType_Normal,
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 2c3f608..491dae1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -38104,6 +38104,8 @@
DayNum = 0 #(BYTE DayNum)//天编号,从1开始,过期未签到领取的天可消耗货币补签领取
Count = 0 #(BYTE Count)// 奖励物品数
AwardItemList = list() #(vector<tagMCActLoginNewItem> AwardItemList)// 奖励物品列表
+ CountEx = 0 #(BYTE CountEx)// 额外奖励物品数
+ AwardItemListEx = list() #(vector<tagMCActLoginNewItem> AwardItemListEx)// 额外奖励物品列表
data = None
def __init__(self):
@@ -38118,12 +38120,19 @@
temAwardItemList = tagMCActLoginNewItem()
_pos = temAwardItemList.ReadData(_lpData, _pos)
self.AwardItemList.append(temAwardItemList)
+ self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.CountEx):
+ temAwardItemListEx = tagMCActLoginNewItem()
+ _pos = temAwardItemListEx.ReadData(_lpData, _pos)
+ self.AwardItemListEx.append(temAwardItemListEx)
return _pos
def Clear(self):
self.DayNum = 0
self.Count = 0
self.AwardItemList = list()
+ self.CountEx = 0
+ self.AwardItemListEx = list()
return
def GetLength(self):
@@ -38132,6 +38141,9 @@
length += 1
for i in range(self.Count):
length += self.AwardItemList[i].GetLength()
+ length += 1
+ for i in range(self.CountEx):
+ length += self.AwardItemListEx[i].GetLength()
return length
@@ -38141,17 +38153,24 @@
data = CommFunc.WriteBYTE(data, self.Count)
for i in range(self.Count):
data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.CountEx)
+ for i in range(self.CountEx):
+ data = CommFunc.WriteString(data, self.AwardItemListEx[i].GetLength(), self.AwardItemListEx[i].GetBuffer())
return data
def OutputString(self):
DumpString = '''
DayNum:%d,
Count:%d,
- AwardItemList:%s
+ AwardItemList:%s,
+ CountEx:%d,
+ AwardItemListEx:%s
'''\
%(
self.DayNum,
self.Count,
+ "...",
+ self.CountEx,
"..."
)
return DumpString
@@ -38165,6 +38184,7 @@
LimitLV = 0 #(WORD LimitLV)// 限制等级
RepSignMoneyType = 0 #(BYTE RepSignMoneyType)// 补签消耗货币类型
RepSignMoneyValue = 0 #(DWORD RepSignMoneyValue)// 补签消耗货币值
+ AwardExCTGID = 0 #(WORD AwardExCTGID)// 扩展奖励礼包充值ID,大于0时代表可以购买礼包每日登录可领取额外奖励
DayCount = 0 #(BYTE DayCount)
AwardDayList = list() #(vector<tagMCActLoginNewDay> AwardDayList)// 奖励天列表
data = None
@@ -38184,6 +38204,7 @@
self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.RepSignMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.RepSignMoneyValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.AwardExCTGID,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.DayCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.DayCount):
temAwardDayList = tagMCActLoginNewDay()
@@ -38202,6 +38223,7 @@
self.LimitLV = 0
self.RepSignMoneyType = 0
self.RepSignMoneyValue = 0
+ self.AwardExCTGID = 0
self.DayCount = 0
self.AwardDayList = list()
return
@@ -38215,6 +38237,7 @@
length += 2
length += 1
length += 4
+ length += 2
length += 1
for i in range(self.DayCount):
length += self.AwardDayList[i].GetLength()
@@ -38230,6 +38253,7 @@
data = CommFunc.WriteWORD(data, self.LimitLV)
data = CommFunc.WriteBYTE(data, self.RepSignMoneyType)
data = CommFunc.WriteDWORD(data, self.RepSignMoneyValue)
+ data = CommFunc.WriteWORD(data, self.AwardExCTGID)
data = CommFunc.WriteBYTE(data, self.DayCount)
for i in range(self.DayCount):
data = CommFunc.WriteString(data, self.AwardDayList[i].GetLength(), self.AwardDayList[i].GetBuffer())
@@ -38244,6 +38268,7 @@
LimitLV:%d,
RepSignMoneyType:%d,
RepSignMoneyValue:%d,
+ AwardExCTGID:%d,
DayCount:%d,
AwardDayList:%s
'''\
@@ -38255,6 +38280,7 @@
self.LimitLV,
self.RepSignMoneyType,
self.RepSignMoneyValue,
+ self.AwardExCTGID,
self.DayCount,
"..."
)
@@ -38274,7 +38300,8 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("ActNum", c_ubyte), # 活动编号
- ("LoginAward", c_int), # 是否已领取,按天索引0代表第1天记录当天是否已领取
+ ("LoginAward", c_int), # 普通奖励领取记录,按天对应二进制位记录是否已领取
+ ("LoginAwardEx", c_int), # 额外奖励领取记录,按天对应二进制位记录是否已领取
]
def __init__(self):
@@ -38293,6 +38320,7 @@
self.SubCmd = 0x70
self.ActNum = 0
self.LoginAward = 0
+ self.LoginAwardEx = 0
return
def GetLength(self):
@@ -38306,13 +38334,15 @@
Cmd:%s,
SubCmd:%s,
ActNum:%d,
- LoginAward:%d
+ LoginAward:%d,
+ LoginAwardEx:%d
'''\
%(
self.Cmd,
self.SubCmd,
self.ActNum,
- self.LoginAward
+ self.LoginAward,
+ self.LoginAwardEx
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
index 2cef80f..5e24d61 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
@@ -29,6 +29,7 @@
import PlayerSuccess
import IpyGameDataPY
import PlayerActLogin
+import PlayerActTask
import GameWorld
import ChConfig
import ChEquip
@@ -158,6 +159,7 @@
PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_EquipPlus, 1)
PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Plus, 1)
PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_Plus, 1)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_EquipPlus)
return
def __EquipMayaPlusChange(curPlayer, packType, curEquip, index, updPlusLV):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
index b13846d..881d5c1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
@@ -26,6 +26,7 @@
import PlayerActGarbageSorting
import DataRecordPack
import PlayerActLogin
+import PlayerActTask
import ShareDefine
import ItemCommon
import ChConfig
@@ -299,6 +300,7 @@
PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_EquipWash, 1)
PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_EquipWash)
PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_Wash, 1)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_EquipWash)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py
index 8fd96e8..e156504 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py
@@ -32,6 +32,7 @@
import PlayerNewFairyCeremony
import PlayerFeastTravel
import PlayerActLogin
+import PlayerActTask
import PlayerWeekParty
import EventShell
#------------------------------------------------------------------------------
@@ -129,6 +130,7 @@
PlayerControl.GiveMoney(curPlayer, giveMoneyType, addMoney, ChConfig.Def_GiveMoney_Pray, addDataDict, False)
PlayerControl.NotifyCode(curPlayer, 'MoneyPray_HowMuch', [addMoney, giveMoneyType])
PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_MoneyPray, 1)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_MoneyPray)
#经验祈愿
elif buyType == ChConfig.VIPPrivilege_ExpPray:
@@ -164,6 +166,7 @@
if not isCostItem: #用物品不增加次数
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_HasPrayCnt % buyType, curCnt + 1)
PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_ExpPray, 1)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_ExpPray)
else:
return
EventShell.EventRespons_Pray(curPlayer, buyType)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py
index 76843f7..9c24f4a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py
@@ -33,6 +33,7 @@
if not msgList:
GameWorld.DebugAnswer(curPlayer, "重置奖励: Zhanling 0 类型")
GameWorld.DebugAnswer(curPlayer, "设置战令: Zhanling 类型 是否激活普通 高级")
+ GameWorld.DebugAnswer(curPlayer, "设置进度: Zhanling v 类型 进度值")
return
value = msgList[0]
@@ -42,6 +43,14 @@
PlayerZhanling.ResetZhanling(curPlayer, zhanlingType, backValue)
GameWorld.DebugAnswer(curPlayer, "重置战令(%s)!" % (zhanlingType))
+ elif value == "v":
+ zhanlingType = msgList[1] if len(msgList) > 1 else 0
+ value1 = msgList[2] if len(msgList) > 2 else 0
+ retValue = PlayerZhanling.SetZhanlingValue(curPlayer, zhanlingType, value1)
+ if retValue == None:
+ GameWorld.DebugAnswer(curPlayer, "该战令不用设置进度值! %s" % (zhanlingType))
+ return
+ GameWorld.DebugAnswer(curPlayer, "战令进度:Type=%s,V=%s" % (zhanlingType, retValue))
else:
zhanlingType = value
activiteC = msgList[1] if len(msgList) > 1 else 0
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index 8bf2cdc..4c9ab35 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -744,6 +744,112 @@
endDateStr = "%d-%d-%d" % (endDateTime.year, endDateTime.month, endDateTime.day)
return startDateStr, endDateStr
+def GetActRelateFuncInfo(curPlayer, actName, actInfo, playerActID):
+ ## 获取活动关联玩家功能开启信息
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ if not cfgID:
+ return
+ ipyData = IpyGameDataPY.GetIpyGameDataNotLog(actName, cfgID)
+ if not ipyData:
+ return
+ if not hasattr(ipyData, "GetRelateFuncID"):
+ return
+ relateFuncID = ipyData.GetRelateFuncID()
+ if not relateFuncID:
+ return
+ funcActDays = ipyData.GetFuncActDays()
+ funcLoop = ipyData.GetFuncLoop()
+
+ playerID = curPlayer.GetPlayerID()
+ isInAct = False # 是否活动中
+ actID = playerActID # 玩家实际的活动ID
+ if not actInfo.get(ShareDefine.ActKey_State, 0):
+ #DebugLog("关联功能非活动中默认不开活动! actName=%s,cfgID=%s" % (actName, cfgID), playerID)
+ return isInAct, actID
+ isOpen = GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_GameFuncFirstTouch, relateFuncID, True)
+ if not isOpen:
+ DebugLog("关联功能未开启默认不开活动! actName=%s,cfgID=%s,relateFuncID=%s" % (actName, cfgID, relateFuncID), playerID)
+ return isInAct, actID
+
+ isDayRest = 0 if not hasattr(ipyData, "GetIsDayReset") else ipyData.GetIsDayReset()
+ actNum = actInfo.get(ShareDefine.ActKey_ActNum)
+ serverTime = GetCurrentTime()
+ newAct = False
+
+ if isDayRest:
+ newAct = True
+ DebugLog("关联功能活动,每日重置的活动! actName=%s,cfgID=%s,relateFuncID=%s" % (actName, cfgID, relateFuncID), playerID)
+
+ elif not playerActID:
+ newAct = True
+ DebugLog("关联功能活动,玩家首次开启活动! actName=%s,cfgID=%s,relateFuncID=%s" % (actName, cfgID, relateFuncID), playerID)
+
+ # 有活动期限的
+ elif funcActDays:
+ startDayDate, endDayDate = GetActRelateFuncDate(ipyData, playerActID)
+ if startDayDate <= serverTime < endDayDate:
+ isInAct = True
+ DebugLog("关联功能活动,正常活动中! actName=%s,cfgID=%s,%s~%s" % (actName, cfgID, startDayDate, endDayDate), playerID)
+ elif serverTime >= endDayDate:
+ if funcLoop:
+ newAct = True
+ DebugLog("关联功能活动,活动结束,重新开始循环新活动! actName=%s,cfgID=%s,%s~%s" % (actName, cfgID, startDayDate, endDayDate), playerID)
+ else:
+ DebugLog("关联功能活动,活动结束,不循环! actName=%s,cfgID=%s,%s~%s" % (actName, cfgID, startDayDate, endDayDate), playerID)
+ else:
+ DebugLog("关联功能活动,玩家活动ID超过当前时间,可能是调时间引起,重新开始循环新活动! actName=%s,cfgID=%s,%s~%s" % (actName, cfgID, startDayDate, endDayDate), playerID)
+ newAct = True
+
+ # 永久的,默认活动中
+ else:
+ isInAct = True
+ DebugLog("关联功能活动,永久开放的活动! actName=%s,cfgID=%s,relateFuncID=%s" % (actName, cfgID, relateFuncID), playerID)
+
+ if newAct:
+ isInAct = True
+ resetType = 0 if not hasattr(ipyData, "GetResetType") else ipyData.GetResetType() # 重置类型,0-0点重置;1-5点重置
+ startDateStr = "%d-%d-%d" % (serverTime.year, serverTime.month, serverTime.day)
+ if resetType == 1:
+ startDayDate = datetime.datetime.strptime("%s 05:00:00" % (startDateStr), ChConfig.TYPE_Time_Format)
+ else:
+ startDayDate = datetime.datetime.strptime("%s 00:00:00" % (startDateStr), ChConfig.TYPE_Time_Format)
+ actID = int(time.mktime(startDayDate.timetuple()))
+
+ DebugLog("关联功能活动! actName=%s,cfgID=%s,actNum=%s,relateFuncID=%s,playerActID=%s,actID=%s,isInAct=%s"
+ % (actName, cfgID, actNum, relateFuncID, playerActID, actID, isInAct), playerID)
+ return isInAct, actID
+
+def GetActRelateFuncDate(ipyData, startTime, returnYmdStr=False):
+ funcActDays = ipyData.GetFuncActDays()
+ isDayRest = 0 if not hasattr(ipyData, "GetIsDayReset") else ipyData.GetIsDayReset()
+ resetType = 0 if not hasattr(ipyData, "GetResetType") else ipyData.GetResetType() # 重置类型,0-0点重置;1-5点重置
+ if isDayRest:
+ funcActDays = 1
+
+ startDayDate = ChangeTimeNumToDatetime(startTime, ChConfig.TYPE_Time_Format)
+ if funcActDays:
+ startDayStr = str(startDayDate)[:10]
+ if resetType == 1:
+ endDayDate = datetime.datetime.strptime("%s 04:59:59" % (startDayStr), ChConfig.TYPE_Time_Format) + datetime.timedelta(days=funcActDays)
+ elif resetType == 2:
+ endDayDate = datetime.datetime.strptime("%s 23:59:59" % (startDayStr), ChConfig.TYPE_Time_Format) + datetime.timedelta(days=(funcActDays-1))
+ else:
+ endDayDate = datetime.datetime.strptime("%s 23:59:59" % (startDayStr), ChConfig.TYPE_Time_Format) + datetime.timedelta(days=(funcActDays-1))
+ else:
+ endDateStr = ipyData.GetEndDate()
+ if resetType == 1:
+ endDayDate = datetime.datetime.strptime("%s 04:59:59" % (endDateStr), ChConfig.TYPE_Time_Format)
+ elif resetType == 2:
+ endDayDate = datetime.datetime.strptime("%s 23:59:59" % (endDateStr), ChConfig.TYPE_Time_Format)
+ else:
+ endDayDate = datetime.datetime.strptime("%s 23:59:59" % (endDateStr), ChConfig.TYPE_Time_Format)
+
+ if returnYmdStr:
+ startDateStr = "%d-%d-%d" % (startDayDate.year, startDayDate.month, startDayDate.day)
+ endDateStr = "%d-%d-%d" % (endDayDate.year, endDayDate.month, endDayDate.day)
+ return startDateStr, endDateStr
+ return startDayDate, endDayDate
+
##获得服务器系统时间
# @param 无
# @return 返回值. 时间Data格式
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 0d87627..d73a552 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
@@ -35,6 +35,7 @@
import PlayerFeastTravel
import PlayerWeekParty
import PlayerActLogin
+import PlayerActTask
import EventReport
import PlayerTeam
import NPCHurtManager
@@ -338,6 +339,7 @@
PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_FMT, addCnt)
PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_FMT, addCnt)
PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_FMT, addCnt)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_FMT, addCnt)
return prizeItemList
def OnPickUpItem(curPlayer, curItem, tick):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
index 7625b6d..e3212f3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
@@ -32,6 +32,7 @@
import PlayerActivity
import PlayerBillboard
import PlayerSuccess
+import PlayerActTask
import GameObj
import GameWorldProcess
@@ -203,8 +204,9 @@
elif fbStep > FB_State_Fighting:
PlayerControl.PlayerLeaveFB(curPlayer)
return
-
-
+
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_SkyTower)
+
# 不做处理,有副本行为客户端发包选择挑战关卡
#EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_SkyTower, 0, ChConfig.CME_Log_Start)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 9f1095a..23ad2c1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -2104,6 +2104,9 @@
("DWORD", "CfgID", 1),
("char", "StartDate", 0),
("char", "EndDate", 0),
+ ("WORD", "RelateFuncID", 0),
+ ("BYTE", "FuncActDays", 0),
+ ("BYTE", "FuncLoop", 0),
("WORD", "LVLimit", 0),
("BYTE", "IsDayReset", 0),
("BYTE", "ResetType", 0),
@@ -2117,6 +2120,9 @@
("DWORD", "CfgID", 1),
("char", "StartDate", 0),
("char", "EndDate", 0),
+ ("WORD", "RelateFuncID", 0),
+ ("BYTE", "FuncActDays", 0),
+ ("BYTE", "FuncLoop", 0),
("WORD", "LVLimit", 0),
("BYTE", "IsDayReset", 0),
("BYTE", "ResetType", 0),
@@ -2136,15 +2142,21 @@
("DWORD", "CfgID", 1),
("char", "StartDate", 0),
("char", "EndDate", 0),
+ ("WORD", "RelateFuncID", 0),
+ ("BYTE", "FuncActDays", 0),
+ ("BYTE", "FuncLoop", 0),
("WORD", "LVLimit", 0),
("list", "RepSignCostMoneyInfo", 0),
("BYTE", "TemplateID", 0),
+ ("WORD", "AwardExCTGID", 0),
+ ("WORD", "ActZhanlingType", 0),
),
"ActLoginNewAward":(
("BYTE", "TemplateID", 1),
("BYTE", "DayNum", 0),
("list", "LoginAwardItemList", 0),
+ ("list", "LoginAwardItemListEx", 0),
),
"ActLoginAward":(
@@ -5653,13 +5665,16 @@
def GetCfgID(self): return self.attrTuple[0] # 配置ID DWORD
def GetStartDate(self): return self.attrTuple[1] # 开启日期 char
def GetEndDate(self): return self.attrTuple[2] # 结束日期 char
- def GetLVLimit(self): return self.attrTuple[3] # 限制等级 WORD
- def GetIsDayReset(self): return self.attrTuple[4] # 是否每天重置 BYTE
- def GetResetType(self): return self.attrTuple[5] # 重置类型,0-0点重置;1-5点重置 BYTE
- def GetCTGIDList(self): return self.attrTuple[6] # 充值ID列表 [ctgID, ...] list
- def GetCTGCountAwardInfo(self): return self.attrTuple[7] # 累计充值次数额外奖励 dict
- def GetCTGCountDayResetList(self): return self.attrTuple[8] # 每日重置累充次数列表 list
- def GetActShopType(self): return self.attrTuple[9] # 商城类型 DWORD
+ def GetRelateFuncID(self): return self.attrTuple[3] # 关联功能ID WORD
+ def GetFuncActDays(self): return self.attrTuple[4] # 功能活动天数 BYTE
+ def GetFuncLoop(self): return self.attrTuple[5] # 功能是否循环 BYTE
+ def GetLVLimit(self): return self.attrTuple[6] # 限制等级 WORD
+ def GetIsDayReset(self): return self.attrTuple[7] # 是否每天重置 BYTE
+ def GetResetType(self): return self.attrTuple[8] # 重置类型,0-0点重置;1-5点重置 BYTE
+ def GetCTGIDList(self): return self.attrTuple[9] # 充值ID列表 [ctgID, ...] list
+ def GetCTGCountAwardInfo(self): return self.attrTuple[10] # 累计充值次数额外奖励 dict
+ def GetCTGCountDayResetList(self): return self.attrTuple[11] # 每日重置累充次数列表 list
+ def GetActShopType(self): return self.attrTuple[12] # 商城类型 DWORD
# 任务活动时间表
class IPY_ActTask():
@@ -5671,11 +5686,14 @@
def GetCfgID(self): return self.attrTuple[0] # 配置ID DWORD
def GetStartDate(self): return self.attrTuple[1] # 开启日期 char
def GetEndDate(self): return self.attrTuple[2] # 结束日期 char
- def GetLVLimit(self): return self.attrTuple[3] # 限制等级 WORD
- def GetIsDayReset(self): return self.attrTuple[4] # 是否每天重置 BYTE
- def GetResetType(self): return self.attrTuple[5] # 重置类型,0-0点重置;1-5点重置 BYTE
- def GetTemplateID(self): return self.attrTuple[6] # 登录奖励模板编号 BYTE
- def GetRoundMax(self): return self.attrTuple[7] # 任务最大轮次 BYTE
+ def GetRelateFuncID(self): return self.attrTuple[3] # 关联功能ID WORD
+ def GetFuncActDays(self): return self.attrTuple[4] # 功能活动天数 BYTE
+ def GetFuncLoop(self): return self.attrTuple[5] # 功能是否循环 BYTE
+ def GetLVLimit(self): return self.attrTuple[6] # 限制等级 WORD
+ def GetIsDayReset(self): return self.attrTuple[7] # 是否每天重置 BYTE
+ def GetResetType(self): return self.attrTuple[8] # 重置类型,0-0点重置;1-5点重置 BYTE
+ def GetTemplateID(self): return self.attrTuple[9] # 登录奖励模板编号 BYTE
+ def GetRoundMax(self): return self.attrTuple[10] # 任务最大轮次 BYTE
# 任务活动模板表
class IPY_ActTaskTemp():
@@ -5700,9 +5718,14 @@
def GetCfgID(self): return self.attrTuple[0] # 配置ID DWORD
def GetStartDate(self): return self.attrTuple[1] # 开启日期 char
def GetEndDate(self): return self.attrTuple[2] # 结束日期 char
- def GetLVLimit(self): return self.attrTuple[3] # 限制等级 WORD
- def GetRepSignCostMoneyInfo(self): return self.attrTuple[4] # 补签消耗货币类型数量 list
- def GetTemplateID(self): return self.attrTuple[5] # 登录奖励模板编号 BYTE
+ def GetRelateFuncID(self): return self.attrTuple[3] # 关联功能ID WORD
+ def GetFuncActDays(self): return self.attrTuple[4] # 功能活动天数 BYTE
+ def GetFuncLoop(self): return self.attrTuple[5] # 功能是否循环 BYTE
+ def GetLVLimit(self): return self.attrTuple[6] # 限制等级 WORD
+ def GetRepSignCostMoneyInfo(self): return self.attrTuple[7] # 补签消耗货币类型数量 list
+ def GetTemplateID(self): return self.attrTuple[8] # 登录奖励模板编号 BYTE
+ def GetAwardExCTGID(self): return self.attrTuple[9] # 扩展奖励礼包充值ID WORD
+ def GetActZhanlingType(self): return self.attrTuple[10] # 关联活动战令类型 WORD
# 登录活动奖励模板表新
class IPY_ActLoginNewAward():
@@ -5713,7 +5736,8 @@
def GetTemplateID(self): return self.attrTuple[0] # 模板ID BYTE
def GetDayNum(self): return self.attrTuple[1] # 第X天从1开始 BYTE
- def GetLoginAwardItemList(self): return self.attrTuple[2] # 奖励列表[[物品ID,个数,是否拍品], ...] list
+ def GetLoginAwardItemList(self): return self.attrTuple[2] # 奖励列表[[物品ID,个数,是否拍品], ...] list
+ def GetLoginAwardItemListEx(self): return self.attrTuple[3] # 扩展奖励列表[[物品ID,个数,是否拍品], ...] list
# 登录奖励时间表
class IPY_ActLoginAward():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 25a3c84..8d1bc7d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -66,6 +66,7 @@
import NPCHurtManager
import PlayerActLogin
import PlayerActTask
+import PlayerZhanling
import FamilyRobBoss
import IpyGameDataPY
import PlayerGubao
@@ -2579,6 +2580,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)
PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_WorldBoss, 1)
elif limitIndex == ShareDefine.Def_Boss_Func_Home:
@@ -5191,6 +5193,7 @@
if GetNPCLV(curNPC) >= curPlayer.GetLV() - IpyGameDataPY.GetFuncCfg('DailyQuestKillMonster'):
PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_KillNPC)
PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_KillNPC)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_KillNPC)
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_KillSpecificNPC, 1, [npcID])
if ChConfig.IsGameBoss(curNPC):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
index 74858fe..881353b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
@@ -42,6 +42,9 @@
import PlayerFreeGoods
import FunctionNPCCommon
import PlayerGreatMaster
+import PlayerActBuyCountGift
+import PlayerActLoginNew
+import PlayerActTask
import IPY_GameWorld
import ItemCommon
import ItemControler
@@ -168,6 +171,11 @@
GameWorld.DebugLog("notifyGameServerFuncIDList=%s" % notifyGameServerFuncIDList)
msgInfo = str(notifyGameServerFuncIDList)
GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0, "FuncOpen", msgInfo, len(msgInfo))
+
+ PlayerActTask.OnCheckRelateFuncAct(curPlayer, openFuncIDList)
+ PlayerActLoginNew.OnCheckRelateFuncAct(curPlayer, openFuncIDList)
+ PlayerActBuyCountGift.OnCheckRelateFuncAct(curPlayer, openFuncIDList)
+
return
## 功能是否可用
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py
index 198b048..b58183b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py
@@ -29,12 +29,17 @@
import GameWorld
import ChConfig
-def OnDay(curPlayer):
+def OnDay(curPlayer, onEventType):
+ OnCheckRelateFuncAct(curPlayer)
+ if onEventType != ShareDefine.Def_OnEventType:
+ return
for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_BuyCountGift, {}).values():
if not actInfo.get(ShareDefine.ActKey_State):
continue
actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BuyCountGiftID % actNum):
+ continue
ipyData = IpyGameDataPY.GetIpyGameData("ActBuyCountGift", cfgID)
if not ipyData:
continue
@@ -56,10 +61,31 @@
actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
isReset = __CheckPlayerBuyCountGiftAction(curPlayer, actNum)
# 活动中同步活动信息
- if not isReset and actInfo.get(ShareDefine.ActKey_State):
+ if not isReset and actInfo.get(ShareDefine.ActKey_State) and curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BuyCountGiftID % actNum):
Sync_BuyCountGiftActionInfo(curPlayer, actNum)
Sync_BuyCountGiftPlayerInfo(curPlayer, actNum)
+ return
+
+def OnCheckRelateFuncAct(curPlayer, openFuncIDList=None):
+ ## 检查关联功能ID开启的活动
+ for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_BuyCountGift, {}).values():
+ if not actInfo.get(ShareDefine.ActKey_State):
+ continue
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActBuyCountGift", cfgID)
+ if not ipyData:
+ continue
+ if not hasattr(ipyData, "GetRelateFuncID"):
+ continue
+ relateFuncID = ipyData.GetRelateFuncID()
+ if not relateFuncID:
+ continue
+ if openFuncIDList and relateFuncID not in openFuncIDList:
+ continue
+ actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
+ __CheckPlayerBuyCountGiftAction(curPlayer, actNum)
+
return
def RefreshBuyCountGiftActionInfo(actNum):
@@ -85,6 +111,12 @@
playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BuyCountGiftID % actNum) # 玩家身上的活动ID
+ funcActInfo = GameWorld.GetActRelateFuncInfo(curPlayer, "ActBuyCountGift", actInfo, playerActID)
+ if funcActInfo:
+ isInAct, actID = funcActInfo
+ if not isInAct:
+ return
+
# 活动ID 相同的话不处理
if actID == playerActID:
GameWorld.DebugLog("购买次数礼包活动ID不变,不处理! actNum=%s,cfgID=%s,actID=%s" % (actNum, cfgID, actID), curPlayer.GetPlayerID())
@@ -128,6 +160,8 @@
if not actInfo.get(ShareDefine.ActKey_State):
GameWorld.DebugLog("购买次数礼包非活动中无法领取奖励! actNum=%s" % actNum, playerID)
+ return
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BuyCountGiftID % actNum):
return
cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
@@ -187,14 +221,19 @@
actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_BuyCountGift, actNum)
if not actInfo.get(ShareDefine.ActKey_State):
return
-
+ playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BuyCountGiftID % actNum)
+ if not playerActID:
+ return
cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
ipyData = IpyGameDataPY.GetIpyGameData("ActBuyCountGift", cfgID)
if not ipyData:
return
CTGCountAwardInfo = ipyData.GetCTGCountAwardInfo()
- startDateStr, endDateStr = GameWorld.GetOperationActionDateStr(ipyData)
+ if hasattr(ipyData, "GetRelateFuncID") and ipyData.GetRelateFuncID():
+ startDateStr, endDateStr = GameWorld.GetActRelateFuncDate(ipyData, playerActID, True)
+ else:
+ startDateStr, endDateStr = GameWorld.GetOperationActionDateStr(ipyData)
startDateSync = actInfo.get(ShareDefine.ActKey_StartDateSync, startDateStr)
actInfo = ChPyNetSendPack.tagMCActBuyCountGiftInfo()
actInfo.ActNum = actNum
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py
index 776da9b..98fcc39 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py
@@ -16,15 +16,18 @@
#-------------------------------------------------------------------------------
import PyGameData
+import PlayerCoin
import ShareDefine
import PlayerControl
import IpyGameDataPY
+import PlayerZhanling
import ChPyNetSendPack
import ItemControler
import IPY_GameWorld
import NetPackCommon
import GameWorld
import ChConfig
+import time
def OnPlayerLogin(curPlayer):
@@ -32,10 +35,35 @@
actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
isReset = __CheckPlayerActLoginAction(curPlayer, actNum)
# 活动中同步活动信息
- if not isReset and actInfo.get(ShareDefine.ActKey_State):
+ if not isReset and actInfo.get(ShareDefine.ActKey_State) and curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActLoginNewID % actNum):
Sync_ActLoginActionInfo(curPlayer, actNum)
Sync_ActLoginPlayerInfo(curPlayer, actNum)
+ return
+
+def OnDay(curPlayer):
+ OnCheckRelateFuncAct(curPlayer)
+ return
+
+def OnCheckRelateFuncAct(curPlayer, openFuncIDList=None):
+ ## 检查关联功能ID开启的活动
+ for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_ActLoginNew, {}).values():
+ if not actInfo.get(ShareDefine.ActKey_State):
+ continue
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActLoginNew", cfgID)
+ if not ipyData:
+ continue
+ if not hasattr(ipyData, "GetRelateFuncID"):
+ continue
+ relateFuncID = ipyData.GetRelateFuncID()
+ if not relateFuncID:
+ continue
+ if openFuncIDList and relateFuncID not in openFuncIDList:
+ continue
+ actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
+ __CheckPlayerActLoginAction(curPlayer, actNum)
+
return
def RefreshActLoginActionInfo(actNum):
@@ -59,6 +87,12 @@
playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActLoginNewID % actNum) # 玩家身上的活动ID
+ funcActInfo = GameWorld.GetActRelateFuncInfo(curPlayer, "ActLoginNew", actInfo, playerActID)
+ if funcActInfo:
+ isInAct, actID = funcActInfo
+ if not isInAct:
+ return
+
# 活动ID 相同的话不处理
if actID == playerActID:
GameWorld.DebugLog("新登录活动ID不变,不处理! actNum=%s,actID=%s" % (actNum, actID), curPlayer.GetPlayerID())
@@ -67,8 +101,16 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLoginNewID % actNum, actID)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLoginNewAward % actNum, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLoginNewAwardEx % actNum, 0)
if state:
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActLoginNew", cfgID)
+ if ipyData:
+ if ipyData.GetAwardExCTGID():
+ PlayerCoin.DoResetCTGCountByIDList(curPlayer, "ActLoginNew", [ipyData.GetAwardExCTGID()])
+ if ipyData.GetActZhanlingType():
+ PlayerZhanling.ResetZhanling(curPlayer, ipyData.GetActZhanlingType())
Sync_ActLoginActionInfo(curPlayer, actNum)
Sync_ActLoginPlayerInfo(curPlayer, actNum)
return True
@@ -76,6 +118,8 @@
def OnGetActLoginAward(curPlayer, dayNum, actNum):
## 领取活动奖励
+ isAwardEx = dayNum / 1000
+ dayNum = dayNum % 1000
actNum = GameWorld.ToIntDef(actNum)
actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_ActLoginNew, actNum)
@@ -87,7 +131,11 @@
GameWorld.DebugLog("非登录活动中! actNum=%s" % actNum)
return
- curDayNum = actInfo.get(ShareDefine.ActKey_DayIndex) + 1
+ playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActLoginNewID % actNum)
+ if not playerActID:
+ return
+
+ curDayNum = GameWorld.GetDiff_Day(int(time.time()), playerActID) + 1
if curDayNum < dayNum:
GameWorld.DebugLog("未到可领取的登录天,无法领取! actNum=%s,curDayNum=%s < %s" % (actNum, curDayNum, dayNum))
return
@@ -111,9 +159,25 @@
if not findIpyData:
GameWorld.DebugLog("找不到对应登录天奖励! actNum=%s,cfgID=%s,templateID=%s,dayNum=%s" % (actNum, cfgID, templateID, dayNum))
return
- awardItemList = findIpyData.GetLoginAwardItemList()
+
+ if isAwardEx:
+ awardExCTGID = ipyData.GetAwardExCTGID()
+ if not awardExCTGID:
+ GameWorld.DebugLog("该登录活动没有扩展奖励! actNum=%s,cfgID=%s" % (actNum, cfgID))
+ return
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % awardExCTGID):
+ GameWorld.DebugLog("该登录活动扩展奖励礼包未购买,无法领取! actNum=%s,cfgID=%s,awardExCTGID=%s" % (actNum, cfgID, awardExCTGID))
+ return
+ stateKey = ChConfig.Def_PDict_ActLoginNewAwardEx
+ awardItemList = findIpyData.GetLoginAwardItemListEx()
+ else:
+ stateKey = ChConfig.Def_PDict_ActLoginNewAward
+ awardItemList = findIpyData.GetLoginAwardItemList()
- awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActLoginNewAward % actNum)
+ if not awardItemList:
+ return
+
+ awardRecord = curPlayer.NomalDictGetProperty(stateKey % actNum)
if awardRecord & pow(2, dayNum):
GameWorld.DebugLog("登录活动该天已领奖! actNum=%s,dayNum=%s,awardRecord=%s" % (actNum, dayNum, awardRecord))
return
@@ -129,13 +193,13 @@
return
if costMoneyType and costMoneyValue:
- PlayerControl.PayMoney(curPlayer, costMoneyType, costMoneyValue, "ActLoginNew", {"actNum":actNum, "dayNum":dayNum})
+ PlayerControl.PayMoney(curPlayer, costMoneyType, costMoneyValue, "ActLoginNew", {"actNum":actNum, "dayNum":dayNum, "isAwardEx":isAwardEx})
updAwardRecord = awardRecord | pow(2, dayNum)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLoginNewAward % actNum, updAwardRecord)
+ PlayerControl.NomalDictSetProperty(curPlayer, stateKey % actNum, updAwardRecord)
Sync_ActLoginPlayerInfo(curPlayer, actNum)
- GameWorld.DebugLog("领取登录活动奖励! actNum=%s,dayNum=%s,awardItemList=%s" % (actNum, dayNum, awardItemList))
+ GameWorld.DebugLog("领取登录活动奖励! actNum=%s,dayNum=%s,isAwardEx=%s,awardItemList=%s,curDayNum=%s" % (actNum, dayNum, isAwardEx, awardItemList, curDayNum))
for itemID, itemCount, isAuctionItem in awardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem], event=["ActLoginNew", False, {}])
@@ -147,6 +211,7 @@
clientPack = ChPyNetSendPack.tagMCActLoginPlayerInfoNew()
clientPack.ActNum = actNum
clientPack.LoginAward = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActLoginNewAward % actNum)
+ clientPack.LoginAwardEx = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActLoginNewAwardEx % actNum)
NetPackCommon.SendFakePack(curPlayer, clientPack)
return
@@ -156,6 +221,9 @@
if not actInfo:
return
if not actInfo.get(ShareDefine.ActKey_State):
+ return
+ playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActLoginNewID % actNum)
+ if not playerActID:
return
cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
ipyData = IpyGameDataPY.GetIpyGameData("ActLoginNew", cfgID)
@@ -167,7 +235,10 @@
if not dayIpyDataList:
return
- startDateStr, endDateStr = GameWorld.GetOperationActionDateStr(ipyData)
+ if hasattr(ipyData, "GetRelateFuncID") and ipyData.GetRelateFuncID():
+ startDateStr, endDateStr = GameWorld.GetActRelateFuncDate(ipyData, playerActID, True)
+ else:
+ startDateStr, endDateStr = GameWorld.GetOperationActionDateStr(ipyData)
actPack = ChPyNetSendPack.tagMCActLoginNew()
actPack.Clear()
actPack.ActNum = actNum
@@ -176,6 +247,7 @@
actPack.LimitLV = ipyData.GetLVLimit()
actPack.RepSignMoneyType = moneyType
actPack.RepSignMoneyValue = moneyValue
+ actPack.AwardExCTGID = ipyData.GetAwardExCTGID()
actPack.AwardDayList = []
for dayIpyData in dayIpyDataList:
@@ -190,6 +262,15 @@
dayInfo.AwardItemList.append(itemInfo)
dayInfo.Count = len(dayInfo.AwardItemList)
+ dayInfo.AwardItemListEx = []
+ for itemID, itemCount, isAuctionItem in dayIpyData.GetLoginAwardItemListEx():
+ itemInfo = ChPyNetSendPack.tagMCActLoginNewItem()
+ itemInfo.ItemID = itemID
+ itemInfo.ItemCount = itemCount
+ itemInfo.IsBind = isAuctionItem
+ dayInfo.AwardItemListEx.append(itemInfo)
+ dayInfo.CountEx = len(dayInfo.AwardItemListEx)
+
actPack.AwardDayList.append(dayInfo)
actPack.DayCount = len(actPack.AwardDayList)
NetPackCommon.SendFakePack(curPlayer, actPack)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py
index 965e97c..c16ecfd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py
@@ -32,11 +32,36 @@
actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
isReset = __CheckPlayerActTaskAction(curPlayer, actNum)
# 活动中同步活动信息
- if not isReset and actInfo.get(ShareDefine.ActKey_State):
+ if not isReset and actInfo.get(ShareDefine.ActKey_State) and curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskID % actNum):
Sync_ActTaskActionInfo(curPlayer, actNum)
Sync_ActTaskPlayerValueInfo(curPlayer, actNum)
Sync_ActTaskPlayerInfo(curPlayer, actNum)
+ return
+
+def OnDay(curPlayer):
+ OnCheckRelateFuncAct(curPlayer)
+ return
+
+def OnCheckRelateFuncAct(curPlayer, openFuncIDList=None):
+ ## 检查关联功能ID开启的活动
+ for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_ActTask, {}).values():
+ if not actInfo.get(ShareDefine.ActKey_State):
+ continue
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActTask", cfgID)
+ if not ipyData:
+ continue
+ if not hasattr(ipyData, "GetRelateFuncID"):
+ continue
+ relateFuncID = ipyData.GetRelateFuncID()
+ if not relateFuncID:
+ continue
+ if openFuncIDList and relateFuncID not in openFuncIDList:
+ continue
+ actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
+ __CheckPlayerActTaskAction(curPlayer, actNum)
+
return
def RefreshActTaskActionInfo(actNum):
@@ -62,6 +87,12 @@
playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskID % actNum) # 玩家身上的活动ID
lastTempID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskTempID % actNum)
+ funcActInfo = GameWorld.GetActRelateFuncInfo(curPlayer, "ActTask", actInfo, playerActID)
+ if funcActInfo:
+ isInAct, actID = funcActInfo
+ if not isInAct:
+ return
+
# 活动ID 相同的话不处理
if actID == playerActID:
GameWorld.DebugLog("任务活动ID不变,不处理! actNum=%s,actID=%s" % (actNum, actID), playerID)
@@ -121,7 +152,8 @@
actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
if not actInfo.get(ShareDefine.ActKey_State):
continue
-
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskID % actNum):
+ continue
cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
ipyData = IpyGameDataPY.GetIpyGameData("ActTask", cfgID)
if not ipyData:
@@ -150,7 +182,7 @@
return
-def AddActTaskValue(curPlayer, taskType, addValue):
+def AddActTaskValue(curPlayer, taskType, addValue=1):
## 增加任务活动进度值
playerID = curPlayer.GetPlayerID()
@@ -158,7 +190,8 @@
actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
if not actInfo.get(ShareDefine.ActKey_State):
continue
-
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskID % actNum):
+ continue
cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
ipyData = IpyGameDataPY.GetIpyGameData("ActTask", cfgID)
if not ipyData:
@@ -350,6 +383,9 @@
return
if not actInfo.get(ShareDefine.ActKey_State):
return
+ playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskID % actNum) # 玩家身上的活动ID
+ if not playerActID:
+ return
cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
ipyData = IpyGameDataPY.GetIpyGameData("ActTask", cfgID)
if not ipyData:
@@ -359,7 +395,10 @@
if not taskIpyDataList:
return
- startDateStr, endDateStr = GameWorld.GetOperationActionDateStr(ipyData)
+ if hasattr(ipyData, "GetRelateFuncID") and ipyData.GetRelateFuncID():
+ startDateStr, endDateStr = GameWorld.GetActRelateFuncDate(ipyData, playerActID, True)
+ else:
+ startDateStr, endDateStr = GameWorld.GetOperationActionDateStr(ipyData)
actPack = ChPyNetSendPack.tagMCActTaskInfo()
actPack.Clear()
actPack.ActNum = actNum
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py
index 4b5cd00..565b682 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py
@@ -27,6 +27,7 @@
import IPY_GameWorld
import ItemControler
import EventShell
+import PlayerActTask
import PlayerWeekParty
import PlayerFeastTravel
import PlayerActivity
@@ -308,6 +309,7 @@
PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_Arena, 1)
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_Arena, 1)
PlayerGubao.AddGubaoItemEffValue(curPlayer, PlayerGubao.GubaoEffType_Arena, 1)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_Arena)
return
def __DoUpdateArenaScore(curPlayer, cmdDict={}):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
index a460ca5..c1253b2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
@@ -38,6 +38,7 @@
import IpyGameDataPY
import PlayerPet
import PlayerRefineStove
+import PlayerActTask
import PlayerSuccess
import SkillShell
@@ -265,6 +266,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, eatCntKey, eatCnt)
if funcIndex == ShareDefine.Def_AttrFruitFunc_Stove:
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_UseStoveBylv, hasUseCnt, [item.GetLV()])
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_FruitStoveEatTimes) # 算次数,不算个数
alchemyIpyData = IpyGameDataPY.GetIpyGameDataByCondition("Alchemy", {"AlchemItemID":itemID}, False, True)
if alchemyIpyData:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
index 71ab13f..5f78ef0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -541,7 +541,6 @@
PlayerVip.VipOnDay(curPlayer)
PlayerCoin.OnDay(curPlayer)
- PlayerActBuyCountGift.OnDay(curPlayer)
#成就
PlayerSuccess.SuccOnDay(curPlayer)
@@ -644,6 +643,12 @@
PlayerTongTianLing.OnDay(curPlayer, onEventType)
#boss凭证
PlayerActBossTrial.PlayerOnDay(curPlayer, onEventType)
+ #任务活动
+ PlayerActTask.OnDay(curPlayer)
+ #登录活动
+ PlayerActLoginNew.OnDay(curPlayer)
+ #购买次数礼包
+ PlayerActBuyCountGift.OnDay(curPlayer, onEventType)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
index 16baf95..0968f60 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
@@ -32,6 +32,7 @@
import PlayerDienstgrad
import PlayerGatherTheSoul
import PlayerActGubao
+import PlayerActTask
import PlayerCoat
GubaoEffType_FamilyWar = 48 # 参与仙盟联赛每X次+XXX属性 x次
@@ -266,6 +267,7 @@
Sync_GubaoInfo(curPlayer, [gubaoID])
PlayerActGubao.OnGubaoCost(curPlayer, needPieceInfo, realNeedItemList)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_GubaoStarUp)
return
def DoGubaoAddFreePoint(curPlayer, gubaoID=0):
@@ -396,6 +398,7 @@
Sync_GubaoInfo(curPlayer, [gubaoID])
PlayerActGubao.OnGubaoCost(curPlayer, needPieceInfo, realNeedItemList)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_GubaoLVUp)
return
def GetGubaoTotalLVStar(curPlayer):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMineArea.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMineArea.py
index 2f4013a..6722046 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMineArea.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMineArea.py
@@ -20,6 +20,7 @@
import IpyGameDataPY
import IPY_GameWorld
import ChPyNetSendPack
+import PlayerActTask
import NetPackCommon
import ItemControler
import ItemCommon
@@ -184,7 +185,12 @@
if msgType == "MineAreaAwardGet":
awardInfoList = dataMsg[0]
__DoGiveMineAreaAward(curPlayer, awardInfoList)
-
+
+ ## 取消拉取 (包含主动 或 被动驱赶)
+ elif msgType == "MineAreaCancelPull":
+ areaPlayerID, reason = dataMsg
+ __OnMineAreaPullEnd(curPlayer, areaPlayerID, reason)
+
return
def __DoGiveMineAreaAward(curPlayer, awardInfoList):
@@ -206,6 +212,7 @@
GUIDList.append(GUID)
GameWorld.DebugLog("结算福地奖励! areaPlayerID=%s,mineID=%s,itemLV=%s,itemID=%s,itemCount=%s,awardTime=%s,isToday=%s,workerCount=%s %s"
% (areaPlayerID, mineID, itemLV, itemID, itemCount, GameWorld.ChangeTimeNumToStr(awardTime), isToday, workerCount, GUID), playerID)
+ __OnMineAreaPullEnd(curPlayer, areaPlayerID, "OK")
if addEnergyUsed:
energyUsed += addEnergyUsed
@@ -223,6 +230,15 @@
SendToGameServer_MineArea(curPlayer, "MineAreaAwardGetOK", [GUIDList, awardItemList])
return
+def __OnMineAreaPullEnd(curPlayer, areaPlayerID, reason):
+ ## 拉取结束额外处理, 包含拉完、取消、被驱赶等
+ GameWorld.DebugLog("__OnMineAreaPullEnd: areaPlayerID=%s, reason=%s" % (areaPlayerID, reason))
+ if curPlayer.GetPlayerID() == areaPlayerID:
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_MineAreaEndSelf)
+ else:
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_MineAreaEndOther)
+ return
+
def OnMineTreasureByCTGID(curPlayer, ctgID):
## 充值激活聚宝盆
treasureCTGIDList = IpyGameDataPY.GetFuncEvalCfg("MineAreaTreasure", 1)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py
index f748efc..254a911 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py
@@ -30,6 +30,7 @@
import ChPyNetSendPack
import PlayerMagicWeapon
import PlayerTongTianLing
+import PlayerActTask
import PlayerPet
import PlayerControl
import GameWorld
@@ -182,6 +183,7 @@
PlayerControl.NotifyCode(curPlayer, "SignInText2", [ChConfig.Def_SkillID_PetSignDay, curEffect.GetEffectID(), curEffect.GetEffectValue(0)])
PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_Sign, 1)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_Sign)
return
## 签到总奖励天数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
index d5326fc..785cee8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -43,7 +43,7 @@
TreasureTypeList = (
TreasureType_Jipin, # 极品寻宝 1
TreasureType_Rune, # 符印寻宝 2
-TreasureType_Jueshi, # 绝世君宝 3
+TreasureType_Jueshi, # 绝世寻宝 3
TreasureType_GatherTheSoul, # 聚魂猎魔 4
TreasureType_Gubao, # 古宝寻宝 5
) = range(1, 1 + 5)
@@ -388,16 +388,19 @@
PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_RuneTreasure, treasureCount)
PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_RuneTreasure, treasureCount)
PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_RuneTreasure, treasureCount)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureRune, treasureCount)
elif treasureType == TreasureType_Jipin:
PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_Treasure, treasureCount)
PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_Treasure, treasureCount)
PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_Treasure, treasureCount)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureJipin, treasureCount)
elif treasureType == TreasureType_Jueshi:
PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_JSTreasure, treasureCount)
PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_JSTreasure, treasureCount)
PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_JSTreasure, treasureCount)
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureJueshi, treasureCount)
elif treasureType == TreasureType_GatherTheSoul:
- pass
+ PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureGatherTheSoul, treasureCount)
elif treasureType == TreasureType_Gubao:
PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureGubao, treasureCount)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
index 4e4c966..7a0f828 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
@@ -16,6 +16,7 @@
#-------------------------------------------------------------------------------
import GameWorld
+import ShareDefine
import NetPackCommon
import IpyGameDataPY
import PlayerControl
@@ -31,15 +32,17 @@
# 战令类型
ZhanlingTypeList = (
-ZhanlingType_LV,
-ZhanlingType_Realm,
-ZhanlingType_SkyTower,
-ZhanlingType_GubaoStar,
-ZhanlingType_Login,
-ZhanlingType_GatherTheSoulLV,
-ZhanlingType_HorsePetTrain,
-ZhanlingType_GubaoTrain,
-) = range(1, 1 + 8)
+ZhanlingType_LV, # 等级 1
+ZhanlingType_Realm, # 境界 2
+ZhanlingType_SkyTower, # 天星塔 3
+ZhanlingType_GubaoStar, # 古宝总星数 4
+ZhanlingType_Login, # 登录 5
+ZhanlingType_GatherTheSoulLV, # 聚魂 6
+ZhanlingType_HorsePetTrain, # 骑宠养成 7
+ZhanlingType_GubaoTrain, # 古宝养成 8
+ZhanlingType_Xianyuan, # 仙缘 9
+ZhanlingType_Huanjingge, # 幻境阁 10
+) = range(1, 1 + 10)
def OnPlayerLogin(curPlayer):
for zhanlingType in ZhanlingTypeList:
@@ -96,6 +99,9 @@
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)
GameWorld.Log("重置战令: zhanlingType=%s,backValue=%s,state=(%s to %s) stateH=(%s to %s)"
% (zhanlingType, backValue, state, updState, stateH, updStateH), curPlayer.GetPlayerID())
@@ -154,6 +160,25 @@
PlayerControl.SendMailByKey("ZhanlingRewardUnget", [playerID], itemList, paramList)
return
+def AddZhanlingValue(curPlayer, zhanlingType, addValue=1):
+ if zhanlingType not in [ZhanlingType_Huanjingge]:
+ return
+ curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType)
+ updValue = min(ChConfig.Def_UpperLimit_DWord, curValue + addValue)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType, updValue)
+ GameWorld.DebugLog("增加战令进度: zhanlingType=%s,addValue=%s,curValue=%s,updValue=%s"
+ % (zhanlingType, addValue, curValue, updValue), curPlayer.GetPlayerID())
+ SyncZhanlingInfo(curPlayer, zhanlingType, [])
+ return updValue
+
+def SetZhanlingValue(curPlayer, zhanlingType, value1):
+ if zhanlingType not in [ZhanlingType_Huanjingge]:
+ return
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType, value1)
+ GameWorld.DebugLog("设置战令进度: zhanlingType=%s,value1=%s" % (zhanlingType, value1), curPlayer.GetPlayerID())
+ SyncZhanlingInfo(curPlayer, zhanlingType, [])
+ return value1
+
def GetZhanlingReward(curPlayer, zhanlingType, rewardID):
## 领取战令奖励
rewardID = GameWorld.ToIntDef(rewardID)
@@ -184,6 +209,10 @@
curValue = PlayerActHorsePetTrain.GetActHorsePetTrainScore(curPlayer)
elif zhanlingType == ZhanlingType_GubaoTrain:
curValue = PlayerActGubao.GetActGubaoTrainScore(curPlayer)
+ elif zhanlingType == ZhanlingType_Xianyuan:
+ curValue = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_XianyuanScore)
+ elif zhanlingType == ZhanlingType_Huanjingge:
+ curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingValue1 % zhanlingType)
else:
return
@@ -223,7 +252,7 @@
# 更新已领取成功标记
GameWorld.SetDictValueByBit(curPlayer, rewardKey, rewardIndex, 1, True, [zhanlingType])
- SyncZhanlingInfo(curPlayer, zhanlingType, ipyData)
+ SyncZhanlingInfo(curPlayer, zhanlingType, [ipyData])
GameWorld.DebugLog("领取战令奖励: zhanlingType=%s,needValue=%s,rewardType=%s,itemList=%s" % (zhanlingType, needValue, rewardType, itemList), playerID)
# 给物品
@@ -232,17 +261,11 @@
return
-def SyncZhanlingInfo(curPlayer, zhanlingType, ipyData=None):
+def SyncZhanlingInfo(curPlayer, zhanlingType, ipyDataList=None):
- ipyDataList = []
- if ipyData == None:
+ if ipyDataList == None:
ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition("Zhanling", {"ZhanlingType":zhanlingType}, True)
- else:
- ipyDataList = [ipyData]
-
- if not ipyDataList:
- return
-
+
rewardList = []
for ipyData in ipyDataList:
rewardIndex = ipyData.GetRewardIndex()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 0fca079..f97d5d3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -1156,7 +1156,9 @@
CDBPlayerRefresh_TiandaoFruit, # 天道果 267
CDBPlayerRefresh_Tuijinbi, # 推金币 268
CDBPlayerRefresh_PayCoinDay, # 代币时效 269
-) = range(146, 270)
+CDBPlayerRefresh_XianyuanScore, # 仙缘积分 270
+CDBPlayerRefresh_HuanjinggeScore, # 幻境阁积分 271
+) = range(146, 272)
TYPE_Price_Gold_Paper_Money = 5 # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
@@ -1192,6 +1194,9 @@
TYPE_Price_HorsePetTrainScore = 45 # 骑宠养成积分
TYPE_Price_GubaoTrainScore = 46 # 古宝养成积分
TYPE_Price_TiandaoFruit = 47 # 天道果
+TYPE_Price_Tuijinbi = 48 # 推金币
+TYPE_Price_XianyuanScore = 49 # 仙缘积分
+TYPE_Price_HuanjinggeScore = 50 # 幻境阁积分
TYPE_Price_PayCoinDay = 98 # 代币时效,每日过天重置
TYPE_Price_PayCoin = 99 # 代币
@@ -1201,6 +1206,7 @@
16:"助战积分", 18:"荣誉", 19:"Boss积分", 23:"符印精华", 24:"符印碎片", 25:"寻宝积分", 26:"集市额度", 27:"丹精", 28:"魂尘",
29:"聚魂碎片", 30:"核心环", 31:"功能特权令", 32:"环保值", 33:"GM令", 34:"古神币", 35:"功德点",
39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 46:"古宝养成积分", 47:"天道果",
+ 49:"仙缘积分", 50:"幻境阁积分",
98:"代币时效", 99:"代币"
}
@@ -1241,6 +1247,8 @@
TYPE_Price_HorsePetTrainScore:CDBPlayerRefresh_HorsePetTrainScore,
TYPE_Price_GubaoTrainScore:CDBPlayerRefresh_GubaoTrainScore,
TYPE_Price_TiandaoFruit:CDBPlayerRefresh_TiandaoFruit,
+ TYPE_Price_XianyuanScore:CDBPlayerRefresh_XianyuanScore,
+ TYPE_Price_HuanjinggeScore:CDBPlayerRefresh_HuanjinggeScore,
TYPE_Price_PayCoinDay:CDBPlayerRefresh_PayCoinDay,
}
--
Gitblit v1.8.0