| | |
| | | if str(equipPlace) not in placeUnlockDict:
|
| | | return True
|
| | | needTowerLV = placeUnlockDict[str(equipPlace)]
|
| | | curTowerLV = 20 # 已过关的诛仙塔层数
|
| | | curTowerLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ZhuXianTowerPassLV) # 已过关的诛仙塔层数
|
| | | return curTowerLV >= needTowerLV
|
| | |
|
| | | def CheckLearnZhuXianSkill(curPlayer, skillID):
|
| | |
| | | reqEquipPlaceIndex = clientData.EquipIndex
|
| | | itemIndex = clientData.ItemIndex
|
| | |
|
| | | GameWorld.DebugLog("诛仙穿戴装备: EquipIndex=%s,ItemIndex=%s" % (reqEquipPlaceIndex, itemIndex), playerID)
|
| | | GameWorld.DebugLog("穿戴诛仙装备: EquipIndex=%s,ItemIndex=%s" % (reqEquipPlaceIndex, itemIndex), playerID)
|
| | |
|
| | | zhuXianItemPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptZhuXianItem)
|
| | | curEquip = zhuXianItemPack.GetAt(itemIndex)
|
| | |
| | | equipPlace = curEquip.GetEquipPlace()
|
| | | equipPlaceIndex = GetZhuXianEquipIndexByPlace(equipPlace)
|
| | | if reqEquipPlaceIndex != equipPlaceIndex:
|
| | | reqEquipPlace = GetZhuXianEquipPlaceByIndex(reqEquipPlaceIndex)
|
| | | canPlace = False
|
| | | for sharePlaceList in ShareDefine.ShareEquipPlace:
|
| | | if reqEquipPlaceIndex in sharePlaceList and equipPlaceIndex in sharePlaceList:
|
| | | if reqEquipPlace in sharePlaceList and equipPlace in sharePlaceList:
|
| | | canPlace = True
|
| | | break
|
| | | if not canPlace:
|
| | |
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | EquipIndex = clientData.EquipIndex
|
| | | |
| | | GameWorld.DebugLog("卸下诛仙装备: EquipIndex=%s" % (EquipIndex), playerID)
|
| | |
|
| | | zhuXianEquipPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptZhuXianEquip)
|
| | | if EquipIndex < 0 or EquipIndex >= zhuXianEquipPack.GetCount():
|
| | |
| | | else:
|
| | | PlayerControl.CalcAttrDict_Type(legendAttrID, legendAttrValue, allAttrList)
|
| | |
|
| | | GameWorld.DebugLog("诛仙装备属性: allAttrList=%s" % (allAttrList))
|
| | | GameWorld.DebugLog(" zxSkillPlusAttrDict=%s" % (zxSkillPlusAttrDict))
|
| | | # GameWorld.DebugLog("诛仙装备属性: allAttrList=%s" % (allAttrList))
|
| | | # GameWorld.DebugLog(" zxSkillPlusAttrDict=%s" % (zxSkillPlusAttrDict))
|
| | | # GameWorld.DebugLog(" equipPlaceClassLVDict=%s" % (equipPlaceClassLVDict))
|
| | |
|
| | | # 缓存技能增强比例,目前暂写死对指定技能伤害百分比提升
|
| | | for attrID, plusValue in zxSkillPlusAttrDict.items():
|
| | |
| | | skillReducePerDict[effSkillTypeID] = plusValue
|
| | | PyGameData.g_zhuXianSkillReducePerDict[playerID] = skillReducePerDict
|
| | |
|
| | | # GameWorld.DebugLog(" PyGameData.g_zhuXianSkillAddPerDict=%s" % PyGameData.g_zhuXianSkillAddPerDict)
|
| | | # GameWorld.DebugLog(" PyGameData.g_zhuXianSkillReducePerDict=%s" % PyGameData.g_zhuXianSkillReducePerDict)
|
| | | |
| | | # 计算套装,目前暂写死对诛仙装备部位基础属性提升
|
| | | suitAttrIDPlusPlaceDict = {
|
| | | ShareDefine.Def_Effect_ZXCloakAttrPer:ShareDefine.zxetCloak,
|
| | |
| | | for place in placeGroupList:
|
| | | if place not in equipPlaceClassLVDict:
|
| | | isSuit = False
|
| | | GameWorld.DebugLog(" 未穿戴装备,无法激活诛仙套装! suitType=%s,placeGroupList=%s,place=%s" % (suitType, placeGroupList, place))
|
| | | #GameWorld.DebugLog(" 未穿戴装备,无法激活诛仙套装! suitType=%s,placeGroupList=%s,place=%s" % (suitType, placeGroupList, place))
|
| | | break
|
| | | if not suitLV:
|
| | | suitLV = equipPlaceClassLVDict[place]
|
| | |
| | | if not isSuit or not suitLV:
|
| | | continue
|
| | |
|
| | | GameWorld.DebugLog(" 激活诛仙套装: suitType=%s, suitLV=%s" % (suitType, suitLV))
|
| | | suitAttrIpyData = IpyGameDataPY.GetIpyGameData("ZhuXianSuitAttr", suitType, suitLV)
|
| | | if not suitAttrIpyData:
|
| | | continue
|
| | |
| | | continue
|
| | | for i, suitEffID in enumerate(suitAttrIDList):
|
| | | suitEffValue = suitAttrValueList[i]
|
| | | #GameWorld.DebugLog(" suitEffID=%s,suitEffValue=%s" % (suitEffID, suitEffValue))
|
| | | if suitEffID in suitAttrIDPlusPlaceDict:
|
| | | plusPlace = suitAttrIDPlusPlaceDict[suitEffID]
|
| | | if plusPlace not in equipPlaceBaseAttrDict:
|
| | | continue
|
| | | plusEffDict = equipPlaceBaseAttrDict[plusPlace]
|
| | | #GameWorld.DebugLog(" plusPlace=%s,plusEffDict=%s" % (plusPlace, plusEffDict))
|
| | | for plusEffID, plusEffValue in plusEffDict.items():
|
| | | addValue = int(plusEffValue * (10000 + suitEffValue) / 10000.0)
|
| | | #GameWorld.DebugLog(" plusEffID=%s,plusEffValue=%s,addValue=%s" % (plusEffID, plusEffValue, addValue))
|
| | | PlayerControl.CalcAttrDict_Type(plusEffID, addValue, allAttrListZXSuit)
|
| | | else:
|
| | | PlayerControl.CalcAttrDict_Type(suitEffID, suitEffValue, allAttrListZXSuit)
|