File ../../LibScriptablePlugins-1.0/LibScriptablePluginLuaTexts-1.0/LibScriptablePluginLuaTexts-1.0.lua
Functions
PluginLuaTexts.GetBestUnitID (unit) | Return the best UnitID for the UnitID provided |
PluginLuaTexts.IsSingletonUnitID (unit) | Return whether the UnitID provided is a singleton |
PluginLuaTexts.IsValidClassification (unit, classification) | Return whether the classification is valid |
PluginLuaTexts.IsWackyUnitGroup (classification) | Return whether the classification provided is considered "wacky" |
Functions
- PluginLuaTexts.GetBestUnitID (unit)
-
Return the best UnitID for the UnitID provided
Parameters
- unit: the known UnitID
Usage:
PluginLuaTexts.GetBestUnitID("playerpet") == "pet"Return value:
the best UnitID. If the ID is invalid, it will return false - PluginLuaTexts.IsSingletonUnitID (unit)
-
Return whether the UnitID provided is a singleton
Parameters
- unit: the UnitID to check
Usage
- PluginLuaTexts.IsSingletonUnitID("player") == true
- PluginLuaTexts.IsSingletonUnitID("party1") == false
Return value:
whether it is a singleton - PluginLuaTexts.IsValidClassification (unit, classification)
-
Return whether the classification is valid
Parameters
- unit:
- classification: the classification to check
Usage
- PluginLuaTexts.IsValidClassification("player") == true
- PluginLuaTexts.IsValidClassification("party") == true
- PluginLuaTexts.IsValidClassification("partytarget") == true
- PluginLuaTexts.IsValidClassification("partypettarget") == true
- PluginLuaTexts.IsValidClassification("party1") == false
Return value:
whether it is a a valid classification - PluginLuaTexts.IsWackyUnitGroup (classification)
-
Return whether the classification provided is considered "wacky"
Parameters
- classification: the classification in question
Usage
- assert(not PluginLuaTexts.IsWackyUnitGroup("player"))
- assert(PluginLuaTexts.IsWackyUnitGroup("targettarget"))
- assert(PluginLuaTexts.IsWackyUnitGroup("partytarget"))
Return value:
whether it is wacky