Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. {
  2. id: 'Shiva Wyrmfang Init',
  3. regex: Regexes.gainsEffect({ effect: 'Wyrmfang' }),
  4. condition: function(data, matches) {
  5. // FIXME: temporary workaround for "gains the effect for 9999.00"
  6. // https://github.com/ravahn/FFXIV_ACT_Plugin/issues/223
  7. return matches.duration < 1000;
  8. },
  9. run: function(data, matches) {
  10. data.wyrmfangs = data.wyrmfangs || [null, null, null, null];
  11. let order = null;
  12. if (parseFloat(matches.duration) < 23)
  13. order = 0;
  14. else if (parseFloat(matches.duration) < 31)
  15. order = 1;
  16. else if (parseFloat(matches.duration) < 39)
  17. order = 2;
  18. else
  19. order = 3;
  20.  
  21. // FIXME: temporary workaround for multiple gains effects messages.
  22. // https://github.com/ravahn/FFXIV_ACT_Plugin/issues/223#issuecomment-513486275
  23. if (order !== null && data.wyrmfangs[order] === null)
  24. data.wyrmfangs[order] = matches.target;
  25. },
  26. infoText: function(data) {
  27. return {
  28. en:
  29. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement