| | |
| | | #===============================================================================
|
| | | # #//03 2F 请求装备显隐#tagRequestEquipShowHide
|
| | | # //装备显示开关
|
| | | # int GetEquipShowSwitch(); 第几套*10+是否有套装
|
| | | # int GetEquipShowSwitch(); 灵根特效表key * 1000+第几套*10+是否有套装
|
| | | #===============================================================================
|
| | | ##请求装备显隐. (设置显示哪套装备外观)
|
| | | # @param index 玩家索引
|
| | |
| | | return
|
| | |
|
| | | def ChangeEquipfacadeByClassLV(curPlayer, classLV):
|
| | | ##变更第X套装备外观
|
| | | ##变更第X套装备外观 灵根特效表key * 1000+第几套*10+是否有套装
|
| | | oldEquipShowSwitch = curPlayer.GetEquipShowSwitch()
|
| | | realSuit=1
|
| | | equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | |
| | | if not curEquip.GetSuiteID():
|
| | | realSuit = 0
|
| | | break
|
| | | updEquipShowSwitch = classLV*10+realSuit
|
| | | updEquipShowSwitch = oldEquipShowSwitch /1000*1000+ classLV*10+realSuit
|
| | | if oldEquipShowSwitch == updEquipShowSwitch:
|
| | | return
|
| | | curPlayer.SetEquipShowSwitch(updEquipShowSwitch)
|
| | | return True
|
| | |
|
| | | def ChangeEquipfacadeByLingGen(curPlayer):
|
| | | ## 灵根品级变化影响角色外观显示 灵根特效表key * 1000+第几套*10+是否有套装
|
| | | pointValueInfo = [[ShareDefine.Def_Effect_Metal,PlayerControl.GetMetalQualityLV(curPlayer)],
|
| | | [ShareDefine.Def_Effect_Wood,PlayerControl.GetWoodQualityLV(curPlayer)],
|
| | | [ShareDefine.Def_Effect_Water,PlayerControl.GetWaterQualityLV(curPlayer)],
|
| | | [ShareDefine.Def_Effect_Fire,PlayerControl.GetFireQualityLV(curPlayer)],
|
| | | [ShareDefine.Def_Effect_Earth,PlayerControl.GetEarthQualityLV(curPlayer)],
|
| | | ]
|
| | | g_skillElementCntDict = {} #灵根对应使用专精技能数量
|
| | | skillManager = curPlayer.GetSkillManager()
|
| | | gameData = GameWorld.GetGameData()
|
| | | for i in xrange(skillManager.GetSkillCount()):
|
| | | curSkill = skillManager.GetSkillByIndex(i)
|
| | | skillID = curSkill.GetSkillTypeID()
|
| | | curSelectSkillID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementID % skillID)
|
| | | if not curSelectSkillID:
|
| | | continue
|
| | | elementSkillData = gameData.GetSkillBySkillID(curSelectSkillID)
|
| | | if not elementSkillData:
|
| | | continue
|
| | | skillElementType = SkillShell.GetSkillElementType(elementSkillData)
|
| | | g_skillElementCntDict[skillElementType] = g_skillElementCntDict.get(skillElementType, 0) + 1
|
| | | |
| | | showPointID, showQualityLV = 0, 0
|
| | | for pointID, qualityLV in pointValueInfo:
|
| | | if qualityLV > showQualityLV:
|
| | | showQualityLV = qualityLV
|
| | | showPointID = pointID
|
| | | elif showQualityLV and qualityLV == showQualityLV:
|
| | | #比谁的专精技能数量多
|
| | | if g_skillElementCntDict.get(pointID, 0) > g_skillElementCntDict.get(showPointID, 0):
|
| | | showQualityLV = qualityLV
|
| | | showPointID = pointID
|
| | | effectID = 0
|
| | | if showPointID:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('LingGenEffect', showPointID, showQualityLV)
|
| | | if not ipyData:
|
| | | return
|
| | | effectID = ipyData.GetID()
|
| | | oldEquipShowSwitch = curPlayer.GetEquipShowSwitch()
|
| | | updEquipShowSwitch = oldEquipShowSwitch % 1000 + 1000 * effectID
|
| | | GameWorld.DebugLog('灵根品级变化影响角色外观显示g_skillElementCntDict=%s,oldEquipShowSwitch=%s,updEquipShowSwitch=%s'%
|
| | | (g_skillElementCntDict, oldEquipShowSwitch, updEquipShowSwitch))
|
| | | if oldEquipShowSwitch != updEquipShowSwitch:
|
| | | curPlayer.SetEquipShowSwitch(updEquipShowSwitch)
|
| | | return
|
| | |
|
| | |
|
| | | #获取当前是第几套装备外观
|
| | | def GetEquipFacadeClassLV(curPlayer):return curPlayer.GetEquipShowSwitch()/10
|
| | |
|