Earlier Versions
| Name | Size | Uploaded | Game Version | Downloads | |
| v1.0-2 release | 3.54 KB | Sep 2, 2022 | 9.2.7 +3 | 197 | Download |
| v1.0-1 release | 2.34 KB | Jun 3, 2021 | 9.0.5 | 45 | Download |
Description
LibIsClassic-1.0
A small embeddable library to detect if you’re on Retail or Classic servers.
The Quick Intro
This library is designed to be directly embedded into your addon.
Ace3 method:
MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "LibIsClassic-1.0")
Non-Ace3 method:
local _, MyAddon = ...
MyAddon = LibStub("LibIsClassic-1.0"):Embed(MyAddon)
Standalone method (no embedding):
local LIC = LibStub("LibIsClassic-1.0")
This library provides a few functions for your addon to use. These functions are self-explanatory:
MyAddon:IsRetail()– returnstrueon modern retail servers andfalseon other serversMyAddon:IsClassic()– returnstrueon Classic Era (1.13.x) servers andfalseon other serversMyAddon:IsBurningCrusadeClassic()– returnstrueon Burning Crusade Classic (2.5.x) servers andfalseon other servers
Example
if self:IsRetail() then
— do stuff that doesn’t apply to 1.13.x or 2.5.x
end
if not self:IsBurningCrusadeClassic() then
— do stuff that only applies to 1.13.x and retail
end
Support
Get 0.05 TON 💎
Download
Add a comment