From 3528d795057f0b96da30a809335369e8593e4c44 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 20 十一月 2018 17:15:59 +0800
Subject: [PATCH] 4856 子 【开发】【1.3】许愿池红点优化,极品标识修改

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py          |    8 ++++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py            |    7 +++++--
 PySysDB/PySysDBPY.h                                                                             |    1 +
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py                               |    8 ++++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWishingWell.py |   22 ++++++++++------------
 5 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 9ae2877..4b0841f 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1334,6 +1334,7 @@
 	BYTE		IsBind;	//是否绑定
 	DWORD		Weight;	//权重
 	DWORD		Mark;	//排序用标识
+	BYTE		Rare;	//珍稀值
 };
 
 //功能预告表
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index d75c677..d3fadfd 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -19692,6 +19692,7 @@
                   ("ItemCnt", c_ushort),    # 物品数量
                   ("IsBind", c_ubyte),    # 是否绑定
                   ("Mark", c_int),    # 排序标识
+                  ("Rare", c_ubyte),    # 珍稀值
                   ]
 
     def __init__(self):
@@ -19708,6 +19709,7 @@
         self.ItemCnt = 0
         self.IsBind = 0
         self.Mark = 0
+        self.Rare = 0
         return
 
     def GetLength(self):
@@ -19721,13 +19723,15 @@
                                 ItemID:%d,
                                 ItemCnt:%d,
                                 IsBind:%d,
-                                Mark:%d
+                                Mark:%d,
+                                Rare:%d
                                 '''\
                                 %(
                                 self.ItemID,
                                 self.ItemCnt,
                                 self.IsBind,
-                                self.Mark
+                                self.Mark,
+                                self.Rare
                                 )
         return DumpString
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index d75c677..d3fadfd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -19692,6 +19692,7 @@
                   ("ItemCnt", c_ushort),    # 物品数量
                   ("IsBind", c_ubyte),    # 是否绑定
                   ("Mark", c_int),    # 排序标识
+                  ("Rare", c_ubyte),    # 珍稀值
                   ]
 
     def __init__(self):
@@ -19708,6 +19709,7 @@
         self.ItemCnt = 0
         self.IsBind = 0
         self.Mark = 0
+        self.Rare = 0
         return
 
     def GetLength(self):
@@ -19721,13 +19723,15 @@
                                 ItemID:%d,
                                 ItemCnt:%d,
                                 IsBind:%d,
-                                Mark:%d
+                                Mark:%d,
+                                Rare:%d
                                 '''\
                                 %(
                                 self.ItemID,
                                 self.ItemCnt,
                                 self.IsBind,
-                                self.Mark
+                                self.Mark,
+                                self.Rare
                                 )
         return DumpString
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 88ab5e5..f17fbff 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1060,6 +1060,7 @@
                         ("BYTE", "IsBind", 0),
                         ("DWORD", "Weight", 0),
                         ("DWORD", "Mark", 0),
+                        ("BYTE", "Rare", 0),
                         ),
 
                 "FunctionForecast":(
@@ -3252,7 +3253,8 @@
         self.ItemCnt = 0
         self.IsBind = 0
         self.Weight = 0
-        self.Mark = 0
+        self.Mark = 0
+        self.Rare = 0
         return
         
     def GetTemplateID(self): return self.TemplateID # 模板ID
@@ -3262,7 +3264,8 @@
     def GetItemCnt(self): return self.ItemCnt # 物品数量
     def GetIsBind(self): return self.IsBind # 是否绑定
     def GetWeight(self): return self.Weight # 权重
-    def GetMark(self): return self.Mark # 排序用标识
+    def GetMark(self): return self.Mark # 排序用标识
+    def GetRare(self): return self.Rare # 珍稀值
 
 # 功能预告表
 class IPY_FunctionForecast():
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..f15e88a 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,  #可选库
@@ -98,7 +98,7 @@
 def __CheckPlayerWishingWellAction(curPlayer):
     ## 检查玩家许愿池活动数据信息
     global g_randomWellDict
-    global g_specialMarkDict
+
     playerID = curPlayer.GetPlayerID()
     
     actWishingWellInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_WishingWell, {})
@@ -123,7 +123,6 @@
     #每天开始随机一次免费盘
     if state:
         g_randomWellDict = {}
-        g_specialMarkDict = {}
         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