mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-11 22:01:00 +00:00
now ally attacks work fine (except scouts, I save it for later when fix all scouts type)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$prefix = "".TB_PREFIX."ndata";
|
$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");
|
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
|
||||||
$query = mysql_num_rows($sql);
|
$query = mysql_num_rows($sql);
|
||||||
$outputList = '';
|
$outputList = '';
|
||||||
@@ -38,11 +38,7 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
|
|||||||
|
|
||||||
$outputList .= $nn;
|
$outputList .= $nn;
|
||||||
$outputList .= $database->getUserField($dataarray[28],username,0);
|
$outputList .= $database->getUserField($dataarray[28],username,0);
|
||||||
if($ntype==0 or $ntype==1 or $ntype==2 or $ntype==3){
|
$getUserAlly = $database->getUserField($dataarray[28],alliance,0);
|
||||||
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
|
|
||||||
}else{
|
|
||||||
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
|
|
||||||
}
|
|
||||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||||
|
|
||||||
if($getUserAlly==$session->alliance || !$getUserAlly){
|
if($getUserAlly==$session->alliance || !$getUserAlly){
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ while($row = mysql_fetch_array($sql)){
|
|||||||
$dataarray = explode(",",$row['data']);
|
$dataarray = explode(",",$row['data']);
|
||||||
$id = $row["id"];
|
$id = $row["id"];
|
||||||
$uid = $row["uid"];
|
$uid = $row["uid"];
|
||||||
|
$toWref = $row["toWref"];
|
||||||
$ally = $row["ally"];
|
$ally = $row["ally"];
|
||||||
$topic = $row["topic"];
|
$topic = $row["topic"];
|
||||||
$ntype = $row["ntype"];
|
$ntype = $row["ntype"];
|
||||||
@@ -38,11 +39,7 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
|
|||||||
|
|
||||||
$outputList .= $nn;
|
$outputList .= $nn;
|
||||||
$outputList .= $database->getUserField($dataarray[28],username,0);
|
$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);
|
||||||
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
|
|
||||||
}else{
|
|
||||||
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
|
|
||||||
}
|
|
||||||
$getAllyName = $database->getAllianceName($getUserAlly);
|
$getAllyName = $database->getAllianceName($getUserAlly);
|
||||||
|
|
||||||
if($getUserAlly==$session->alliance || !$getUserAlly){
|
if($getUserAlly==$session->alliance || !$getUserAlly){
|
||||||
|
|||||||
@@ -67,13 +67,22 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
|
|||||||
$outputList .= $nn;
|
$outputList .= $nn;
|
||||||
$outputList .= $database->getUserField($dataarray[28],username,0);
|
$outputList .= $database->getUserField($dataarray[28],username,0);
|
||||||
if($ntype==0){
|
if($ntype==0){
|
||||||
|
$isoasis = $database->isVillageOases($toWref);
|
||||||
|
if($isoasis == 0){
|
||||||
if($toWref != $village->wid){
|
if($toWref != $village->wid){
|
||||||
$getUser = $database->getVillageField($toWref,owner);
|
$getUser = $database->getVillageField($toWref,owner);
|
||||||
}else{
|
}else{
|
||||||
$getUser = $database->getVillageField($dataarray[1],owner);
|
$getUser = $database->getVillageField($dataarray[1],owner);
|
||||||
}
|
}
|
||||||
$getUserAlly = $database->getUserField($getUser,alliance,0);
|
}else{
|
||||||
}else if($ntype==1 or $ntype==2 or $ntype==3){
|
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);
|
$getUserAlly = $database->getUserField($dataarray[28],alliance,0);
|
||||||
}else{
|
}else{
|
||||||
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
|
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
|
||||||
|
|||||||
Reference in New Issue
Block a user