From 2ece6a9d52e3cc210edb89a26ba7e599d5c4f7fe Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 26 十二月 2019 16:04:10 +0800
Subject: [PATCH] 8346 【恺英】【后端】协助系统(宗门类镜像协助支持,删除镜像协助记录)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py | 2
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 9
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py | 279 ++++-----------------
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py | 253 +++----------------
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/HelpCheckInInfo.py | 3
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py | 81 +++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ChaosDemon.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py | 17 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py | 8
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py | 2
ServerPython/CoreServerGroup/GameServer/Script/PyGameData.py | 1
ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py | 5
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Assist.py | 12
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 9
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 9
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 12
21 files changed, 164 insertions(+), 557 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
index 6ab6842..75616d2 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
@@ -586,7 +586,6 @@
ShareDefine.Def_BT_Campaign_StarLV : 100, #升星等级(开服活动榜)
ShareDefine.Def_BT_FCCostGold : 5, #消费排行榜(仙界盛典)
ShareDefine.Def_BT_NewFCCostGold : 5, #消费排行榜(仙界盛典)
- ShareDefine.Def_BT_FBHelpBattle : 100, #助战次数榜
}
#排行榜保存类型(和BillboardType匹配), 默认保存, 如果不保存,可配置进去
@@ -804,8 +803,8 @@
VIPPrivilege_BindJadeWheel, #30 绑玉转盘次数
VIPPrivilege_PrayElixir, #31 丹药祈福次数
VIPPrivilege_32, #32 封魔坛自动挑战
-VIPPrivilege_XianyuanCoinUpperAdd, #33 仙缘币上限加成
-VIPPrivilege_XianyuanCoinAddPer, #34 仙缘币获得倍率加成(万分比)
+VIPPrivilege_33, #33
+VIPPrivilege_34, #34
) = range(1, 35)
#游戏货币来源类型定义
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Assist.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Assist.py
index 2a212f9..7050296 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Assist.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Assist.py
@@ -62,16 +62,16 @@
assistThanksMgr = PyDataManager.GetPlayerAssistThanksPyManager()
GameWorld.Log("---------- 未完结总感谢条数: %s" % len(assistThanksMgr.allAssistThanksList))
for playerID, thanksList in assistThanksMgr.playerThanksDict.items():
- GameWorld.DebugLog("玩家未发送感谢数: %s, %s" % (playerID, len(thanksList)))
+ GameWorld.DebugLog("--- 玩家未发送感谢数: %s, %s" % (playerID, len(thanksList)))
for i, thanks in enumerate(thanksList):
- GameWorld.DebugLog(" i=%s, %s" % (i, thanks.outputString()))
- GameWorld.DebugLog(" %s" % thanks.AssistPlayerDict)
+ GameWorld.DebugLog(" %s itemID=%s,map(%s,%s,%s), %s %s" % (i, thanks.ItemID, thanks.MapID, thanks.LineID, thanks.NPCID, thanks.TimeStr, thanks.GUID), thanks.PlayerID)
+ GameWorld.DebugLog(" ThanksState=%s, %s" % (thanks.ThanksState, thanks.AssistPlayerDict), thanks.PlayerID)
for playerID, thanksList in assistThanksMgr.assistPlayerThanksDict.items():
- GameWorld.DebugLog("玩家未接收感谢数: %s, %s" % (playerID, len(thanksList)))
+ GameWorld.DebugLog("--- 玩家未接收感谢数: %s, %s" % (playerID, len(thanksList)))
for i, thanks in enumerate(thanksList):
- GameWorld.DebugLog(" i=%s, %s" % (i, thanks.outputString()))
- GameWorld.DebugLog(" %s" % thanks.AssistPlayerDict)
+ GameWorld.DebugLog(" %s itemID=%s,map(%s,%s,%s), %s %s" % (i, thanks.ItemID, thanks.MapID, thanks.LineID, thanks.NPCID, thanks.TimeStr, thanks.GUID), thanks.PlayerID)
+ GameWorld.DebugLog(" ThanksState=%s, %s" % (thanks.ThanksState, thanks.AssistPlayerDict), thanks.PlayerID)
GameWorld.DebugLog("-----------------------------------------")
return
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/HelpCheckInInfo.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/HelpCheckInInfo.py
index 2dbb3c5..221338b 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/HelpCheckInInfo.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/HelpCheckInInfo.py
@@ -63,8 +63,8 @@
GameWorld.DebugAnswer(curPlayer, "等级: %s, 境界: %s, VIP%s" % (helpBattlePlayer.playerLV, helpBattlePlayer.realmLV, helpBattlePlayer.vipLV))
GameWorld.DebugAnswer(curPlayer, "战力: %s, 仙盟: %s" % (helpBattlePlayer.fightPower, helpBattlePlayer.familyID))
GameWorld.DebugAnswer(curPlayer, "登记时间: %s, 次数: %s" % (GameWorld.ChangeTimeNumToStr(helpBattlePlayer.checkInTime), helpBattlePlayer.checkInCount))
- GameWorld.DebugAnswer(curPlayer, "今日仙缘币: %s" % (helpBattlePlayer.todayXianyuanCoin))
GameWorld.DebugAnswer(curPlayer, "今天助战数: %s" % (helpBattlePlayer.todayHelpCountDict))
+ GameWorld.DebugAnswer(curPlayer, "接受礼盒数: %s" % (helpBattlePlayer.getThanksGiftCountDict))
return
def __AddFakeHelpPlayer(curPlayer, addCount):
@@ -97,7 +97,6 @@
helpBattlePlayer.vipLV = random.randint(0, 10)
helpBattlePlayer.checkInCount = 100
helpBattlePlayer.checkInTime = curTime
- helpBattlePlayer.todayXianyuanCoin = 0
addFakeIDList.append(fakeID)
GameWorld.DebugAnswer(curPlayer, "添加假助战登记 %s" % addFakeIDList)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index 4ce5a49..b56a04f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -354,8 +354,6 @@
GameWorldAverageLv.OpenWorldAverageLv()
#倒计时离队处理
PlayerTeam.DoCountdownLeaveTeamLogic(tick)
- #副本助战
- PlayerFBHelpBattle.OnMinuteProcess()
#红包
PlayerFamilyRedPacket.OnRedPacketMinuteProcess()
#拍卖行
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
index 56f727b..2e6964a 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -182,8 +182,6 @@
GameWorldActionControl.OnPlayerLogin(curPlayer)
#玩家等级记录
PyGameData.g_todayPlayerLVDict[curPlayer.GetID()] = curPlayer.GetLV()
- #副本助战
- PlayerFBHelpBattle.OnHelpPlayerLogin(curPlayer)
#跨服PK
CrossRealmPK.OnPlayerLogin(curPlayer)
#诛仙BOSS
@@ -705,9 +703,6 @@
elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr10:
PlayerControl.SetChatBubbleBox(curPlayer, packValue)
-
- elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr11:
- PlayerControl.SetTodayXianyuanCoin(curPlayer, packValue)
elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr13:
PlayerControl.SetPlayerServerGroupID(curPlayer, packValue)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py
index 80653c9..eb5faa8 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py
@@ -20,6 +20,7 @@
import IpyGameDataPY
import NetPackCommon
import PyGameDataStruct
+import PlayerFBHelpBattle
import ChPyNetSendPack
import PlayerControl
import PlayerFamily
@@ -176,17 +177,15 @@
playerThanksList = thanksMgr.playerThanksDict[playerID]
playerThanksList.append(dbData)
- # 已经感谢的
- else:
- for assistPlayerID, assistPlayerInfo in dbData.AssistPlayerDict.items():
- if "IsGet" in assistPlayerInfo:
- # 已经接受感谢奖励的不再处理
- continue
-
- if assistPlayerID not in thanksMgr.assistPlayerThanksDict:
- thanksMgr.assistPlayerThanksDict[assistPlayerID] = []
- assistPlayerThanksList = thanksMgr.assistPlayerThanksDict[assistPlayerID]
- assistPlayerThanksList.append(dbData)
+ for assistPlayerID, assistPlayerInfo in dbData.AssistPlayerDict.items():
+ if "IsGet" in assistPlayerInfo:
+ # 已经接受感谢奖励的不再处理
+ continue
+
+ if assistPlayerID not in thanksMgr.assistPlayerThanksDict:
+ thanksMgr.assistPlayerThanksDict[assistPlayerID] = []
+ assistPlayerThanksList = thanksMgr.assistPlayerThanksDict[assistPlayerID]
+ assistPlayerThanksList.append(dbData)
return
@@ -688,11 +687,11 @@
curPlayer = playerMgr.FindPlayerByID(playerID)
if not curPlayer:
continue
- __AddAssistThanks(curPlayer, assistAwardItemID, mapID, lineID, assistPlayerDict, npcID)
+ AddNewAssistThanks(curPlayer, assistAwardItemID, mapID, lineID, assistPlayerDict, npcID)
return
-def __AddAssistThanks(curPlayer, itemID, mapID, lineID, assistPlayerDict, npcID=0, exData=""):
+def AddNewAssistThanks(curPlayer, itemID, mapID, lineID, assistPlayerDict, npcID=0, exData=""):
## 添加协助感谢数据
playerID = curPlayer.GetPlayerID()
@@ -718,7 +717,7 @@
assistThanksMgr = PyDataManager.GetPlayerAssistThanksPyManager()
OnInitAssistThanksData(assistThanksMgr, newThanks)
- GameWorld.DebugLog("增加协助感谢: mapID=%s,lineID=%s,npcID=%s,exData=%s" % (mapID, lineID, npcID, exData), playerID)
+ GameWorld.DebugLog("增加协助感谢: itemID=%s,mapID=%s,lineID=%s,npcID=%s,exData=%s" % (itemID, mapID, lineID, npcID, exData), playerID)
return
#// B0 14 使用协助感谢礼盒 #tagCGUseAssistThanksGift
@@ -784,16 +783,12 @@
queryData = [itemID]
QueryPlayerResult_PlayerAssist(curPlayer, "UseAssistThanksGift", queryData)
- # 加入协助玩家接收感谢列表
+ # 通知协助玩家可接收的感谢个数
playerMgr = GameWorld.GetPlayerManager()
for assistPlayerID in useThanks.AssistPlayerDict.keys():
- if assistPlayerID not in assistThanksMgr.assistPlayerThanksDict:
- assistThanksMgr.assistPlayerThanksDict[assistPlayerID] = []
- assistPlayerThanksList = assistThanksMgr.assistPlayerThanksDict[assistPlayerID]
- assistPlayerThanksList.append(useThanks)
assistPlayer = playerMgr.FindPlayerByID(assistPlayerID)
if assistPlayer:
- SyncCanGetAssistThanksGiftCount(assistPlayer, len(assistPlayerThanksList))
+ SyncCanGetAssistThanksGiftCount(assistPlayer)
return
#// B0 15 接收协助感谢礼物 #tagCGGetAssistThanksGift
@@ -814,9 +809,14 @@
GameWorld.ErrLog("玩家没有可接收感谢的协助感谢礼盒!", playerID)
return
assistPlayerThanksList = assistThanksMgr.assistPlayerThanksDict[playerID]
- if not assistPlayerThanksList:
+ getThanks = None
+ for thanks in assistPlayerThanksList:
+ if thanks.ThanksState:
+ getThanks = thanks
+ break
+ if not getThanks:
+ GameWorld.ErrLog("找不到玩家可接收感谢的协助感谢礼盒!", playerID)
return
- getThanks = assistPlayerThanksList[0] # 默认接收第一个
itemID = getThanks.ItemID
ipyData = IpyGameDataPY.GetIpyGameData("AssistThanksGift", itemID)
if not ipyData:
@@ -862,7 +862,7 @@
if getThanks in assistThanksMgr.allAssistThanksList:
assistThanksMgr.allAssistThanksList.remove(getThanks)
- assistPlayerThanksList.pop(0) # 移除
+ assistPlayerThanksList.remove(getThanks) # 移除
updateTodayGiftCount = todayGiftCount + 1
# 更新当天该礼盒ID已领取次数
@@ -874,25 +874,36 @@
assistPlayerInfoDict = thanks.AssistPlayerDict[playerID]
assistPlayerInfoDict["TodayGiftCount"] = updateTodayGiftCount
- SyncCanGetAssistThanksGiftCount(curPlayer, len(assistPlayerThanksList))
+ SyncCanGetAssistThanksGiftCount(curPlayer, True)
- # 通知地图
isCurDailyDate = getThanks.DailyDateStr == GameWorld.GetDailyDateStr()
+
+ # 如果是镜像协助的,更新今日接收感谢礼盒次数
+ if isCurDailyDate:
+ if IpyGameDataPY.GetIpyGameDataNotLog("FBHelpBattle", getThanks.MapID, getThanks.LineID):
+ PlayerFBHelpBattle.UpdateGetThanksGiftCountDict(curPlayer, itemID, updateTodayGiftCount)
+
+ # 通知地图
queryData = [itemID, isExtraAward, isCurDailyDate, updateTodayGiftCount]
QueryPlayerResult_PlayerAssist(curPlayer, "GetAssistThanksGift", queryData)
return
-def SyncCanGetAssistThanksGiftCount(curPlayer, canGetCount=None):
+def SyncCanGetAssistThanksGiftCount(curPlayer, isForce=False):
## 通知可接收协助感谢礼物个数
- if canGetCount == None:
- playerID = curPlayer.GetPlayerID()
- assistThanksMgr = PyDataManager.GetPlayerAssistThanksPyManager()
- if playerID not in assistThanksMgr.assistPlayerThanksDict:
- return
- assistPlayerThanksList = assistThanksMgr.assistPlayerThanksDict[playerID]
- if not assistPlayerThanksList:
- return
- canGetCount = len(assistPlayerThanksList)
+
+ playerID = curPlayer.GetPlayerID()
+ assistThanksMgr = PyDataManager.GetPlayerAssistThanksPyManager()
+ if playerID not in assistThanksMgr.assistPlayerThanksDict:
+ return
+ assistPlayerThanksList = assistThanksMgr.assistPlayerThanksDict[playerID]
+ canGetCount = 0
+ for thanks in assistPlayerThanksList:
+ if thanks.ThanksState:
+ canGetCount += 1
+
+ if not canGetCount and not isForce:
+ return
+
countPack = ChPyNetSendPack.tagGCCanGetAssistThanksGiftCount()
countPack.CanGetCount = canGetCount
NetPackCommon.SendFakePack(curPlayer, countPack)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py
index 60b9741..1e4371b 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py
@@ -227,10 +227,6 @@
def GetChatBubbleBox(curPlayer): return curPlayer.GetExAttr10()
def SetChatBubbleBox(curPlayer, value): return curPlayer.SetExAttr10(value)
-##今日已获得仙缘币
-def GetTodayXianyuanCoin(curPlayer): return curPlayer.GetExAttr11()
-def SetTodayXianyuanCoin(curPlayer, value): return curPlayer.SetExAttr11(value)
-
##玩家主动退出仙盟时间(<100代表退出次数)
def SetLeaveFamilyTime(curPlayer, value, isSyncMap=True):
curPlayer.SetExAttr12(value)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
index 06fec5a..f110140 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
@@ -19,11 +19,10 @@
import IpyGameDataPY
import PlayerViewCache
import IPY_GameServer
-import PlayerControl
+import PlayerAssist
import ShareDefine
import PyGameData
import GameWorld
-import ChConfig
import random
import time
@@ -31,7 +30,6 @@
MaxRobotID = 100 # 最大机器人NPC定义ID
Def_RecType_CheckInPlayer = ShareDefine.Def_UniversalGameRecType_FBHelpBattleCheckInPlayer
-Def_RecType_HelpRecord = ShareDefine.Def_UniversalGameRecType_FBHelpBattleRecord
## 助战玩家简要信息
class HelpBattlePlayer():
@@ -48,21 +46,7 @@
self.checkInCount = 0 # 累计登记次数
self.checkInTime = 0
self.todayHelpCountDict = {} # 今天已助战次数 {(mapID, lineID):count, ...}, 通用次数时lineID默认为0
- self.todayXianyuanCoin = 0 # 今日已获得仙缘币
- return
-
-## 助战记录 - 目前只记录未通知玩家的助战信息
-class FBHelpBattleRecord():
-
- def __init__(self):
- self.callPlayerID = 0 # 召唤他的玩家ID
- self.callPlayerName = ""
- self.mapID = 0
- self.funcLineID = 0
- self.xianyuanCoinAdd = 0 # 0代表到达上限
- self.relation = 0 # 当时的关系
- self.vipLV = 0 # 当时的VIP等级
- self.recordTime = 0 # 记录的时间
+ self.getThanksGiftCountDict = {} # 协助方今日接收该感谢礼盒次数 {itemID:count, ...}
return
def OnServerStart():
@@ -83,44 +67,28 @@
helpBattlePlayer.realmLV = int(str(value5)[-3:-1])
helpBattlePlayer.job = value5 % 10
helpBattlePlayer.playerName = recData.GetStrValue1()
- helpBattlePlayer.todayXianyuanCoin = int(recData.GetStrValue2())
- helpCountDictStr = recData.GetStrValue3()
+ strValue3 = recData.GetStrValue3()
+ strValue3List = strValue3.split("|")
+ helpCountDictStr = strValue3List[0] if len(strValue3List) > 0 else "{}"
+ getThanksGiftCountDictStr = strValue3List[1] if len(strValue3List) > 1 else "{}"
+
if helpCountDictStr.startswith("{") and helpCountDictStr.endswith("}"):
helpBattlePlayer.todayHelpCountDict = eval(helpCountDictStr)
else:
GameWorld.ErrLog("LoadCheckInPlayerError: helpCountDictStr=%s" % helpCountDictStr, playerID)
+
+ if getThanksGiftCountDictStr.startswith("{") and getThanksGiftCountDictStr.endswith("}"):
+ helpBattlePlayer.getThanksGiftCountDict = eval(getThanksGiftCountDictStr)
+ else:
+ GameWorld.ErrLog("LoadCheckInPlayerError: getThanksGiftCountDictStr=%s" % getThanksGiftCountDictStr, playerID)
PyGameData.g_fbHelpBattleCheckInPlayerDict[playerID] = helpBattlePlayer
GameWorld.Log("加载助战登记玩家记录: %s" % len(PyGameData.g_fbHelpBattleCheckInPlayerDict))
-
- helpRecordRecList = universalRecMgr.GetTypeList(Def_RecType_HelpRecord)
- for index in xrange(helpRecordRecList.Count()):
- recData = helpRecordRecList.At(index)
- playerID = recData.GetValue1()
-
- helpRecord = FBHelpBattleRecord()
- helpRecord.callPlayerID = int(recData.GetStrValue2())
- helpRecord.callPlayerName = recData.GetStrValue1()
- helpRecord.mapID = recData.GetValue2()
- helpRecord.funcLineID = recData.GetValue3()
- helpRecord.xianyuanCoinAdd = recData.GetValue4()
- helpRecord.relation = recData.GetValue5() % 10
- helpRecord.vipLV = recData.GetValue5() / 10
- helpRecord.recordTime = recData.GetTime()
-
- unNotifyRecordList = PyGameData.g_fbHelpBattleRecord.get(playerID, [])
- unNotifyRecordList.append(helpRecord)
- PyGameData.g_fbHelpBattleRecord[playerID] = unNotifyRecordList
-
- GameWorld.Log("加载玩家未同步助战: %s" % len(PyGameData.g_fbHelpBattleRecord))
- for playerID, helpList in PyGameData.g_fbHelpBattleRecord.items():
- GameWorld.Log("加载玩家未同步助战记录: %s" % (len(helpList)), playerID)
return
def OnServerClose():
GameWorld.Log("关服保存助战相关信息...")
universalRecMgr = GameWorld.GetUniversalRecMgr()
universalRecMgr.Delete(Def_RecType_CheckInPlayer)
- universalRecMgr.Delete(Def_RecType_HelpRecord)
GameWorld.Log("保存助战登记玩家记录: %s" % len(PyGameData.g_fbHelpBattleCheckInPlayerDict))
checkInPlayerRecList = universalRecMgr.GetTypeList(Def_RecType_CheckInPlayer)
@@ -133,23 +101,10 @@
recData.SetValue4(checkInPlayer.checkInCount)
recData.SetValue5(int("%d%02d%02d%d" % (checkInPlayer.playerLV, checkInPlayer.vipLV, checkInPlayer.realmLV, checkInPlayer.job)))
recData.SetStrValue1(checkInPlayer.playerName)
- recData.SetStrValue2(str(checkInPlayer.todayXianyuanCoin))
- recData.SetStrValue3(str(checkInPlayer.todayHelpCountDict).replace(" ", ""))
+ strValue3 = "%s|%s" % (str(checkInPlayer.todayHelpCountDict).replace(" ", ""),
+ str(checkInPlayer.getThanksGiftCountDict).replace(" ", ""))
+ recData.SetStrValue3(strValue3)
- GameWorld.Log("保存助战未同步记录: %s" % len(PyGameData.g_fbHelpBattleRecord))
- helpRecordRecList = universalRecMgr.GetTypeList(Def_RecType_HelpRecord)
- for playerID, helpList in PyGameData.g_fbHelpBattleRecord.items():
- GameWorld.Log("玩家未同步助战记录: %s" % (len(helpList)), playerID)
- for helpRecord in helpList:
- recData = helpRecordRecList.AddRec()
- recData.SetTime(helpRecord.recordTime)
- recData.SetValue1(playerID)
- recData.SetValue2(helpRecord.mapID)
- recData.SetValue3(helpRecord.funcLineID)
- recData.SetValue4(helpRecord.xianyuanCoinAdd)
- recData.SetValue5(helpRecord.vipLV*10+helpRecord.relation)
- recData.SetStrValue1(helpRecord.callPlayerName)
- recData.SetStrValue2(str(helpRecord.callPlayerID))
return
def HelpBattleOnDay():
@@ -166,77 +121,7 @@
GameWorld.Log("清除超时助战登记玩家: curTime=%s,checkInTime=%s" % (curTime, checkInTime), playerID)
continue
checkInPlayer.todayHelpCountDict = {}
- checkInPlayer.todayXianyuanCoin = 0
- return
-
-def OnHelpPlayerLogin(curPlayer):
- playerID = curPlayer.GetPlayerID()
- if playerID not in PyGameData.g_fbHelpBattleRecord:
- return
- unNotifyRecordList = PyGameData.g_fbHelpBattleRecord.pop(playerID)
- SendMapServer_FBHelpBattleRecord(curPlayer, unNotifyRecordList, True)
- return
-
-def OnMinuteProcess():
- ''' 每分钟处理
- 前X次登记后,分别在登记后的第X分钟赠送玩家宗门试炼一层的助战仙缘币,并伪造一份助战记录。
- 助战记录随机从助战登记库里随机挑选1名除自己外的玩家,如果没有玩家,该特殊逻辑不生效
- '''
-
- if not PyGameData.g_fbHelpBattleCheckInPlayerDict:
- return
- helpPlayerIDList = PyGameData.g_fbHelpBattleCheckInPlayerDict.keys()
-
- curTime = int(time.time())
-
- playerManager = GameWorld.GetPlayerManager()
- newbieCheckInCount = IpyGameDataPY.GetFuncCfg("HelpBattleCheckIn", 2) # 新手前X次登记特殊逻辑
- sysAutoCallHelpDict = IpyGameDataPY.GetFuncEvalCfg("HelpBattleCheckIn", 3) # 系统自动召唤助战,默认功能线路0, {登记多少分钟后:[随机地图ID, ...], ...}
- for playerID, checkInPlayer in PyGameData.g_fbHelpBattleCheckInPlayerDict.items():
-
- curPlayer = playerManager.FindPlayerByID(playerID)
-
- if not curPlayer or PlayerControl.GetIsTJG(curPlayer):
- #GameWorld.DebugLog(" 离线或脱机不处理, playerID=%s" % playerID)
- continue
-
- checkInCount = checkInPlayer.checkInCount
- if checkInCount > newbieCheckInCount:
- #GameWorld.DebugLog(" 超过规定的登记次数,不处理, playerID=%s,checkInCount=%s > newbieCheckInCount=%s"
- # % (playerID, checkInCount, newbieCheckInCount))
- continue
-
- checkInTime = checkInPlayer.checkInTime
- checkInMinutes = (curTime - checkInTime) / 60
- if checkInMinutes not in sysAutoCallHelpDict:
- #GameWorld.DebugLog(" 签到时间不满足,不处理, playerID=%s,checkInMinutes=%s not in %s"
- # % (playerID, checkInMinutes, sysAutoCallHelpDict))
- continue
-
- randHelpMapList = sysAutoCallHelpDict[checkInMinutes]
- # 随机一个不是自己的登记玩家
- for _ in xrange(20):
- randPlayerID = random.choice(helpPlayerIDList)
- if randPlayerID != playerID:
- break
-
- # 只有自己不处理
- if randPlayerID == playerID:
- #GameWorld.DebugLog(" 登记玩家只有自己,不处理, playerID=%s" % (playerID))
- continue
-
- randHelpMapID = random.choice(randHelpMapList)
- lineID = 0 # 默认0
-
- helpBattlePlayer = PyGameData.g_fbHelpBattleCheckInPlayerDict[randPlayerID]
- relation = __GetHelpBattleRelation(curPlayer, helpBattlePlayer)
- calledPlayerID = playerID # 因为这里是系统模拟玩家被召唤助战,所以被召唤玩家就是当前被处理的玩家ID
- GameWorld.DebugLog(" 系统模拟召唤新手登记玩家: checkInMinutes=%s,playerID=%s,callPlayerID=%s" % (checkInMinutes, playerID, randPlayerID))
-
- calledPlayerDict = {calledPlayerID:relation}
- msgList = ["Call", randHelpMapID, lineID, calledPlayerDict]
- __DoFBHelpBattleCall(randPlayerID, helpBattlePlayer.playerName, msgList)
-
+ checkInPlayer.getThanksGiftCountDict = {}
return
## 是否在助战登记列表里
@@ -266,7 +151,12 @@
# 扫荡召唤
elif cmd == "SweepCall":
result = __DoFBHelpBattleSweepCall(curPlayer, msgList)
-
+
+ # 协助完成
+ elif cmd == "AssistFinish":
+ __DoAssistFinish(curPlayer, msgList)
+ return
+
if result == None:
return
@@ -279,7 +169,6 @@
playerID = curPlayer.GetPlayerID()
curCache = PlayerViewCache.FindViewCache(playerID)
haveViewCache = 1 if curCache else 0
- todayXianyuanCoin = PlayerControl.GetTodayXianyuanCoin(curPlayer)
helpBattlePlayer = PyGameData.g_fbHelpBattleCheckInPlayerDict.get(playerID)
if not helpBattlePlayer:
@@ -294,11 +183,10 @@
helpBattlePlayer.vipLV = curPlayer.GetVIPLv()
helpBattlePlayer.checkInCount = checkInCount + 1
helpBattlePlayer.checkInTime = curTime
- helpBattlePlayer.todayXianyuanCoin = todayXianyuanCoin
isOK = 1 # 默认成功
- GameWorld.Log("玩家助战登记: playerLV=%s,fightPower=%s,familyID=%s,vipLV=%s,todayXianyuanCoin=%s,checkInCount=%s,haveViewCache=%s"
- % (curPlayer.GetLV(), fightPower, curPlayer.GetFamilyID(), curPlayer.GetVIPLv(), todayXianyuanCoin, checkInCount + 1, haveViewCache), playerID)
+ GameWorld.Log("玩家助战登记: playerLV=%s,fightPower=%s,familyID=%s,vipLV=%s,checkInCount=%s,haveViewCache=%s"
+ % (curPlayer.GetLV(), fightPower, curPlayer.GetFamilyID(), curPlayer.GetVIPLv(), checkInCount + 1, haveViewCache), playerID)
return [isOK, haveViewCache]
def UpdateCheckInPlayerInfo(playerID, fightPower, familyID, playerName):
@@ -320,8 +208,6 @@
helpBattlePlayer = PyGameData.g_fbHelpBattleCheckInPlayerDict[playerID]
if refreshType == IPY_GameServer.CDBPlayerRefresh_LV:
helpBattlePlayer.playerLV = value
- elif refreshType == IPY_GameServer.CDBPlayerRefresh_ExAttr11:
- helpBattlePlayer.todayXianyuanCoin = value
elif refreshType == IPY_GameServer.CDBPlayerRefresh_VIPLv:
helpBattlePlayer.vipLV = value
else:
@@ -556,7 +442,7 @@
def __DoFBHelpBattleSweepCall(curPlayer, msgList):
''' 扫荡助战列表刷新且直接召唤
- 随机选择免费的玩家、过滤仙缘币已达上限或溢出的玩家
+ 随机选择免费的玩家
'''
mapID, funcLineID = msgList[1:]
@@ -580,8 +466,6 @@
helpCountKey = (mapID, helpCountLineID)
playerID = curPlayer.GetPlayerID()
- tagPlayerID = playerID
- tagPlayerName = curPlayer.GetName()
GameWorld.Log("扫荡刷新助战列表: mapID=%s,funcLineID=%s,helpCountLineID=%s" % (mapID, funcLineID, helpCountLineID), playerID)
curTime = int(time.time())
@@ -589,11 +473,6 @@
checkInValidHours = IpyGameDataPY.GetFuncCfg("HelpBattleCheckIn", 1) # 登记有效时长,小时
checkInValidSeconds = checkInValidHours * 3600
- xianyuanCoinUpper = IpyGameDataPY.GetFuncCfg("HelpBattlePoint", 1) # 每日仙缘币上限
- baseHelpPoint = fbFuncIpyData.GetHelpPoint() # 助战 - 基础仙缘币
- relationCoinAddDict = IpyGameDataPY.GetFuncEvalCfg("HelpBattlePoint", 2, {}) # 社交关系加成 {"社交关系":[过关加成, 助战加成], ...}
-
- isSweep = True
onlyFree = True
checkInPlayerIDList = PyGameData.g_fbHelpBattleCheckInPlayerDict.keys()
random.shuffle(checkInPlayerIDList) # 刷新纯随机
@@ -607,12 +486,8 @@
checkInValidSeconds, curTime, helpCountKey, dayFreeHelpCount, onlyFree)
if not canHelp:
continue
-
+ helpBattlePlayer.todayHelpCountDict[helpCountKey] = helpBattlePlayer.todayHelpCountDict.get(helpCountKey, 0) + 1
relation = __GetHelpBattleRelation(curPlayer, helpBattlePlayer)
- if not __DoCallHelpPlayer(tagPlayerID, tagPlayerName, helpBattlePlayer, relation, mapID, funcLineID, helpCountKey, isSweep,
- curTime, xianyuanCoinUpper, relationCoinAddDict, baseHelpPoint):
- continue
-
helpBattlePlayerDict[checkInPlayerID] = __GetNotifyMapServerHelpPlayerInfoDict(helpBattlePlayer, needGoldCall, helpBattlePlayer.job, relation)
# 不足的机器人NPC补足
@@ -629,62 +504,6 @@
GameWorld.Log(" helpBattlePlayerDict=%s" % (helpBattlePlayerDict), playerID)
return [helpBattlePlayerDict]
-
-def __DoCallHelpPlayer(callPlayerID, callPlayerName, helpBattlePlayer, relation, mapID, funcLineID, helpCountKey, isSweep, curTime,
- xianyuanCoinUpper, relationCoinAddDict, baseHelpPoint):
-
- calledPlayerID = helpBattlePlayer.playerID
- addCoinRate = 10000 # 基础倍率
- playerXianyuanCoinUpper = xianyuanCoinUpper
- relationAddList = relationCoinAddDict.get(str(relation), [])
- relationAdd = relationAddList[1] if len(relationAddList) == 2 else 0
-
- todayXianyuanCoin = helpBattlePlayer.todayXianyuanCoin # 今日已获得仙缘币
- vipLV = helpBattlePlayer.vipLV
- if vipLV:
- xianyuanCoinUpperAdd = PlayerControl.GetPrivilegeValue(vipLV, ChConfig.VIPPrivilege_XianyuanCoinUpperAdd)
- xianyuanCoinAddPer = PlayerControl.GetPrivilegeValue(vipLV, ChConfig.VIPPrivilege_XianyuanCoinAddPer)
-
- playerXianyuanCoinUpper += xianyuanCoinUpperAdd
- addCoinRate += xianyuanCoinAddPer
-
- # 仙缘币公式=(通关仙缘币或助战仙缘币+社交关系加成)*VIP倍数
- coinAdd = int((baseHelpPoint + relationAdd) * addCoinRate / 10000.0)
- canAddMax = max(playerXianyuanCoinUpper - todayXianyuanCoin, 0)
-
- # 扫荡不可溢出
- if isSweep and coinAdd > canAddMax:
- GameWorld.DebugLog(" 今日仙缘币已达上限, calledPlayerID=%s,coinAdd=%s > canAddMax=%s" % (calledPlayerID, coinAdd, canAddMax))
- return
- coinAddReal = min(coinAdd, canAddMax) # 实际加仙缘币
-
- todayMapHelpCount = helpBattlePlayer.todayHelpCountDict.get(helpCountKey, 0) + 1
- helpBattlePlayer.todayHelpCountDict[helpCountKey] = todayMapHelpCount
- GameWorld.DebugLog(" 助战增加仙缘币: todayXianyuanCoin=%s,coinUpper=%s,canAddMax=%s,coinAdd=%s,coinAddReal=%s,todayMapHelpCount=%s"
- % (todayXianyuanCoin, playerXianyuanCoinUpper, canAddMax, coinAdd, coinAddReal, todayMapHelpCount), calledPlayerID)
-
- # GameServer 直接先加
- helpBattlePlayer.todayXianyuanCoin += coinAddReal
-
- helpRecord = FBHelpBattleRecord()
- helpRecord.callPlayerID = callPlayerID # 召唤他的玩家ID
- helpRecord.callPlayerName = callPlayerName
- helpRecord.mapID = mapID
- helpRecord.funcLineID = funcLineID
- helpRecord.xianyuanCoinAdd = coinAddReal
- helpRecord.relation = relation
- helpRecord.vipLV = vipLV
- helpRecord.recordTime = curTime
-
- calledPlayer = GameWorld.GetPlayerManager().FindPlayerByID(calledPlayerID)
- # 非脱机在线直接通知地图
- if calledPlayer and not PlayerControl.GetIsTJG(calledPlayer):
- SendMapServer_FBHelpBattleRecord(calledPlayer, [helpRecord])
- else:
- unNotifyRecordList = PyGameData.g_fbHelpBattleRecord.get(calledPlayerID, [])
- unNotifyRecordList.append(helpRecord)
- PyGameData.g_fbHelpBattleRecord[calledPlayerID] = unNotifyRecordList
- return True
def __DoFBHelpBattleCall(callPlayerID, callPlayerName, msgList):
''' 助战召唤,不管最终过关与否,被召唤方都直接算助战成功,这里处理被召唤的,主动方在地图直接处理
@@ -704,31 +523,41 @@
helpCountLineID = 0
helpCountKey = (mapID, helpCountLineID)
- curTime = int(time.time())
- xianyuanCoinUpper = IpyGameDataPY.GetFuncCfg("HelpBattlePoint", 1) # 每日仙缘币上限
- baseHelpPoint = fbFuncIpyData.GetHelpPoint() # 助战 - 基础仙缘币
- relationCoinAddDict = IpyGameDataPY.GetFuncEvalCfg("HelpBattlePoint", 2, {}) # 社交关系加成 {"社交关系":[过关加成, 助战加成], ...}
GameWorld.DebugLog("召唤助战: mapID=%s, funcLineID=%s, helpCountKey=%s, calledPlayerDict=%s" % (mapID, funcLineID, helpCountKey, calledPlayerDict), callPlayerID)
- isSweep = False
- for calledPlayerID, relation in calledPlayerDict.items():
+ for calledPlayerID in calledPlayerDict.keys():
if calledPlayerID not in PyGameData.g_fbHelpBattleCheckInPlayerDict:
continue
helpBattlePlayer = PyGameData.g_fbHelpBattleCheckInPlayerDict[calledPlayerID]
- __DoCallHelpPlayer(callPlayerID, callPlayerName, helpBattlePlayer, relation, mapID, funcLineID, helpCountKey, isSweep,
- curTime, xianyuanCoinUpper, relationCoinAddDict, baseHelpPoint)
+ helpBattlePlayer.todayHelpCountDict[helpCountKey] = helpBattlePlayer.todayHelpCountDict.get(helpCountKey, 0) + 1
return
-def SendMapServer_FBHelpBattleRecord(curPlayer, syncHelpRecordList, isLogin=False):
- if not syncHelpRecordList:
- return
+def __DoAssistFinish(curPlayer, msgList):
+ ## 协助完成
- helpRecordList = []
- for record in syncHelpRecordList:
- helpRecordList.append([record.callPlayerID, record.callPlayerName, record.mapID, record.funcLineID,
- record.xianyuanCoinAdd, record.relation, record.vipLV, record.recordTime])
- addXianyuanCoinMsg = str(["HelpRecord", helpRecordList, isLogin])
- curPlayer.MapServer_QueryPlayerResult(0, 0, 'FBHelpBattle', addXianyuanCoinMsg, len(addXianyuanCoinMsg))
- GameWorld.DebugLog(" MapServer_QueryPlayerResult %s" % addXianyuanCoinMsg, curPlayer.GetPlayerID())
+ liheItemID, mapID, lineID, assistPlayerIDList = msgList[1:]
+
+ assistPlayerDict = {}
+ for assistPlayerID in assistPlayerIDList:
+ if assistPlayerID not in PyGameData.g_fbHelpBattleCheckInPlayerDict:
+ continue
+ helpBattlePlayer = PyGameData.g_fbHelpBattleCheckInPlayerDict[assistPlayerID]
+ assistPlayerDict[assistPlayerID] = {"PlayerName":helpBattlePlayer.playerName, "Job":helpBattlePlayer.job,
+ "LV":helpBattlePlayer.playerLV, "RealmLV":helpBattlePlayer.realmLV,
+ "TodayGiftCount":helpBattlePlayer.getThanksGiftCountDict.get(liheItemID, 0)}
+
+ # 插入新协助感谢
+ PlayerAssist.AddNewAssistThanks(curPlayer, liheItemID, mapID, lineID, assistPlayerDict)
+ return
+
+def UpdateGetThanksGiftCountDict(curPlayer, itemID, updateTodayGiftCount):
+ ## 更新今日接收感谢礼盒次数
+
+ playerID = curPlayer.GetPlayerID()
+ if playerID not in PyGameData.g_fbHelpBattleCheckInPlayerDict:
+ return
+ helpBattlePlayer = PyGameData.g_fbHelpBattleCheckInPlayerDict[playerID]
+ helpBattlePlayer.getThanksGiftCountDict[itemID] = updateTodayGiftCount
+ GameWorld.DebugLog(" 更新镜像协助今日接收感谢礼盒次数: itemID=%s,updateTodayGiftCount=%s" % (itemID, updateTodayGiftCount), playerID)
return
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/PyGameData.py b/ServerPython/CoreServerGroup/GameServer/Script/PyGameData.py
index 88cb507..246e322 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/PyGameData.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/PyGameData.py
@@ -82,7 +82,6 @@
g_bourseItemTradingTimeDict = {} # 物品开始交易的时间记录 {guid:tick}
g_fbHelpBattleCheckInPlayerDict = {} # 副本助战玩家登记缓存 {playerID:HelpBattlePlayer, ...}
-g_fbHelpBattleRecord = {} # 未同步的副本助战记录 {playerID:[FBHelpBattleRecord, ...], ...}
g_autoViceleaderDict = {}#自动安排副盟主的玩家记录{familyID:[]}
g_forbidAutoViceleaderFamily = [] #禁止自动安排副盟主的仙盟[familyID,..]
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index a520f4d..2b7a31f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -642,7 +642,7 @@
Def_BT_FCCostGold, #消费排行榜(仙界盛典)
Def_BT_Campaign_RuneLV, #符印等级(开服活动榜)
- Def_BT_FBHelpBattle, #助战次数排行榜
+ Def_BT_19,
Def_BT_Campaign_GodWeaponLV, #神兵等级(开服活动榜) 20
Def_BT_Campaign_Recharge, #累计充值(开服活动榜)
Def_BT_Campaign_PetLV, #灵宠等级(开服活动榜)
@@ -664,7 +664,6 @@
#排行榜Value1存储境界信息的榜单列表
BTValue1_OfficialRankList = [Def_BT_FightPower, Def_BT_FightPower_Warrior, Def_BT_FightPower_Wizard, Def_BT_FightPower_Assassin,
Def_BT_LV, Def_BT_FightPower_Horse, Def_BT_FightPower_Pet, Def_BT_TrialTower, Def_BT_OffLineEfficient,
- Def_BT_FBHelpBattle,
]
##---比率---
@@ -826,7 +825,7 @@
CDBPlayerRefresh_RealmPoint, # 境界修炼点
CDBPlayerRefresh_Ysog, # 魔精
CDBPlayerRefresh_FamilyActivity, # 仙盟活跃令
-CDBPlayerRefresh_Xianyuancoin, # 仙缘币
+CDBPlayerRefresh_174,
CDBPlayerRefresh_PKState, # 战斗状态 175
CDBPlayerRefresh_BossState, # boss状态
CDBPlayerRefresh_BaseAtkMin, # 基础最小攻击
@@ -891,7 +890,6 @@
TYPE_Price_Ysog = 14 # 魔精
TYPE_Price_FamilyActivity = 15 # 仙盟活跃令
TYPE_Price_FBHelpPoint = 16 # 副本助战积分, 废弃
-TYPE_Price_XianyuanCoin = 17 # 仙缘币
TYPE_Price_Honor = 18 # 荣誉
TYPE_Price_Rune = 23 # 符印精华点
TYPE_Price_RuneSplinters = 24 # 符印碎片
@@ -919,7 +917,6 @@
TYPE_Price_RealmPoint:CDBPlayerRefresh_RealmPoint,
TYPE_Price_Ysog:CDBPlayerRefresh_Ysog,
TYPE_Price_FamilyActivity:CDBPlayerRefresh_FamilyActivity,
- TYPE_Price_XianyuanCoin:CDBPlayerRefresh_Xianyuancoin,
TYPE_Price_Danjing:CDBPlayerRefresh_Danjing,
TYPE_Price_SoulDust:CDBPlayerRefresh_SoulDust,
TYPE_Price_SoulSplinters:CDBPlayerRefresh_SoulSplinters,
@@ -1046,7 +1043,7 @@
Def_UniversalGameRecType_YesterdayPlayerLVInfo,#昨日活跃玩家等级信息7
Def_UniversalGameRecType_StoreServerCntRecord, #商店全服购买记录 8,
Def_UniversalGameRecType_FBHelpBattleCheckInPlayer, #助战玩家登记记录9
- Def_UniversalGameRecType_FBHelpBattleRecord, #助战未同步记录10
+ Def_UniversalGameRecType_10,
Def_UniversalGameRecType_ZhuXianBossRecord, #诛仙BOSS结算记录11
Def_UniversalGameRecType_LuckyTreasure, #幸运鉴宝大奖记录12
Def_UniversalGameRecType_FairyDomain, #缥缈仙域事件次数记录13
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 331cc9e..d82feea 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -285,11 +285,9 @@
Def_ItemID_SoulSplinters = 701 # 直接给聚魂碎片
Def_ItemID_SoulCore = 702 # 直接给核心环
Def_ItemID_Honor = 2141 # 直接给荣誉
-Def_ItemID_XianyuanCoin = 2138 # 直接给仙缘币
Def_TransformItemIDList = [Def_ItemID_FamilyContribution, Def_ItemID_FamilyActive, Def_ItemID_SP, Def_ItemID_GoldPaper,
Def_ItemID_RealmPoint, Def_ItemID_SilverMoney, Def_ItemID_BossReborn, Def_ItemID_Ysog,
- Def_ItemID_SoulDust, Def_ItemID_SoulSplinters, Def_ItemID_SoulCore, Def_ItemID_Honor, Def_ItemID_GoldMoney,
- Def_ItemID_XianyuanCoin]
+ Def_ItemID_SoulDust, Def_ItemID_SoulSplinters, Def_ItemID_SoulCore, Def_ItemID_Honor, Def_ItemID_GoldMoney]
#---------------------------------------------------------------------
#写死的物品类型都放这边
Def_ItemType_All = -1 #所有类型
@@ -3292,9 +3290,6 @@
Def_PDict_EquipTotalBaseDef = "EquipTotalBaseDef" # 装备累计基础防御
Def_PDict_EquipTotalBaseHP = "EquipTotalBaseHP" # 装备累计基础生命
-Def_PDict_TodayXianyuanCoinOnLogin = "TodayXianyuanCoinOnLogin" # 登录时触发过天后今日还需要增加的仙缘币
-Def_PDict_LoginAddTodayXianyuanCoinTime = "LoginAddTodayXianyuanCoinTime" # 登录时记录当天增加仙缘币的time值
-
#---玩家字典KEY,存于数据库---
#===========================================================================
# //玩家通用字典 RoleNomalDict
@@ -3762,7 +3757,6 @@
#助战
Def_PDict_HelpBattleCheckInCount = "HelpBattleCheckInCount" #助战登记次数, 登记次数*10+今日是否登记过
-Def_PDict_HelpBattleTotalCount = "HelpBattleTotalCount" #累计助战次数
Def_PDict_FBRealHelpCount = "FBRealHelpCount_%s" #副本真实助战次数,仅针对真实进去打的副本,参数mapID
#周狂欢
@@ -5115,8 +5109,8 @@
VIPPrivilege_BindJadeWheel, #30 绑玉转盘次数
VIPPrivilege_PrayElixir, #31 丹药祈福次数
VIPPrivilege_32, #32 封魔坛自动挑战
-VIPPrivilege_XianyuanCoinUpperAdd, #33 仙缘币上限加成
-VIPPrivilege_XianyuanCoinAddPer, #34 仙缘币获得倍率加成(万分比)
+VIPPrivilege_33, #33
+VIPPrivilege_34, #34
VIPPrivilege_35, #35 诛仙BOSS购买次数 - 副本总表统一处理
VIPPrivilege_36, #36 仙丹批量炼制
VIPPrivilege_BossHomeBuy, #37 BOSS之家购买次数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
index a8a08f3..83c72bb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -1525,7 +1525,7 @@
return callFunc(curPlayer, mapID, lineID, cnt, isFinish, dataEx)
## 副本助战扫荡结果
-def OnPlayerFBHelpBattleSweepResult(curPlayer, mapID, lineID, helpBattlePlayerDict, addXianyuanCoin, reason):
+def OnPlayerFBHelpBattleSweepResult(curPlayer, mapID, lineID, helpBattlePlayerDict):
do_FBLogic_ID = __GetFBLogic_MapID(mapID)
callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnPlayerFBHelpBattleSweepResult"))
@@ -1533,7 +1533,7 @@
if callFunc == None:
return False
- return callFunc(curPlayer, mapID, lineID, helpBattlePlayerDict, addXianyuanCoin, reason)
+ return callFunc(curPlayer, mapID, lineID, helpBattlePlayerDict)
## 开始公共CD副本扫荡
def OnStartPubCDFBSweep(curPlayer, mapID, lineID, cnt, dataEx):
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 0b23622..9966c85 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
@@ -96,7 +96,6 @@
Over_extrScore = 'extrScore' #已获得额外积分
Over_enterLV = 'enterLV' #进入时等级
Over_leaderID = 'leaderID' #渡劫玩家ID
-Over_xianyuanCoin = 'xianyuanCoin' #获得仙缘币信息 [获得仙缘币数, 没有获得的原因] 原因: 1-达到助战次数上限,2-达到每日获得仙缘币上限
Over_helpPlayer = 'helpPlayer' #助战玩家信息 {"玩家ID":{玩家信息key:value, ...}, ...}
Over_ownerID = 'ownerID' #归属玩家ID
Over_ownerName = 'ownerName' #归属玩家名
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py
index 2dff682..3ed7a04 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py
@@ -18,7 +18,6 @@
import GameWorld
import ChConfig
import PlayerControl
-import PlayerBillboard
import ChPyNetSendPack
import NetPackCommon
import PlayerViewCacheTube
@@ -30,11 +29,11 @@
import GameMap
import NPCCommon
import FBLogic
-import PlayerVip
import IPY_GameWorld
import PlayerActivity
+import ItemControler
-import time
+MaxRobotID = 100 # 最大机器人NPC定义ID
def DoPlayerOnDay(curPlayer):
checkInInfo = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HelpBattleCheckInCount)
@@ -44,21 +43,6 @@
checkInInfo = checkInCount * 10 + 0
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HelpBattleCheckInCount, checkInInfo)
SyncCheckInState(curPlayer, 0, False)
-
- # 重置每日已获得仙缘币
- ondaySetXianyuanCoin = 0
- ondayLoginSetXianyuanCoin = curPlayer.GetDictByKey(ChConfig.Def_PDict_TodayXianyuanCoinOnLogin)
- if ondayLoginSetXianyuanCoin:
- # 这里做时间比较,预防玩家登录后就没有再切换地图,再次在该地图过天会导致设置值错误问题
- loginAddCoinTime = curPlayer.GetDictByKey(ChConfig.Def_PDict_LoginAddTodayXianyuanCoinTime)
- if GameWorld.CheckTimeIsSameServerDayEx(loginAddCoinTime):
- ondaySetXianyuanCoin = ondayLoginSetXianyuanCoin
- GameWorld.DebugLog("玩家过天时,登录增加仙缘币有值,仍然是同一天,仙缘币重置为登录时增加的仙缘币!ondayLoginSetXianyuanCoin=%s" % ondayLoginSetXianyuanCoin)
- else:
- GameWorld.DebugLog("玩家过天时,登录增加仙缘币有值,但是不是同一天了,仙缘币重置为0!")
- PlayerControl.SetTodayXianyuanCoin(curPlayer, ondaySetXianyuanCoin)
- GameWorld.DebugLog("玩家过天设置今日已获得仙缘币: ondaySetXianyuanCoin=%s,ondayLoginSetXianyuanCoin=%s"
- % (ondaySetXianyuanCoin, ondayLoginSetXianyuanCoin))
return
def DoPlayerLogin(curPlayer):
@@ -90,10 +74,6 @@
# 刷新
elif cmd == "Refresh":
__OnHelpBattleRefreshResult(curPlayer, msgList, tick)
-
- # 助战记录
- elif cmd == "HelpRecord":
- __OnHelpBattleRecord(curPlayer, msgList, tick)
# 扫荡召唤
elif cmd == "SweepCall":
@@ -422,208 +402,55 @@
if not fbFuncIpyData:
return
- reason = 0
- addCoinRate = 10000 # 基础倍率
- baseFBPoint = fbFuncIpyData.GetFBPoint() # 过关 - 基础仙缘币
-
- xianyuanCoinUpper = IpyGameDataPY.GetFuncCfg("HelpBattlePoint", 1) # 每日仙缘币上限
- relationCoinAddDict = IpyGameDataPY.GetFuncEvalCfg("HelpBattlePoint", 2, {}) # 社交关系加成 {"社交关系":[过关加成, 助战加成], ...}
- todayXianyuanCoin = PlayerControl.GetTodayXianyuanCoin(curPlayer) # 今日已获得仙缘币
- playerXianyuanCoinUpper = xianyuanCoinUpper
- if curPlayer.GetVIPLv():
- playerXianyuanCoinUpper += PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_XianyuanCoinUpperAdd)
- addCoinRate += PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_XianyuanCoinAddPer)
-
- relation, relationAdd = 0, 0
- for helpPlayerInfoDict in helpBattlePlayerDict.values():
- relation = helpPlayerInfoDict.get("Relation", 0)
- if not relation:
+ assistPlayerIDList = []
+ for helpPlayerID in helpBattlePlayerDict.keys():
+ if helpPlayerID <= MaxRobotID:
continue
- relationAddList = relationCoinAddDict.get(str(relation), [])
- relationAdd += relationAddList[0] if len(relationAddList) == 2 else 0
-
- coinAdd = 0
- if baseFBPoint:
- coinAdd = int((baseFBPoint + relationAdd) * addCoinRate / 10000.0)
- canAddMax = max(playerXianyuanCoinUpper - todayXianyuanCoin, 0)
- coinAddReal = min(coinAdd, canAddMax) # 实际加仙缘币
- if canAddMax == 0 and not reason:
- reason = 2
-
- GameWorld.DebugLog("扫荡副本增加仙缘币: baseFBPoint=%s,relationAdd=%s,addCoinRate=%s,coinAdd=%s,canAddMax=%s,coinAddReal=%s"
- % (baseFBPoint, relationAdd, addCoinRate, coinAdd, canAddMax, coinAddReal), playerID)
- if coinAddReal:
- addDataDict = {"MapID":mapID, "FuncLineID":funcLineID, "IsSweep":1}
- PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_XianyuanCoin, coinAddReal, addDataDict=addDataDict)
- PlayerControl.AddTodayXianyuanCoin(curPlayer, coinAddReal)
-
+ assistPlayerIDList.append(helpPlayerID)
+ __DoGivePlayerAssistLihe(curPlayer, mapID, funcLineID, assistPlayerIDList)
+
#扫荡结果给奖励等
- FBLogic.OnPlayerFBHelpBattleSweepResult(curPlayer, mapID, funcLineID, helpBattlePlayerDict, coinAddReal, reason)
-
- # 通知自己获得仙缘币
- msgPack = ChPyNetSendPack.tagMCAddXianyuanCoinMsg()
- msgPack.MapID = mapID
- msgPack.FuncLineID = funcLineID
- msgPack.Relation = relation
- msgPack.RelationCoinAdd = relationAdd
- msgPack.XianyuanCoinAdd = coinAddReal
- msgPack.Reason = reason
- #msgPack.CallPlayerID = relationPlayerID
- #msgPack.CallPlayerName = relationPlayerName
- msgPack.NameLen = len(msgPack.CallPlayerName)
- msgPack.IsSweep = 1
- NetPackCommon.SendFakePack(curPlayer, msgPack)
+ FBLogic.OnPlayerFBHelpBattleSweepResult(curPlayer, mapID, funcLineID, helpBattlePlayerDict)
return
-def __OnHelpBattleRecord(curPlayer, msgList, tick):
- ## 助战记录同步
- cmd, helpRecordList, isLogin = msgList
+def DoFBHelpBattleFinish(curPlayer, mapID, lineID):
+ ## 副本助战完成
+
+ assistPlayerIDList = []
+ gameFB = GameWorld.GetGameFB()
playerID = curPlayer.GetPlayerID()
- GameWorld.DebugLog("__OnHelpBattleRecord %s,helpRecordList=%s" % (cmd, helpRecordList), playerID)
+ helpBattlePlayerDict = PyGameData.g_fbHelpBattlePlayerDict.get(playerID, {})
+ for helpPlayerID in helpBattlePlayerDict.keys():
+ objID = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_HelpBattleFBObjID % helpPlayerID)
+ if not objID:
+ continue
+ if helpPlayerID <= MaxRobotID:
+ continue
+ assistPlayerIDList.append(helpPlayerID)
+ __DoGivePlayerAssistLihe(curPlayer, mapID, lineID, assistPlayerIDList)
- addXianyuanCoinTotal = 0 # 累计需要增加的仙缘币
- addXianyuanCoinTotalTotay = 0 # 累计需要增加的今日仙缘币
- drList = []
-
- totalHelpCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HelpBattleTotalCount)
- recordPack = ChPyNetSendPack.tagMCHelpBattleRecordList()
- recordPack.RecordList = []
- for recordInfo in helpRecordList:
- callPlayerID, callPlayerName, mapID, funcLineID, xianyuanCoinAdd, relation, vipLV, recordTime = recordInfo
- timeStr = GameWorld.ChangeTimeNumToStr(recordTime)
- isSameDay = GameWorld.CheckTimeIsSameServerDayEx(recordTime)
-
- record = ChPyNetSendPack.tagMCHelpBattleRecord()
- record.CallPlayerID = callPlayerID
- record.CallPlayerName = callPlayerName
- record.NameLen = len(record.CallPlayerName)
- record.MapID = mapID
- record.FuncLineID = funcLineID
- record.XianyuanCoinAdd = xianyuanCoinAdd
- record.Relation = relation
- record.VIPLV = vipLV
- record.HelpTime = timeStr
- recordPack.RecordList.append(record)
- drList.append({"CallPlayerID":callPlayerID, "MapID":mapID, "FuncLineID":funcLineID, "XianyuanCoinAdd":xianyuanCoinAdd,
- "Relation":relation, "VIPLV":vipLV, "HelpTime":timeStr, "IsSameDay":isSameDay})
- addXianyuanCoinTotal += xianyuanCoinAdd
- if isSameDay:
- addXianyuanCoinTotalTotay += xianyuanCoinAdd
- totalHelpCount += 1
-
- recordPack.RecordCount = len(recordPack.RecordList)
- NetPackCommon.SendFakePack(curPlayer, recordPack)
-
- addDataDict = {"HelpList":drList}
- GameWorld.DebugLog(" addXianyuanCoinTotal=%s,addXianyuanCoinTotalTotay=%s,totalHelpCount=%s,isLogin=%s"
- % (addXianyuanCoinTotal, addXianyuanCoinTotalTotay, totalHelpCount, isLogin), playerID)
- PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_XianyuanCoin, addXianyuanCoinTotal, addDataDict=addDataDict, isSysHint=False)
- if addXianyuanCoinTotalTotay:
- PlayerControl.AddTodayXianyuanCoin(curPlayer, addXianyuanCoinTotalTotay)
- if isLogin:
- curPlayer.SetDict(ChConfig.Def_PDict_TodayXianyuanCoinOnLogin, addXianyuanCoinTotalTotay)
- curPlayer.SetDict(ChConfig.Def_PDict_LoginAddTodayXianyuanCoinTime, int(time.time()))
- GameWorld.Log(" 登录时今日助战信息: addXianyuanCoinTotalTotay=%s" % (addXianyuanCoinTotalTotay), playerID)
-
- # 更新总助战次数,更新排行榜
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HelpBattleTotalCount, totalHelpCount)
- if totalHelpCount >= IpyGameDataPY.GetFuncCfg("HelpBattleRefresh", 4):
- PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_FBHelpBattle, totalHelpCount)
return
-def DoFBAddXianyuanCoin(curPlayer, mapID, lineID, isHelp=False):
- '''真人挑战副本增加仙缘币,包含过关或助战(不含镜像助战)
- @param isHelp: 是否助战的
- @return: 获得的仙缘币, 无法获得仙缘币原因(1-达到助战次数上限,2-达到每日获得仙缘币上限)
- '''
- playerID = curPlayer.GetPlayerID()
- fbFuncIpyData = IpyGameDataPY.GetIpyGameData("FBFunc", mapID)
- if not fbFuncIpyData:
- return 0, 0
+def __DoGivePlayerAssistLihe(curPlayer, mapID, lineID, assistPlayerIDList):
+ ## 给玩家协助礼盒奖励
- reason = 0
- addCoinRate = 10000 # 基础倍率
- if not isHelp:
- baseFBPoint = fbFuncIpyData.GetFBPoint() # 过关 - 基础仙缘币
- else:
- baseFBPoint = fbFuncIpyData.GetHelpPoint() # 助战
- dayHelpCountMax = fbFuncIpyData.GetDayHelpCountMax() # 真实助战每日可获得仙缘币次数
- if dayHelpCountMax:
- todayHelpCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FBRealHelpCount % mapID)
- if todayHelpCount >= dayHelpCountMax:
- baseFBPoint = 0
- reason = 1
- GameWorld.DebugLog("达到每日助战可获得仙缘币次数上限!无法再获得!mapID=%s" % (mapID), playerID)
- else:
- todayHelpCount += 1
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FBRealHelpCount % mapID, todayHelpCount)
- GameWorld.DebugLog("增加每日助战可获得仙缘币次数!mapID=%s,todayHelpCount=%s" % (mapID, todayHelpCount), playerID)
-
- xianyuanCoinUpper = IpyGameDataPY.GetFuncCfg("HelpBattlePoint", 1) # 每日仙缘币上限
- relationCoinAddDict = IpyGameDataPY.GetFuncEvalCfg("HelpBattlePoint", 2, {}) # 社交关系加成 {"社交关系":[过关加成, 助战加成], ...}
- todayXianyuanCoin = PlayerControl.GetTodayXianyuanCoin(curPlayer) # 今日已获得仙缘币
- playerXianyuanCoinUpper = xianyuanCoinUpper
- if curPlayer.GetVIPLv():
- playerXianyuanCoinUpper += PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_XianyuanCoinUpperAdd)
- addCoinRate += PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_XianyuanCoinAddPer)
-
- #达到上限也需要记录,所以这里暂不限制
- #if todayXianyuanCoin >= playerXianyuanCoinUpper:
- # GameWorld.DebugLog("玩家今日仙缘币已达上限!todayXianyuanCoin=%s,playerXianyuanCoinUpper=%s"
- # % (todayXianyuanCoin, playerXianyuanCoinUpper), playerID)
- # return
+ if not assistPlayerIDList:
+ return
- relation, relationAdd, relationPlayerID, relationPlayerName = 0, 0, 0, ""
+ liheItemID = 0
+ mapAssistGiftDict = IpyGameDataPY.GetFuncEvalCfg("AssistAward", 2, {})
+ mapID = FBCommon.GetRecordMapID(mapID)
+ if str(mapID) in mapAssistGiftDict:
+ liheItemID = mapAssistGiftDict[str(mapID)][0]
+ if not liheItemID:
+ return
- fbType = GameWorld.GetMap().GetMapFBType()
- if fbType == IPY_GameWorld.fbtSingle:
- gameFB = GameWorld.GetGameFB()
- helpBattlePlayerDict = PyGameData.g_fbHelpBattlePlayerDict.get(playerID, {})
- for helpPlayerID, helpPlayerInfoDict in helpBattlePlayerDict.items():
- objID = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_HelpBattleFBObjID % helpPlayerID)
- if not objID:
- continue
- relation = helpPlayerInfoDict.get("Relation", 0)
- if not relation:
- continue
- relationAddList = relationCoinAddDict.get(str(relation), [])
- relationAdd += relationAddList[0] if len(relationAddList) == 2 else 0
- elif fbType == IPY_GameWorld.fbtTeam:
- if playerID in PyGameData.g_teamFBMemRelationAddDict:
- relation, relationAdd, relationPlayerID, relationPlayerName = PyGameData.g_teamFBMemRelationAddDict.pop(playerID)
-
- coinAdd = 0
- if baseFBPoint:
- coinAdd = int((baseFBPoint + relationAdd) * addCoinRate / 10000.0)
- canAddMax = max(playerXianyuanCoinUpper - todayXianyuanCoin, 0)
- coinAddReal = min(coinAdd, canAddMax) # 实际加仙缘币
- if canAddMax == 0 and not reason:
- reason = 2
-
- if isHelp and not relationPlayerID:
- relationPlayerID = 1
- #GameWorld.DebugLog("没有助战目标则设置relationPlayerID为1,标记是助战的!")
-
- GameWorld.DebugLog("挑战副本增加仙缘币: baseFBPoint=%s,relationAdd=%s,addCoinRate=%s,coinAdd=%s,canAddMax=%s,coinAddReal=%s,relationPlayerID=%s"
- % (baseFBPoint, relationAdd, addCoinRate, coinAdd, canAddMax, coinAddReal, relationPlayerID), playerID)
- if coinAddReal:
- addDataDict = {"MapID":mapID, "FuncLineID":lineID}
- PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_XianyuanCoin, coinAddReal, addDataDict=addDataDict)
- PlayerControl.AddTodayXianyuanCoin(curPlayer, coinAddReal)
-
- # 通知自己获得仙缘币
- msgPack = ChPyNetSendPack.tagMCAddXianyuanCoinMsg()
- msgPack.MapID = mapID
- msgPack.FuncLineID = lineID
- msgPack.Relation = relation
- msgPack.RelationCoinAdd = relationAdd
- msgPack.XianyuanCoinAdd = coinAddReal
- msgPack.Reason = reason
- msgPack.CallPlayerID = relationPlayerID
- msgPack.CallPlayerName = relationPlayerName
- msgPack.NameLen = len(msgPack.CallPlayerName)
- NetPackCommon.SendFakePack(curPlayer, msgPack)
- return coinAddReal, reason
+ ItemControler.GivePlayerItemOrMail(curPlayer, [[liheItemID, 1, 0]])
+
+ msgInfo = str(["AssistFinish", liheItemID, mapID, lineID, assistPlayerIDList])
+ GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0, "FBHelpBattle", msgInfo, len(msgInfo))
+ return
+
def __GetTeamFBMemRelationInfo(curPlayer, isHelp, leavePlayerID):
## 计算队员间相互加成信息,离线玩家不算
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ChaosDemon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ChaosDemon.py
index 12cf089..ef07e1a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ChaosDemon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ChaosDemon.py
@@ -381,9 +381,6 @@
expPoint = addExp / ChConfig.Def_PerPointValue
overDict[FBCommon.Over_exp] = exp
overDict[FBCommon.Over_expPoint] = expPoint
-
- addXianyuanCoin, reason = FBHelpBattle.DoFBAddXianyuanCoin(curPlayer, mapID, 0, isHelp)
- overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
FBCommon.Notify_FB_Over(curPlayer, overDict)
#成就
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py
index d8579a2..b50fa1c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py
@@ -30,7 +30,6 @@
import PlayerSuccess
import EventShell
import EventReport
-import FBHelpBattle
import math
import time
@@ -207,10 +206,6 @@
# if gameFB.GetFBStep() == FB_Step_Fighting:
# __OnDuJieFBStart(tick)
fbStep = gameFB.GetFBStep()
-
-# if lineID !=0 and fbStep == FB_Step_CallHelp:
-# FBHelpBattle.SendGameServer_RefreshHelpBattlePlayer(curPlayer, ChConfig.Def_FBMapID_DuJie)
-# return
if fbStep == FB_Step_MapPrepare:
#初始化并通知等待倒计时
@@ -418,9 +413,6 @@
#清除CD
FBCommon.SetFBPDictValue(curPlayer, ChConfig.Def_PDict_LastEnterFBTick % ChConfig.Def_FBMapID_DuJie, 0)
FBCommon.SyncFBEnterTick(curPlayer)
- if lineID:
- addXianyuanCoin, reason = FBHelpBattle.DoFBAddXianyuanCoin(curPlayer, ChConfig.Def_FBMapID_DuJie, FBPropertyMark)
- overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
FBCommon.NotifyFBOver(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, isPass, overDict)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py
index 1df4214..6ad5125 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py
@@ -36,8 +36,6 @@
import NPCCommon
import FBHelpBattle
import PlayerActLogin
-import PlayerPet
-import PlayerHorse
import math
@@ -127,11 +125,6 @@
if historyStar < needStar:
GameWorld.DebugLog(' 上一层评级未达到%s,无法挑战本层!' % needStar)
return False
- #坐骑与灵宠总等级
- needSumLV = IpyGameDataPY.GetFuncEvalCfg('MunekadoLockLimit', 2, {}).get(lineID, 0)
- if PlayerPet.GetTotalPetLV(curPlayer) + PlayerHorse.GetHorseSumLV(curPlayer) < needSumLV:
- GameWorld.DebugLog(' 坐骑与灵宠总等级未达到%s,无法挑战本层!' % needSumLV)
- return False
return True
@@ -439,11 +432,10 @@
# 如果在副本中过天,则只给物品奖励,不变更过关信息
if not isInFBOnDay:
FBCommon.AddEnterFBCount(curPlayer, mapID, 1)
- addXianyuanCoin, reason = FBHelpBattle.DoFBAddXianyuanCoin(curPlayer, mapID, lineID)
- overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
needSyncFBData = False
else:
curPlayer.SetDict(ChConfig.Def_PlayerKey_IsInFBOnDay, 0)
+ FBHelpBattle.DoFBHelpBattleFinish(curPlayer, mapID, lineID)
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_MunekadoTrialEx, 1)
PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_MunekadoTrial, 1)
#=======================================================================================
@@ -489,7 +481,7 @@
return True
## 助战扫荡结果
-def OnPlayerFBHelpBattleSweepResult(curPlayer, mapID, lineID, helpBattlePlayerDict, addXianyuanCoin, reason):
+def OnPlayerFBHelpBattleSweepResult(curPlayer, mapID, lineID, helpBattlePlayerDict):
#扣门票要在公共逻辑中完成
refreshNPCList = __GetZMSLnpcCfg(lineID, mapID)[0]
@@ -499,8 +491,8 @@
if not lastNPCList:
return
killNPCID = lastNPCList[0][0] # 默认最后一波的NPCID为通关boss奖励ID
- GameWorld.DebugLog("扫荡宗门试炼: killNPCID=%s,addXianyuanCoin=%s,reason=%s,helpBattlePlayerDict=%s"
- % (killNPCID, addXianyuanCoin, reason, helpBattlePlayerDict))
+ GameWorld.DebugLog("扫荡宗门试炼: killNPCID=%s,helpBattlePlayerDict=%s"
+ % (killNPCID, helpBattlePlayerDict))
star = 5
EventReport.WriteEvent_FB(curPlayer, mapID, lineID, ChConfig.CME_Log_End, 0, 1)
@@ -515,7 +507,6 @@
# 通知结果
overDict = {FBCommon.Over_grade:star,FBCommon.Over_dataMapID:mapID,FBCommon.Over_isPass:1, FBCommon.Over_isSweep:1}
overDict[FBCommon.Over_helpPlayer] = helpBattlePlayerDict
- overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
overDict[FBCommon.Over_itemInfo] = jsonItemList
FBCommon.Notify_FB_Over(curPlayer, overDict)
return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
index 2a47654..f46ae81 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
@@ -543,8 +543,6 @@
GameWorld.DebugLog("首次结算奖励,增加挑战次数!", playerID)
needSyncFBData = False
FBCommon.AddEnterFBCount(curPlayer, dataMapID)
- addXianyuanCoin, reason = FBHelpBattle.DoFBAddXianyuanCoin(curPlayer, mapID, lineID)
- overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
else:
GameWorld.DebugLog("副本中过天,不增加挑战次数!", playerID)
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_QueenRelicsEx, 1)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
index b482b0e..ce582b0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -1039,8 +1039,6 @@
PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_Honor, itemCount)
elif itemID == ChConfig.Def_ItemID_GoldMoney:
PlayerControl.GiveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, itemCount)
- #elif itemID == ChConfig.Def_ItemID_XianyuanCoin:
- # PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_XianyuanCoin, itemCount)
return True
def __CrossServerPutInItem(self, packIndex, tagItem, event=["", False, {}]):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 490a212..22f698e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -3170,10 +3170,6 @@
msgInfo = {"PlayerID":curPlayer.GetPlayerID(), "MoneyType":priceType, "Value":value, "GiveType":giveType, "AddDataDict":addDataDict}
GameWorld.SendMsgToClientServer(ShareDefine.CrossServerMsg_GiveMoney, msgInfo, [serverGroupID])
return True
-
- ## 恺英版去除了仙缘币,改为获得仙盟活跃令
- if priceType == ShareDefine.TYPE_Price_XianyuanCoin:
- priceType = ShareDefine.TYPE_Price_FamilyActivity
if priceType == IPY_GameWorld.TYPE_Price_Gold_Money:
if curPlayer.GetGold() + value > ChConfig.Def_PlayerTotalMoney_Gold:
@@ -5946,11 +5942,6 @@
if silverPoint != curPlayer.GetExAttr6():
curPlayer.SetExAttr6(silverPoint)
return
-
-## 玩家今日已获得仙缘币
-def GetTodayXianyuanCoin(curPlayer): return curPlayer.GetExAttr11()
-def SetTodayXianyuanCoin(curPlayer, value): return curPlayer.SetExAttr11(value, False, True)
-def AddTodayXianyuanCoin(curPlayer, addValue): return curPlayer.SetExAttr11(curPlayer.GetExAttr11() + addValue, False, True)
##VIP到期时间, 需要同步GameServer
def GetVIPExpireTime(curPlayer): return curPlayer.GetExAttr9()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index a520f4d..2b7a31f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -642,7 +642,7 @@
Def_BT_FCCostGold, #消费排行榜(仙界盛典)
Def_BT_Campaign_RuneLV, #符印等级(开服活动榜)
- Def_BT_FBHelpBattle, #助战次数排行榜
+ Def_BT_19,
Def_BT_Campaign_GodWeaponLV, #神兵等级(开服活动榜) 20
Def_BT_Campaign_Recharge, #累计充值(开服活动榜)
Def_BT_Campaign_PetLV, #灵宠等级(开服活动榜)
@@ -664,7 +664,6 @@
#排行榜Value1存储境界信息的榜单列表
BTValue1_OfficialRankList = [Def_BT_FightPower, Def_BT_FightPower_Warrior, Def_BT_FightPower_Wizard, Def_BT_FightPower_Assassin,
Def_BT_LV, Def_BT_FightPower_Horse, Def_BT_FightPower_Pet, Def_BT_TrialTower, Def_BT_OffLineEfficient,
- Def_BT_FBHelpBattle,
]
##---比率---
@@ -826,7 +825,7 @@
CDBPlayerRefresh_RealmPoint, # 境界修炼点
CDBPlayerRefresh_Ysog, # 魔精
CDBPlayerRefresh_FamilyActivity, # 仙盟活跃令
-CDBPlayerRefresh_Xianyuancoin, # 仙缘币
+CDBPlayerRefresh_174,
CDBPlayerRefresh_PKState, # 战斗状态 175
CDBPlayerRefresh_BossState, # boss状态
CDBPlayerRefresh_BaseAtkMin, # 基础最小攻击
@@ -891,7 +890,6 @@
TYPE_Price_Ysog = 14 # 魔精
TYPE_Price_FamilyActivity = 15 # 仙盟活跃令
TYPE_Price_FBHelpPoint = 16 # 副本助战积分, 废弃
-TYPE_Price_XianyuanCoin = 17 # 仙缘币
TYPE_Price_Honor = 18 # 荣誉
TYPE_Price_Rune = 23 # 符印精华点
TYPE_Price_RuneSplinters = 24 # 符印碎片
@@ -919,7 +917,6 @@
TYPE_Price_RealmPoint:CDBPlayerRefresh_RealmPoint,
TYPE_Price_Ysog:CDBPlayerRefresh_Ysog,
TYPE_Price_FamilyActivity:CDBPlayerRefresh_FamilyActivity,
- TYPE_Price_XianyuanCoin:CDBPlayerRefresh_Xianyuancoin,
TYPE_Price_Danjing:CDBPlayerRefresh_Danjing,
TYPE_Price_SoulDust:CDBPlayerRefresh_SoulDust,
TYPE_Price_SoulSplinters:CDBPlayerRefresh_SoulSplinters,
@@ -1046,7 +1043,7 @@
Def_UniversalGameRecType_YesterdayPlayerLVInfo,#昨日活跃玩家等级信息7
Def_UniversalGameRecType_StoreServerCntRecord, #商店全服购买记录 8,
Def_UniversalGameRecType_FBHelpBattleCheckInPlayer, #助战玩家登记记录9
- Def_UniversalGameRecType_FBHelpBattleRecord, #助战未同步记录10
+ Def_UniversalGameRecType_10,
Def_UniversalGameRecType_ZhuXianBossRecord, #诛仙BOSS结算记录11
Def_UniversalGameRecType_LuckyTreasure, #幸运鉴宝大奖记录12
Def_UniversalGameRecType_FairyDomain, #缥缈仙域事件次数记录13
--
Gitblit v1.8.0