| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalStoneLV, totalStoneLV)
|
| | | GameWorld.DebugLog("登录更新装备相关值汇总: orangeEquipCount=%s,totalStar=%s,totalPlusLV=%s,totalEvolveLV=%s,totalWashLV=%s,totalStoneLV=%s"
|
| | | % (orangeEquipCount, totalStar, totalPlusLV, totalEvolveLV, totalWashLV, totalStoneLV))
|
| | | Sync_EquipPartSuiteActivateInfo(curPlayer)
|
| | | return
|
| | |
|
| | | ## 刷新所有装备对人物属性的改变
|
| | |
| | | suiteCnt = ipyData.GetSuiteCnt()
|
| | | needStar = ipyData.GetStar()
|
| | | skillID = ipyData.GetSkillID()
|
| | | if [1 if star >= needStar else 0 for star in starList].count(1) >= suiteCnt:
|
| | | activateIndex = ipyData.GetActivateIndex()
|
| | | isActivate = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteActivate, activateIndex)
|
| | | #GameWorld.DebugLog("suiteID=%s,suiteCnt=%s,needStar=%s,isActivate=%s" % (suiteID, suiteCnt, needStar, isActivate))
|
| | | if isActivate and [1 if star >= needStar else 0 for star in starList].count(1) >= suiteCnt:
|
| | | #GameWorld.DebugLog(" 套装: suiteID=%s,suiteCnt=%s,needStar=%s" % (suiteID, suiteCnt, needStar))
|
| | | for attrID, attrValue in ipyData.GetAttrInfo().items():
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListSuit)
|
| | |
| | | #技能
|
| | | if skillID and not skillManager.FindSkillBySkillTypeID(skillID):
|
| | | learnSkillList.append(skillID)
|
| | | #广播
|
| | | notifyMark = ipyData.GetIsNotify()
|
| | | if notifyMark and not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteNotify, notifyMark):
|
| | | PlayerControl.WorldNotify(0, 'AllStarLevelUp' if needStar else 'AllStarLevelUp2', [playerName, suiteID, suiteCnt, needStar])
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteNotify, notifyMark, 1)
|
| | | # #广播,改为激活时广播即可
|
| | | # notifyMark = ipyData.GetIsNotify()
|
| | | # if notifyMark and not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteNotify, notifyMark):
|
| | | # PlayerControl.WorldNotify(0, 'AllStarLevelUp' if needStar else 'AllStarLevelUp2', [playerName, suiteID, suiteCnt, needStar])
|
| | | # GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteNotify, notifyMark, 1)
|
| | |
|
| | | else:
|
| | | if skillID and skillManager.FindSkillBySkillTypeID(skillID):
|
| | |
| | | PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer)
|
| | | return
|
| | |
|
| | | #// A5 C6 装备部位星级套装激活 #tagCMEquipPartSuiteActivate
|
| | | #
|
| | | #struct tagCMEquipPartSuiteActivate
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE ClassLV; // 所属装备阶
|
| | | # WORD SuiteID; // 套装ID
|
| | | # BYTE SuiteCount; // 件数
|
| | | # BYTE Star; // 星数
|
| | | #};
|
| | | def OnEquipPartSuiteActivate(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | classLV = clientData.ClassLV
|
| | | suiteID = clientData.SuiteID
|
| | | suiteCount = clientData.SuiteCount
|
| | | star = clientData.Star
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataList('EquipSuitAttr', suiteID)
|
| | | if not ipyDataList:
|
| | | return
|
| | | |
| | | actIpyData = None
|
| | | for ipyData in ipyDataList:
|
| | | needCount = ipyData.GetSuiteCnt()
|
| | | needStar = ipyData.GetStar()
|
| | | if suiteCount == needCount and star == needStar:
|
| | | actIpyData = ipyData
|
| | | break
|
| | | |
| | | if not actIpyData:
|
| | | return
|
| | | activateIndex = actIpyData.GetActivateIndex()
|
| | | # 这里就不判断是否满足件数、星数条件了,算属性的时候本身也是条件之一,是否激活只是附加条件,这里只处理激活状态变更,能否激活前端判断即可
|
| | | isActivate = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteActivate, activateIndex)
|
| | | if isActivate:
|
| | | return
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteActivate, activateIndex, 1)
|
| | | Sync_EquipPartSuiteActivateInfo(curPlayer)
|
| | | |
| | | #广播
|
| | | notifyMark = actIpyData.GetIsNotify()
|
| | | if notifyMark:
|
| | | PlayerControl.WorldNotify(0, 'AllStarLevelUp' if needStar else 'AllStarLevelUp2', [curPlayer.GetPlayerName(), suiteID, suiteCount, star])
|
| | | |
| | | RefreshPlayerEquipAttribute(curPlayer, classLV)
|
| | | #刷新所有属性
|
| | | playControl = PlayerControl.PlayerControl(curPlayer)
|
| | | playControl.RefreshPlayerAttrState()
|
| | | return
|
| | |
|
| | | def Sync_EquipPartSuiteActivateInfo(curPlayer):
|
| | | ## 同步装备位星级套装激活状态信息
|
| | | keyCount = 10
|
| | | activateStateList = []
|
| | | for i in xrange(keyCount):
|
| | | activateStateList.append(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartSuiteActivate % i))
|
| | | if activateStateList.count(0) == keyCount:
|
| | | return
|
| | | activateInfo = ChPyNetSendPack.tagMCEquipPartSuiteActivateInfo()
|
| | | activateInfo.SuiteActivateStateInfo = activateStateList
|
| | | activateInfo.Count = len(activateInfo.SuiteActivateStateInfo)
|
| | | NetPackCommon.SendFakePack(curPlayer, activateInfo)
|
| | | return
|
| | |
|
| | | ##全身橙色装备数量触发相关(包含橙色品质以上的装备数量)
|
| | | def OnOrangeQualityCntChange(curPlayer, orangeQualityCnt):
|