bool Character::InRange(Character *other) { if(this->house == this->mapid && other->mapid == this->house && !other->nowhere && this->player->id != other->player->id) { return false; } if (this->nowhere || other->nowhere) { return false; } return this->InRange(other->x, other->y); } bool Character::InRange(NPC *other) { if(this->house == this->mapid) { return false; } if (this->nowhere) { return false; } return this->InRange(other->x, other->y); } bool Character::InRange(Map_Item *other) { if(this->house == this->mapid && other->owner != this->player->id) { return false; } if (this->nowhere) { return false; } return this->InRange(other->x, other->y); }