Page 1 of 1

bug: default waypoint type if using __WPL:load(getExecutionP

Posted: Mon Jul 27, 2009 4:17 am
by d003232
I'm using a wayopint file with type 'TRAVEL' to switch between botting places and I'm starting with that wayopint file within my profile.xml:

Code: Select all

<waypoints type="TRAVEL" >
	<!-- # 1 --><waypoint x="-424" z="-5999"></waypoint>
	<!-- # 2 --><waypoint x="-667" z="-5952"></waypoint>
	...
	    __WPL:load(getExecutionPath() .. "/waypoints/l5_kaefer.xml");	
	</waypoint>
</waypoints>
The new loaded 'l5_kaefer.xml' file don't have a type settig:

Code: Select all

<waypoints >
	<!-- # 1 --><waypoint x="-1782" z="-6115"></waypoint>
	<!-- # 2 --><waypoint x="-1999" z="-6254"></waypoint>
	...
Doning that, all waypoints inherit the type 'TRAVEL'. IMHO that's not right. All waypoints of 'l5_kaefer.xml' should get type 'NORMAL'. It is working right, if one also set a global type 'NORMAL' in 'l5_kaefer.xml':

Code: Select all

<waypoints type="NORMAL">
	<!-- # 1 --><waypoint x="-1782" z="-6115"></waypoint>
	<!-- # 2 --><waypoint x="-1999" z="-6254"></waypoint>
	...

Re: bug: default waypoint type if using __WPL:load(getExecutionP

Posted: Mon Jul 27, 2009 7:42 am
by Zilvermoon
Very nice info to have :)

Actually been thinking of doing something like this.

Zilvermoon

Re: bug: default waypoint type if using __WPL:load(getExecutionP

Posted: Mon Jul 27, 2009 7:44 am
by d003232
Zilvermoon wrote:Very nice info to have :)

Actually been thinking of doing something like this.

Zilvermoon
Yeaa. It works very find. I will have some waypoint files to level from 1-10 and run up to the town after being lvl 10.

Re: bug: default waypoint type if using __WPL:load(getExecutionP

Posted: Mon Jul 27, 2009 12:20 pm
by Administrator

Code: Select all

	if( type ) then
		if( type == "TRAVEL" ) then
			self.Type = WPT_TRAVEL;
		elseif( type == "NORMAL" ) then
			self.Type = WPT_NORMAL;
		end
	end
I guess the easiest thing to do would be to change that to this:

Code: Select all

	if( type ) then
		if( type == "TRAVEL" ) then
			self.Type = WPT_TRAVEL;
		elseif( type == "NORMAL" ) then
			self.Type = WPT_NORMAL;
		else
			self.Type = WPT_NORMAL;
		end
	else
		self.Type = WPT_NORMAL;
	end
It will default back to WPT_NORMAL when unspecified. This is in revision 97.