-
-
Save Stanzilla/e00c16336a1c5a2085e102fea8667ea2 to your computer and use it in GitHub Desktop.
BigWigs snippets for Atom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'.source.lua': | |
################ | |
# BigWigs stuff | |
################ | |
# API | |
'Log': | |
'prefix': 'bwlog' | |
'body': 'self:Log("${1:event}", "${2:func}", ${3:...})$4' | |
'Log AURA_APPLIED': | |
'prefix': 'bwlogauraapplied' | |
'body': 'self:Log("SPELL_AURA_APPLIED", "${2:func}", ${3:...})$4' | |
'Log AURA_APPLIED_DOSE': | |
'prefix': 'bwlogauraapplieddose' | |
'body': 'self:Log("SPELL_AURA_APPLIED_DOSE", "${2:func}", ${3:...})$4' | |
'Log AURA_REMOVED': | |
'prefix': 'bwlogauraremoved' | |
'body': 'self:Log("SPELL_AURA_REMOVED", "${2:func}", ${3:...})$4' | |
'Log AURA_REMOVED_DOSE': | |
'prefix': 'bwlogauraremoveddose' | |
'body': 'self:Log("SPELL_AURA_REMOVED_DOSE", "${2:func}", ${3:...})$4' | |
'Log CAST_START': | |
'prefix': 'bwlogcaststart' | |
'body': 'self:Log("SPELL_CAST_START", "${2:func}", ${3:...})$4' | |
'Log CAST_SUCCESS': | |
'prefix': 'bwlogcaststart' | |
'body': 'self:Log("SPELL_CAST_SUCCESS", "${2:func}", ${3:...})$4' | |
'Emote': | |
'prefix': 'bwemote' | |
'body': 'self:Emote("${1:func}", ${2:...})$3' | |
'Yell': | |
'prefix': 'bwyell' | |
'body': 'self:Yell("${1:func}", ${2:...})$3' | |
'Death': | |
'prefix': 'bwdeath' | |
'body': 'self:Death("${1:func}", ${2:...})$3' | |
'RegisterEvent': | |
'prefix': 'bwrevent' | |
'body': 'self:RegisterEvent("${1:event}", "${2:func...}")$3' | |
'UnregisterEvent': | |
'prefix': 'bwuevent' | |
'body': 'self:UnregisterEvent("${1:event}", "${2:func...}")$3' | |
'RegisterUnitEvent': | |
'prefix': 'bwrunitevent' | |
'body': 'self:RegisterUnitEvent("${1:UNIT_SPELLCAST_}", ${2:nil}, "${3:boss1}")$4' | |
'UnregisterUnitEvent': | |
'prefix': 'bwuunitevent' | |
'body': 'self:UnregisterUnitEvent("${1:UNIT_SPELLCAST_}", "${2:boss1}")$3' | |
'NewTargetList': | |
'prefix': 'bwlist' | |
'body': 'mod:NewTargetList()$1' | |
'ColorName': | |
'prefix': 'bwcolorname' | |
'body': 'self:ColorName(${1:args.destName})$2' | |
'UnitName': | |
'prefix': 'bwunitname' | |
'body': 'self:UnitName(${1:name})$2' | |
'SpellName': | |
'prefix': 'bwspellname' | |
'body': 'self:SpellName(${1:args.spellId})$2' | |
'Message': | |
'prefix': 'bwmsg' | |
'body': 'self:Message(${1:args.spellId}, "${2:Attention}", "${3:Info}")$4' | |
'Message (Full)': | |
'prefix': 'bwmsg2' | |
'body': 'self:Message(${1:args.spellId}, "${2:Attention}", "${3:Info}", ${4:text}, ${5:icon})$6' | |
'TargetMessage': | |
'prefix': 'bwtmsg' | |
'body': 'self:TargetMessage(${1:args.spellId}, ${2:args.destName}, "${3:Urgent}", "${4:Alarm}")$5' | |
'TargetMessage (Full)': | |
'prefix': 'bwtmsg2' | |
'body': 'self:TargetMessage(${1:args.spellId}, ${2:args.destName}, "${3:Urgent}", "${4:Alarm}", ${5:text}, ${6:icon}, ${7:alwaysPlaySound})$8' | |
'StackMessage': | |
'prefix': 'bwsmsg' | |
'body': 'self:StackMessage(${1:args.spellId}, ${2:args.destName}, ${3:stack}, "${4:Urgent}", "${5:Warning}")$6' | |
'StackMessage (Full)': | |
'prefix': 'bwsmsg2' | |
'body': 'self:StackMessage(${1:args.spellId}, ${2:args.destName}, ${3:stack}, "${4:Urgent}", "${5:Warning}", ${6:text}, ${7:icon})$8' | |
'RangeMessage': | |
'prefix': 'bwrmsg' | |
'body': 'self:RangeMessage(${1:args.spellId})$2' | |
'RangeMessage (Full)': | |
'prefix': 'bwrmsg2' | |
'body': 'self:RangeMessage(${1:args.spellId}, "${2:Personal}", "${3:Alarm}", ${4:text}, ${5:icon})$6' | |
'DelayedMessage': | |
'prefix': 'bwdmsg' | |
'body': 'self:DelayedMessage(${1:args.spellId}, ${2:delay}, "${3:Attention}", ${4:text}, ${5:icon}, "${6:sound}")$7' | |
'CancelDelayedMessage': | |
'prefix': 'bwcmsg' | |
'body': 'self:CancelDelayedMessage(${1:text})$2' | |
'Bar': | |
'prefix': 'bwbar' | |
'body': 'self:Bar(${1:args.spellId}, ${2:length})$3' | |
'Bar (Full)': | |
'prefix': 'bwbar2' | |
'body': 'self:Bar(${1:args.spellId}, ${2:length}, ${3:text}, ${4:icon})$5' | |
'CDBar': | |
'prefix': 'bwcdbar' | |
'body': 'self:CDBar(${1:args.spellId}, ${2:length})$3' | |
'CDBar (Full)': | |
'prefix': 'bwcdbar2' | |
'body': 'self:CDBar(${1:args.spellId}, ${2:length}, ${3:text}, ${4:icon})$5' | |
'TargetBar': | |
'prefix': 'bwtbar' | |
'body': 'self:TargetBar(${1:args.spellId}, ${2:args.destName}, ${3:length})$4' | |
'TargetBar (Full)': | |
'prefix': 'bwtbar2' | |
'body': 'self:TargetBar(${1:args.spellId}, ${2:args.destName}, ${3:length}, ${4:text}, ${5:icon})$6' | |
'StopBar': | |
'prefix': 'bwsbar' | |
'body': 'self:StopBar(${1:args.spellId})$2' | |
'StopBar (player)': | |
'prefix': 'bwsbar2' | |
'body': 'self:StopBar(${1:args.spellId}, ${2:args.destName})$3' | |
'PrimaryIcon': | |
'prefix': 'bwpicon' | |
'body': 'self:PrimaryIcon(${1:args.spellId}, ${2:args.destName})$3' | |
'PrimaryIcon (Off)': | |
'prefix': 'bwpicon2' | |
'body': 'self:PrimaryIcon(${1:args.spellId})$3' | |
'SecondaryIcon': | |
'prefix': 'bwsicon' | |
'body': 'self:SecondaryIcon(${1:args.spellId}, ${2:args.destName})$3' | |
'SecondaryIcon (Off)': | |
'prefix': 'bwsicon2' | |
'body': 'self:SecondaryIcon(${1:args.spellId})$3' | |
'Say': | |
'prefix': 'bwsay' | |
'body': 'self:Say(${1:args.spellId})$2' | |
'Say (Text)': | |
'prefix': 'bwsay2' | |
'body': 'self:Say(${1:args.spellId}, ${2:msg})$3' | |
'Say (directPrint)': | |
'prefix': 'bwsayd' | |
'body': 'self:Say(${1:args.spellId}, ${2:msg}, true)$3' | |
'Flash': | |
'prefix': 'bwflash' | |
'body': 'self:Flash(${1:args.spellId})$2' | |
'PlaySound': | |
'prefix': 'bwsound' | |
'body': 'self:PlaySound(${1:args.spellId}, "${2:Warning}")$3' | |
'Berserk': | |
'prefix': 'bwberserk' | |
'body': 'self:Berserk(${1:seconds})$6' | |
'Berserk (Full)': | |
'prefix': 'bwberserk2' | |
'body': 'self:Berserk(${1:seconds}, ${2:noEngageMessage}, ${3:customBoss}, ${4:customBerserk}, ${5:customFinalMessage})$6' | |
'Me': | |
'prefix': 'bwme' | |
'body': 'self:Me(${1:args.destGUID})$2' | |
'Dispeller': | |
'prefix': 'bwdispel' | |
'body': 'self:Dispeller("${1:magic}")$4' | |
'Dispeller (Full)': | |
'prefix': 'bwdispel2' | |
'body': 'self:Dispeller("${1:magic}", ${2:nil}, ${3:args.spellId})$4' | |
'Interrupter': | |
'prefix': 'bwinterrupt' | |
'body': 'self:Interrupter(${1:args.sourceGUID})$2' | |
'Range': | |
'prefix': 'bwdist' | |
'body': 'self:Range(${1:args.destName})$2' | |
'GetUnitIdByGUID': | |
'prefix': 'bwfunit' | |
'body': 'self:GetUnitIdByGUID(${1:args.sourceGUID})$2' | |
'GetUnitTarget': | |
'prefix': 'bwutarget' | |
'body': 'self:GetUnitTarget(${1:func}, ${2:tankCheckExpiry}, ${3:args.sourceGUID})$4' | |
'GetBossTarget': | |
'prefix': 'bwbtarget' | |
'body': 'self:GetBossTarget(${1:func}, ${2:tankCheckExpiry}, ${3:args.sourceGUID})$4' | |
# Module | |
'Module Stub': | |
'prefix': 'bwmod' | |
'body': """ | |
-------------------------------------------------------------------------------- | |
-- Module Declaration | |
-- | |
local mod, CL = BigWigs:NewBoss(${1:bossName}, ${2:mapId}) | |
if not mod then return end | |
mod:RegisterEnableMob(${3:bossId}) | |
--mod.engageId = 0 | |
--mod.respawnTime = 0 | |
-------------------------------------------------------------------------------- | |
-- Locals | |
-- | |
-------------------------------------------------------------------------------- | |
-- Localization | |
-- | |
local L = mod:GetLocale() | |
-------------------------------------------------------------------------------- | |
-- Initialization | |
-- | |
function mod:GetOptions() | |
return { | |
"berserk", | |
} | |
end | |
function mod:OnBossEnable() | |
end | |
function mod:OnEngage() | |
self:Message("berserk", "Neutral", nil, self.displayName.." engaged")$4 | |
end | |
-------------------------------------------------------------------------------- | |
-- Event Handlers | |
-- | |
""" | |
'Empty Callback': | |
'prefix': 'bwfunc' | |
'body': """ | |
function mod:${1:Name}(args) | |
$2 | |
end | |
""" | |
'Simple Callback': | |
'prefix': 'bwfunc2' | |
'body': """ | |
function mod:${1:Name}(args) | |
self:Message(${2:args.spellId}, ${3:"Attention"}) | |
self:Bar(${4:args.spellId}, ${4:duration})$6 | |
end | |
""" | |
'Damage Callback': | |
'prefix': 'bwfuncdamage' | |
'body': """ | |
do | |
local prev = 0 | |
function mod:${1:SpellDamage}(args) | |
local t = GetTime() | |
if self:Me(args.destGUID) and t-prev > 2 then | |
prev = t | |
self:Flash(${2:args.spellId}) | |
self:Message(${3:args.spellId}, "Personal", "Alarm", CL.underyou:format(${4:args.spellName}))$5 | |
end | |
end | |
end | |
""" | |
# Common Locale | |
'BigWigs CL.count': | |
'prefix': 'bwclcount' | |
'body': 'CL.count:format(${1:args.spellName}, ${2:count})$3' | |
'BigWigs CL.you': | |
'prefix': 'bwclyou' | |
'body': 'CL.you:format(${1:args.spellName})$2' | |
'BigWigs CL.underyou': | |
'prefix': 'bwclunderyou' | |
'body': 'CL.underyou:format(${1:args.spellName})$2' | |
'BigWigs CL.cast': | |
'prefix': 'bwclcast' | |
'body': 'CL.cast:format(${1:args.spellName})$2' | |
'BigWigs CL.casting': | |
'prefix': 'bwclcasting' | |
'body': 'CL.casting:format(${1:args.spellName})$2' | |
'BigWigs CL.phase': | |
'prefix': 'bwclphase' | |
'body': 'CL.phase:format(${1:phase})$2' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment