hxp
5 天以前 388823edfe6308cba6f76ca6dc4f20022c5cb2be
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/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