From e84f8a63b4d3bd8ee4722f6bb8f40865f09d967c Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 22 一月 2019 20:29:31 +0800 Subject: [PATCH] 5931 【后端】【1.5.100】诛仙装备开发(套装属性、诛仙背包整理、装备总评分、穿戴绑定) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py | 14 +++++++++++--- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py | 23 +++++++++++++++++------ ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 2 +- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py index ea1a7a4..173dabb 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py @@ -1483,7 +1483,7 @@ #自动恢复计算间隔 Def_HPRestoreInterval = 5000 #允许重置的背包索引 -Def_CanItemResetPack = [IPY_GameWorld.rptItem, IPY_GameWorld.rptWarehouse, ShareDefine.rptTreasure] +Def_CanItemResetPack = [IPY_GameWorld.rptItem, IPY_GameWorld.rptWarehouse, ShareDefine.rptTreasure, ShareDefine.rptZhuXianItem] #仓库分页个数 Def_ItemReset_WarehousePageCnt = 56 #玩家捡起物品的距离 8 diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py index 8f79049..6592e7e 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py @@ -41,7 +41,7 @@ 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): @@ -83,7 +83,7 @@ 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) @@ -97,9 +97,10 @@ 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: @@ -137,6 +138,8 @@ 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(): @@ -213,8 +216,9 @@ 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(): @@ -241,6 +245,9 @@ 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, @@ -258,7 +265,7 @@ 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] @@ -268,6 +275,7 @@ 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 @@ -277,13 +285,16 @@ 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) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py index a93cdda..5c084b2 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py @@ -500,7 +500,15 @@ def GetZhuXianEquipTotalGS(curPlayer): ##诛仙装备总评分 - return 10000000 + equipScoreTotal = 0 + zhuXianEquipPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptZhuXianEquip) + for equipIndex in xrange(zhuXianEquipPack.GetCount()): + curEquip = zhuXianEquipPack.GetAt(equipIndex) + if curEquip.IsEmpty(): + continue + equipScoreTotal += GetEquipGearScore(curEquip) + return equipScoreTotal + #--------------------------------------------------------------------- ## 通过效果ID,检查是否为指定物品 # @param curPlayer 当前玩家 @@ -1710,7 +1718,7 @@ DoLogic_ItemBindType(curPlayer, switchItem, ChConfig.Def_BindType_DoEquipBind) # 装备技能书、坐骑装备绑定 - if putInPackIndex in [IPY_GameWorld.rptHorseEquip]: + if putInPackIndex in [IPY_GameWorld.rptHorseEquip, ShareDefine.rptZhuXianEquip]: DoLogic_ItemBindType(curPlayer, curItem, ChConfig.Def_BindType_DoEquipBind) #交换装备 @@ -1735,7 +1743,7 @@ DoLogic_ItemBindType(curPlayer, switchItem, ChConfig.Def_BindType_DoEquipBind) # 装备技能书、坐骑装备绑定 - if putInPackIndex in [IPY_GameWorld.rptHorseEquip]: + if putInPackIndex in [IPY_GameWorld.rptHorseEquip, ShareDefine.rptZhuXianEquip]: DoLogic_ItemBindType(curPlayer, emptyItem, ChConfig.Def_BindType_DoEquipBind) if switchItem.GetGameWorldItemType() == IPY_GameWorld.gwitRoleItem: -- Gitblit v1.8.0