| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package GameWorldOpenServerCampaign  | 
| #  | 
| # @todo:¿ª·þ»î¶¯  | 
| # @author hxp  | 
| # @date 2018-03-06  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: ¿ª·þ»î¶¯  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #"""Version = 2018-03-06 11:00"""  | 
| #-------------------------------------------------------------------------------  | 
|   | 
|   | 
| import GameWorld  | 
| import ShareDefine  | 
|   | 
|   | 
| def CanGiveCampaignAward(curPlayer, msgList):  | 
|     ## ¿É·ñÁìÈ¡¿ª·þ»î¶¯°ñµ¥½±Àø  | 
|       | 
|     if not curPlayer:  | 
|         return msgList  | 
|       | 
|     campTypeList, isEndMail = msgList  | 
|       | 
|     queryResultList = []  | 
|     for oscType in campTypeList:  | 
|         queryResultList.append(__GetGiveCampaignAwardInfo(curPlayer, oscType))  | 
|     msgList.append(queryResultList)  | 
|       | 
|     GameWorld.DebugLog("ÇëÇóÁìÈ¡¿ª·þ»î¶¯½±Àø: campTypeList=%s,isEndMail=%s,queryResultList=%s"   | 
|                        % (campTypeList, isEndMail, queryResultList), curPlayer.GetPlayerID())  | 
|     return msgList  | 
|   | 
| def __GetGiveCampaignAwardInfo(curPlayer, campaignType):  | 
|     ## »ñÈ¡Áì½±ËùÐèµÄÐÅÏ¢  | 
|       | 
|     awardBillboardType = ShareDefine.Def_Campaign_Billboard_Dict.get(campaignType)  | 
|     if not awardBillboardType:  | 
|         return 0  | 
|       | 
|     billBoard = GameWorld.GetBillboard().FindBillboard(awardBillboardType)  | 
|     if not billBoard:  | 
|         return 0  | 
|       | 
|     curPlayerID = curPlayer.GetPlayerID()  | 
|     order = billBoard.IndexOfByID(curPlayerID) + 1  # Íæ¼ÒÔÚÅÅÐаñÖеÄÃû´Î  | 
|     GameWorld.DebugLog("    ½±Àø°ñ: campaignType=%s,order=%s" % (campaignType, order), curPlayerID)  | 
|     return order  | 
|   | 
|   | 
|   |