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)
-   -   Creating a "Faction" for adoptables/owned adoptables (http://www.mysidiaadoptables.com/forum/showthread.php?t=4423)

Vaporman87 03-04-2014 01:55 PM

Creating a "Faction" for adoptables/owned adoptables
 
Some time ago, I asked about adding a description (that would be created in the ACP during adoptable creation) that would display on the myadopts/stats/ page.

Thanks to you guys, I got that done.

Now I want to add yet another option called "Faction" to be specified during the adoptable creation process in ACP. Only, I need this new option to carry over from the adopts_adoptables table in the database to the adopts_owned_adoptables in the database (whenever someone buys/adopts the adoptable).

So essentially, this new option needs to show up in every table in the database that an adoptable shows up in. Mainly because I am planning to use this new option in a custom battle system I'll be having made.

Any help is welcome!!!

IntoRain 03-04-2014 03:38 PM

If it's already in the adopts_adoptable table, you don't need to carry it over since all OwnedAdoptables inherit all properties from an Adoptable. To the class adoptable, you need to add a new variable $faction to the attribute list (this variable has to have the same name as the one you got in your database, but with a $ behind it) and create a function similar to others in that file to return that $faction (getFaction() ). You can then use the getFaction() on an OwnedAdoptable like that to obtain its faction. Of course with this all OwnedAdoptables of the same species/type will have the same faction


All times are GMT -5. The time now is 05:35 AM.

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