Gladius

20 - Adding AddonLoader support

What is the enhancement in mind? How should it look and feel?

Adding AddonLoader support to Gladius would help reducing logon time (and potentially resource usage) by postponing effective loading until it is really needed (i.e. entering an arena or using configuration GUI/command).

Please provide any additional information below.

Adding AddonLoader support is pretty simple :

1) add the following line to Gladius.toc:

## LoadManagers: AddonLoader
## X-LoadOn-Slash: /gladius
## X-LoadOn-InterfaceOptions: Gladius
## X-LoadOn-Arena: yes

This makes Gladius LoadOnDemand when AddonLoader is present and then tells AddonLoader to load Gladius when:

  • the user uses the "/gladius" command,
  • the user tries to display the Gladius interface option panel,
  • the player enters an arena.

(AddonLoader handles the tricky details about slash command and interface option panel so it is transparent both the the user and the addon.)

2) ensure Gladius loads properly after PLAYER_LOGIN. Since Gladius uses Ace3 and do not depend directly on PLAYER_LOGIN, adding this at the end of Gladius:OnEnable is sufficient:

	-- Check if we are in an arena in case of postponed loading (AddonLoader support)
	if IsLoggedIn() then
		Gladius:ZONE_CHANGED_NEW_AREA()
	end

I already tested both changes locally.

User When Change
Adirelle Sun, 27 Sep 2009 07:47:21 Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Reported on
27 Sep 2009
Status
New - Issue has not had initial review yet.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.

Reported by

Possible assignees