Thread Tools Display Modes
12-08-17, 02:17 PM   #1
vis781
A Fallenroot Satyr
Join Date: Dec 2017
Posts: 27
You're going too far with what I'm saying. It is perfectly acceptable to call a read only method from inside a secure snippet. You are suggesting that it's also possible to cast spells, but you can't do that from UnitName alone, you would need additional functions.

There is no reason why blizzard couldn't include a small subset of global functions localised to a table and make that table accessible from a secure snippet. Please read what I have posted and tell me where I suggested making functions that cast spells available or any other methods that could affect gameplay... I didn't.
  Reply With Quote
12-08-17, 02:45 PM   #2
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
You didn't. The post you quoted did.
  Reply With Quote
12-08-17, 03:50 PM   #3
vis781
A Fallenroot Satyr
Join Date: Dec 2017
Posts: 27
I'm not MunkDev, from the beginning I have spoken of the method UnitName. That function alone cannot be used to trivialise gameplay. If it can I will hold my hands up and admit I am wrong. If you can provide me with an example of how UnitName could be expoloited then perhaps I could understand better.
  Reply With Quote
12-08-17, 06:17 PM   #4
Kakjens
A Cliff Giant
Join Date: Apr 2017
Posts: 75
Something similar to this:
Lua Code:
  1. if UnitName("target") == "somename" then
  2.     CastSpellByname("Polymorph")
  3. else
  4.     if UnitName("target") == "someothername" then
  5.         CastSpellByname("Fire Blast")
  6.     else
  7.         CastSpellByname("Frost Nova")
  8.     end
  9. end

Last edited by Kakjens : 12-08-17 at 06:22 PM.
  Reply With Quote
12-08-17, 06:25 PM   #5
vis781
A Fallenroot Satyr
Join Date: Dec 2017
Posts: 27
So CastspellbyName is a function that can be called whilst in combat lockdown from a secure frame, or any other frame for that matter?
  Reply With Quote
12-09-17, 04:50 PM   #6
vis781
A Fallenroot Satyr
Join Date: Dec 2017
Posts: 27
How little i knew, I haven't touched on action buttons yet but my immediate thoughts were that the very first functions to be protected and unavailable in combat lockdown to user code would be the spell casting ones. That explains everything.

Thank you everyone for your replies.
  Reply With Quote
12-10-17, 12:34 AM   #7
aallkkaa
A Warpwood Thunder Caller
 
aallkkaa's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 98
Those spellcasting functions allow addons such as Dominos and Bartender4 (amongst many others) to do a complete overhaul of your actions bars.
As a rule of thumb, Blizzard allows you to display any information the game has to give and allows you to implement any action your character can perform IF AND ONLY IF for every one action your code makes your character do, there is one physical action performed by the player (pressing a key, clicking the mouse, moving the mouse*). Preventing automation, as far as Blizzard goes, can be done on either side of the fence: either getting the necessary data and/or performing an action.

* Haven't seen gestures or anything like that be implemented yet; so, there might be limmitations I'm not aware of. You can drag-and-drop frames though.
  Reply With Quote
12-10-17, 10:41 AM   #8
vis781
A Fallenroot Satyr
Join Date: Dec 2017
Posts: 27
It's an interesting design choice by Blizzard, another way for them to have implemented this would have simply been to make action button events opaque i.e they can be subscribed/unsubscribed out of combat. Dragging and dropping spell on to an action bar would subscribe the button to that spell. Once in combat, you can't change it, a sort of ( you take in the tools you think you'll need and if it doesn't work you have to come out and try again approach ) That way spell casting functions would be limited to action buttons and they could prevent user code from calling them completely.
  Reply With Quote
12-10-17, 12:23 PM   #9
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
But then what if you need to re-arrange orders of spells or add something to your bar mid-combat? Default action bars allow it.
  Reply With Quote
