Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Hide egg gender (http://www.mysidiaadoptables.com/forum/showthread.php?t=5345)

SilverDragonTears 01-21-2017 10:26 AM

Hide egg gender
 
How would I go about hiding the egg's gender?

IntoRain 01-21-2017 10:45 AM

You can go to class_ownedadoptable.php and modify the getGender() function to, for example, hide the gender when the adopt is under a certain level. Something like this:

PHP Code:

public function getGender($fetchMode ""){
        
    
$showGenderAtLevel 1;
        
    if(
$this->currentlevel $showGenderAtLevel) {
        
//don't show gender
        
if($fetchMode == Model::GUI) return new Image("picuploads/NO_GENDER.png");//or whatever your image for unknown gender is
        
else return "Unknown";
    }
    else {
        
//show gender
        
if($fetchMode == Model::GUI) return new Image("picuploads/{$this->gender}.png");
        else return 
$this->gender;
    }    
        



SilverDragonTears 01-21-2017 12:36 PM

Brilliant! Thank you :)


All times are GMT -5. The time now is 05:07 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.