From cdb5d93a9fd7b32a2ed178feed4eee20ee6502e5 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 11 二月 2019 15:41:24 +0800 Subject: [PATCH] 5940 【后端】【1.6】跨服PK奖励配置规则优化 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWishingWell.py | 26 ++++++++++++-------------- 1 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWishingWell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWishingWell.py index 0ade701..768296c 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWishingWell.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWishingWell.py @@ -33,7 +33,7 @@ import time g_randomWellDict = {} -g_specialMarkDict = {} + ( WellType_Select, #可选库 @@ -85,7 +85,7 @@ return def RefreshWishingWellAction(): - #__InitWishRateList() + __InitWishRateList() playerManager = GameWorld.GetPlayerManager() for i in xrange(playerManager.GetPlayerCount()): curPlayer = playerManager.GetPlayerByIndex(i) @@ -98,7 +98,7 @@ def __CheckPlayerWishingWellAction(curPlayer): ## 检查玩家许愿池活动数据信息 global g_randomWellDict - global g_specialMarkDict + playerID = curPlayer.GetPlayerID() actWishingWellInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_WishingWell, {}) @@ -122,8 +122,7 @@ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WishingWellID, WishingWellID) #每天开始随机一次免费盘 if state: - g_randomWellDict = {} - g_specialMarkDict = {} + #g_randomWellDict = {} PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WishingWellRefreshCnt, 0) __DoActWishingRefresh(curPlayer, 1, True) @@ -180,7 +179,6 @@ def __InitWishRateList(): ## 初始许愿池随机库 global g_randomWellDict - global g_specialMarkDict actWishingWellInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_WishingWell, {}) state = actWishingWellInfo.get(ShareDefine.ActKey_State, 0) cfgID = actWishingWellInfo.get(ShareDefine.ActKey_CfgID, 0) @@ -206,15 +204,14 @@ isBind = ipyData.GetIsBind() weight = ipyData.GetWeight() mark = ipyData.GetMark() + rare = ipyData.GetRare() weightDict[isFree] = weightDict.get(isFree, 0) + weight if isFree not in g_randomWellDict: g_randomWellDict[isFree] = [] - g_randomWellDict[isFree].append([weightDict[isFree], [itemID, itemCnt, isBind, mark]]) + g_randomWellDict[isFree].append([weightDict[isFree], [itemID, itemCnt, isBind, mark, rare]]) - groupID, rowID = mark / 100, mark % 100 - if rowID > g_specialMarkDict.get(groupID, 0) % 100: - g_specialMarkDict[groupID] = mark - GameWorld.DebugLog(' 初始许愿池随机库 g_randomWellDict=%s, g_specialMarkDict=%s' % (g_randomWellDict, g_specialMarkDict)) + + GameWorld.DebugLog(' 初始许愿池随机库 g_randomWellDict=%s' % (g_randomWellDict)) return @@ -282,8 +279,8 @@ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WishingWellFreeTime, int(time.time())) for i, info in enumerate(randomResultList): - itemID, itemCnt, isBind, mark = info - isSpecial = 1 if mark in g_specialMarkDict.values() else 0 + itemID, itemCnt, isBind, mark, rare = info + isSpecial = rare __SetItemData(curPlayer, WellType_Select, i, itemID, itemCnt, isBind, isSpecial) GameWorld.DebugLog(' 许愿池活动刷新 isFree=%s, randomResultList=%s' % (isFree, randomResultList), playerID) return @@ -386,12 +383,13 @@ actInfo.WellItemInfo = [] randomItemList = __GetRandomRateList(0) for itemInfo in randomItemList: - itemID, itemCnt, isBind, mark = itemInfo[1] + itemID, itemCnt, isBind, mark, rare = itemInfo[1] wellItemInfo = ChPyNetSendPack.tagMCWishingWellItem() wellItemInfo.ItemID = itemID wellItemInfo.ItemCnt = itemCnt wellItemInfo.IsBind = isBind wellItemInfo.Mark = mark + wellItemInfo.Rare = rare actInfo.WellItemInfo.append(wellItemInfo) actInfo.Count = len(actInfo.WellItemInfo) NetPackCommon.SendFakePack(curPlayer, actInfo) -- Gitblit v1.8.0