| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
|   | 
| ##@package DelAllMission  | 
| # »ñµÃÍæ¼ÒÈÎÎñÁÐ±í  | 
| #  | 
| # @author kill  | 
| # @date 2010-4-21  | 
| # @version 1.0  | 
| #  | 
| # ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ  | 
| # VER = "2010-05-12 18:30" zhengyang Ìí¼Ó×¢ÊÍ  | 
| #  | 
| # Ä£¿éÏêϸ˵Ã÷  | 
|   | 
| import GameWorld  | 
| import Lang  | 
| import ChConfig  | 
| import LogUI  | 
| import QuestCommon  | 
|   | 
| ## GMÃüÁîÖ´ÐÐÈë¿Ú  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param playerList ²ÎÊýÁбí []  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnExec(curPlayer, playerList):  | 
|   | 
|     curIndex = 0  | 
|     cnt = curPlayer.GetMissionCount()  | 
|     while curIndex < cnt:  | 
|         cnt = curPlayer.GetMissionCount()  | 
|         #±éÀúÈÎÎñÁбí, ÕÒµ½Õâ¸öÈËÎï¿ÉÒÔÖ´ÐеÄÈÎÎñ  | 
|         curMission = curPlayer.GetMissionByIndex(curIndex)  | 
|           | 
|         if curMission == None:  | 
|             break  | 
|           | 
|         #»ñµÃÈÎÎñID  | 
|         MissionID = curMission.GetMissionID()  | 
|           | 
|         GameWorld.DebugAnswer(curPlayer, Lang.GBText("ɾ³ý Íæ¼ÒÈÎÎñID£º%d"%(MissionID)))  | 
|         curPlayer.DelMission(MissionID)  | 
|           | 
|     # ÖØÖþçÇéÈÎÎñÍê³É״̬  | 
|     resetStoryNumList = []  | 
|     for storyNum in xrange(ChConfig.Max_StoryMissionNum + 1):  | 
|         isAllFinish = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_StoryMissionState, storyNum)  | 
|         if isAllFinish:  | 
|             GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_StoryMissionState, storyNum, 0)  | 
|             resetStoryNumList.append(storyNum)  | 
|     if resetStoryNumList:  | 
|         QuestCommon.Sync_StoryMissionState(curPlayer, resetStoryNumList)  | 
|           | 
|     GameWorld.DebugAnswer(curPlayer, Lang.GBText("ɾ³ýÈÎÎñ³É¹¦"))  | 
|     return  |