View Single Post
09/15/16, 05:01 AM   #4
ArtOfShred
 
ArtOfShred's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 103
Originally Posted by Scootworks View Post
i'm not a coder, but i have some ideas:
- hamstring is an example or a real buff Name? if it's a real buffname, please don't hardcode the Name
- s'rendarr used this for fake stuff:
So hamstrung is the debuff in question, it's a 5 sec snare applied randomly by NPC's if the player is moving (I think with their back turned primarily). It normally has no aura display associated with it. I overwrote the name for the debuff as "Hamstring" because I don't like the past tense there. I've added the functionality to overwrite names for situations like that as well as various stun effects present in quests with names like "CON_Knockback&Knockdown" that don't have a display. Instead I'd rename it to something appropriate for the situation. A good example is: 39579: CON_Knockback&Knockdown, a 2 sec stun that is applied when the player gets hit by Palolel's Rage, a knockback + stun ability used by Queen Palolel in the 3rd Fighter's Guild Quest. It would be silly to have the mouseover name for that ability remain unchanged, renaming it to "Palolel's Rage" or just "Stun" would be more appropriate.

Originally Posted by Sasky View Post
What's most likely happening is that FakeBuffs[abilityId] doesn't exist. So then on those particular lines it tries to dereference nil.

You need something more like:

Lua Code:
  1. function SCB.OnCombatEvent( ... )
  2.     if FakeBuffs[abilityId] ~= nil then
  3.         iconName = FakeBuffs[abilityId].icon
  4.         effectName = FakeBuffs[abilityId].name
  5.         duration = FakeBuffs[abilityId].duration
  6.  
  7.         ...
  8.     end
  9. end

PS - use the Lua BBCode when posting code snippets -- not screenshots
Ah that did the trick, thanks! Ends up my duration formatting was off as well, but now it's working perfectly. Thanks for your aid!
  Reply With Quote