now ally attacks work fine (except scouts, I save it for later when fix all scouts type)

This commit is contained in:
unknown
2012-04-10 01:00:07 +03:00
parent 25e6da2e13
commit dc5ecf3c7a
3 changed files with 15 additions and 13 deletions
+2 -6
View File
@@ -1,6 +1,6 @@
<?php
$prefix = "".TB_PREFIX."ndata";
$limit = "ntype!=4 AND ntype!=5 AND ntype!=6 AND ntype!=7 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15";
$limit = "ntype!=0 AND ntype!=4 AND ntype!=5 AND ntype!=6 AND ntype!=7 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15";
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
$query = mysql_num_rows($sql);
$outputList = '';
@@ -38,11 +38,7 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
$outputList .= $nn;
$outputList .= $database->getUserField($dataarray[28],username,0);
if($ntype==0 or $ntype==1 or $ntype==2 or $ntype==3){
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
}else{
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
}
$getUserAlly = $database->getUserField($dataarray[28],alliance,0);
$getAllyName = $database->getAllianceName($getUserAlly);
if($getUserAlly==$session->alliance || !$getUserAlly){
+2 -5
View File
@@ -12,6 +12,7 @@ while($row = mysql_fetch_array($sql)){
$dataarray = explode(",",$row['data']);
$id = $row["id"];
$uid = $row["uid"];
$toWref = $row["toWref"];
$ally = $row["ally"];
$topic = $row["topic"];
$ntype = $row["ntype"];
@@ -38,11 +39,7 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
$outputList .= $nn;
$outputList .= $database->getUserField($dataarray[28],username,0);
if($ntype==0 or $ntype==1 or $ntype==2 or $ntype==3){
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
}else{
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
}
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
$getAllyName = $database->getAllianceName($getUserAlly);
if($getUserAlly==$session->alliance || !$getUserAlly){
+11 -2
View File
@@ -67,13 +67,22 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
$outputList .= $nn;
$outputList .= $database->getUserField($dataarray[28],username,0);
if($ntype==0){
$isoasis = $database->isVillageOases($toWref);
if($isoasis == 0){
if($toWref != $village->wid){
$getUser = $database->getVillageField($toWref,owner);
}else{
$getUser = $database->getVillageField($dataarray[1],owner);
}
$getUserAlly = $database->getUserField($getUser,alliance,0);
}else if($ntype==1 or $ntype==2 or $ntype==3){
}else{
if($toWref != $village->wid){
$getUser = $database->getOasisField($toWref,owner);
}else{
$getUser = $database->getOasisField($dataarray[1],owner);
}
}
$getUserAlly = $database->getUserField($getUser,alliance,0);
}else if($ntype==1 or $ntype==2 or $ntype==3){
$getUserAlly = $database->getUserField($dataarray[28],alliance,0);
}else{
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);