12-06-17, 06:41 PM   #10
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by vis781 View Post
Wait a sec... you're saying that the Blizzard function UnitName is not callable from a secure snippet? But why not, that actually doesn't make sense at all.
It makes sense since somebody could come up with an secure automation based on the unit's name. CC unit X, nuke unit Y, heal unit Z with a single button. This was entirely possible (and even a lot nastier things too) up to WotLK.

Last edited by Resike : 12-06-17 at 06:44 PM.
  Reply With Quote
12-06-17, 06:51 PM   #11
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Originally Posted by vis781 View Post
Wait a sec... you're saying that the Blizzard function UnitName is not callable from a secure snippet? But why not, that actually doesn't make sense at all.
This actually makes perfect sense. This is the type of data that can be used to extend the functionality of the environment, which is why it's intentionally left out. For example, you could map buttons to do specific things when targeting specific mobs, instead of having to make the decision of what to cast yourself.

Here's a list of what's available:
https://www.townlong-yak.com/framexm...ronment.lua#74
__________________
  Reply With Quote
12-06-17, 01:51 PM   #12
vis781
A Fallenroot Satyr
Join Date: Dec 2017
Posts: 27
Rightio, for anyone that might be interested in how to accomplish this, here is the quicker and much dirtier answer.....

No need to worry about changing the size of the frame itself. Since texture are not clipped to the frame and they can "live" outside of it, one solution is to have the frame the size of your portrait and then set textures for the fill and border. Simply then anchor the textures to the right side of the fontstring and hey presto. The frame then appears to change size in response to the width of the string ( the targets name in this case ) The only caveat is that the only part of the frame that is clickable is the portrait itself, which in and of itself is desirable is this case... less chance of a random, mid-battle misclick.

There we go, if you can't to do it properly... hack!

V
  Reply With Quote
12-06-17, 03:11 PM   #13
aallkkaa
A Warpwood Thunder Caller
 
aallkkaa's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 98
Originally Posted by vis781 View Post
Rightio, for anyone that might be interested in how to accomplish this, here is the quicker and much dirtier answer.....

No need to worry about changing the size of the frame itself. Since texture are not clipped to the frame and they can "live" outside of it, one solution is to have the frame the size of your portrait and then set textures for the fill and border. Simply then anchor the textures to the right side of the fontstring and hey presto. The frame then appears to change size in response to the width of the string ( the targets name in this case ) The only caveat is that the only part of the frame that is clickable is the portrait itself, which in and of itself is desirable is this case... less chance of a random, mid-battle misclick.

There we go, if you can't to do it properly... hack!

V
LOL. That's the spirit!
Or rather, KISS.
  Reply With Quote
12-08-17, 08:39 AM   #14
vis781
A Fallenroot Satyr
Join Date: Dec 2017
Posts: 27
This actually makes perfect sense. This is the type of data that can be used to extend the functionality of the environment, which is why it's intentionally left out. For example, you could map buttons to do specific things when targeting specific mobs, instead of having to make the decision of what to cast yourself.

Here's a list of what's available:
https://www.townlong-yak.com/framexm...ronment.lua#74
12/06/17 06:41 PM
Actually this doesn't make any sense, your answer implies the use of further functions to try and develop a cheat for the game. UnitName is a read-only method and therefore not subject to tampering. So, there is no reason why it shouldn't be usable from inside the secure environment.
  Reply With Quote
12-08-17, 01:25 PM   #15
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Originally Posted by vis781 View Post
Actually this doesn't make any sense, your answer implies the use of further functions to try and develop a cheat for the game. UnitName is a read-only method and therefore not subject to tampering. So, there is no reason why it shouldn't be usable from inside the secure environment.
Of course it's read-only, you're not gonna change the name of a unit for everyone through lua.

You can create secure action buttons for using items or casting spells, but if UnitName was readable from within that environment, you could have a secure button for casting spells which could automate selecting between different actions depending on which unit you have targeted, etc.

That's how I understand it, at least.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Dynamic frame resize, whilst in combat?


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