From 164b1a9e2eb3f9908e95e0050de828f0e35cb74b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 23 五月 2022 16:38:31 +0800
Subject: [PATCH] 9415 【BT5】【后端】古神战场(初版:包含战场副本外的所有功能;副本中暂仅支持击杀玩家玩法)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

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 575ba44..41301f6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -328,7 +328,7 @@
     return
 
 #---------------------------------------------------------------------
-def SendMailBatch(mailTypeKey, batchPlayerIDList, batchAddItemList=[], batchParamList=[], batchGold=[], batchGoldPaper=[], batchSilver=[], batchDetail=[], moneySource=ChConfig.Def_GiveMoney_Mail):
+def SendMailBatch(mailTypeKey, batchPlayerIDList, batchAddItemList=[], batchParamList=[], batchGold=[], batchGoldPaper=[], batchSilver=[], batchDetail=[], moneySource=ChConfig.Def_GiveMoney_Mail, crossMail=False):
     '''批量发送邮件, 用于瞬间需要发送多封(大量)邮件的,比如一些公共副本活动等结算时
     @param mailTypeKey: 邮件模板key
     @param batchPlayerIDList: [playerIDList, playerIDList, ...]
@@ -352,17 +352,17 @@
                 bGoldPaper = [batchGoldPaper[i]] if len(batchGoldPaper) > i else []
                 bSilver = [batchSilver[i]] if len(batchSilver) > i else []
                 bDetail = [batchDetail[i]] if len(batchDetail) > i else []
-                AddUnLoginOKPlayerMailCache(playerID, "ByMailTemplate", [mailTypeKey, bAddItemList, bParamList, bGold, bGoldPaper, bSilver, bDetail, moneySource])
+                AddUnLoginOKPlayerMailCache(playerID, "ByMailTemplate", [mailTypeKey, bAddItemList, bParamList, bGold, bGoldPaper, bSilver, bDetail, moneySource, crossMail])
                 playerIDList.pop(playerIDList.index(playerID))
                 continue
             
-    msgInfo = str([mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList, batchGold, batchGoldPaper, batchSilver, batchDetail, moneySource])
+    msgInfo = str([mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList, batchGold, batchGoldPaper, batchSilver, batchDetail, moneySource, crossMail])
     GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "SendMailBatch", msgInfo, len(msgInfo))
     GameWorld.Log("SendMailBatch %s, batchPlayerIDList=%s, batchAddItemList=%s, batchParamList=%s, batchGold=%s, batchGoldPaper=%s, batchSilver=%s" 
                   % (mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList, batchGold, batchGoldPaper, batchSilver))
     return
 
-def SendMailByKey(mailTypeKey, playerIDList, addItemList, paramList=[], gold=0, goldPaper=0, silver=0, detail="", moneySource=ChConfig.Def_GiveMoney_Mail):
+def SendMailByKey(mailTypeKey, playerIDList, addItemList, paramList=[], gold=0, goldPaper=0, silver=0, detail="", moneySource=ChConfig.Def_GiveMoney_Mail, crossMail=False):
     '''
     @param detail: 记录邮件流向用
     '''
@@ -370,7 +370,7 @@
         mailTypeKey = ShareDefine.DefaultLackSpaceMailType
     
     content = "<MailTemplate>%s</MailTemplate>%s" % (mailTypeKey, json.dumps(paramList, ensure_ascii=False))
-    SendMail("", content, 30, playerIDList, addItemList, gold, goldPaper, silver, detail, moneySource)
+    SendMail("", content, 30, playerIDList, addItemList, gold, goldPaper, silver, detail, moneySource, crossMail)
     return
 
 def SendCrossMail(serverGroupID, mailTypeKey, playerIDList, addItemList, paramList=[]):
@@ -412,7 +412,7 @@
 ## 功能发放物品补偿/奖励邮件
 #  @param addItemList [(itemID, itemCnt, 是否拍品), {或物品信息字典}, ...]
 #  @return
-def SendMail(title, content, getDays, playerIDList, addItemList, gold=0, goldPaper=0, silver=0, detail="", moneySource=ChConfig.Def_GiveMoney_Mail):
+def SendMail(title, content, getDays, playerIDList, addItemList, gold=0, goldPaper=0, silver=0, detail="", moneySource=ChConfig.Def_GiveMoney_Mail, crossMail=False):
     if not playerIDList:
         return
     
@@ -424,7 +424,7 @@
         return
     
     # 跨服服务器不允许发送邮件
-    if GameWorld.IsCrossServer():
+    if GameWorld.IsCrossServer() and not crossMail:
         return
     
     sendPlayerIDList = []
@@ -437,7 +437,7 @@
         sendPlayerIDList.append(playerID)
         
     combineItemList = CombineMailItem(addItemList)
-    cmdList = [title, content, getDays, sendPlayerIDList, combineItemList, gold, goldPaper, silver, detail, moneySource]
+    cmdList = [title, content, getDays, sendPlayerIDList, combineItemList, gold, goldPaper, silver, detail, moneySource, crossMail]
     GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "SendMail", '%s' % (cmdList), len(str(cmdList)))
     return True
 
@@ -476,8 +476,8 @@
             title, content, getDays, addItemList, gold, goldPaper, silver, detail, moneySource = mailInfo
             SendMail(title, content, getDays, playerIDList, addItemList, gold, goldPaper, silver, detail, moneySource)
         elif cacheType == "ByMailTemplate":
-            mailTypeKey, bAddItemList, bParamList, bGold, bGoldPaper, bSilver, bDetail, moneySource = mailInfo
-            SendMailBatch(mailTypeKey, [playerIDList], bAddItemList, bParamList, bGold, bGoldPaper, bSilver, bDetail, moneySource)
+            mailTypeKey, bAddItemList, bParamList, bGold, bGoldPaper, bSilver, bDetail, moneySource, crossMail = mailInfo
+            SendMailBatch(mailTypeKey, [playerIDList], bAddItemList, bParamList, bGold, bGoldPaper, bSilver, bDetail, moneySource, crossMail)
     return
 
 def CombineMailItem(addItemList):
@@ -1785,7 +1785,10 @@
         
         if not FBLogic.OnEnterFBEvent(curPlayer, mapID, lineID, tick):
             GameWorld.DebugLog("    OnEnterFBEvent False!", curPlayer.GetPlayerID())
-            NotifyCode(curPlayer, "SingleEnterDefaul")
+            if mapID in [ChConfig.Def_FBMapID_CrossBattlefield]:
+                NotifyCode(curPlayer, "GeRen_chenxin_268121")
+            else:
+                NotifyCode(curPlayer, "SingleEnterDefaul")
             return
         
     # 需要动态分布线路的地图,发送到跨服服务器进行分配
@@ -1797,7 +1800,7 @@
                 return
             extendInfo["BossID"] = bossID
             
-        msgDict = {"PlayerID":curPlayer.GetPlayerID(), "MapID":mapID, "FuncLineID":lineID}
+        msgDict = {"PlayerID":curPlayer.GetPlayerID(), "MapID":mapID, "FuncLineID":lineID, "LV":curPlayer.GetLV()}
         if extendInfo:
             msgDict.update(extendInfo)
         GameWorld.SendMsgToCrossServer(ShareDefine.ClientServerMsg_EnterFB, msgDict)

--
Gitblit v1.8.0