| | |
| | | if 1 > packSpace:
|
| | | PlayerControl.SendMailByKey('TreasureWakeUp', [curPlayer.GetID()], [itemAward])
|
| | | else:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind,
|
| | | [IPY_GameWorld.rptItem], True, showSysInfo=True, event=["MWAward", False, {"mwID":mwID}])
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem], event=["MWAward", False, {"mwID":mwID}])
|
| | | activeMWID = upIpyData.GetActiveMWID()
|
| | | if activeMWID == mwID:
|
| | | GameWorld.ErrLog(' TreasureUp.txt 配置异常 不可激活自身法宝 mwID=%s'%mwID)
|
| | |
| | | break
|
| | | if cnt:
|
| | | break
|
| | | elif curType == 3:
|
| | | #全身装备X星
|
| | | cnt = ChEquip.GetTotalEquipStars(curPlayer)
|
| | | # elif curType == 3:
|
| | | # #全身装备X星
|
| | | # cnt = ChEquip.GetTotalEquipStars(curPlayer)
|
| | |
|
| | | elif curType == 4:
|
| | | #X阶普通、强化套装
|
| | | suiteCntDict = {}
|
| | | playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | for equipIndex in xrange(playerEquip.GetCount()):
|
| | | curEquip = playerEquip.GetAt(equipIndex)
|
| | | if curEquip.IsEmpty():
|
| | | continue
|
| | | suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, equipIndex, curEquip)
|
| | | for suitelv, suiteType in conditionList:
|
| | | if suiteInfo.get(suiteType, 0) >= suitelv:
|
| | | suiteCntDict[suiteType] = suiteCntDict.get(suiteType, 0)+1
|
| | | cnt = max(suiteCntDict.values()) if suiteCntDict else 0
|
| | | # elif curType == 4:
|
| | | # #X阶普通、强化套装
|
| | | # suiteCntDict = {}
|
| | | # playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | # for equipIndex in xrange(playerEquip.GetCount()):
|
| | | # curEquip = playerEquip.GetAt(equipIndex)
|
| | | # if curEquip.IsEmpty():
|
| | | # continue
|
| | | # suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, equipIndex, curEquip)
|
| | | # for suitelv, suiteType in conditionList:
|
| | | # if suiteInfo.get(suiteType, 0) >= suitelv:
|
| | | # suiteCntDict[suiteType] = suiteCntDict.get(suiteType, 0)+1
|
| | | # cnt = max(suiteCntDict.values()) if suiteCntDict else 0
|
| | |
|
| | | else:
|
| | | return
|
| | |
| | | # 给物品
|
| | | if awardItemList:
|
| | | for itemID, itemCnt in awardItemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 1, [IPY_GameWorld.rptItem], True)
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
|
| | |
|
| | | #给钱
|
| | | for moneyType, value in ipyData.GetMoney():
|
| | |
| | | return
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWSoulGotItemState % privilege, 1)
|
| | | for itemid, cnt, isBind in itemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, int(itemid), int(cnt), isBind,
|
| | | [IPY_GameWorld.rptItem], True, showSysInfo=True, event=["MWSoulAward", False, {"privilege":privilege}])
|
| | | ItemControler.GivePlayerItem(curPlayer, int(itemid), int(cnt), 0, [IPY_GameWorld.rptItem], event=["MWSoulAward", False, {"privilege":privilege}])
|
| | |
|
| | | #֪ͨ
|
| | | Sycn_MWPrivilegeData(curPlayer, privilege)
|