| | |
| | | if isActive:
|
| | | GameWorld.DebugLog(' 该法宝已开启! mwID=%s' % mwID)
|
| | | return
|
| | |
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('XBXZ', {'MWID':mwID}, True, False)
|
| | | |
| | | #消耗物品判断
|
| | | ipyData = GetWMIpyData(mwID)
|
| | | needItemDict = ipyData.GetNeedItem()
|
| | |
| | |
|
| | | #扣消耗
|
| | | ItemCommon.DelCostItem(curPlayer, itemPack, delInfoDict, ChConfig.ItemDel_MagicWeapon)
|
| | | else:
|
| | | elif ipyDataList:
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('XBXZ', {'MWID':mwID}, True, False)
|
| | | if not ipyDataList:
|
| | | return
|
| | | for ipyData in ipyDataList:
|
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_XBXZAwardRecord, ipyData.GetID()):
|
| | | return
|
| | | |
| | | elif mwID != 101: #定海神针特殊 可直接获得
|
| | | return
|
| | | |
| | | DoActiveMW(curPlayer, mwID)
|
| | | return
|
| | |
|
| | |
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID, state, True)
|
| | | return
|
| | |
|
| | | #// A5 12 感应法宝 #tagCMThinkMagicWeapon
|
| | | #
|
| | | #struct tagCMThinkMagicWeapon
|
| | | #{
|
| | | # tagHead Head;
|
| | | # DWORD MWID;
|
| | | #};
|
| | | def OnThinkMagicWeapon(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | mwID = clientData.MWID
|
| | | #只触发任务接口
|
| | | EventShell.EventRespons_ThinkMagicWeapon(curPlayer)
|
| | | return |