All pastes #903811 Raw Edit

Someone

public text v1 · immutable
·published 2008-02-14 14:27 UTC
rendered paste body
ethod Load()
	{
		variable string Continent
		variable int INDEX_Continent
		variable string Zone
		variable int INDEX_Zone
		variable lnavregionref LoadZoneRegion
		variable lnavregionref LoadedZoneRegion
		variable bool UseLSO = ${Config.Xboxx.Element["chkLSOFormat"]}
		variable string MapsToLoad[4]
		variable int i=1
		MapsToLoad[3]:Set[Orgrimmar]
		MapsToLoad[2]:Set[feralas]
		MapsToLoad[1]:Set[tanaris]
		MapsToLoad[4]:Set[Thousand Needles]
				
		;Clear out the map information
		LavishNav:Clear
		; Add tree structure for the loading
		This:InitializeRegions
		
		;Add in a default Intance as a catch all for any zone we dont know about
		LoadZoneRegion:SetRegion[${LavishNav.FindRegion["Instance"].FQN}]
		LoadedZoneRegion:SetRegion[${LoadZoneRegion.Parent}]

		echo "Loading ${Zone} into ${LoadedZoneRegion.FQN} P: ${LoadedZoneRegion.Parent.FQN}"

		if ${UseLSO}
		{
			echo Loaded Maps in LSO Format
			LoadedZoneRegion:Import[-lso,"${ConfigDir}Instance"]
		}		
		else
		{
			echo Loaded Maps in XML Format
			LoadedZoneRegion:Import["${ConfigDir}Instance"]			
		}
		do
		{
			LoadedZoneRegion:Import[-lso,"${ConfigDir}${MapsToLoad[${i}]}"]
			ECHO "LOADED ${MapsToLoad[${i}]}"
			
		}
		while ${i:Inc}<=4
		
		;INDEX_Continent:Set[1]
		;do
		;{
		;	Continent:Set[${WoWScript[GetMapContinents(),${INDEX_Continent}]}]
			;INDEX_Zone:Set[1]
			;do
			;{
				;Zone:Set[${WoWScript[GetMapZones(${INDEX_Continent}),${INDEX_Zone}]}]
				;Zone:Set[${ISXWoW.RealZoneText}]
				;LoadZoneRegion:SetRegion[${LavishNav.FindRegion[${Zone}].FQN}]
				;LoadedZoneRegion:SetRegion[${LoadZoneRegion.Parent}]
				;if ${UseLSO}
				;{
					;LoadedZoneRegion:Import[-lso,"${ConfigDir}${Zone}"]
				;}		
				;else
				;{
					;LoadedZoneRegion:Import["${ConfigDir}${Zone}"]		
			;	}				
				;INDEX_Zone:Inc
		;	}
			;while ${WoWScript[GetMapZones(${INDEX_Continent}),${INDEX_Zone}](exists)}
			;INDEX_Continent:Inc
		;}
		;while ${WoWScript[GetMapContinents(),${INDEX_Continent}](exists)}
	}