| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package PlayerActGarbageSorting  | 
| #  | 
| # @todo:À¬»øÊÕ¼¯  | 
| # @author hxp  | 
| # @date 2021-05-13  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: À¬»øÊÕ¼¯  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #"""Version = 2021-05-13 19:30"""  | 
| #-------------------------------------------------------------------------------  | 
| import PlayerBillboard  | 
| import ShareDefine  | 
| import GameWorld  | 
| import IpyGameDataPY  | 
| import PlayerCompensation  | 
|   | 
|   | 
| def OnActStart(actNum):  | 
|     ## »î¶¯¿ªÆô  | 
|     PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_Environment)  | 
|     return  | 
|   | 
|   | 
| def OnActEnd(actNum):  | 
|     ## »î¶¯½áÊø  | 
|       | 
|     # ·¢·ÅÅÅÐн±Àø  | 
|     GameWorld.Log("=== À¬»ø·ÖÀà»î¶¯½áÊø£¡·¢·Å»·±£°ñµ¥½±Àø£¡ === actNum=%s" % actNum)  | 
|     billBoard = GameWorld.GetBillboard().FindBillboard(ShareDefine.Def_BT_Environment)  | 
|     if not billBoard:  | 
|         return  | 
|       | 
|     orderAwardDict = IpyGameDataPY.GetFuncEvalCfg("GarbageSortingAward", 1, {})  | 
|       | 
|     for index in xrange(billBoard.GetCount()):  | 
|         billBoardData = billBoard.At(index)  | 
|         if not billBoardData:  | 
|             continue  | 
|           | 
|         order = index + 1  | 
|           | 
|         awardItemList = GameWorld.GetOrderValueByDict(orderAwardDict, order, False)  | 
|         if not awardItemList:  | 
|             break  | 
|           | 
|         playerID = billBoardData.GetID()  | 
|         name2 = billBoardData.GetName2()  | 
|         cmpValue = billBoardData.GetCmpValue()  | 
|           | 
|         GameWorld.Log("    ·¢·Å»·±£°ñµ¥½±Àø: order=%s,playerID=%s,cmpValue=%s,awardItemList=%s, %s"   | 
|                       % (order, playerID, cmpValue, awardItemList, name2))  | 
|           | 
|         PlayerCompensation.SendMailByKey("GarbageSortingMail30", [playerID], awardItemList, [order])  | 
|           | 
|     PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_Environment)  | 
|     return  |