| | |
| | | import IpyGameDataPY
|
| | | import FormulaControl
|
| | | import DataRecordPack
|
| | | import PlayerSuccess
|
| | |
|
| | | g_GatherSoulLVExpDict = {} #经验缓存
|
| | | g_gatherSoulLVAttrDict = {} #属性缓存
|
| | |
| | | RefreshGatherSoulAttr(curPlayer)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | Sync_GatherSoulHoleInfo(curPlayer)
|
| | | DoGatherSoulSuccessLogic(curPlayer)
|
| | | return True
|
| | |
|
| | |
|
| | |
| | | RefreshGatherSoulAttr(curPlayer)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | Sync_GatherSoulHoleInfo(curPlayer)
|
| | | |
| | | DoGatherSoulSuccessLogic(curPlayer)
|
| | | GameWorld.DebugLog("聚魂升级!placeType=%s,placeIndex=%s,GatherSoulData=%s,updGatherSoulData=%s"
|
| | | % (placeType, placeIndex, GatherSoulData, updGatherSoulData), playerID)
|
| | | return
|
| | |
| | | return
|
| | |
|
| | |
|
| | | def DoGatherSoulSuccessLogic(curPlayer):
|
| | | #聚魂成就处理
|
| | | #清掉#镶嵌X枚X品质聚魂的成就信息
|
| | | PlayerSuccess.ResetSuccessByType(curPlayer, ShareDefine.SuccType_InlayGatherSoul)
|
| | | totalLV = 0
|
| | | GatherSoulUnlockDict = IpyGameDataPY.GetFuncEvalCfg("GatherSoulHole", 1, {})
|
| | | maxGatherSoulHole = len(GatherSoulUnlockDict)
|
| | | for holeNum in xrange(maxGatherSoulHole):
|
| | | GatherSoulData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherSoulHoleData % holeNum, 0)
|
| | | if not GatherSoulData:
|
| | | continue
|
| | | GatherSoulItemID = ItemControler.GetGatherSoulItemID(GatherSoulData)
|
| | | itemData = GameWorld.GetGameData().GetItemByTypeID(GatherSoulItemID)
|
| | | if not itemData:
|
| | | continue
|
| | | if itemData.GetType() == ChConfig.Def_ItemType_GatherSoulCore:
|
| | | continue
|
| | | itemColor = itemData.GetItemColor()
|
| | | GatherSoulItemPlusLV = ItemControler.GetGatherSoulItemPlusLV(GatherSoulData) + 1 #客户端1开始
|
| | | totalLV += GatherSoulItemPlusLV
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_InlayGatherSoul, 1, [itemColor])
|
| | | PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_GatherSoulLvUp, totalLV)
|
| | | return
|
| | |
|
| | | def RefreshGatherSoulAttr(curPlayer):
|
| | | allAttrList = [{} for _ in range(4)]
|
| | | GatherSoulUnlockDict = IpyGameDataPY.GetFuncEvalCfg("GatherSoulHole", 1, {})
|