fix rat from questmaster, more fix for icon for reports, fix hero in type 3 of report, fix reinforcement from questmaster in rallypoint and now when hero lose 90% health or more in one battle he die

This commit is contained in:
unknown
2012-04-21 02:40:57 +03:00
parent 3a24e1d6e0
commit 47919ed84b
8 changed files with 113 additions and 22 deletions
+10 -2
View File
@@ -2086,8 +2086,16 @@ $crannyimg = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" wid
@fclose($ourFileHandle);
$q = "SELECT * FROM ".TB_PREFIX."movement, ".TB_PREFIX."attacks where ".TB_PREFIX."movement.ref = ".TB_PREFIX."attacks.id and ".TB_PREFIX."movement.proc = '0' and ".TB_PREFIX."movement.sort_type = '3' and ".TB_PREFIX."attacks.attack_type = '2' and endtime < $time";
$dataarray = $database->query_return($q);
foreach($dataarray as $data) {
if($data['from']==0){
$to = $database->getMInfo($data['to']);
$database->addEnforce($data);
$reinf = $database->getEnforce($data['to'],$data['from']);
$database->modifyEnforce($reinf['id'],31,1,1);
$data_fail = '0,0,4,1,0,0,0,0,0,0,0,0,0,0';
$database->addNotice($to['owner'],$to['wref'],$targetally,8,'village of the elders reinforcement '.addslashes($to['name']).'',$data_fail,$AttackArrivalTime);
$database->setMovementProc($data['moveid']);
}else{
//set base things
$owntribe = $database->getUserField($database->getVillageField($data['from'],"owner"),"tribe",0);
$targettribe = $database->getUserField($database->getVillageField($data['to'],"owner"),"tribe",0);
@@ -2133,7 +2141,7 @@ $crannyimg = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" wid
}
//update status
$database->setMovementProc($data['moveid']);
}
}
if(file_exists("GameEngine/Prevention/sendreinfunits.txt")) {
@unlink("GameEngine/Prevention/sendreinfunits.txt");
+1 -1
View File
@@ -508,7 +508,7 @@ class Battle {
$hero_health=$fdb['health'];
$damage_health=round(100*$result[1]);
//exit($damage_health."|".$hero_health."|".$atkhero['heroid']);
if ($hero_health<=$damage_health)
if ($hero_health<=$damage_health or $damage_health>90)
{
//hero die
$result['casualties_attacker']['11'] = 1;