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
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.LoadMission
#
# @todo:¼ì²éÈÎÎñ½Å±¾¸ñʽÊÇ·ñÕý³£
# @author hxp
# @date 2017-11-17
# @version 1.0
#
# ÏêϸÃèÊö: ¼ì²éÈÎÎñ½Å±¾¸ñʽÊÇ·ñÕý³£
#
#-------------------------------------------------------------------------------
#"""Version = 2017-11-17 17:00"""
#-------------------------------------------------------------------------------
import IPY_GameWorld
import QuestManager
import GameWorld
import ChConfig
import zipfile
 
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param playerList ²ÎÊýÁбí [] [index] [index, count]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, playerList):
    
    questPath = ChConfig.GetAppPath() + "QuestData.zip"
    ZipFile = zipfile.ZipFile(questPath)
    nameList = ZipFile.namelist()
    
    xmlLoader = IPY_GameWorld.IPY_XMLLoader()
    #GameWorld.DebugLog("questPath %s" % questPath)
    for name in nameList:
        if not name.upper().endswith("XML"):
            #GameWorld.DebugLog("    ²»ÊÇXMLÎļþ²»´¦Àí%s" % name)
            continue
        isOK = xmlLoader.LoadFromXML(name, QuestManager.ZipFile_GetData(name))
        if not isOK:
            GameWorld.DebugAnswer(curPlayer, "XMLÎļþ¸ñʽ´íÎó£¡%s" % (name))
            
    GameWorld.DebugAnswer(curPlayer, "ÈÎÎñ½Å±¾¼ì²éÍê±Ï£¡")
    return True