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)
-   -   Breeding With Other Males [Solved] (http://www.mysidiaadoptables.com/forum/showthread.php?t=5659)

Missy Master 07-07-2020 11:12 PM

Breeding With Other Males [Solved]
 
[Solved!]





I need to allow breeding with other members males, I can't work out how to fix this in Validation, any help would be great :)


The females I want to breed only in their own, but the males I'd like to be able to have available from others.

Micolai 07-08-2020 12:44 PM

Try this thread

Hall of Famer 07-08-2020 02:11 PM

I think she means, breeding pets across users? Like your female pets with a friend's male pets? the easiest way is to use trade feature.

Missy Master 07-09-2020 12:14 PM

I do, and thank you HOF :)

If thats the best way to allow it, we'll go with that!

Hall of Famer 07-09-2020 02:20 PM

Actually its possible to allow trade with friends' pets more easily, I can think of a solution later.

Missy Master 07-14-2020 07:25 PM

Does anyone else know a (hopefully) easy fix to this?

My members (understandably) dont want to hand over one of their pets to someone else, and trust they get it back. They just want to be able to breed with other males.

I have tried to work it out, and nothing works, just that white page we all love comes up.

Really need help on this, people breeding among each other's pets is really a big deal for us.

Tried the Validator and Settings code, a few different ways, removing the 'owner' part in an array, everything I can see to mess with. Still will *show* the other members males, but when we go to breed --- Invalid ID!


Thanks if anyone can work it out :)

Abronsyth 07-16-2020 01:33 PM

Is it only failing to get the ID for other member's males, but working fine for the user's own males?

Missy Master 07-16-2020 08:07 PM

Yep!

Its just for other members pets. Breeding in our own is fine. I know how to get the *list* to show the other ones, finally figured that out, but go to breed and nope :(

Just cannot find it.

There's even a ban that happens sometimes.

Other times, depending on what I mess with, it just does the invalid ID.

Tried all that even looks like it might be for it, in breeding, breedingview, and class_breeding.

Somewhere it's saying ok, NOT your pet, so nope!

Abronsyth 07-18-2020 09:00 AM

To show other males you just edit line 72 in breeding.php to this:
PHP Code:

$stmt $mysidia->db->select("owned_adoptables", array("name""aid"), "gender = 'm' AND currentlevel >= {$settings->level} AND lastbred <= '{$lasttime}'"); 

(I'd personally like to add a section for whether the pet is up for stud or not that's null for female pets automatically, and yes or no for males...)

Then I went into class_breedingvalidator.php and changed private function checkOwner to this:
PHP Code:

private function checkOwner(){
        
$mysidia Registry::get("mysidia");
        if(
$this->female->getOwner() != $mysidia->user->username){
            
banuser($mysidia->user->username);
            throw new 
BreedingException("owner");
        }
        return 
TRUE;
    } 

(removed the part where it does this for males, but left where it checks owner of female)

Now I have no idea if this will work or not because I don't have any other accounts on my test site right now, but you can check it if you want?

Missy Master 07-18-2020 09:48 AM

Wow thank you, I will try this right away!! :)


All times are GMT -5. The time now is 01:52 AM.

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