WoW BlueTracker Home | RSS | News | Contact
Recent | Search | Archive | CS Posts
Poster: Dworkin at 9/14/2005 1:00:03 AM PDT
Subject: MoveAnything Addon Fix!!
   Okay, after inspecting the MoveAnything! code (which, I might add, is VERY GOOD--this guy knows how to write proper code), I've determined the problem, and here's a TEMPORARY fix until he releases a new version.

[Edit:] Slouken has verified that this fix is COMPLETELY SAFE. Leaving the rest of the post unedited for the sake of discussion. Feel free to modify the file, this fix won't hurt anything.

-----BEGIN FIX-----

1. Open "Interface\Addons\MoveAnything\MoveAnything.xml"
2. Search for the text:
if( event == "VARIABLES_LOADED" ) then
3. Insert a new line after this that reads:
MoveAnything_PlayerNameValid = true; --TEMPORARY
4. Save and reload.

-----END FIX-----

Or, if you don't wish to tamper with the files (because such could expose an error I can't see) then type the following once you get in the game:

/script MoveAnything_Init()

This will easily and safely load your settings--for your session--without having to restart World of Warcraft.

WARNING ABOUT MODDING YOUR FILE: I do not know why the author had this check in place because everything seems to work fine. It was a very hard-coded check. When we write checks into our mods, it is most DEFINITELY for a good reason. This fix appears to work for me and the check does not seem to be necessary because the thing it checks for works properly all the time, but even
still, USE THIS FIX AT YOUR OWN RISK until the mod author posts a revision.

If the condition this check looks for FAILS, you will probably overwrite your saved MoveAnything! information for the character name you just came *from*.

Coding details:

The full block of code that you're modifying is the following:
				if( event == "VARIABLES_LOADED" ) then

MoveAnything_VariablesLoaded = true;
if( MoveAnything_PlayerNameValid ) then
MoveAnything_Init();
end
elseif( event == "UNIT_NAME_UPDATE" and arg1 == "player" ) then
local name = UnitName( "player" );
if( name and name ~= UNKNOWNOBJECT ) then
MoveAnything_PlayerNameValid = true;
if( MoveAnything_VariablesLoaded ) then
MoveAnything_Init();
end
end
end


As you can see, this script basically calls once both the events VARIABLES_LOADED (which always occurs at the beginning of a UI load) and UNIT_NAME_UPDATE. This is clearly to verify that before initializing for a given character profile, the settings for that profile are the ones actually being written to. If the command UnitName("player") returns anything other than the current player's name, then the wrong profile will be written to. I don't know if this is still a problem or not, but it doesn't seem to be.

The reason that the code malfunctions is because the event UNIT_NAME_UPDATE (arg1 = "player") simply [b]doesn't fire[b] at the beginning of a UI load (sometimes). I believe this is because the player's name is now saved even after logging off, so if you reenter the game the name is still the same and the event doesn't fire because nothing has changed. While this is great, the problem is that the event failing to fire prevents MoveAnything! from initializing.

[ post edited by Dworkin ]

  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=216481&p=#post216481
 
Poster: slouken at 9/14/2005 1:06:21 AM PDT
Subject: Re: TEMPORARY fix for MoveAnything!
   Waiting for UNIT_NAME_UPDATE for the player is completely obsolete. As of 1.6, the player's name is always available, and since event delivery was optimized in 1.7, is no longer guaranteed to fire.

So... your fix is just fine. :)
  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=216481&p=#post216497

View all recent official Blue Posts

WoW Blue Tracker: Archiving World of Warcraft Blue Posts
since March 2005
Home | RSS | News | Contact
Recent | Search | Archive | CS Posts
 

Why Ads?