Skip to content

Commit f17f750

Browse files
committedJul 26, 2024·
System - C_Spell API Update and Cleanup
1 parent f788b65 commit f17f750

31 files changed

+1400
-1150
lines changed
 

‎.luacheckrc

+63-43
Original file line numberDiff line numberDiff line change
@@ -8150,7 +8150,6 @@ read_globals = {
81508150
'DirtyFlagsMixin',
81518151
'DisableAddOn',
81528152
'DisableAllAddOns',
8153-
'DisableSpellAutocast',
81548153
'DisabledTooltipButtonMixin',
81558154
'DismissCompanion',
81568155
'Dismount',
@@ -8170,7 +8169,6 @@ read_globals = {
81708169
'DoesCurrentLocaleSellExpansionLevels',
81718170
'DoesFollowerMatchCurrentGarrisonType',
81728171
'DoesItemContainSpec',
8173-
'DoesSpellExist',
81748172
'DoesTemplateExist',
81758173
'DoublyLinkedListMixin',
81768174
'DragonflightLandingOverlayMixin',
@@ -10750,7 +10748,6 @@ read_globals = {
1075010748
'EmoteMenu_OnLoad',
1075110749
'EnableAddOn',
1075210750
'EnableAllAddOns',
10753-
'EnableSpellAutocast',
1075410751
'EncounterBar',
1075510752
'EncounterBarMixin',
1075610753
'EncounterBossButtonMixin',
@@ -13626,7 +13623,6 @@ read_globals = {
1362613623
'GetNumSpecGroups',
1362713624
'GetNumSpecializations',
1362813625
'GetNumSpecializationsForClassID',
13629-
'GetNumSpellTabs',
1363013626
'GetNumSubgroupMembers',
1363113627
'GetNumTitles',
1363213628
'GetNumTrainerServices',
@@ -13861,34 +13857,16 @@ read_globals = {
1386113857
'GetSpecializationSpells',
1386213858
'GetSpecsForSpell',
1386313859
'GetSpeed',
13864-
'GetSpellAutocast',
13865-
'GetSpellAvailableLevel',
1386613860
'GetSpellBaseCooldown',
1386713861
'GetSpellBonusDamage',
1386813862
'GetSpellBonusHealing',
13869-
'GetSpellBookItemInfo',
13870-
'GetSpellBookItemName',
13871-
'GetSpellBookItemTexture',
13872-
'GetSpellCharges',
1387313863
'GetSpellConfirmationPromptsInfo',
13874-
'GetSpellCooldown',
13875-
'GetSpellCount',
1387613864
'GetSpellCritChance',
13877-
'GetSpellDescription',
1387813865
'GetSpellHitModifier',
1387913866
'GetSpellInfo',
13880-
'GetSpellLevelLearned',
13881-
'GetSpellLink',
13882-
'GetSpellLossOfControlCooldown',
1388313867
'GetSpellNameColor',
1388413868
'GetSpellPenetration',
13885-
'GetSpellPowerCost',
1388613869
'GetSpellQueueWindow',
13887-
'GetSpellRank',
13888-
'GetSpellSubtext',
13889-
'GetSpellTabInfo',
13890-
'GetSpellTexture',
13891-
'GetSpellTradeSkillLink',
1389213870
'GetSpellsForCharacterUpgradeTier',
1389313871
'GetStablePetFoodTypes',
1389413872
'GetStablePetInfo',
@@ -14693,7 +14671,6 @@ read_globals = {
1469314671
'HasNoReleaseAura',
1469414672
'HasOverrideActionBar',
1469514673
'HasPendingGlyphCast',
14696-
'HasPetSpells',
1469714674
'HasPetUI',
1469814675
'HasSPEffectsAttackPower',
1469914676
'HasSendMailItem',
@@ -15539,9 +15516,7 @@ read_globals = {
1553915516
'IsArtifactRelicItem',
1554015517
'IsAtStableMaster',
1554115518
'IsAttackAction',
15542-
'IsAttackSpell',
1554315519
'IsAutoRepeatAction',
15544-
'IsAutoRepeatSpell',
1554515520
'IsAvailableQuestTrivial',
1554615521
'IsBNLogin',
1554715522
'IsBagOpen',
@@ -15568,7 +15543,6 @@ read_globals = {
1556815543
'IsCurrentAction',
1556915544
'IsCurrentItem',
1557015545
'IsCurrentQuestFailed',
15571-
'IsCurrentSpell',
1557215546
'IsDebugBuild',
1557315547
'IsDemonHunterAvailable',
1557415548
'IsDesaturateSupported',
@@ -15604,9 +15578,7 @@ read_globals = {
1560415578
'IsGuildMember',
1560515579
'IsGuildRankAssignmentAllowed',
1560615580
'IsHarmfulItem',
15607-
'IsHarmfulSpell',
1560815581
'IsHelpfulItem',
15609-
'IsHelpfulSpell',
1561015582
'IsInActiveWorldPVP',
1561115583
'IsInArenaTeam',
1561215584
'IsInAuthenticatedRank',
@@ -15669,7 +15641,6 @@ read_globals = {
1566915641
'IsPVPTimerRunning',
1567015642
'IsPartyLFG',
1567115643
'IsPartyWorldPVP',
15672-
'IsPassiveSpell',
1567315644
'IsPendingGlyphRemoval',
1567415645
'IsPetActive',
1567515646
'IsPetAttackAction',
@@ -15683,10 +15654,8 @@ read_globals = {
1568315654
'IsPlayerNeutral',
1568415655
'IsPlayerSpell',
1568515656
'IsPossessBarVisible',
15686-
'IsPressHoldReleaseSpell',
1568715657
'IsPublicBuild',
1568815658
'IsPublicVoiceChannel',
15689-
'IsPvpTalentSpell',
1569015659
'IsQuestCompletable',
1569115660
'IsQuestIDValidSpellTarget',
1569215661
'IsQuestItemHidden',
@@ -15710,7 +15679,6 @@ read_globals = {
1571015679
'IsShiftKeyDown',
1571115680
'IsSpecializationActivateSpell',
1571215681
'IsSpellClassOrSpec',
15713-
'IsSpellInRange',
1571415682
'IsSpellKnown',
1571515683
'IsSpellKnownOrOverridesKnown',
1571615684
'IsSpellOverlayed',
@@ -15722,7 +15690,6 @@ read_globals = {
1572215690
'IsSubZonePVPPOI',
1572315691
'IsSubmerged',
1572415692
'IsSwimming',
15725-
'IsTalentSpell',
1572615693
'IsTargetLoose',
1572715694
'IsTestBuild',
1572815695
'IsThreatWarningEnabled',
@@ -15733,7 +15700,6 @@ read_globals = {
1573315700
'IsUnitModelReadyForUI',
1573415701
'IsUsableAction',
1573515702
'IsUsableItem',
15736-
'IsUsableSpell',
1573715703
'IsUsingFixedTimeStep',
1573815704
'IsUsingGamepad',
1573915705
'IsUsingMouse',
@@ -21457,7 +21423,6 @@ read_globals = {
2145721423
'PickupPetSpell',
2145821424
'PickupPlayerMoney',
2145921425
'PickupPvpTalent',
21460-
'PickupSpell',
2146121426
'PickupSpellBookItem',
2146221427
'PickupStablePet',
2146321428
'PickupTalent',
@@ -26777,7 +26742,6 @@ read_globals = {
2677726742
'SpellFlyout_SetBorderSize',
2677826743
'SpellFlyout_Toggle',
2677926744
'SpellGetVisibilityInfo',
26780-
'SpellHasRange',
2678126745
'SpellIsAlwaysShown',
2678226746
'SpellIsPriorityAura',
2678326747
'SpellIsSelfBuff',
@@ -28210,7 +28174,6 @@ read_globals = {
2821028174
'ToggleRun',
2821128175
'ToggleSelfHighlight',
2821228176
'ToggleSheath',
28213-
'ToggleSpellAutocast',
2821428177
'ToggleSpellBook',
2821528178
'ToggleStats',
2821628179
'ToggleStoreUI',
@@ -34074,23 +34037,80 @@ read_globals = {
3407434037
C_Spell = {
3407534038
fields = {
3407634039
'DoesSpellExist',
34040+
'GetDeadlyDebuffInfo',
3407734041
'GetMawPowerBorderAtlasBySpellID',
34042+
'GetOverrideSpell',
34043+
'GetSpellAutoCast',
34044+
'GetSpellCastCount',
34045+
'GetSpellCharges',
34046+
'GetSpellCooldown',
34047+
'GetSpellDescription',
34048+
'GetSpellInfo',
34049+
'GetSpellLevelLearned',
34050+
'GetSpellLink',
34051+
'GetSpellLossOfControlCooldown',
34052+
'GetSpellName',
34053+
'GetSpellPowerCost',
34054+
'GetSpellSkillLineAbilityRank',
34055+
'GetSpellSubtext',
34056+
'GetSpellTexture',
34057+
'GetSpellTradeSkillLink',
34058+
'IsAutoAttackSpell',
34059+
'IsAutoRepeatSpell',
34060+
'IsClassTalentSpell',
34061+
'IsCurrentSpell',
34062+
'IsPressHoldReleaseSpell',
34063+
'IsPvPTalentSpell',
34064+
'IsRangedAutoAttackSpell',
3407834065
'IsSpellDataCached',
34066+
'IsSpellDisabled',
34067+
'IsSpellHarmful',
34068+
'IsSpellHelpful',
34069+
'IsSpellInRange',
34070+
'IsSpellPassive',
34071+
'IsSpellUsable',
34072+
'PickupSpell',
3407934073
'RequestLoadSpellData',
34080-
'TargetSpellJumpsUpgradeTrack'
34074+
'SetSpellAutoCastEnabled',
34075+
'SpellHasRange',
34076+
'TargetSpellJumpsUpgradeTrack',
34077+
'ToggleSpellAutoCast',
3408134078
}
3408234079
},
3408334080
C_SpellBook = {
3408434081
fields = {
3408534082
'ContainsAnyDisenchantSpell',
3408634083
'GetCurrentLevelSpells',
34087-
'GetDeadlyDebuffInfo',
34088-
'GetOverrideSpell',
34084+
'GetNumSpellBookSkillLines',
3408934085
'GetSkillLineIndexByID',
34090-
'GetSpellInfo',
34091-
'GetSpellLinkFromSpellID',
34086+
'GetSpellBookItemAutoCast',
34087+
'GetSpellBookItemCastCount',
34088+
'GetSpellBookItemCharges',
34089+
'GetSpellBookItemCooldown',
34090+
'GetSpellBookItemLevelLearned',
34091+
'GetSpellBookItemLink',
34092+
'GetSpellBookItemLossOfControlCooldown',
34093+
'GetSpellBookItemName',
34094+
'GetSpellBookItemPowerCost',
34095+
'GetSpellBookItemTexture'
34096+
'GetSpellBookItemTradeSkillLink',
34097+
'GetSpellBookItemType'
34098+
'GetSpellBookSkillLineInfo',
3409234099
'GetTrackedNameplateCooldownSpells',
34093-
'IsSpellDisabled'
34100+
'HasPetSpells',
34101+
'IsAutoAttackSpellBookItem',
34102+
'IsClassTalentSpellBookItem',
34103+
'IsPvPTalentSpellBookItem',
34104+
'IsRangedAutoAttackSpellBookItem',
34105+
'IsSpellBookItemHarmful',
34106+
'IsSpellBookItemHelpful',
34107+
'IsSpellBookItemInRange'
34108+
'IsSpellBookItemPassive',
34109+
'IsSpellBookItemUsable',
34110+
'PickupSpellBookItem',
34111+
'SetSpellAutoCastEnabled',
34112+
'SpellBookItemHasRange',
34113+
'ToggleSpellBookItemAutoCast',
3409434114
}
3409534115
},
3409634116
C_SplashScreen = {

‎BadRotations API.md

+42-16
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
# Development Informations.
2+
23
### The Macros
3-
* /power ---- Start/Stop Badboy Entirely
4-
* /aoe ------- Toggles AoE Modes
5-
* /cooldowns -- Toggles Cooldowns
6-
* /pause ---- Stop attacking
4+
5+
- /power ---- Start/Stop Badboy Entirely
6+
- /aoe ------- Toggles AoE Modes
7+
- /cooldowns -- Toggles Cooldowns
8+
- /pause ---- Stop attacking
9+
710
### The Functions.
11+
812
**Old standar UnitBuff**
9-
***
13+
14+
---
15+
1016
`br.UnitBuffID(UnitID, SpellID, Filter) - 1/nil` Returns 1 if Buff found on target
1117
`br.UnitDebuffID(UnitID, SpellID, Filter) - 1/nil` Returns 1 if Debuff found on target
1218
**CAN - Booleans**
13-
***
19+
20+
---
21+
1422
`canAttack(Unit1,Unit2) - Bool` Returns true if Unit1 can attack Unit2
1523
`br.canDispel(Unit,spellID) - Bool` Retruns true if the Unit have a valid Dispel
1624
`canHeal(Unit) - Bool` Returns true if we can heal that Unit
@@ -19,13 +27,17 @@
1927
`br.canRun() - Bool` Returns true if we can Run profile(incombat)
2028
`br.canUseItem(itemID) - Bool` Returns true if the item can be used
2129
**CAST - Function Methods**
22-
***
30+
31+
---
32+
2333
`castGround(Unit,SpellID,maxDistance)` Used to cast Spells on ground. Returns true if everything passes.
2434
`castGroundBetween(Unit,SpellID,maxDistance) ` Used to ground cast between yourself and target. Returns true if everything passes.
2535
`castHealGround(SpellID,Radius,Health,NumberOfPlayers)` Used to ground cast between lowest br.friend members. Returns true if everything passes.
2636
[castSpell(Unit,SpellID,FacingCheck,MovementCheck,SpamAllowed,KnownSkip)](https://github.com/CuteOne/BadRotations/wiki/castSpell-Method#castspell) Used to cast Spells. Returns true if everything passes.
2737
**GET - Mixed**
28-
***
38+
39+
---
40+
2941
`getAllies(Target,Radius) - Table` Returns a table of the allies found within Radius of the target
3042
`br.getBuffRemain(Unit,BuffID) - Num` Returns how long remain on this Unit buff.
3143
`br.getBuffStacks(Unit,BuffID) - Num` Returns number of stacks of this Units buff.
@@ -54,10 +66,14 @@
5466
`getTotemDistance(Unit1) - Num` Returns distance from totem to target
5567
`getVengeance() - Num` Returns player vengeance(considers classes)
5668
**HAS**
57-
***
69+
70+
---
71+
5872
`hasGlyph(glyphid)` Returns true if we have this Glyph
5973
**IS - Booleans**
60-
***
74+
75+
---
76+
6177
`br.isAlive(Unit) - Bool` Returns true if Unit is alive
6278
`br.isBoss() - Bool` Returns true if a boss is found in boss 1-2-3-4-5
6379
`isBuffed(UnitID,SpellID,TimeLeft) - Bool` Rturns true if Unit have at least Timeleft remaining on SpellId Buff
@@ -73,38 +89,48 @@
7389
`isLooting() - Bool` Returns true if we are currently looting
7490
`isMoving(Unit) - Num` Returns Unit movement speed
7591
`IsMovingTime(time) - Bool` Returns true if we have been moving for time seconds
76-
`isSpellInRange(SpellID,Unit) - Bool` Returns true spell is in Range of Unit
92+
`C_Spell.IsSpellInRange(SpellID,Unit) - Bool` Returns true spell is in Range of Unit
7793
`isValidTarget(Unit) - Bool` Returns true if the target is valid
7894
**Uncategorized - Mixed**
79-
***
95+
96+
---
97+
8098
`makeEnemiesTable()` - does not return anything but create br.enemy that hold br.enemy[i].unit br.enemy[i].distance and br.enemy[i].hp of all enemies in 40 yards
8199
`nDbDmg(tar, spellID, player) - Num` Returns tooltip damage
82100
`pause() - Bool` Returns true if pause is engaged
83101
`castingUnit() - Bool` Returns true is said unit is casting.
84102
`br.useItem(itemID)` Use item via ID
85103
`shouldStopCasting(SpellID) - Bool` Built into casts methods. Prevents spell locking.
86104
**Config Queries - Mixed**
87-
***
105+
106+
---
107+
88108
`br.isChecked(Value) - Bool` Returns true if Value Checkbox is checked in UI
89109
`isSelected(Value) - Bool` Returns true if Value Checkbox is checked in UI and CD requirements are met.
90110
`br.getValue(Value) - Num` Returns drop or box Value from UI
91111
`CreateNewCheck(value, textString, tip1, state)`
112+
92113
- Used to create checkboxes in UI
114+
93115
1. value must always be thisConfig - Do not change
94116
2. textString - the name of your option - String
95117
3. tip1 - the tooltip displayed when the user mouseover the checkbox - String
96118
4. state - the désired deployment state - Numeric 0(Unchecked)/1(Checked)
97-
`CreateNewBox(value,textString,minValue,maxValue,step,base,tip1)`
119+
`CreateNewBox(value,textString,minValue,maxValue,step,base,tip1)`
120+
98121
- Used to create valueboxes in UI
122+
99123
1. value must always be thisConfig - Do not change
100124
2. textString - the name of your option - String
101125
3. minValue - minimum value for this option
102126
4. maxValue - maximum value for this option
103127
5. step - how much you want to add/sub from the actual value when user wheel-up/down over the box
104128
6. base - what is the base value for this option
105-
`CreateNewDrop(value, textString, base, tip1, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10)`
129+
`CreateNewDrop(value, textString, base, tip1, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10)`
130+
106131
- Used to create selectors in UI. Assigning tip "Toggles" will use predefined toggles, values should be empty when doing so.
132+
107133
1. value must always be thisConfig - Do not change
108134
2. textString - the name of your option - String
109135
3. the tooltip displayed when the user mouseover the checkbox - String
110-
4 and more. Selections enumeration - Strings
136+
4 and more. Selections enumeration - Strings

0 commit comments

Comments
 (0)
Please sign in to comment.