hxp
2024-11-18 db72112f4cb48a5ab83cde13b80d21fcaf429d7f
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
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GameWorldAlineInvade
#
# @todo:ÒìÊÞÈëÇÖ
# @author hxp
# @date 2024-05-16
# @version 1.0
#
# ÏêϸÃèÊö: ÒìÊÞÈëÇÖ
#
#-------------------------------------------------------------------------------
#"""Version = 2024-05-16 16:00"""
#-------------------------------------------------------------------------------
 
import GameWorld
import ShareDefine
import PlayerCompensation
import IpyGameDataPY
 
def DoOnDay():
    GiveDayHurtAward()
    return
 
def GiveDayHurtAward():
    GameWorld.Log("ÒìÊÞÈëÇÖÿÈÕ½áËã½±Àø")
    billBoard = GameWorld.GetBillboard().FindBillboard(ShareDefine.Def_BT_AlineInvade)
    if not billBoard:
        return
    billboradAwardDict = IpyGameDataPY.GetFuncEvalCfg("AlineInvade", 2, {})
    
    orderList = []
    for orderStr in billboradAwardDict.keys():
        orderList.append(int(orderStr))
    orderList.sort()
    GameWorld.Log("    ½±ÀøÃû´ÎÁбí: %s" % orderList)
    
    awardOrder = orderList[0]
    billboardCount, billboardMaxCount = billBoard.GetCount(), billBoard.GetMaxCount()
    GameWorld.Log("    °ñµ¥Êý¾ÝÊý! billboardCount=%s,billboardMaxCount=%s" % (billboardCount, billboardMaxCount))
    for index in xrange(billboardCount):
        billBoardData = billBoard.At(index)
        if not billBoardData:
            continue
        order = index + 1
        
        if order > awardOrder:
            nextOrderIndex = orderList.index(awardOrder) + 1
            if nextOrderIndex >= len(orderList):
                break
            awardOrder = orderList[nextOrderIndex]
            
        playerID = billBoardData.GetID()
        #GameWorld.DebugLog("order=%s,playerID=%s,awardOrder=%s" % (order, playerID, awardOrder))
        if playerID < 10000:
            continue
        
        awardList = billboradAwardDict[str(awardOrder)]
        PlayerCompensation.SendMailByKey("AlineInvadeHurtRank", [playerID], awardList, [order])
        
    billBoard.Clear()
    return