bugs in the destroyer officer
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
-
not on 2moons. this feature never existed, maybe on 1.3 below, but for ages destroyer never had this feature.
-
you can edit 'public static function getElementPrice'(line65) in includes\classes\class.BuildFunctions.php
after line 99($price[$resType] *= $elementLevel;) you can add something like this.
if($Element == 218 && $USER['rpg_destructeur'] > 0){
$price[$resType] = $price[$resType] * 0.5;
}
this tests if the element ist the deathstar and if the destroyer is more then level 0. then it makes the price the half. -
-
puso el código como me dijo así
y no hace nadaVERY SAD -
Why not using the BuildAuftr method in shipyard file?
You could easily do something like
if($USER[‘nameOfOfficer’] > 0 && $shipId == 218) and if it’s true you double the build amount before serializing the array to b_hangar_id in planets database table.
I could not test it because I’m not home yet but but I’m pretty sure it’s working -
lo que necesito es que no me cree el bug y me duplique la cantidad de recursos el metodo puede ser cuelquiera saludos y graciasVERY SAD
-
XenQen wrote:
if($USER[‘nameOfOfficer’] > 0 && $shipId == 218)
VERY SAD -
yamilrh wrote:
Gracias mister ahora viene lo otro, faltaría el código para que cuando tu cancelaras te descuente el 60% de los recursos, porque de lo contrario crea un bug y te duplica el doble de los recursos. saludos y gracias
canceling shipbuild deathstar ->
(ShowShipyardPage.class.php)2moons requests the price of the deathstar->
(class.BuildFunctions.php)the price is halfed cause of the officer ->
(ShowShipyardPage.class.php)then the haled price is reduced to 60% of itself. -
mimikri wrote:
this is already included
VERY SAD -
im sorry, i gave you the wrong id. change 218 to 214
and go to the adminpanel and clear the gamecache after the change. -
VERY SAD
-
cambiando de la 214 -218 me dio este error cuando visite el hangar
Source Code
- Message: Undefined variable: resType
- File: /includes/classes/class.BuildFunctions.php
- Line: 214
- URL: https://dominio/xnova/game.php?page=shipyard&mode=fleet
- PHP-Version: 7.2.10
- PHP-API: fpm-fcgi
- 2Moons Version: 1.8.git
- Debug Backtrace:
- #0 /includes/classes/class.BuildFunctions.php(214): errorHandler(8, 'Undefined varia...', 'FILEPATH ...', 214, Array)
- #1 /includes/pages/game/ShowShipyardPage.class.php(240): BuildFunctions::getMaxConstructibleElements(Array, Array, '202', Array)
- #2 /game.php(57): ShowShipyardPage->show()
- #3 {main}
VERY SAD -
replace
with
PHP Source Code: includes\classes\class.BuildFunctions.php
-
no pincha, no crea 2 estrellas por el precio de unaVERY SAD
-
-
Perfecto, eres un dios xD!!... se puediera hacer para que mostrará el precio correcto o sea la mitad del original si tienes el destructor y si no lo tiene que muestre el precio original... disculpa las molestiasVERY SAD
-
-
me sigue mostrando el precio original
5.000.000 Metal
4.000.000 Cristal
1.000.000 Deuterio
VERY SAD -
yamilrh wrote:
Hola tengo un problema el oficial destructor deveria funcionar hacer 2 estrella de la muerte por el precio de 1 y resulta que no esta pinchando. saludos, veron 1.8 en adelante
yamilrh wrote:
me sigue mostrando el precio original
5.000.000 Metal
4.000.000 Cristal
1.000.000 Deuterio
-
Share
- Facebook 0
- Twitter 0
- Google Plus 0
- Reddit 0