#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package UseItem.Item_AddCrossRealmPKCnt # # @todo:Ôö¼Ó¿ç·þPK´ÎÊý # @author xdh # @date 2019-01-14 # @version 1.0 # # ÏêϸÃèÊö: Ôö¼Ó¿ç·þPK´ÎÊý # #------------------------------------------------------------------------------- #"""Version = 2018-03-09 12:00""" #------------------------------------------------------------------------------- import ItemCommon import PlayerCrossRealmPK import PlayerControl import ChConfig import CrossRealmPlayer import GameWorld def BatchUseItem(curPlayer, curRoleItem, tick, useCnt, exData): ##ÅúÁ¿Ê¹ÓÃÎïÆ· playerID = curPlayer.GetID() #curEff = curRoleItem.GetEffectByIndex(0) addCnt = useCnt #curEff.GetEffectValue(0) if not CrossRealmPlayer.IsCrossServerOpen(): PlayerControl.NotifyCode(curPlayer, "CrossMatching18") return if not PlayerCrossRealmPK.IsCrossRealmPKMatchState(): GameWorld.DebugLog("¿ç·þÆ¥Åä먦Æô£¬²»¿É½øÐÐʹÓÃÎïÆ·Ôö¼Ó´ÎÊý£¡", playerID) return todayItemAddCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_ItemAddCount) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_ItemAddCount, todayItemAddCount+addCnt) ItemCommon.DelItem(curPlayer, curRoleItem, useCnt, True, ChConfig.ItemDel_AddFBCnt) PlayerCrossRealmPK.SyncCrossRealmPKPlayerInfo(curPlayer) PlayerControl.NotifyCode(curPlayer, 'CrossMatching25', [useCnt]) return True, useCnt