View Single Post
  #8  
Old 05-04-2017, 07:49 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 67,980
Dinocanid is on a distinguished road
Default

To get a pet's info from the database, you would need to get the ID of the pet somehow. In the case of items, items get the ID of a pet like this:
Quote:
$adopt->aid
in functions_items.php. (Which is where you define what a certain item does)
I haven't tried, but I'm assuming $adopt->getType(); or $adopt->getType would still work. This is because items already call the pet that it's about to be used on so you don't have to use the whole database call to get it. From there, the code should still work the same.
__________________
Reply With Quote