From 1dbff913370634e8aea37f2940f2a0d261d4dcb3 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期一, 27 五月 2019 20:05:10 +0800 Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py | 51 +++++++++++++++++++++++++++++++-------------------- 1 files changed, 31 insertions(+), 20 deletions(-) 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 288c9d5..a28f8ec 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 @@ -92,7 +92,11 @@ playControl.RefreshPlayerAttrState() if updPartStar in IpyGameDataPY.GetFuncEvalCfg('EquipPartStarNotify'): - PlayerControl.WorldNotify(0, "StarLevelUp", [curPlayer.GetPlayerName(), curEquip.GetItemTypeID(), updPartStar]) + itemID = curEquip.GetItemTypeID() + userData = curEquip.GetUserData() + guid = ItemCommon.CacheNotifyEquipDetailInfo(curPlayer, curEquip) + msgParamList = [curPlayer.GetPlayerName(), itemID, userData, guid, updPartStar] + PlayerControl.WorldNotify(0, "StarLevelUp", msgParamList) EventShell.EventRespons_EquipStarUp(curPlayer) return @@ -113,27 +117,34 @@ return result costEquipPlaceList = ipyData.GetCostEquipPlace() costEquipColorList = ipyData.GetCostEquipColor() + isJobLimit = ipyData.GetIsJobLimit() suitTotalRate = ipyData.GetSuitTotalRate() - singleSuitRate = float(suitTotalRate) / costEquipCnt - curRate = 0 #成功概率 - delEquipIndexList = [] itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem) - for i, index in enumerate(clientData.CostEquipIndex): - costEquip = itemPack.GetAt(index) - if not costEquip or costEquip.IsEmpty(): - return result - equipID = costEquip.GetItemTypeID() - 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: - return result - if costEquip.GetEquipPlace() not in costEquipPlaceList: - return result - delEquipIndexList.append(index) - isSuite = costEquip.GetSuiteID() - addRate = singleSuitRate if isSuite else singleSuitRate / 2 - curRate += addRate + delEquipIndexList = [] + if not costEquipCnt: + curRate = suitTotalRate / 2 + else: + singleSuitRate = float(suitTotalRate) / costEquipCnt + curRate = 0 #成功概率 + + for i, index in enumerate(clientData.CostEquipIndex): + costEquip = itemPack.GetAt(index) + if not costEquip or costEquip.IsEmpty(): + return result + equipID = costEquip.GetItemTypeID() + 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: + return result + if costEquip.GetEquipPlace() 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 if curRate <= 0: GameWorld.Log('装备升星异常 概率为0!!equipPackIndex=%s'%equipPackIndex) return result -- Gitblit v1.8.0