| | |
| | | import ChEquip
|
| | | import PlayerVip
|
| | |
|
| | | import random
|
| | |
|
| | | g_succInfoDict = {}
|
| | | g_potentialsSkillDict = {}
|
| | | ##登录处理
|
| | |
| | | #infoDict = {"SkillID":skillTypeID, "SkillLV":upSkillLv, ChConfig.Def_Cost_Reason_SonKey:upSkill.GetSkillName()}
|
| | | if not PlayerControl.PlayerLostZhenQi(curPlayer, needSP):
|
| | | return
|
| | | |
| | | if not GameWorld.CanHappen(initRate):
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | maxRateValue = ShareDefine.Def_MaxRateValue
|
| | | randValue = random.randint(0, maxRateValue-1)
|
| | | canHappen = randValue < initRate
|
| | | GameWorld.DebugLog("canHappen=%s,randValue=%s,initRate=%s,maxRateValue=%s" |
| | | % (canHappen, randValue, initRate, maxRateValue), playerID)
|
| | | # 不是百分百成功的记录合成流向
|
| | | if initRate != maxRateValue:
|
| | | drDict = {"PlayerID":playerID, "AccID":curPlayer.GetAccID(), "skillTypeID":skillTypeID, "IsSuccess":canHappen,
|
| | | "initRate":initRate, "randValue":randValue, "maxRateValue":maxRateValue}
|
| | |
|
| | | DataRecordPack.SendEventPack("MagicWeaponSkillUp", drDict, curPlayer)
|
| | |
|
| | | if not canHappen:
|
| | | GameWorld.DebugLog("法宝技能升级,curSkillID=%s, maxRate=%s 升级失败" % (curSkillID, initRate))
|
| | | curPlayer.Sync_MakeItemAnswer(ShareDefine.Def_mitMagicWeaponSkillUp, 0)
|
| | | return
|