WoW LibIsClassic addon Dragonflight/Wrath of the Lich King Classic 2024
logo
wow addon LibIsClassic

LibIsClassic

Game Version: 9.2.7 +3
Total Downloads: 243
Updated: Sep 2, 2022
Created: May 31, 2021
download LibIsClassicDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
v1.0-2 release 3.54 KB Sep 2, 2022 9.2.7 +3 197 download LibIsClassic v1.0-2 releaseDownload
v1.0-1 release 2.34 KB Jun 3, 2021 9.0.5 45 download LibIsClassic v1.0-1 releaseDownload

Description

Share this:

LibIsClassic-1.0

A small embeddable library to detect if you’re on Retail or Classic servers.

Version
Tracker


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() – returns true on modern retail servers and false on other servers
  • MyAddon:IsClassic() – returns true on Classic Era (1.13.x) servers and false on other servers
  • MyAddon:IsBurningCrusadeClassic() – returns true on Burning Crusade Classic (2.5.x) servers and false on 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

Twitter
Twooter
Discord

Twitch
GitHub
PayPal
Coffee

Comments

Add a comment