Code Monkey home page Code Monkey logo

yihaopeng / libtoteminfo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swimmingtiger/libtoteminfo

0.0 1.0 0.0 52 KB

[Discarded] A compatible implementation of GetTotemInfo() API for WoW Classic 1.13.3. Make your totem timer work again. | [已废弃]为魔兽世界怀旧服1.13.3编写的GetTotemInfo()接口兼容层,可修复萨满图腾计时器不起作用的问题

Home Page: https://www.curseforge.com/wow/addons/libtoteminfo

License: Apache License 2.0

Lua 100.00%

libtoteminfo's Introduction

LibTotemInfo-1.0

A compatible implementation of GetTotemInfo() API for WoW Classic 1.13.3.

Discarded

I noticed that Wow Classic 1.13.4 has been added GetTotemInfo() and GetTotemTimeLeft() back.

So I don't think we need this addon anymore.

Please consider removing !LibTotemInfo to see if the other addon is working well.

Desc

You should know that Blizzard removed the totem information API from Wow Classic 1.13.3, which caused many totem timers to not work.

I created a simple addon and restored one of the APIs (GetTotemInfo). In this way most totem timers can work normally.

The code from RotationMaster by PreZ and edited / fixed by SwimmingTiger.

Usage

Download LibTotemInfo-1.0.x.zip and put it in your World of Warcraft\_classic_\Interface\Addons\!LibTotemInfo folder. Please note the leading !, it is to make it load earlier than other addons. Don't rename it.

And, if you get the folder LibTotemInfo-master, you can rename it to!LibTotemInfo (This folder will appear when you download the repository ZIP directly. It is recommended to download the zip in the Release page) or keep the current name. The latest version of the addon folder can be named under the following two names:

  • !LibTotemInfo
  • LibTotemInfo-master

Then it should be in the addon list and displayed as Lib: TotemInfo-1.0. Enable it, and your totem timer will work again.

AddOn List

Verified working addons without modification

  • NugRunning
    (The latest version of NugRunning has LibTotemInfo embedded and no longer needs to be installed separately.)
  • TotemTimers 1.06-classic
  • SamyTotemTimers v2.6
  • PitBull4 v4.1.21

Totem timer works

For AddOn Developer

You can embed the project, just like this:

your-addon.toc

libs\!LibTotemInfo\embeds.xml
your-file.lua

your-file.lua

local GetTotemInfo = LibStub("LibTotemInfo-1.0").GetTotemInfo
for i =1, 4 do
    print(GetTotemInfo(i))
    print(GetTotemTimeLeft(i))
end

The Global API

When GetTotemInfo does not exist, the library will register GetTotemInfo as its own implementation. So addons that rely on GetTotemInfo can use this function directly, without having to instantiate it from LibStub.

Interfaces currently implemented:

-- Added return value by the lib (not in Blizzard old interface):
--     spellid - int, the totem's spell id.
--     rank    - int (1 to 8) or nil, the rank of the totem spell.
--               nil indicates that there is no rank for this totem.
haveTotem, totemName, startTime, duration, icon, spellid, rank = GetTotemInfo(1 through 4)

timeLeft = GetTotemTimeLeft(1 through 4)

See details at https://wow.gamepedia.com/API_GetTotemInfo

License

Inherited the Apache License Version 2.0 from the Rotation Master project.

libtoteminfo's People

Contributors

swimmingtiger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.