From 4b857588a060f62383b85ee501ff7555e7d2edc6 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 16 七月 2019 18:37:48 +0800
Subject: [PATCH] 8008 【2.0.300】【开发】升星功能调整
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py | 18 ++++++++++++------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 29 +++++++++++++++++++++++++++++
PySysDB/PySysDBPY.h | 11 +++++++++++
3 files changed, 52 insertions(+), 6 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index fbfc1bb..595a519 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1916,4 +1916,15 @@
DWORD NeedExp; //升级需要经验
dict AttrInfo; //属性
BYTE SkinIndex; //外观
+};
+
+//骑宠幻化表
+
+struct tagEquipStarUpRate
+{
+ DWORD _ClassLV; //装备阶级
+ DWORD _EquipColor; //品质
+ DWORD _EquipPlace; //部位
+ DWORD _IsSuite; //是否套装
+ DWORD Rate; //概率
};
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
index 1c9560a..fb7d7bf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
@@ -124,9 +124,8 @@
totalEquipStars = ChEquip.GetTotalEquipStars(curPlayer)
if not costEquipCnt:
- curRate = suitTotalRate / 2
+ curRate = 100
else:
- singleSuitRate = float(suitTotalRate) / costEquipCnt
curRate = 0 #成功概率
for i, index in enumerate(clientData.CostEquipIndex):
@@ -137,16 +136,23 @@
if equipID != clientData.CostEquipID[i]:
GameWorld.ErrLog(' 装备升星 客户端发的物品索引与实际物品ID不对应 index=%s,eatItemID=%s,wantEatItemID=%s' % (index, equipID, clientData.CostEquipID[i]))
return result
- if costEquip.GetItemColor() not in costEquipColorList:
+ itemColor = costEquip.GetItemColor()
+ equipPlace = costEquip.GetEquipPlace()
+ if itemColor not in costEquipColorList:
return result
- if costEquip.GetEquipPlace() not in costEquipPlaceList:
+ if equipPlace not in costEquipPlaceList:
return result
if isJobLimit and not ItemCommon.CheckJob(curPlayer, costEquip):
return result
delEquipIndexList.append(index)
isSuite = costEquip.GetSuiteID()
- addRate = singleSuitRate if isSuite else singleSuitRate / 2
- curRate += addRate
+
+ ipyData = IpyGameDataPY.GetIpyGameData('EquipStarUpRate', ItemCommon.GetItemClassLV(costEquip),
+ itemColor, equipPlace, isSuite
+ )
+ if not ipyData:
+ return
+ curRate += ipyData.GetRate()
if totalEquipStars < IpyGameDataPY.GetFuncCfg('EquipStarCustomized'):
curRate = 100
if curRate <= 0:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 7461689..02e6f9b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1483,6 +1483,14 @@
("dict", "AttrInfo", 0),
("BYTE", "SkinIndex", 0),
),
+
+ "EquipStarUpRate":(
+ ("DWORD", "ClassLV", 1),
+ ("DWORD", "EquipColor", 1),
+ ("DWORD", "EquipPlace", 1),
+ ("DWORD", "IsSuite", 1),
+ ("DWORD", "Rate", 0),
+ ),
}
@@ -4538,6 +4546,23 @@
def GetNeedExp(self): return self.NeedExp # 升级需要经验
def GetAttrInfo(self): return self.AttrInfo # 属性
def GetSkinIndex(self): return self.SkinIndex # 外观
+
+# 骑宠幻化表
+class IPY_EquipStarUpRate():
+
+ def __init__(self):
+ self.ClassLV = 0
+ self.EquipColor = 0
+ self.EquipPlace = 0
+ self.IsSuite = 0
+ self.Rate = 0
+ return
+
+ def GetClassLV(self): return self.ClassLV # 装备阶级
+ def GetEquipColor(self): return self.EquipColor # 品质
+ def GetEquipPlace(self): return self.EquipPlace # 部位
+ def GetIsSuite(self): return self.IsSuite # 是否套装
+ def GetRate(self): return self.Rate # 概率
def Log(msg, playerID=0, par=0):
@@ -4861,6 +4886,8 @@
self.ipyLingGenEffectLen = len(self.ipyLingGenEffectCache)
self.ipyHorsePetSkinCache = self.__LoadFileData("HorsePetSkin", IPY_HorsePetSkin)
self.ipyHorsePetSkinLen = len(self.ipyHorsePetSkinCache)
+ self.ipyEquipStarUpRateCache = self.__LoadFileData("EquipStarUpRate", IPY_EquipStarUpRate)
+ self.ipyEquipStarUpRateLen = len(self.ipyEquipStarUpRateCache)
Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
Log("IPY_DataMgr InitOK!")
return
@@ -5325,6 +5352,8 @@
def GetLingGenEffectByIndex(self, index): return self.ipyLingGenEffectCache[index]
def GetHorsePetSkinCount(self): return self.ipyHorsePetSkinLen
def GetHorsePetSkinByIndex(self, index): return self.ipyHorsePetSkinCache[index]
+ def GetEquipStarUpRateCount(self): return self.ipyEquipStarUpRateLen
+ def GetEquipStarUpRateByIndex(self, index): return self.ipyEquipStarUpRateCache[index]
IPYData = IPY_DataMgr()
def IPY_Data(): return IPYData
--
Gitblit v1.8.0