From d7415e1acc3cfaae895597d889bf4f5d56d85ad0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 31 七月 2023 16:34:55 +0800
Subject: [PATCH] 9788 【BT9】【后端】成就系统(新增成就类型164~175)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py | 4 ++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py | 7 ++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py | 7 ++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py | 15 +++++++++++----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py | 1 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py | 7 ++++++-
6 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
index ee209c0..2cef80f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
@@ -189,6 +189,8 @@
if not ipyDataList:
return
+ totalPlusLV = ChEquip.GetTotalPlusLV(curPlayer)
+ classPlusLV = 0
packType = IPY_GameWorld.rptEquip
plusLVCountDict = {}
for ipyData in ipyDataList:
@@ -198,9 +200,12 @@
continue
conditionKey = (classLV, plusLV)
plusLVCountDict[conditionKey] = plusLVCountDict.get(conditionKey, 0) + 1
+ classPlusLV += plusLV
- #GameWorld.DebugLog("强化成就数据: classLV=%s,plusLVCountDict=%s" % (classLV, plusLVCountDict))
+ #GameWorld.DebugLog("强化成就数据: classLV=%s,plusLVCountDict=%s,classPlusLV=%s,totalPlusLV=%s" % (classLV, plusLVCountDict, classPlusLV, totalPlusLV))
PlayerSuccess.UpdateSuccessProgressByConditions(curPlayer, ShareDefine.SuccType_EquipPlus, plusLVCountDict)
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipPlusTotal, totalPlusLV)
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipPlusClass, classPlusLV, [classLV])
PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_EquipPlus)
return
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 7df697b..947378d 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
@@ -311,6 +311,8 @@
if not ipyDataList:
return
+ totalStarLV = ChEquip.GetTotalEquipStars(curPlayer)
+ classStarLV = 0
starCountDict = {}
for ipyData in ipyDataList:
index = ipyData.GetGridIndex()
@@ -319,8 +321,11 @@
continue
conditionKey = (classLV, equipStar)
starCountDict[conditionKey] = starCountDict.get(conditionKey, 0) + 1
+ classStarLV += equipStar
- #GameWorld.DebugLog("升星成就数据: classLV=%s,starCountDict=%s" % (classLV, starCountDict))
+ #GameWorld.DebugLog("升星成就数据: classLV=%s,starCountDict=%s,classStarLV=%s,totalStarLV=%s" % (classLV, starCountDict, classStarLV, totalStarLV))
PlayerSuccess.UpdateSuccessProgressByConditions(curPlayer, ShareDefine.SuccType_EquipStar, starCountDict)
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipStarTotal, totalStarLV)
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipStarClass, classStarLV, [classLV])
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
index b74c219..5becad8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
@@ -218,16 +218,17 @@
# 同步客户端
Sycn_StoneHoleInfo(curPlayer, [equipPackIndex])
# 成就
- DoStoneSuccess(curPlayer)
+ DoStoneSuccess(curPlayer, classLV)
EventShell.EventRespons_InlayStone(curPlayer)
return
-def DoStoneSuccess(curPlayer):
+def DoStoneSuccess(curPlayer, classLV):
#PlayerSuccess.ResetSuccessByType(curPlayer, ShareDefine.SuccType_InlayStone1)
#PlayerSuccess.ResetSuccessByType(curPlayer, ShareDefine.SuccType_InlayStone2)
totalStoneLV = 0
+ classStoneLV = 0
holeIndexList = GetAllEquipPlaceHoleIndex()
gameData = GameWorld.GetGameData()
packType = IPY_GameWorld.rptEquip
@@ -252,10 +253,16 @@
# PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_InlayStone2, 1, [gemLV])
totalStoneLV += gemLV
+
+ ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex': equipIndex})
+ if ipyData and ipyData.GetClassLV() == classLV:
+ classStoneLV += gemLV
# 记录开服活动宝石总等级
+ #GameWorld.DebugLog("classLV=%s,classStoneLV=%s,totalStoneLV=%s" % (classLV, classStoneLV, totalStoneLV))
OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_StoneLV, totalStoneLV)
- #PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_StoneTotalLV, totalStoneLV)
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_StoneTotalLV, totalStoneLV)
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipStoneClass, classStoneLV, [classLV])
PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Stone, totalStoneLV, False, True)
return
@@ -497,7 +504,7 @@
# 同步客户端
Sycn_StoneHoleInfo(curPlayer, [equipPackIndex])
- DoStoneSuccess(curPlayer)
+ DoStoneSuccess(curPlayer, classLV)
return
def __CheckStoneHoleCanUse(curPlayer, equipStar, holeIndex, equipPackType):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
index ef0aca7..b13846d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
@@ -482,6 +482,8 @@
if not ipyDataList:
return
+ totalWashLV = GetTotalEquipWashLV(curPlayer)
+ classWashLV = 0
washLVCountDict = {}
for ipyData in ipyDataList:
index = ipyData.GetGridIndex()
@@ -490,8 +492,11 @@
continue
conditionKey = (classLV, washLV)
washLVCountDict[conditionKey] = washLVCountDict.get(conditionKey, 0) + 1
+ classWashLV += washLV
- #GameWorld.DebugLog("洗练成就数据: classLV=%s,washLVCountDict=%s" % (classLV, washLVCountDict))
+ #GameWorld.DebugLog("洗练成就数据: classLV=%s,washLVCountDict=%s,classWashLV=%s,totalWashLV=%s" % (classLV, washLVCountDict, classWashLV, totalWashLV))
PlayerSuccess.UpdateSuccessProgressByConditions(curPlayer, ShareDefine.SuccType_EquipWash, washLVCountDict)
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipWashTotal, totalWashLV)
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipWashClass, classWashLV, [classLV])
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
index 6be7530..40a53d8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
@@ -266,6 +266,10 @@
if funcIndex == ShareDefine.Def_AttrFruitFunc_Stove:
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_UseStoveBylv, hasUseCnt, [item.GetLV()])
+ alchemyIpyData = IpyGameDataPY.GetIpyGameDataByCondition("Alchemy", {"AlchemItemID":itemID}, False, True)
+ if alchemyIpyData:
+ PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_UseStoveByType, hasUseCnt, [alchemyIpyData.GetAlchemType()])
+
effect = item.GetEffectByIndex(0)
effID = effect.GetEffectID()
## 特殊属性ID处理,此属性ID做一次性处理,不做属性计算
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
index 67318d0..1f181c5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
@@ -518,6 +518,7 @@
return
succInfoList = GetSuccDataMng().GetSuccDataByType(successType)
if not succInfoList:
+ GameWorld.DebugLog(" 找不到成就数据successType=%s" % successType)
return
curCnt = -1
for succData in succInfoList:
--
Gitblit v1.8.0