From e21d04fc85faa430a0d93e4928d4e5f12b6c0d4c Mon Sep 17 00:00:00 2001 From: Yord Date: Thu, 5 Mar 2015 01:25:50 +0100 Subject: [PATCH] Fixed broken benefits in Character-Cards version 2.0. --- static/javascripts/heroic.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/javascripts/heroic.js b/static/javascripts/heroic.js index ad980c2..a887e59 100644 --- a/static/javascripts/heroic.js +++ b/static/javascripts/heroic.js @@ -81,7 +81,7 @@ var ikrpg = ikrpg || {}; //"benefit1": { "title": "Common Feats", "description": "Boost Non-Attack Skill Roll - Heroic Dodge - Make a Quick Action - Parry - Relentless Charge - Reroll Failed Attack/Skill/Willpower roll - Run and Gun - Shake Continuous Effect - Shake Knockdown - Shake Stationary - Sprint - Two-Fister - Walk it Off" }, //"benefit2": { "title": "Benefit/Feat name", "description": "Benefit/Feat description" }, //"benefit3": { "title": "...", "description": "..." }, - /*"benefit1": { "title": "benefit/feat", "description": "description" }, + "benefit1": { "title": "benefit/feat", "description": "description" }, "benefit2": { "title": "", "description": "" }, "benefit3": { "title": "", "description": "" }, "benefit4": { "title": "", "description": "" }, @@ -91,7 +91,7 @@ var ikrpg = ikrpg || {}; "benefit8": { "title": "", "description": "" }, "benefit9": { "title": "", "description": "" }, "benefit10": { "title": "", "description": "" }, - "benefit11": { "title": "", "description": "" },*/ + "benefit11": { "title": "", "description": "" }, "spell1": { "title": "spell", "cost": 0, "rng": 0, "aoe": "-", "pow": 0, "up": "NO", "off": "YES", "description": "description" }, "spell2": { "title": "", "cost": "", "rng": "", "aoe": "", "pow": "", "up": "", "off": "", "description": "" }, "spell3": { "title": "", "cost": "", "rng": "", "aoe": "", "pow": "", "up": "", "off": "", "description": "" }, @@ -264,7 +264,7 @@ var ikrpg = ikrpg || {}; var parent = $("#"+attribute+":first"); for (var key in value) { var child = $("#"+attribute+":first input."+key+", #"+attribute+":first textarea."+key); - if (child) { + if (child && child.length > 0) { child[0].value = value[key]; if (child[0].nodeName == "TEXTAREA") ikrpg.cards.resize(child)(); }