1
0
forked from 0ad/0ad

Fix hero button for heroes without attack

This was SVN commit r13401.
This commit is contained in:
leper 2013-05-12 16:02:53 +00:00
parent daf572eb43
commit 3bec6ced85

View File

@ -449,7 +449,7 @@ function updateHero()
// Setup tooltip
var tooltip = "[font=\"serif-bold-16\"]" + template.name.specific + "[/font]";
tooltip += "\n[font=\"serif-bold-13\"]Health:[/font] " + heroState.hitpoints + "/" + heroState.maxHitpoints;
tooltip += "\n[font=\"serif-bold-13\"]" + (heroState.attack ? heroState.attack.type + " " : type)
tooltip += "\n[font=\"serif-bold-13\"]" + (heroState.attack ? heroState.attack.type + " " : "")
+ "Attack:[/font] " + damageTypeDetails(heroState.attack);
// Show max attack range if ranged attack, also convert to tiles (4m per tile)
if (heroState.attack && heroState.attack.type == "Ranged")