From b7da225082b6267289e3f51ebb3efdd067571741 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 07 十一月 2018 11:49:53 +0800 Subject: [PATCH] 4593 【1.2】【后端】VIP7特权加成在成为VIP7时就生效 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) 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 3b60019..208913e 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py @@ -188,6 +188,17 @@ GameWorld.DebugLog("__AddTeamVIPBuff sameMapVIPLV=%s,isOK=%s" % (sameMapVIPLV, isOK), playerID) return +def RefreshTeamVIPBuff_OnNoTeam(curPlayer, tick): + ## 刷新队伍VIPbuff,注意该函数只能无队伍时触发 + sameMapVIPLV = 0 + playerVIPLV = curPlayer.GetVIPLv() + teamVIPBuffIpyData = PlayerVip.GetVipPrivilegeData(ChConfig.VIPPrivilege_TeamVIPBuff) + if teamVIPBuffIpyData and hasattr(teamVIPBuffIpyData, "GetVIP%d" % playerVIPLV) \ + and getattr(teamVIPBuffIpyData, "GetVIP%d" % playerVIPLV)(): + sameMapVIPLV += 1 + __RefreshTeamVIPBuff(curPlayer, sameMapVIPLV, tick) + return + ## 刷新玩家队伍ID # @param curPlayer 当前玩家 # @param teamID 队伍ID @@ -210,13 +221,7 @@ #GameWorld.DebugLog(" 玩家有队伍,处理玩家离队!", playerID) __OnLeaveTeam(curPlayer, tick) - sameMapVIPLV = 0 - playerVIPLV = curPlayer.GetVIPLv() - teamVIPBuffIpyData = PlayerVip.GetVipPrivilegeData(ChConfig.VIPPrivilege_TeamVIPBuff) - if teamVIPBuffIpyData and hasattr(teamVIPBuffIpyData, "GetVIP%d" % playerVIPLV) \ - and getattr(teamVIPBuffIpyData, "GetVIP%d" % playerVIPLV)(): - sameMapVIPLV += 1 - __RefreshTeamVIPBuff(curPlayer, sameMapVIPLV, tick) + RefreshTeamVIPBuff_OnNoTeam(curPlayer, tick) return #--------------世界服务器组队表中有队伍 -- Gitblit v1.8.0