From e2b7b1aee489472bf7afc97880b2502ec876d4bc Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 23 五月 2019 19:45:43 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(修复召唤木桩怪等级报错)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py | 63 +++++++++++++++++++++++++++----
1 files changed, 55 insertions(+), 8 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py
index 3f00186..53ff4f7 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py
@@ -463,7 +463,6 @@
invitePack.NameLen = len(invitePack.Name)
invitePack.LV = curPlayer.GetLV()
invitePack.Job = curPlayer.GetJob()
- invitePack.JobLevel = PlayerControl.GetJobRank(curPlayer)
invitePack.RealmLV = curPlayer.GetOfficialRank()
invitePack.TagMapID = tagMapID
invitePack.TagMapEx = tagMapEx
@@ -524,7 +523,6 @@
requestPack.NameLen = len(requestPack.Name)
requestPack.LV = curPlayer.GetLV()
requestPack.Job = curPlayer.GetJob()
- requestPack.JobLevel = PlayerControl.GetJobRank(curPlayer)
requestPack.RealmLV = curPlayer.GetOfficialRank()
NetPackCommon.SendFakePack(tagPlayer, requestPack)
@@ -1596,7 +1594,6 @@
nearbyPlayer.NameLen = len(nearbyPlayer.Name)
nearbyPlayer.LV = player.GetLV()
nearbyPlayer.Job = player.GetJob()
- nearbyPlayer.JobLevel = PlayerControl.GetJobRank(player)
nearbyPlayer.RealmLV = player.GetOfficialRank()
nearbyPlayerInfo.PlayerList.append(nearbyPlayer)
@@ -1685,7 +1682,6 @@
sceneTeam.NameLen = len(sceneTeam.PlayerName)
sceneTeam.LV = leader.GetLV()
sceneTeam.Job = leader.GetJob()
- sceneTeam.JobLevel = PlayerControl.GetJobRank(leader)
sceneTeam.RealmLV = leader.GetOfficialRank()
sceneTeam.MemberCount = team.GetTeamPlayerCount()
sceneTeam.TagMapID = team.GetTagMapID()
@@ -1877,6 +1873,7 @@
#如果队伍正在匹配中,则通知状态
if IsTeamMatchingPlayer(curTeamID):
Sync_TeamMatchState(curPlayer, True)
+ OnTeamMemFamilyRefresh(curPlayer, curPlayer.GetFamilyID())
return True
#---------------------------------------------------------------------
@@ -2057,7 +2054,6 @@
tagMapTeam.NameLen = len(tagMapTeam.PlayerName)
tagMapTeam.LV = leader.GetLV()
tagMapTeam.Job = leader.GetJob()
- tagMapTeam.JobLevel = PlayerControl.GetJobRank(leader)
tagMapTeam.RealmLV = leader.GetOfficialRank()
tagMapTeam.MemberCount = team.GetTeamPlayerCount()
tagMapTeam.ReqMinLV = team.GetReqMinLV()
@@ -2776,8 +2772,6 @@
["TeamEnterCDMe", "TeamEnterCDAll"], "SingleEnterCD"],
ShareDefine.EntFBAskRet_LVLimit:[["TeamMatchingLVMe", "TeamMatchingLVAll"],
["TeamEnterLVMe", "TeamEnterLVAll"], "FbLV"],
- ShareDefine.EntFBAskRet_JobRankLimit:[["TeamMatchingJobMe", "TeamMatchingJobAll"],
- ["TeamEnterJobMe", "TeamEnterJobAll"], "SingleEnterJob"],
ShareDefine.EntFBAskRet_NoTicket:[["TeamMatchingTicketMe", "TeamMatchingTicketAll"],
["TeamEnterTicketMe", "TeamEnterTicketAll"], "GeRen_chenxin_157069"],
ShareDefine.EntFBAskRet_Dead:[["TeamMatchingDeadMe", "TeamMatchingDeadAll"],
@@ -2794,6 +2788,10 @@
["TeamEnterDefaultMe", "TeamEnterDefaultAll"], "SingleEnterDefaul"],
ShareDefine.EntFBAskRet_Sit:[["TeamMatchingSITMe", "TeamMatchingSITAll"],
["TeamEnterSITMe", "TeamEnterSITAll"], "Carry_lhs_697674"],
+ ShareDefine.EntFBAskRet_CrossPKMatching:[["CrossMatching9", "CrossMatching10"],
+ ["CrossMatching11", "CrossMatching12"], "CrossMatching8"],
+ ShareDefine.EntFBAskRet_InCrossMap:[["CrossMap6", "CrossMap7"],
+ ["CrossMap8", "CrossMap9"], "CrossMap5"],
ShareDefine.EntFBAskRet_Other:[["TeamMatchingDefaultMe", "TeamMatchingDefaultAll"],
["TeamEnterDefaultMe", "TeamEnterDefaultAll"], "SingleEnterDefaul"],
}
@@ -2953,10 +2951,59 @@
PyGameData.g_prepareTeamDict.pop(teamID)
# 同步进入组队副本的队员关系到目标地图
- relationInfo = str([teamID, friendList, memFamilyIDDict, memNameDict])
+ relationInfo = str(["InitRelation", teamID, friendList, memFamilyIDDict, memNameDict])
leader.MapServer_QueryPlayerResult(0, 0, "EnterFBTeamRelation", relationInfo, len(relationInfo))
return
+def OnTeamMemFriendChange(curPlayer, tagPlayerID, isFriend):
+ ## 队员好友关系变更,离线也同步
+ teamID = curPlayer.GetTeamID()
+ if not teamID:
+ GameWorld.DebugLog("好友变更,无队伍不管!")
+ return
+ curMapData = GameWorld.GetMap(curPlayer.GetMapID())
+ if not curMapData or curMapData.GetMapFBType() != ChConfig.fbtTeam:
+ GameWorld.DebugLog("好友变更,不在组队副本不管!")
+ return
+
+ isSameTeam = False
+ playerID = curPlayer.GetPlayerID()
+ curTeam = curPlayer.GetTeam()
+ for index in xrange(curTeam.GetMemberCount()):
+ memberInfo = curTeam.GetMemberInfo(index)
+ if not memberInfo:
+ continue
+ memPlayerID = memberInfo.GetPlayerID()
+ if tagPlayerID == memPlayerID:
+ isSameTeam = True
+ break
+
+ if not isSameTeam:
+ GameWorld.DebugLog("好友关系变更,不是同队伍不管!")
+ return
+
+ relationInfo = str(["FriendChange", teamID, playerID, tagPlayerID, isFriend])
+ curPlayer.MapServer_QueryPlayerResult(0, 0, "EnterFBTeamRelation", relationInfo, len(relationInfo))
+ return
+
+def OnTeamMemFamilyRefresh(curPlayer, familyID):
+ ## 队员仙盟变更,仅在线同步,上线同步
+ if not curPlayer:
+ return
+ teamID = curPlayer.GetTeamID()
+ if not teamID:
+ GameWorld.DebugLog("家族变更,无队伍不管!")
+ return
+ curMapData = GameWorld.GetMap(curPlayer.GetMapID())
+ if not curMapData or curMapData.GetMapFBType() != ChConfig.fbtTeam:
+ GameWorld.DebugLog("家族变更,不在组队副本不管!")
+ return
+ playerID = curPlayer.GetPlayerID()
+ familyID = curPlayer.GetFamilyID()
+ relationInfo = str(["FamilyChange", teamID, playerID, familyID])
+ curPlayer.MapServer_QueryPlayerResult(0, 0, "EnterFBTeamRelation", relationInfo, len(relationInfo))
+ return
+
def __CheckTeamFBPlayerExist(curTeam):
##玩家离开副本
# @param curTeam 队伍实例
--
Gitblit v1.8.0