From bf8da678145a7693199e6a39097d2c8571c9928f Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期三, 15 五月 2019 11:17:05 +0800 Subject: [PATCH] 6791 【2.0】【后端】缥缈仙域定制功能优化(增加随机奖励) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 7 +++++-- PySysDB/PySysDBPY.h | 1 + ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h index 28908bc..f0f8d38 100644 --- a/PySysDB/PySysDBPY.h +++ b/PySysDB/PySysDBPY.h @@ -1870,6 +1870,7 @@ WORD _Cnt; //次数 DWORD EventID; //事件编号 list Award; //定制奖励(没配走正常奖励规则)[[物品ID,数量,是否拍品],..] + list RandomAward; //随机奖励 [[(权重,[物品ID,数量,是否拍品]),..],..] }; //副本Buff表 diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py index 757b045..78345db 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py @@ -1445,6 +1445,7 @@ ("WORD", "Cnt", 1), ("DWORD", "EventID", 0), ("list", "Award", 0), + ("list", "RandomAward", 0), ), "FBBuyBuff":( @@ -4440,12 +4441,14 @@ def __init__(self): self.Cnt = 0 self.EventID = 0 - self.Award = [] + self.Award = [] + self.RandomAward = [] return def GetCnt(self): return self.Cnt # 次数 def GetEventID(self): return self.EventID # 事件编号 - def GetAward(self): return self.Award # 定制奖励(没配走正常奖励规则)[[物品ID,数量,是否拍品],..] + def GetAward(self): return self.Award # 定制奖励(没配走正常奖励规则)[[物品ID,数量,是否拍品],..] + def GetRandomAward(self): return self.RandomAward # 随机奖励 [[(权重,[物品ID,数量,是否拍品]),..],..] # 副本Buff表 class IPY_FBBuyBuff(): diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py index 8ce2716..5e52bb1 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py @@ -460,4 +460,11 @@ itemList.append([itemInfo[0][job], itemInfo[1], itemInfo[2]]) else: itemList.append(itemInfo) + + for itemRateList in ipyData.GetRandomAward(): + itemRateList = ItemCommon.GetWeightItemListByAlchemyDiffLV(curPlayer, itemRateList, 1) + giveItem = GameWorld.GetResultByWeightList(itemRateList) + if not giveItem: + continue + itemList.append(giveItem) return itemList -- Gitblit v1.8.0