From 8d4ec39c7460905bdcbca01a620ee9a2d52084b9 Mon Sep 17 00:00:00 2001 From: coolmodi <7333074+coolmodi@users.noreply.github.com> Date: Tue, 14 Jul 2020 11:38:04 +0200 Subject: [PATCH] fix maxlevel for totem spells --- data/classes/shaman_spell.lua | 10 +++++----- tools/spelldata_creator/app.ts | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/data/classes/shaman_spell.lua b/data/classes/shaman_spell.lua index b36586b..7359a01 100644 --- a/data/classes/shaman_spell.lua +++ b/data/classes/shaman_spell.lua @@ -331,7 +331,7 @@ _addon.spellRankInfo = { }, [1535] = { -- Fire Nova Totem(Rank 1) spellLevel = 12, - maxLevel = 0, + maxLevel = 17, duration = 5, baseCost = 95, effects = { @@ -735,7 +735,7 @@ _addon.spellRankInfo = { }, [8498] = { -- Fire Nova Totem(Rank 2) spellLevel = 22, - maxLevel = 0, + maxLevel = 27, duration = 5, baseCost = 170, effects = { @@ -750,7 +750,7 @@ _addon.spellRankInfo = { }, [8499] = { -- Fire Nova Totem(Rank 3) spellLevel = 32, - maxLevel = 0, + maxLevel = 37, duration = 5, baseCost = 280, effects = { @@ -1165,7 +1165,7 @@ _addon.spellRankInfo = { }, [11314] = { -- Fire Nova Totem(Rank 4) spellLevel = 42, - maxLevel = 0, + maxLevel = 47, duration = 5, baseCost = 395, effects = { @@ -1180,7 +1180,7 @@ _addon.spellRankInfo = { }, [11315] = { -- Fire Nova Totem(Rank 5) spellLevel = 52, - maxLevel = 0, + maxLevel = 57, duration = 5, baseCost = 520, effects = { diff --git a/tools/spelldata_creator/app.ts b/tools/spelldata_creator/app.ts index 2ec4bae..c531431 100644 --- a/tools/spelldata_creator/app.ts +++ b/tools/spelldata_creator/app.ts @@ -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); @@ -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!"; } }