#!/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