# /*
#  *  引入YDTrigger存储系统 (需要VJass的支持)
#  *  
#  *  By actboy168
#  *
#  */
#
#ifndef INCLUDE_IMPORT_SAVE_LOAD_SYSTEM_H
#define INCLUDE_IMPORT_SAVE_LOAD_SYSTEM_H

library YDTriggerSaveLoadSystem initializer Init
#
#    if WARCRAFT_VERSION >= 124
#      include <YDTrigger/SaveLoadSystem/HTSystem.h>
#    else
#      include <YDTrigger/SaveLoadSystem/GCSystem.h>
#    endif
#
globals
#    if WARCRAFT_VERSION >= 124
#      ifndef YDWE_HASHTABLE_DEFVAR
#      define YDWE_HASHTABLE_DEFVAR
         hashtable YDTRIGGER_HASHTABLE
#      endif
#    else
#      ifndef YDWE_GAMECACHE_DEFVAR
#      define YDWE_GAMECACHE_DEFVAR
         gamecache YDTRIGGER_GAMECACHE 
#      endif
#    endif
endglobals
#
#    if WARCRAFT_VERSION >= 124
#    else
#      include <YDTrigger/SaveLoadSystem/GCSystem.j>
#    endif
#
#    include <YDTrigger/SaveLoadSystem/Any2I.h>
#    include <YDTrigger/SaveLoadSystem/Has_Clear.h>
#

	private function Init takes nothing returns nothing
	#if WARCRAFT_VERSION >= 124
	#  ifndef YDWE_HASHTABLE_INITVAR
	#  define YDWE_HASHTABLE_INITVAR
		set YDTRIGGER_HASHTABLE = InitHashtable()    
	#  endif
	#else 
	#  ifndef YDWE_GAMECACHE_INITVAR
	#  define YDWE_GAMECACHE_INITVAR
		set YDTRIGGER_GAMECACHE = InitGameCache("YDWE.wav")
	#  endif
	#endif
	endfunction

endlibrary

#endif
