fix destroy village bug + more some updates

This commit is contained in:
yi12345
2013-07-24 14:51:36 +03:00
parent 9e646c0edc
commit 45e6c4a1e2
3 changed files with 49 additions and 63 deletions
+2 -2
View File
@@ -2649,7 +2649,7 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
}
$database->setMovementProc($data['moveid']);
if($chiefing_village != 1 && $village_destroyed != 1){
if($chiefing_village != 1){
$database->addMovement(4,$to['wref'],$from['wref'],$data['ref'],$AttackArrivalTime,$endtime);
// send the bounty on type 6.
if($type !== 1)
@@ -2663,7 +2663,7 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
$database->modifyPointsAlly($targetally,'RR',$totalstolentaken );
$database->modifyPointsAlly($ownally,'RR',$totalstolengain);
}
}else if($chiefing_village == 1){
}else{
$database->addEnforce2($data,$owntribe,$troopsdead1,$troopsdead2,$troopsdead3,$troopsdead4,$troopsdead5,$troopsdead6,$troopsdead7,$troopsdead8,$troopsdead9,$troopsdead10,$troopsdead11);
}
}
+22 -2
View File
@@ -256,7 +256,7 @@ if($id != 39 && $id != 40) {
<div id="build_list_soon" class="hide">
<?php
if($rallypoint == 0 && $session->tribe == 3 && $trapper == 0 ) {
//include("soon/trapper.tpl");
include("soon/trapper.tpl");
}
if($mainbuilding < 10 && $warehouse < 10 && $village->capital == 0 && $largeA['owner'] == $session->uid || $normalA['vref'] == $village->wid ) {
include("soon/greatwarehouse.tpl");
@@ -286,7 +286,27 @@ if($academy == 0 && ($mainbuilding <= 2 || $barrack <= 2)) {
include("soon/academy.tpl");
}
if($embassy == 0 || $mainbuilding >= 2 && $mainbuilding <= 4) {
include("soon/palace.tpl");
//loop search village user
$query = mysql_query("SELECT * FROM ".TB_PREFIX."vdata WHERE owner = ".$user."");
while($villaggi_array = mysql_fetch_array($query)){
//loop structure village
$query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref']."");
$strutture= mysql_fetch_array($query1);
//search Castle in array structure village
$test = in_array(26,$strutture);
if ($test){
break;
}
}
//if Castle no ready include palace.tpl
if (!$test){
include("soon/palace.tpl");
}
}
if($blacksmith == 0 && ($academy <= 2 || $mainbuilding <= 2)) {
include("soon/blacksmith.tpl");
+25 -59
View File
@@ -69,8 +69,8 @@ if(REG_OPEN == true){ ?>
<tr>
<th><?php echo PASSWORD; ?></th>
<td>
<input class="text" type="password" name="pw" value="<?php echo stripslashes($form->getValue('pw')); ?>" maxlength="30" />
<input class="text" type="password" name="pw" value="<?php echo stripslashes($form->getValue('pw')); ?>" maxlength="100" />
<span style="color: #DD0000"><b>Warning:</b> password with & can cause problems!</span>
<span class="error"><?php echo $form->getError('pw'); ?></span>
</td>
</tr>
@@ -78,62 +78,28 @@ if(REG_OPEN == true){ ?>
</table>
<table cellpadding="1" cellspacing="1" id="sign_select">
<tbody>
<tr class="top">
<th width="109"><img src="img/x.gif" class="img_u06" alt="choose tribe"></th>
<th colspan="2"><img src="img/x.gif" class="img_u07" alt="starting position"></th>
</tr>
<tr>
<td rowspan="5" class="nat">
<label>
<img src="img/rpage/Roman.jpg" alt="Romans" width="87" height="87" longdesc="img" />
<br />
<input class="radio" type="radio" name="vid" value="1" <?php echo $form->getRadio('vid',1); ?>>&nbsp;<?php echo ROMANS; ?>
</label>
</td>
<td width="170" class="btm">&nbsp;</td>
<td width="158" class="btm">&nbsp;</td>
</tr>
<tr>
<td class="pos1"><label><input class="radio" type="radio" name="kid" value="0" checked>&nbsp;<?php echo RANDOM; ?></label></td>
<td width="158" class="btm">&nbsp;</td>
</tr>
<tr>
<td><label><input class="radio" type="radio" name="kid" value="1" <?php echo $form->getRadio('kid',1); ?>>&nbsp;<?php echo NW; ?>&nbsp;<b>(-|+)</b>&nbsp;</label></td>
<td><label><input class="radio" type="radio" name="kid" value="2" <?php echo $form->getRadio('kid',2); ?>>&nbsp;<?php echo NE; ?>&nbsp;<b>(+|+)</b>&nbsp;</label></td>
</tr>
<tr>
<td><label><input class="radio" type="radio" name="kid" value="3" <?php echo $form->getRadio('kid',3); ?>>&nbsp;<?php echo SW; ?>&nbsp;<b>(-|-)</b>&nbsp;</label></td>
<td><label><input class="radio" type="radio" name="kid" value="4" <?php echo $form->getRadio('kid',4); ?>>&nbsp;<?php echo SE; ?>&nbsp;<b>(+|-)</b>&nbsp;</label></td>
</tr>
<tr>
<td class="btm">&nbsp;</td>
<td class="btm">&nbsp;</td>
</tr>
<tr>
<td>
<label>
<img src="img/rpage/Teuton.jpg" alt="Teuton" width="87" height="87" longdesc="img" />
<br />
<input class="radio" type="radio" name="vid" value="2" <?php echo $form->getRadio('vid',2); ?>>&nbsp;<?php echo TEUTONS; ?>
</label>
</td>
<td colspan="2" rowspan="2">
<img src="img/rpage/travian_logo.png" width="219" height="234" longdesc="img" />
</td>
</tr>
<tr>
<td>
<label>
<img src="img/rpage/Gaul.jpg" alt="Gaul" width="87" height="87" longdesc="img" />
<br />
<input class="radio" type="radio" name="vid" value="3" <?php echo $form->getRadio('vid',3); ?>>&nbsp;<?php echo GAULS; ?>
</label>
</td>
</tr>
</tbody>
</table>
<tbody>
<tr class="top">
<th><img src="img/x.gif" class="img_u06" alt="choose tribe"></th>
<th colspan="2"><img src="img/x.gif" class="img_u07" alt="starting position"></th>
</tr>
<tr>
<td class="nat"><label><input class="radio" type="radio" name="vid" value="1" <?php echo $form->getRadio('vid',1); ?>>&nbsp;<?php echo ROMANS; ?></label></td>
&nbsp;<td class="pos1"><label><input class="radio" type="radio" name="kid" value="0" checked>&nbsp;<?php echo RANDOM; ?></label></td>
<td class="pos2">&nbsp;</td>
</tr>
<tr>
<td><label><input class="radio" type="radio" name="vid" value="2" <?php echo $form->getRadio('vid',2); ?>>&nbsp;<?php echo TEUTONS; ?></label></td>
<td><label><input class="radio" type="radio" name="kid" value="1" <?php echo $form->getRadio('kid',1); ?>>&nbsp;<?php echo NW; ?> <b>(-|+)</b>&nbsp;</label></td>
<td><label><input class="radio" type="radio" name="kid" value="2" <?php echo $form->getRadio('kid',2); ?>>&nbsp;<?php echo NE; ?> <b>(+|+)</b></label></td>
</tr>
<tr class="btm">
<td><label><input class="radio" type="radio" name="vid" value="3" <?php echo $form->getRadio('vid',3); ?>>&nbsp;<?php echo GAULS; ?></label></td>
<td><label><input class="radio" type="radio" name="kid" value="3" <?php echo $form->getRadio('kid',3); ?>>&nbsp;<?php echo SW; ?> <b>(-|-)</b></label></td>
<td><label><input class="radio" type="radio" name="kid" value="4" <?php echo $form->getRadio('kid',4); ?>>&nbsp;<?php echo SE; ?> <b>(+|-)</b></label></td>
</tr>
</tbody>
</table>
<ul class="important">
<?php
@@ -178,4 +144,4 @@ if(NEWSBOX3) { include("Templates/News/newsbox3.tpl"); }
<?php include("Templates/footer.tpl"); ?>
<div id="ce"></div>
</body>
</html>
</html>