#!/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
|
|
|