diff --git a/SCRIPTS.md b/SCRIPTS.md index 4a038c6..0fd2e87 100644 --- a/SCRIPTS.md +++ b/SCRIPTS.md @@ -39,6 +39,7 @@ For custom events, see [EVENTS.md](EVENTS.md). For installation, configuration, - [GetUnitData](#getunitdataunittoken-copy) - [GetUnitField](#getunitfieldunittoken-fieldname-copy) - [GetUnitGUID](#getunitguidunittoken) + - [SetMouseoverUnit](#setmouseoverunitunittoken) - [GetRaidTargets](#getraidtargets) - [SetLocalRaidTargetIndex](#setlocalraidtargetindexunittoken-raidtargetindex) - [Spell Casting and Queuing](#spell-casting-and-queuing) @@ -926,6 +927,25 @@ print(GetUnitGUID("party1pet")) -- pet of party member 1 print(GetUnitGUID("0xF5300000000000A5target")) ``` +##### SetMouseoverUnit(unitToken) +Sets the client's current mouseover unit from a unit token string. + +This uses the same client object-tracking path as normal UI mouseover updates. If `unitToken` resolves to a GUID, the mouseover is updated to that unit. If it does not resolve, the mouseover is cleared. + +**Parameters:** +- `unitToken` (string): A standard unit token string such as `"target"`, `"party1"`, or `"mouseover"` + +**Returns:** +- `1` if the client has a non-empty mouseover GUID after the update +- `nil` if the mouseover GUID is empty after the update + +**Examples:** +```lua +SetMouseoverUnit("target") +SetMouseoverUnit("party1") +SetMouseoverUnit("mouseover") +``` + ##### GetRaidTargets() Returns the current local raid-target assignments as a table of GUID strings. diff --git a/nampower/main.cpp b/nampower/main.cpp index a3c4b47..3f44a67 100644 --- a/nampower/main.cpp +++ b/nampower/main.cpp @@ -1909,6 +1909,7 @@ namespace Nampower { char getItemStats[] = "GetItemStats"; RegisterLuaFunction(getItemStats, reinterpret_cast(Script_GetItemStats)); + // for private use only char startItemExport[] = "StartItemExport"; RegisterLuaFunction(startItemExport, reinterpret_cast(Script_StartItemExport));