9762 【BT8】【后端】藏宝阁(9767 【BT8】新增古宝特效效果)
# Conflicts:
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipEnchant.py
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
| | |
| | | DWORD _GubaoEffID; //古宝特殊效果ID
|
| | | BYTE GubaoEffType; //效果类型
|
| | | DWORD EffCond; //条件
|
| | | DWORD EffCond2; //条件2
|
| | | DWORD EffCond3; //条件3
|
| | | BYTE IsPer; //是否百分比提升
|
| | | list EffFuncAttrIDList; //提升指定功能属性ID列表
|
| | | DWORD EffAttrID; //直接增加属性类型
|
| | |
| | | washLV = min(washLV, maxWashLV)
|
| | | washType = GetEquipWashType(equipPlace)
|
| | | if washType is None:
|
| | | return
|
| | | return 0
|
| | | washData = GetEquipWashData(washType, washLV)
|
| | | if not washData:
|
| | | return
|
| | | return 0
|
| | | #GameWorld.DebugLog("装备位属性: equipPlace=%s,washLV=%s" % (equipPlace, washLV))
|
| | | for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
|
| | | attrID = getattr(washData, "GetAttrType%s" % attrNum)()
|
| | |
| | | if attrValue:
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
|
| | | baseAttrDictWash[attrID] = baseAttrDictWash.get(attrID, 0) + attrValue
|
| | | return
|
| | | return washLV
|
| | |
|
| | | def EquipWashSuccess(curPlayer, classLV):
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
|
| | |
| | | ("DWORD", "GubaoEffID", 1),
|
| | | ("BYTE", "GubaoEffType", 0),
|
| | | ("DWORD", "EffCond", 0),
|
| | | ("DWORD", "EffCond2", 0),
|
| | | ("DWORD", "EffCond3", 0),
|
| | | ("BYTE", "IsPer", 0),
|
| | | ("list", "EffFuncAttrIDList", 0),
|
| | | ("DWORD", "EffAttrID", 0),
|
| | |
| | | self.GubaoEffID = 0
|
| | | self.GubaoEffType = 0
|
| | | self.EffCond = 0
|
| | | self.EffCond2 = 0
|
| | | self.EffCond3 = 0
|
| | | self.IsPer = 0
|
| | | self.EffFuncAttrIDList = []
|
| | | self.EffAttrID = 0
|
| | |
| | | def GetGubaoEffID(self): return self.GubaoEffID # 古宝特殊效果ID
|
| | | def GetGubaoEffType(self): return self.GubaoEffType # 效果类型
|
| | | def GetEffCond(self): return self.EffCond # 条件
|
| | | def GetEffCond2(self): return self.EffCond2 # 条件2
|
| | | def GetEffCond3(self): return self.EffCond3 # 条件3
|
| | | def GetIsPer(self): return self.IsPer # 是否百分比提升
|
| | | def GetEffFuncAttrIDList(self): return self.EffFuncAttrIDList # 提升指定功能属性ID列表
|
| | | def GetEffAttrID(self): return self.EffAttrID # 直接增加属性类型
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def GetGatherSoulTotalLV(curPlayer):
|
| | | ## 聚魂累计总等级
|
| | | totalLV = 0
|
| | | GatherSoulUnlockDict = IpyGameDataPY.GetFuncEvalCfg("GatherSoulHole", 1, {})
|
| | | for holeNum in xrange(len(GatherSoulUnlockDict)):
|
| | | GatherSoulData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherSoulHoleData % holeNum, 0)
|
| | | if not GatherSoulData:
|
| | | continue
|
| | | totalLV += ItemControler.GetGatherSoulItemPlusLV(GatherSoulData) + 1
|
| | | return totalLV
|
| | |
|
| | | def Sync_GatherSoulHoleInfo(curPlayer):
|
| | | ##通知聚魂孔信息
|
| | |
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import GameWorld
|
| | | import PlayerRune
|
| | | import ItemCommon
|
| | | import PlayerControl
|
| | | import IpyGameDataPY
|
| | | import ChPyNetSendPack
|
| | | import PlayerGatherSoul
|
| | | import NetPackCommon
|
| | | import IPY_GameWorld
|
| | | import PlayerHorse
|
| | |
| | | return
|
| | | effType = ipyData.GetGubaoEffType()
|
| | | effCond = ipyData.GetEffCond()
|
| | | effCond2 = ipyData.GetEffCond2()
|
| | | effCond3 = ipyData.GetEffCond3()
|
| | | attrID = ipyData.GetEffAttrID()
|
| | | effAttrValue = ipyData.GetEffAttrValue()
|
| | | if effAttrValue <= 0:
|
| | |
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | |
|
| | | #22 天星塔每通关x层+xx属性 x层
|
| | | elif effType == 22:
|
| | | skyTowerFloor = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor)
|
| | | addAttrValue = int(skyTowerFloor / effCond * effAttrValue)
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,effCond=%s,skyTowerFloor=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, skyTowerFloor, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #23 符印塔每通关x层+xx属性 x层
|
| | | elif effType == 23:
|
| | | trialTowerPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
|
| | | addAttrValue = int(trialTowerPassLV / effCond * effAttrValue)
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,effCond=%s,trialTowerPassLV=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, trialTowerPassLV, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #24 符印等级每每x级+xx属性 x级
|
| | | elif effType == 24:
|
| | | runeTotalLV = PlayerRune.GetRuneTotalLV(curPlayer)
|
| | | addAttrValue = int(runeTotalLV / effCond * effAttrValue)
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,effCond=%s,runeTotalLV=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, runeTotalLV, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #25 聚魂等级每每x级+xx属性 x级
|
| | | elif effType == 25:
|
| | | soulTotalLV = PlayerGatherSoul.GetGatherSoulTotalLV(curPlayer)
|
| | | addAttrValue = int(soulTotalLV / effCond * effAttrValue)
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,effCond=%s,soulTotalLV=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, soulTotalLV, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #26 x阶装备强化每x级+xx属性 x阶 x级
|
| | | elif effType == 26:
|
| | | customAttrDictPlus = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Plus)[2]
|
| | | classPlusLVDict = customAttrDictPlus.get("classPlusLVDict", {})
|
| | | classLV = effCond
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,classLV=%s,classPlusLVDict=%s" % (effID, effType, classLV, classPlusLVDict))
|
| | | if classLV not in classPlusLVDict:
|
| | | return
|
| | | totalPlusLV = classPlusLVDict[classLV]
|
| | | addAttrValue = int(totalPlusLV / effCond2 * effAttrValue)
|
| | | #GameWorld.DebugLog(" effCond=%s,effCond2=%s,totalPlusLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalPlusLV, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #27 x阶装备宝石每x级+xx属性 x阶 x级
|
| | | elif effType == 27:
|
| | | customAttrDictStone = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Stone)[2]
|
| | | classStoneLVDict = customAttrDictStone.get("classStoneLVDict", {})
|
| | | classLV = effCond
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,classLV=%s,classStoneLVDict=%s" % (effID, effType, classLV, classStoneLVDict))
|
| | | if classLV not in classStoneLVDict:
|
| | | return
|
| | | totalStoneLV = classStoneLVDict[classLV]
|
| | | addAttrValue = int(totalStoneLV / effCond2 * effAttrValue)
|
| | | #GameWorld.DebugLog(" effCond=%s,effCond2=%s,totalStoneLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalStoneLV, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #28 x阶装备升星每x星+xx属性 x阶 x星
|
| | | elif effType == 28:
|
| | | customAttrDictStar = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Star)[2]
|
| | | classStarLVDict = customAttrDictStar.get("classStarLVDict", {})
|
| | | classLV = effCond
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,classLV=%s,classStarLVDict=%s" % (effID, effType, classLV, classStarLVDict))
|
| | | if classLV not in classStarLVDict:
|
| | | return
|
| | | totalStarLV = classStarLVDict[classLV]
|
| | | addAttrValue = int(totalStarLV / effCond2 * effAttrValue)
|
| | | #GameWorld.DebugLog(" effCond=%s,effCond2=%s,totalStarLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalStarLV, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #29 x阶装备洗练每x级+xx属性 x阶 x级
|
| | | elif effType == 29:
|
| | | customAttrDictWash = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Wash)[2]
|
| | | classWashLVDict = customAttrDictWash.get("classWashLVDict", {})
|
| | | classLV = effCond
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,classLV=%s,classWashLVDict=%s" % (effID, effType, classLV, classWashLVDict))
|
| | | if classLV not in classWashLVDict:
|
| | | return
|
| | | totalWashLV = classWashLVDict[classLV]
|
| | | addAttrValue = int(totalWashLV / effCond2 * effAttrValue)
|
| | | #GameWorld.DebugLog(" effCond=%s,effCond2=%s,totalWashLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalWashLV, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #30 x阶装备附魔每x级+xx属性 x阶 x级
|
| | | elif effType == 30:
|
| | | customAttrDictEnchant = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Enchant)[2]
|
| | | classEnchantLVDict = customAttrDictEnchant.get("classEnchantLVDict", {})
|
| | | classLV = effCond
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,classLV=%s,classEnchantLVDict=%s" % (effID, effType, classLV, classEnchantLVDict))
|
| | | if classLV not in classEnchantLVDict:
|
| | | return
|
| | | totalEnchantLV = classEnchantLVDict[classLV]
|
| | | addAttrValue = int(totalEnchantLV / effCond2 * effAttrValue)
|
| | | #GameWorld.DebugLog(" effCond=%s,effCond2=%s,totalEnchantLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalEnchantLV, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #31 x阶装备x件x品质装备+xx属性 x阶 x件 x品质
|
| | | elif effType == 31:
|
| | | customAttrDictEquip = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Equip)[2]
|
| | | classEquipColorDict = customAttrDictEquip.get("classEquipColorDict", {})
|
| | | classLV = effCond
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,classLV=%s,classEquipColorDict=%s" % (effID, effType, classLV, classEquipColorDict))
|
| | | if classLV not in classEquipColorDict:
|
| | | return
|
| | | equipColorDict = classEquipColorDict[classLV]
|
| | | equipColorCnt = 0
|
| | | for itemColor in equipColorDict.values():
|
| | | if itemColor >= effCond3:
|
| | | equipColorCnt += 1
|
| | | addAttrValue = int(equipColorCnt / effCond2 * effAttrValue)
|
| | | #GameWorld.DebugLog(" effCond=%s,effCond2=%s,effCond3=%s,equipColorCnt=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, effCond3, equipColorCnt, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | #32 获得x点灵根点+xx属性 x点
|
| | | elif effType == 32:
|
| | | totalLingGenPoint = PlayerControl.GetTotalLingGenPoint(curPlayer)
|
| | | addAttrValue = int(totalLingGenPoint / effCond * effAttrValue)
|
| | | #GameWorld.DebugLog(" effID=%s,effType=%s,effCond=%s,totalLingGenPoint=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, totalLingGenPoint, attrID, addAttrValue))
|
| | | if attrID > 0 and addAttrValue > 0:
|
| | | effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
|
| | | |
| | | return
|
| | |
|
| | | def __addStarEffFuncAttr(ipyData, effAttrInfo, funcAttrInfo, effAttrValue):
|
| | |
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Rune, allAttrList)
|
| | | return
|
| | |
|
| | | def GetRuneTotalLV(curPlayer):
|
| | | ## 符印累计总等级
|
| | | totalLV = 0
|
| | | runeHoleCnt = IpyGameDataPY.GetFuncCfg("RuneUnlock", 4)
|
| | | for holeNum in xrange(1, runeHoleCnt + 1):
|
| | | runeData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Rune_Data % holeNum, 0)
|
| | | if not runeData:
|
| | | continue
|
| | | totalLV += ItemControler.GetRuneItemPlusLV(runeData) + 1
|
| | | return totalLV
|
| | |
|
| | |
|
| | | ## 同步客户端
|