hzr
2025-04-21 2d9d117228fd281aeeb0f3c173f538744f8dffd7
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
#!/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