hxp
2024-11-25 878fef04122d1feaa0f42c429f364659931bc379
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
47
48
49
50
51
52
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#
##@package Commands.ClearMail
#
# @todo:Çå³ýËùÓÐδÁìÈ¡Óʼþ
# @author hxp
# @date 2015-10-26
# @version 1.0
#
# ÏêϸÃèÊö: Çå³ýËùÓÐδÁìÈ¡Óʼþ
#
#---------------------------------------------------------------------
"""Version = 2015-10-26 10:30"""
#---------------------------------------------------------------------
 
import PlayerCompensation
import ChPyNetSendPack
import NetPackCommon
import GameWorld
 
## Ö´ÐÐÂß¼­
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param gmList []
#  @return None
def OnExec(curPlayer, gmList):
    
    curPlayerID = curPlayer.GetPlayerID()
    mailList = PlayerCompensation.SeekPlayerCompensation(curPlayer)
    for i, mail in enumerate(mailList):
        GUID = mail[0]
        curPersonalCompensation = GameWorld.GetCompensationMgr().FindPersonalCompensation(curPlayerID, GUID)
        if curPersonalCompensation.PlayerID == curPlayerID:
            compensationType = PlayerCompensation.Personal_CompensationType
        else:
            curEntireRequire = GameWorld.GetCompensationMgr().FindEntireCompensation(GUID)
            if curEntireRequire.GUID != GUID:
                continue
            compensationType = PlayerCompensation.Entire_CompensationType
        PlayerCompensation.GiveCompensationSuccess(curPlayer, GUID, compensationType, True)
        
        sendMCPack = ChPyNetSendPack.tagMCGiveCompensationResult()
        sendMCPack.GUID = GUID
        sendMCPack.Result = 1
        NetPackCommon.SendFakePack(curPlayer, sendMCPack)
        GameWorld.DebugAnswer(curPlayer, 'clearMail i=%s,GUID=%s,Type=%s' % (i, GUID, compensationType))
    return