Thread Tools Display Modes
Prev Previous Post   Next Post Next
05/08/24, 05:04 PM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,016
Thanks, have something similar in LibVampire I think, but have not updated it for a long while now

Hint
You can easeand speed-up such ifs
Code:
if (abilityId == VAMPIRE_STAGE_1) or (abilityId == VAMPIRE_STAGE_2) or (abilityId == VAMPIRE_STAGE_3) or (abilityId == VAMPIRE_STAGE_4) then
by the help of a simple table with key = abilityId and value = boolean true:

Lua Code:
  1. local vampireStages = {
  2.  [VAMPIRE_STAGE_1] = true,
  3.  [VAMPIRE_STAGE_2] = true,
  4.  [VAMPIRE_STAGE_3] = true,
  5.  [VAMPIRE_STAGE_4] = true,
  6. }
  7. if vampireStages[abilityId] then
  Reply With Quote
 

ESOUI » Developer Discussions » Wish List » [open] New API functions IsVampire() / GetVampireStage()


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off