Skip to content

Commit

Permalink
fix maxlevel for totem spells
Browse files Browse the repository at this point in the history
  • Loading branch information
coolmodi committed Jul 14, 2020
1 parent 0355aeb commit 8d4ec39
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 5 additions & 5 deletions data/classes/shaman_spell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ _addon.spellRankInfo = {
},
[1535] = { -- Fire Nova Totem(Rank 1)
spellLevel = 12,
maxLevel = 0,
maxLevel = 17,
duration = 5,
baseCost = 95,
effects = {
Expand Down Expand Up @@ -735,7 +735,7 @@ _addon.spellRankInfo = {
},
[8498] = { -- Fire Nova Totem(Rank 2)
spellLevel = 22,
maxLevel = 0,
maxLevel = 27,
duration = 5,
baseCost = 170,
effects = {
Expand All @@ -750,7 +750,7 @@ _addon.spellRankInfo = {
},
[8499] = { -- Fire Nova Totem(Rank 3)
spellLevel = 32,
maxLevel = 0,
maxLevel = 37,
duration = 5,
baseCost = 280,
effects = {
Expand Down Expand Up @@ -1165,7 +1165,7 @@ _addon.spellRankInfo = {
},
[11314] = { -- Fire Nova Totem(Rank 4)
spellLevel = 42,
maxLevel = 0,
maxLevel = 47,
duration = 5,
baseCost = 395,
effects = {
Expand All @@ -1180,7 +1180,7 @@ _addon.spellRankInfo = {
},
[11315] = { -- Fire Nova Totem(Rank 5)
spellLevel = 52,
maxLevel = 0,
maxLevel = 57,
duration = 5,
baseCost = 520,
effects = {
Expand Down
9 changes: 9 additions & 0 deletions tools/spelldata_creator/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ function summonTotemSlot(rankInfo: RankInfo, effect: SpellEffect, effectNum: num
if (!totemSpell) throw new Error("Totem spell not found!");
const totemEffects = spellData.getSpellEffects(totemSpell);
const totemSpellCat = spellData.getSpellCategory(totemSpell);
const totemSpellLevel = spellData.getSpellLevel(totemSpell);

rankInfo.maxLevel = totemSpellLevel.MaxLevel;

switch(spellName) {
case "Searing Totem":
directDmg(rankInfo, totemEffects[0], effectNum);
Expand Down Expand Up @@ -469,6 +473,11 @@ function buildSpellInfo(pclass: string) {
// Handle effects
for (let i = 0; i < effects.length; i++) {
effectInfoHandler[effects[i].Effect](classInfo.rankInfo[effects[i].SpellID], effects[i], i, spellName, classInfo.baseInfo[spellName]);

// Make sure maxlevel is defined for spells with level scaling
if (classInfo.rankInfo[effects[0].SpellID].effects[i]
&& classInfo.rankInfo[effects[0].SpellID].effects[i].perLevel != 0
&& classInfo.rankInfo[effects[0].SpellID].maxLevel == 0) throw "Effect has perlevel scaling but maxlevel of the spell is 0!";
}
}

Expand Down

0 comments on commit 8d4ec39

Please sign in to comment.