|
|
@ -588,19 +588,7 @@ bool Units::isMischievous(df::unit *unit)
|
|
|
|
bool Units::isAvailableForAdoption(df::unit* unit)
|
|
|
|
bool Units::isAvailableForAdoption(df::unit* unit)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CHECK_NULL_POINTER(unit);
|
|
|
|
CHECK_NULL_POINTER(unit);
|
|
|
|
auto refs = unit->specific_refs;
|
|
|
|
return unit->flags3.bits.available_for_adoption;
|
|
|
|
for(size_t i=0; i<refs.size(); i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
auto ref = refs[i];
|
|
|
|
|
|
|
|
auto reftype = ref->type;
|
|
|
|
|
|
|
|
if( reftype == df::specific_ref_type::PETINFO_PET )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//df::pet_info* pet = ref->pet;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool Units::isPet(df::unit* unit)
|
|
|
|
bool Units::isPet(df::unit* unit)
|
|
|
|