[Fixes]Instant Construction+Remove Alliance from player stats when leaving

Status
Not open for further replies.
Joined
Jan 1, 2009
Messages
385
Reaction score
20

AdriaN401MasteR - [Fixes]Instant Construction+Remove Alliance from player stats when leaving - RaGEZONE Forums
Because of the speed of your server, some building may have 0 seconds construction time. Well this "fix" will make the construction take 1 second. It well take the maximum from the original construction time and 1 ( so max of 1 and 0 is 1 ).

1. Go to includes/functions/getbuildingtime.php

2. Somewhere at the bottom find:
PHP:
return $time;

3. Replace that with:
PHP:
$time         = max($time ,1);
return $time;

The intergalactic network. If you have problems like research time increasing instead of decreasing, you should try to apply this fix.

1. Go to includes/functions/getbuildingtime.php

2. Find:
PHP:
if ($intergal_lab >= "1") {
                $lablevel = 0;
                for ($lab = 1; $lab <= $intergal_lab; $lab++) {
                    asort($techlevel);
                    $lablevel += $techlevel[$lab - 1];

3. Replate it with:
PHP:
if ($intergal_lab >= 1) {
        $lablevel = 0;
        for ($lab > 1; $lab <= $intergal_lab; $lab++) {
                 asort($techlevel);
             $lablevel += $techlevel[$lab + 1];
Should work now.

I had problems with alliance name staying in statistics (even if update) of a player even if he was kicked, he exited or delete the alliance, so here is the fix for that (tested):

1. Open alliance_admin_members_function.tpl ( thats in templates )

2. Replace all its contents which should be:
PHP:
<a onmouseover="this.T_WIDTH=116;return escape('Virer ce membre');" href="alliance.php?mode=admin&edit=members&kickid={id}" onclick="java script:return confirm('Êtes-vous sûr de vouloir virer ce membre?');"><img src="{dpath}pic/abort.gif" border=0 ></a> <a onmouseover="this.T_WIDTH=98;return escape('Attribuer un rang');" href="alliance.php?mode=admin&edit=members&rank={id}"><img src="{dpath}pic/key.gif" border=0></a>
<script src="scripts/wz_tooltip.js" type="text/javascript"></script>

3. Replace that with:
PHP:
<a onmouseover="this.T_WIDTH=116;return escape('Virer ce membre');" href="alliance.php?mode=admin&edit=members&kick={id}" onclick="java script:return confirm('Are you sure you want to transfer this member?');"><img src="{dpath}pic/abort.gif" border=0 ></a> <a onmouseover="this.T_WIDTH=98;return escape('Assign a rank');" href="alliance.php?mode=admin&edit=members&rank={id}"><img src="{dpath}pic/key.gif" border=0></a>
<script src="scripts/wz_tooltip.js" type="text/javascript"></script>
That's all for today :$:
 
As long you see 0/1 second as a "bug" this could be usefull.
Also im afraid you left some french in your code
Code:
<a onmouseover="this.T_WIDTH=116;return escape('Virer ce membre');....
. Just saying :nerd:
 
Status
Not open for further replies.
Back