Ejemplo n.º 1
0
        $passed = $now - $battle->getLastUpdate();
        $roundsMissed = floor($passed / ($round_time / 1000));
        $remainingTime = $passed % ($round_time / 1000);
        $battle->setAttackingDivisions($attackDivisions);
        $battle->setDefendingDivisions($defendDivisions);
        if ($noView) {
            echo "/";
            foreach ($attackDivisions as $index => $division) {
                echo $division->getUnitId() . ":" . $division->getQuantity();
                if ($index < count($attackDivisions) - 1) {
                    echo ",";
                }
            }
            echo "/";
            foreach ($defendDivisions as $index => $division) {
                echo $division->getUnitId() . ":" . $division->getQuantity();
                if ($index < count($defendDivisions) - 1) {
                    echo ",";
                }
            }
            $maxRound = $battleRoundConn->getMaxRoundsByBattleId($battle->getId());
            echo "/" . $battle->getId() . "/" . $maxRound;
            die;
        }
    }
    $maxRound = $battleRoundConn->getMaxRoundsByBattleId($battle->getId());
}
echo $remainingTime . "^_^";
$detailType = 'battle';
require "../../views/detailBox/detailBoxView.php";
require '../../views/detailBox/battleDetailsView.php';