From 6844bbc5174e39138047b606ac82d74d6e82d91c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 28 十一月 2018 17:39:34 +0800
Subject: [PATCH] 4762 【后端】无队伍或队伍只有一人时无法进入组队副本助战;(可匹配,有次数时可单人进入)       混乱妖域增加同步是否助战及助战次数;

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py                             |    5 ++++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ChaosDemon.py |    6 ++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                                      |    1 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py             |    8 ++++++++
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 6f46b30..5ebb877 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3070,6 +3070,7 @@
 
 Def_PlayerKey_TotalExpRate = "TotalExpRate"      #总经验加成
 Def_PlayerKey_TeamExpRate = "TeamExpRate"      #组队经验加成
+Def_PlayerKey_TeamMemCount = "TeamMemCount"      #队伍在线玩家数
 Def_PlayerKey_CurState = "PlayerCurState" # 当前状态信息, 标记详见 Def_PlayerStateList
 Def_PlayerKey_AttrFaintRate = "FaintRate"        #触发击晕
 Def_PlayerKey_AttrFaintDefRate = "FaintDefRate"        #击晕抵抗
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 7ff53c3..5e85a7e 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
@@ -63,6 +63,8 @@
 Help_score = 'score' #已获得积分
 Help_grade = 'grade' #评级(5-S,4-A,3-B,2-C,1-D)
 Help_leaderID = 'leaderID' #渡劫玩家ID
+Help_isHelp = 'isHelp' #本次是否是助战
+Help_helpCount = 'helpCount' #该副本今日已助战次数
 
 #副本结算信息通用key
 Over_dataMapID = 'dataMapID' #数据地图ID
@@ -176,6 +178,12 @@
                     PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_268121", [mapID])
                 return ShareDefine.EntFBAskRet_NoEnterCnt
             
+        if not isTeamAsk and fbIpyData.GetDayHelpCountMax():
+            if not curPlayer.GetTeamID() or curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TeamMemCount) == 1:
+                if isNotify:
+                    PlayerControl.NotifyCode(curPlayer, "TeamSingleEnter", [mapID])
+                return ShareDefine.EntFBAskRet_NoEnterCnt
+            
             # 周今日次数暂不做,待扩展...
         #进入CD判断
         if CheckIsEnterCD(curPlayer, mapID):
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 c84da43..865339c 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
@@ -519,8 +519,10 @@
     KillNPCCnt = max(0, needKillCnt - remainNPCCnt)
     data = [KillNPCCnt, needKillCnt]
     lineID = FBCommon.GetFBPropertyMark()
-    fbHelpDict = {FBCommon.Help_step:wheelNum, FBCommon.Help_grade:star, FBCommon.Help_npcTotal:KillNPCCnt, FBCommon.Help_lineID:lineID}
-    
+    isHelp = FBCommon.GetIsHelpFight(curPlayer)
+    helpCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FBRealHelpCount % ChConfig.Def_FBMapID_ChaosDemon)
+    fbHelpDict = {FBCommon.Help_step:wheelNum, FBCommon.Help_grade:star, FBCommon.Help_npcTotal:KillNPCCnt, FBCommon.Help_lineID:lineID, 
+                  FBCommon.Help_isHelp:isHelp, FBCommon.Help_helpCount:helpCount}
     FBCommon.Notify_FBHelp(curPlayer, fbHelpDict)
     return
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py
index 2c13dd3..50ce377 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py
@@ -121,9 +121,10 @@
     playerID = curPackData.PlayerID
     teamID = curPackData.TeamID
     teamLV = curPackData.TeamLV
+    memCnt = curPackData.MemCnt
     dataDict = {"playerID":playerID, "teamLV":teamLV}
     
-    GameWorld.DebugLog("GameServer_TeamInfo playerID=%s,teamID=%s,teamLV=%s" % (playerID, teamID, teamLV), playerID)
+    GameWorld.DebugLog("GameServer_TeamInfo playerID=%s,teamID=%s,teamLV=%s,memCnt=%s" % (playerID, teamID, teamLV, memCnt), playerID)
     curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
     if not curPlayer or curPlayer.IsEmpty():
         DR_Team("TeamInfo", teamID, dataDict, "curPlayer is None or empty")
@@ -138,6 +139,8 @@
     
     RefreshPlayerTeamID(curPlayer, teamID, teamLV, tick)
     
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_TeamMemCount, memCnt)
+    
     sameMapMemCount = 0 # 同地图队员数
     sameMapVIPLV = 0 # 同地图VIP加成等级
     mapID = curPlayer.GetMapID()

--
Gitblit v1.8.0