Thread Tools Display Modes
Unread 08-17-12, 10:44 AM   #221
Iza
A Cyclonian
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 43
GetSpellBookItemName(index, booktype) will cause an error ("... invalid spell slot ...") instead of returning <nil> values for non-existant spell slots it seems. I solved this by using pcall for the moment, but that's just not very smart. Is there way to tell how many slots there are?

Last edited by Iza : 08-17-12 at 10:59 AM.
Iza is offline  
Unread 08-17-12, 11:56 AM   #222
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,034
I used that in one of my addons earlier but managed to bypass it somehow but can't remember how but now I see that same error for GetSpellInfo as well in nUI. Not double checked my own addons yet. Something for tonight me thinks.
__________________
Xrystal is offline  
Unread 08-17-12, 01:06 PM   #223
Iza
A Cyclonian
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 43
Originally Posted by Xrystal View Post
I used that in one of my addons earlier but managed to bypass it somehow but can't remember how but now I see that same error for GetSpellInfo as well in nUI. Not double checked my own addons yet. Something for tonight me thinks.
GetSpellInfo(spellId) is still working fine for me for some reason. I remember some people reporting inconsistent return values for some of the GetSpellxxx functions on official forums these days.
Iza is offline  
Unread 08-17-12, 01:59 PM   #224
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,034
I just took a look at my post in the nUI forums about my investigations yesterday and I found that somehow the way Scott has coded it to build the spell database for cool downs wow no longer likes it twice as the first time it goes through fine but the second time it errors out.

For no apparent reason barring it is a different event. Which makes it difficult if SPELLS_CHANGED isn't called when you learn a spell as if you tried to also run through the update routine when LEARNED_SPELL_IN_TAB event is fired it would error out. Or any such other Spell related event required an update to the table the way it currently does it in nUI.

If it isn't a blizzard oversight I may have to recode how it builds the spell database so that it could be dynamically built rather than rebuilt everytime.
__________________
Xrystal is offline  
Unread 08-18-12, 02:49 AM   #225
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,034
well I changed scotts way of reading through the spell book with a while an infinite break when we run out of spells loop to a for loop that just reads through the spell tab using the following block of code. No errors since I did that but when I logged in earlier before the change i got the same error.

Lua Code:
  1. -- Get Specialization Spell Tab Info
  2. local tabName, tabTexture, tabOffset, tabSlots, tabIsGuild, tabOffSpecID = GetSpellTabInfo(2);
  3.  
  4. -- Cycle through specialization spell tab and extra spells for cooldown usage
  5. for i = tabOffset+1, tabSlots+tabOffset do
  6.      local spellType, spellID = GetSpellBookItemInfo( i, BOOKTYPE_SPELL );
  7.      local spellName,spellRank = GetSpellInfo( i, BOOKTYPE_SPELL );
  8.      ....
  9. end
__________________
Xrystal is offline  
Unread 08-18-12, 07:10 PM   #226
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 567
For the 16004 build seems they only added GetLootSourceInfo(slot) (unused) wowpedia/wowprog

Edit:
It seems to be used for differentiating between from what GUIDs an item (stack) is while AoE looting

In my case there were [Wool Cloth] x10 in the 4th loot slot
Lua Code:
  1. -- guid, lootQuantity = GetLootSourceInfo(slot)
  2. GetLootSourceInfo(4) => "0xF130B4AA00000035", 4, "0xF130B4A900000034", 4, "0xF130B4AC00000067", 2
"Riverpaw Poacher" = 0xB4AA = 46250
"Riverpaw Slayer" = 0xB4A9 = 46249
"Riverpaw Shaman" = 0xB4AC = 46252

Last edited by Ketho : 08-18-12 at 07:55 PM.
Ketho is offline  
Unread 08-18-12, 07:45 PM   #227
Lombra
A Cobalt Mageweaver
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 240
The following code crashes the client:
Code:
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, addon)
	GetIgnoreName(1)
end)
Dunno if it does on live too.
__________________
Grab your sword and fight the Horde!
Lombra is offline  
Unread 08-18-12, 07:59 PM   #228
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,062
Originally Posted by Ketho View Post
For the 16004 build seems they only added GetLootSourceInfo(slot) (unused) wowpedia/wowprog

Edit:
It seems to be used for differentiating between from what GUIDs an item (stack) is while AoE looting

