Thread Tools Display Modes
08-24-10, 02:01 PM   #1
seancwatson
A Cyclonian
 
seancwatson's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 42
Question SetCurrentTitle(titleId); Help

Ok so I went to download Title Swapper but it won't work because SetCurrentTitle() is now a hardware protected event.
My question is why do these work?
Code:
/run SetCurrentTitle(111);
Code:
/run local t={}; for titles=1,GetNumTitles()-1,1 do if IsTitleKnown(titles)==1 then table.insert(t,titles) end; end; local x=random(#t); print("Using title: "..GetTitleName(t[x])); SetCurrentTitle(t[x])
Does entering these either in chat or as a macro count as a hardware event?
__________________
  Reply With Quote
08-24-10, 03:06 PM   #2
Sidriel
A Murloc Raider
Join Date: Apr 2010
Posts: 4
I think its a protected function so you have to use hooksecurefunc
  Reply With Quote
08-24-10, 07:26 PM   #3
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 154
The <Enter> keypress when you run those slash commands counts as the hardware event. If you ran it on a timer, i.e. "/in 1 /run ...", it would fail like you expect.
  Reply With Quote
08-25-10, 08:49 AM   #4
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
I wonder why it's a HW function, hmm...
  Reply With Quote
08-25-10, 08:53 AM   #5
Motig
A Fallenroot Satyr
 
Motig's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 23
I used to have an addon that would swap my title every 0.1 second, that was great fun
  Reply With Quote
08-25-10, 05:18 PM   #6
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by Vladinator View Post
I wonder why it's a HW function, hmm...
Because every time you change your title, an event (I forget exactly which one) fires which caused most every UnitFrame AddOn to instantly refresh all UnitFrames (which was especially CPU-intensive when in a raid with everyone showing), making the game barely playable. Blizzard tends to break stuff that behaves this way.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
08-25-10, 07:44 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Originally Posted by Motig View Post
I used to have an addon that would swap my title every 0.1 second, that was great fun
Maybe for you. As Torhal noted, people abusing title changes with those addons are the reason why it was changed to a hardware event. Person A's addon should not have a negative impact on the performance of Person B's game.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-25-10, 07:50 PM   #8
Motig
A Fallenroot Satyr
 
Motig's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 23
Originally Posted by Seerah View Post
Maybe for you. As Torhal noted, people abusing title changes with those addons are the reason why it was changed to a hardware event. Person A's addon should not have a negative impact on the performance of Person B's game.
Hmmm, I didn't know it could actually negatively affect other people, that changes things of course
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » SetCurrentTitle(titleId); Help


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off