From 130f2b21484644f6793e1ecb2fbe9e569a9faa01 Mon Sep 17 00:00:00 2001 From: Akshay Naik Date: Tue, 23 Apr 2013 22:03:40 +0530 Subject: [PATCH] FIX attack bug --- a2b.php | 2 +- install/data/sql.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/a2b.php b/a2b.php index 7ffa5c29..7ea3d55e 100644 --- a/a2b.php +++ b/a2b.php @@ -206,7 +206,7 @@ if(isset($_GET['o'])) { } $p_time = round($automation->procDistanceTime($p_to,$p_from,min($p_speeds),1)/$p_fastertroops); $p_reference = $database->addAttack($prisoner['from'],$prisoner['t1'],$prisoner['t2'],$prisoner['t3'],$prisoner['t4'],$prisoner['t5'],$prisoner['t6'],$prisoner['t7'],$prisoner['t8'],$prisoner['t9'],$prisoner['t10'],$prisoner['t11'],3,0,0,0,0,0,0,0,0,0,0,0); - $database->addMovement(4,$prisoner['wref'],$prisoner['from'],$p_reference,time(),($p_time+time())); + $database->addMovement(4,$prisoner['wref'],$prisoner['from'],$p_reference,(microtime(true)),($p_time+microtime(true))); $troops = $prisoner['t1']+$prisoner['t2']+$prisoner['t3']+$prisoner['t4']+$prisoner['t5']+$prisoner['t6']+$prisoner['t7']+$prisoner['t8']+$prisoner['t9']+$prisoner['t10']+$prisoner['t11']; $database->modifyUnit($prisoner['wref'],array("99o"),array($troops),array(0)); $database->deletePrisoners($prisoner['id']); diff --git a/install/data/sql.sql b/install/data/sql.sql index e4c0bba2..80bba466 100644 --- a/install/data/sql.sql +++ b/install/data/sql.sql @@ -969,8 +969,8 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%movement` ( `to` int(11) unsigned NOT NULL DEFAULT '0', `ref` int(11) unsigned NOT NULL DEFAULT '0', `ref2` int(11) unsigned NOT NULL DEFAULT '0', - `starttime` int(11) unsigned NOT NULL DEFAULT '0', - `endtime` int(11) unsigned NOT NULL DEFAULT '0', + `starttime` float(20) unsigned NOT NULL DEFAULT '0', + `endtime` float(20) unsigned NOT NULL DEFAULT '0', `proc` tinyint(1) unsigned NOT NULL DEFAULT '0', `send` tinyint(1) unsigned NOT NULL, `wood` int(11) unsigned NOT NULL,