示例#1
0
//debug_save($user);//->save();
//debug_save($target);//->save();
$user->cacheStats();
$target->cacheStats();


$attacklog->isSuccess = $isSuccess;
debug("Success: $isSuccess");
debug_exit();

$battleId = $attacklog->create();

// TODO: figure a better way to do this
require_once('logger.php');

Weapon::cleanupWeapons();

if ($battleId) {
	header("Location: battlelog.php?id=$battleId");
	exit;
}
else {
	// some kind of database error..
	header("Location: stats.php?uid=$uid&e=4");
	exit;
}

function getDeath($n, $isSuccess) {
	if ($isSuccess) {
		return floor(rand(0, 80 ) * 0.000001 * $n);
	}