Showing results 1 to 25 of 500
Search took 0.03 seconds.
Search: Posts Made By: SDPhantom
Forum: Lua/XML Help Yesterday, 04:37 PM
Replies: 1
Views: 147
Posted By SDPhantom
This seems to work. I changed it to initialize on...

This seems to work. I changed it to initialize on PLAYER_LOGIN and listen for SPELL_POWER_CHANGED. Many character-related data functions don't return meaningful values on load and require initial...
Forum: Lua/XML Help 04-13-24, 02:28 AM
Replies: 2
Views: 303
Posted By SDPhantom
Pretty much anything that inherits from...

Pretty much anything that inherits from SecureUnitButtonTemplate (https://warcraft.wiki.gg/wiki/SecureUnitButtonTemplate) will do this automatically, including the DefaultUI. There appears to be some...
Forum: AddOn Help/Support 04-08-24, 06:54 PM
Replies: 1
Views: 202
Posted By SDPhantom
Tables can't be sorted by keys. This is a...

Tables can't be sorted by keys. This is a combination of how Lua tables are stored in memory and how WoW serializes SavedVars. Lua tables are stored in two components, an array list and a hashmap....
Forum: AddOn Help/Support 04-04-24, 02:28 AM
Replies: 5
Views: 428
Posted By SDPhantom
I swapped the button's parent to...

I swapped the button's parent to QuestFrameDetailPanel. That should do the trick.
Forum: AddOn Help/Support 04-02-24, 06:34 PM
Replies: 5
Views: 428
Posted By SDPhantom
Unless you're hooking into a Blizzard LoD...

Unless you're hooking into a Blizzard LoD "addon", the UI code is already loaded before yours. There's no need to delay creating your button.
Unless the inherited template requires it, frame names...
Forum: AddOn Help/Support 04-02-24, 02:52 PM
Replies: 2
Views: 407
Posted By SDPhantom
Xrystal already answered, but I do have a note...

Xrystal already answered, but I do have a note for the posted code.


This function already exists as tContains()...
Forum: Lua/XML Help 04-01-24, 06:15 PM
Replies: 3
Views: 460
Posted By SDPhantom
The problem with this is OnLoad runs when...

The problem with this is OnLoad runs when CreateFrame() is called. Registering a script to it through Lua does nothing as it's never called again.

It's still a good idea to proofread any code...
Forum: Lua/XML Help 03-29-24, 11:02 PM
Replies: 3
Views: 355
Posted By SDPhantom
On the surface, this is just storing one table...

On the surface, this is just storing one table into another and keeping a local reference to it. Taking the rest of the message into account, I'm assuming the real question is, "What is the 'local...
Forum: UI Screenshots, Feedback and Design Discussion 03-29-24, 08:28 PM
Replies: 6
Views: 337
Posted By SDPhantom
For future reference, the game turns texture...

For future reference, the game turns texture objects solid green if there's a problem loading the image file. It's nothing wrong with your code, just the image you exported.
Forum: Lua/XML Help 03-26-24, 02:39 PM
Replies: 2
Views: 623
Posted By SDPhantom
tooltip:GetItem() was replaced with...

tooltip:GetItem() was replaced with TooltipUtil.GetDisplayedItem() (https://github.com/Gethe/wow-ui-source/blob/live/Interface/SharedXML/Tooltip/TooltipUtil.lua#L98-L112).
Forum: Lua/XML Help 03-23-24, 08:44 PM
Replies: 6
Views: 408
Posted By SDPhantom
This is how I would implement a fallback list...

This is how I would implement a fallback list using multiple ors.

watchedFactionID = watchedFactionID
or (inInstance and hasDungeonTabard and tabardID)
or (lookUpSubZones and...
Forum: Lua/XML Help 03-23-24, 05:17 PM
Replies: 6
Views: 408
Posted By SDPhantom
Every check for watchedFactionID==nil is...

Every check for watchedFactionID==nil is overwriting watchedFactionID with false whenever it isn't nil.

-also-

watchedFactionID = watchedFactionID == nil and not inInstance and...
Forum: AddOn Help/Support 03-23-24, 01:43 AM
Replies: 12
Views: 590
Posted By SDPhantom
TargetUnit()...

TargetUnit() (https://warcraft.wiki.gg/wiki/API_TargetUnit) is a protected function and can't be called autonomously. Additionally, it only accepts a name or valid UnitID...
Forum: Classic - AddOn Help/Support 03-20-24, 10:27 PM
Replies: 7
Views: 2,010
Posted By SDPhantom
If there isn't a setting for it, then no. The...

If there isn't a setting for it, then no. The plain text names (as opposed to NamePlates) are rendered by C-code and are inaccessible by the UI.

NamePlates do replace the plain text names when...
Forum: Classic - AddOn Help/Support 03-18-24, 07:45 PM
Replies: 7
Views: 2,010
Posted By SDPhantom
It's purely cosmetic and hinders readability....

It's purely cosmetic and hinders readability. Extreme cases like shortening variable names to a single letter may run afoul of Blizzard's addon policy due to their obfuscation rule. You can only...
Forum: Classic - AddOn Help/Support 03-18-24, 05:13 PM
Replies: 7
Views: 2,010
Posted By SDPhantom
I haven't tested this past running it through a...

I haven't tested this past running it through a Lua compiler.
GameTooltip:HookScript("OnShow",function(s)if _G[s:GetName().."TextLeft1"]:GetText():find"^Corpse of "then s:Hide()end end)


I revised...
Forum: Macro Help 03-15-24, 11:29 AM
Replies: 4
Views: 3,605
Posted By SDPhantom
This is what I'd suggest. Since all 3 spells only...

This is what I'd suggest. Since all 3 spells only work on friendly targets, that's one less thing to be checked. Also combining it into a single /cast command ensures only one spell gets called and...
Forum: Macro Help 03-07-24, 09:50 AM
Replies: 6
Views: 561
Posted By SDPhantom
This is what the checkbox ends up calling /run if...

This is what the checkbox ends up calling
/run if not ChatFrame_ContainsMessageGroup(ChatFrame1,"SYSTEM") then ChatFrame_AddMessageGroup(ChatFrame1,"SYSTEM");end
/run if...
Forum: Lua/XML Help 02-05-24, 08:31 PM
Replies: 1
Views: 732
Posted By SDPhantom
The way Lua handles obj.method() vs obj:method()...

The way Lua handles obj.method() vs obj:method() is simple, but not straightforward.
When calling a function, obj:method(...) is the same as obj.method(obj,...).
When defining a function,...
Forum: Lua/XML Help 02-03-24, 12:35 AM
Replies: 5
Views: 819
Posted By SDPhantom
I don't see anything standing out at the moment....

I don't see anything standing out at the moment. I'd suggest making sure you have error alerts turned on, I think they're off by default.
The command is /console scriptErrors 1



PS:

-Lua: about -...
Forum: Lua/XML Help 02-01-24, 12:20 PM
Replies: 2
Views: 593
Posted By SDPhantom
Have you registered your addon chat messages to...

Have you registered your addon chat messages to be received using C_ChatInfo.RegisterAddonMessagePrefix() (https://warcraft.wiki.gg/wiki/API_C_ChatInfo.RegisterAddonMessagePrefix)?
This tells the...
Forum: Lua/XML Help 02-01-24, 12:08 PM
Replies: 5
Views: 819
Posted By SDPhantom
You can use PLAYER_DEAD...

You can use PLAYER_DEAD (https://warcraft.wiki.gg/wiki/PLAYER_DEAD) when the user has died. For raid/party members, I'd rather track their health by UNIT_HEALTH...
Forum: AddOn Help/Support 01-25-24, 11:13 PM
Replies: 3
Views: 826
Posted By SDPhantom
It depends on what tasks you want to do. Keep in...

It depends on what tasks you want to do. Keep in mind things like moving, casting a spell, using abilities, etc are protected actions and can't be run autonomously.
Forum: Lua/XML Help 01-25-24, 11:08 PM
Replies: 1
Views: 665
Posted By SDPhantom
I made Modern TargetFrame...

I made Modern TargetFrame (https://www.wowinterface.com/downloads/info25510-ModernTargetFrame.html) to backport the WotLK Target Frame to Classic Era. It'll work for the most part with some caveats....
Forum: Lua/XML Help 01-25-24, 10:52 PM
Replies: 1
Views: 520
Posted By SDPhantom
If this is related to your other post...

If this is related to your other post (https://www.wowinterface.com/forums/showthread.php?t=59773), we're not allowed to help with projects running on private servers.
Showing results 1 to 25 of 500