| | |
| | | #import EventReport
|
| | | import IpyGameDataPY
|
| | | import PassiveBuffEffMng
|
| | | import OpenServerCampaign
|
| | |
|
| | | import random
|
| | |
|
| | |
| | | setFunc, notifyType = sceneEffectsDict[weaponType]
|
| | | setFunc(curPlayer, lv)
|
| | | curPlayer.SendPropertyRefresh(notifyType, lv, False)
|
| | | |
| | | totalLV = 0
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | maxType = ipyDataMgr.GetGodWeaponByIndex(ipyDataMgr.GetGodWeaponCount()-1).GetType()
|
| | | for gwType in xrange(1, maxType + 1):
|
| | | totalLV += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % gwType)
|
| | | |
| | | # 开服活动数据
|
| | | OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_GodWeaponLV, totalLV)
|
| | | return
|
| | |
|
| | | ## 神器开启
|
| | |
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValueList[i], allAttrList)
|
| | |
|
| | | fightPowerEx += IpyGameDataPY.GetFuncEvalCfg('MagicExterior').get(str(gwType), 0)
|
| | | # 附加战力
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_GodWeapon, fightPowerEx)
|
| | | #特效等级属性战力
|
| | | godWeaponEffectData = IpyGameDataPY.InterpolationSearch("GodWeaponEffect", "Level", attrLV, {"GWType":gwType})
|
| | | if godWeaponEffectData:
|
| | | for attrID, attrValue in godWeaponEffectData.GetAttr().items():
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
|
| | | fightPowerEx += godWeaponEffectData.GetFightPower()
|
| | | |
| | | |
| | | # 附加战力
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_GodWeapon, fightPowerEx)
|
| | | GameWorld.DebugLog("神兵属性:%s" % allAttrList)
|
| | | # 保存计算值
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_GodWeapon, allAttrList)
|
| | |
| | | GameWorld.DebugLog("已经解锁的神兵!weaponType=%s" % weaponType)
|
| | | return
|
| | |
|
| | | # 满足玩家等级或者前置神兵等级可解锁
|
| | | if __GWCheckPlayerLV(curPlayer, weaponType) or __GWCheckOtherGWLV(curPlayer, weaponType):
|
| | | |
| | | SetGodWeaponLV(curPlayer, weaponType, 1)
|
| | | RefreshGodWeaponAttr(curPlayer)
|
| | | GameWorld.DebugLog("解锁神兵: weaponType=%s" % weaponType)
|
| | | Sync_GodWeaponLVInfo(curPlayer, weaponType)
|
| | | return
|
| | |
|
| | | # 神兵激活需2次判断等级 {2:100, 4:100}
|
| | | def __GWCheckPlayerLV(curPlayer, weaponType):
|
| | | godWeaponUnlockDict = IpyGameDataPY.GetFuncEvalCfg("GodWeaponActive", 3, {})
|
| | | if str(weaponType) not in godWeaponUnlockDict:
|
| | | GameWorld.DebugLog("该神兵不能解锁!weaponType=%s" % weaponType)
|
| | | return False
|
| | | return curPlayer.GetLV() >= godWeaponUnlockDict[str(weaponType)]
|
| | |
|
| | | # 神兵激活需判断前置神兵等级
|
| | | def __GWCheckOtherGWLV(curPlayer, weaponType):
|
| | | godWeaponUnlockDict = IpyGameDataPY.GetFuncEvalCfg("GodWeaponActive", 2, {})
|
| | | if str(weaponType) not in godWeaponUnlockDict:
|
| | | GameWorld.DebugLog("该神兵不能解锁!weaponType=%s" % weaponType)
|
| | | return
|
| | | return False
|
| | | conditionList = godWeaponUnlockDict[str(weaponType)]
|
| | |
|
| | | for needType, needLV in conditionList:
|
| | |
| | | if needTypeLV < needLV:
|
| | | GameWorld.DebugLog("所需前置神兵等级不足,无法解锁!weaponType=%s,needType=%s,needLV=%s > needTypeLV(%s)"
|
| | | % (weaponType, needType, needLV, needTypeLV))
|
| | | return
|
| | | return False
|
| | |
|
| | | SetGodWeaponLV(curPlayer, weaponType, 1)
|
| | | GameWorld.DebugLog("解锁神兵: weaponType=%s" % weaponType)
|
| | | Sync_GodWeaponLVInfo(curPlayer, weaponType)
|
| | | return
|
| | | return True
|
| | |
|
| | | #===============================================================================
|
| | | #// A5 55 神兵升级 #tagCMGodWeaponPlus
|
| | |
| | | PlayerControl.WorldNotify(0, sysMark, [curPlayer.GetName(), weaponType])
|
| | |
|
| | | #{1:[100,200,300,400],2:[100,200,300,400],3:[100,200,300,400]}
|
| | | notifyDict = IpyGameDataPY.GetFuncEvalCfg('GodLv', 1, {})
|
| | | if weaponType in notifyDict:
|
| | | for notifyLV in notifyDict[weaponType]:
|
| | | if beforeAttrLV < notifyLV and attrLV >= notifyLV:
|
| | | PlayerControl.WorldNotify(0, 'GodWeaponLv', [curPlayer.GetName(), weaponType, notifyLV])
|
| | | #=======================================================================
|
| | | # notifyDict = IpyGameDataPY.GetFuncEvalCfg('GodLv', 1, {})
|
| | | # if weaponType in notifyDict:
|
| | | # for notifyLV in notifyDict[weaponType]:
|
| | | # if beforeAttrLV < notifyLV and attrLV >= notifyLV:
|
| | | # PlayerControl.WorldNotify(0, 'GodWeaponLv', [curPlayer.GetName(), weaponType, notifyLV])
|
| | | #=======================================================================
|
| | |
|
| | | # 神兵特效激活广播
|
| | | godWeaponEffectData = IpyGameDataPY.GetIpyGameDataByCondition('GodWeaponEffect', {'GWType':weaponType, "Level":attrLV}, False, False)
|
| | | if godWeaponEffectData:
|
| | | PlayerControl.WorldNotify(0, godWeaponEffectData.GetNotifyCode(), [curPlayer.GetName(), attrLV])
|
| | | |
| | | totalExp = godWeaponData.GetExp()
|
| | | |
| | | |
| | | Sync_GodWeaponLVInfo(curPlayer, weaponType)
|
| | | #任务
|
| | | EventShell.EventRespons_PlusGodWeapon(curPlayer)
|