Closed GoogleCodeExporter closed 9 years ago
actually a much better fix: (this one works with multiple raided stuff as well
foreach ($combats as $cmbt):
if ($cmbt->getType() == "Ship vs NPC" || $cmbt->getType() == "Ship vs Ship"):
$cr = split(";", $cmbt->getData());
$len = count($cr);
$stats = $len-9;
for($i=1;$i<=$len;$i++){
if($cr[$len-$i] =="E") $stats=$len-$i;
}
?>
combats.push({
attacker: {
name: <?php printf("\"%s\"", $cmbt->getAttacker())?>,
image: <?php printf("\"%s\"", $cr[1])?>,
isNPC: <?php echo((int) (stripos($npcImages, $cr[1]) !== false))?>,
hullA: <?php echo($cr[2])?>,
armourA: <?php echo($cr[3])?>,
shieldA: <?php echo($cr[4])?>,
hullB: <?php echo($cr[$stats + 1])?>,
armourB: <?php echo($cr[$stats + 2])?>,
shieldB: <?php echo($cr[$stats + 3])?>
},
defender: {
name: <?php printf("\"%s\"", $cmbt->getDefender())?>,
image: <?php printf("\"%s\"", $cr[6])?>,
isNPC: <?php echo((int) (stripos($npcImages, $cr[6]) !== false))?>,
hullA: <?php echo($cr[7])?>,
armourA: <?php echo($cr[8])?>,
shieldA: <?php echo($cr[9])?>,
hullB: <?php echo($cr[$stats + 5])?>,
armourB: <?php echo($cr[$stats + 6])?>,
shieldB: <?php echo($cr[$stats + 7])?>
}
});
Original comment by spoilerh...@gmail.com
on 11 Mar 2012 at 12:47
[deleted comment]
Fixed in release 1.6.9. Thanks.
Original comment by uncledan74
on 11 Mar 2012 at 3:25
Original issue reported on code.google.com by
spoilerh...@gmail.com
on 5 Mar 2012 at 11:10