In my case there were [Wool Cloth] x10 in the 4th loot slot
Lua Code:
  1. -- guid, lootQuantity = GetLootSourceInfo(slot)
  2. GetLootSourceInfo(4) => "0xF130B4AA00000035", 4, "0xF130B4A900000034", 4, "0xF130B4AC00000067", 2
"Riverpaw Poacher" = 0xB4AA = 46250
"Riverpaw Slayer" = 0xB4A9 = 46249
"Riverpaw Shaman" = 0xB4AC = 46252
This was because with AoE looting, it was impossible to determine which NPC an item came from. The WoWDB and WoWHead AddOns could not record accurate drop rates because of this. The function makes this possible again.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of Revelation, Spamalyzer, TravelAgent, Volumizer, and many other AddOns.
Torhal is offline  
Unread 08-18-12, 08:44 PM   #229
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 567
Originally Posted by Torhal View Post
This was because with AoE looting, it was impossible to determine which NPC an item came from. The WoWDB and WoWHead AddOns could not record accurate drop rates because of this. The function makes this possible again.
Thanks for the explanation, and my apologies .. I didn't notice this thread beforehand ><

@Lombra: just tested, it doesn't also crash on live*
Ketho is offline  
Unread 08-19-12, 03:54 AM   #230
Iza
A Cyclonian
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 43
Using "MONOCHROME" font modifier instantly crashes game client for me.

@Xrystal: Thanks a lot, will change it this way too.
Iza is offline  
Unread 08-19-12, 05:02 AM   #231
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,171
I use "OUTLINEMONOCHROME" and I haven't been seeing these problems.
Haleth is online now  
Unread 08-19-12, 06:02 AM   #232
Iza
A Cyclonian
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 43
Originally Posted by Haleth View Post
I use "OUTLINEMONOCHROME" and I haven't been seeing these problems.
Right, "OUTLINE|MONOCHROME" is working for me too, but not "MONOCHROME" alone.
Iza is offline  
Unread 08-19-12, 03:17 PM   #233
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,638
Hmm... "MONOCHROME" was fine for me a couple builds ago.
__________________
"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

Seerah is offline  
Unread 08-19-12, 04:55 PM   #234
Shackleford
A Murloc Raider
 
Shackleford's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 5
SummonRandomCritter()

Does anyone know the status of SummonRandomCritter()? Currently this only returns an error message of "You do not have a pet". Is this to be removed or is it just bugged?
Shackleford is online now  
Unread 08-22-12, 11:19 AM   #235
Meorawr
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 193
Fontstrings with the MONOCHROME style set (and no outline styles) still crash the client as of 16010.
Meorawr is offline  
Unread 08-22-12, 11:30 AM   #236
Iza
A Cyclonian
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 43
Originally Posted by Meorawr View Post
Fontstrings with the MONOCHROME style set (and no outline styles) still crash the client as of 16010.
Thanks for confirming, I already started thinking it's on my end...
Iza is offline  
Unread 08-22-12, 06:04 PM   #237
Kharthus
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 8
Originally Posted by Shackleford View Post
Does anyone know the status of SummonRandomCritter()? Currently this only returns an error message of "You do not have a pet". Is this to be removed or is it just bugged?
It looks like they moved almost everything into C_PetJournal functions, but they didn't copy all the old functions over.
Kharthus is offline  
Unread 08-23-12, 04:28 AM   #238
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 765
Still not response on the API bug:
http://us.battle.net/wow/en/forum/to...5843?page=1#10 (illustration)
I hope they fix it for release, jeez.

Cladhaire if you are here, any inside info?
__________________
Profile: Curse | Wowhead
Vlad is online now  
Unread 08-23-12, 05:28 AM   #239
Talyrius
A Rage Talon Dragon Guard
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 307
I hope this gets fixed for release as well:
[Bug] SecureAuraHeader

I've tried to make it as easy as possible for them to implement the necessary code changes.
Talyrius is offline  
Unread 08-23-12, 07:00 AM   #240
Meorawr
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 193
And the MONOCHROME fontstring style crash is still in as of 16016. Might have to remove it as a configurable option for now
Meorawr is offline  
 

Go BackWoWInterface » WoD Beta » MoP archived threads » Beta API discussion

Thread Tools
Display Modes

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