| 3214 | } |
| 3215 | |
| 3216 | Mob* Bot::GetBotTarget(Client* bot_owner) |
| 3217 | { |
| 3218 | Mob* t = GetTarget(); |
| 3219 | |
| 3220 | if (!t || PASSIVE) { |
| 3221 | if (GetTarget()) { |
| 3222 | SetTarget(nullptr); |
| 3223 | } |
| 3224 | |
| 3225 | WipeHateList(); |
| 3226 | SetAttackFlag(false); |
| 3227 | SetAttackingFlag(false); |
| 3228 | |
| 3229 | if (PULLING_BOT || RETURNING_BOT) { |
| 3230 | // 'Flags' should only be set on the bot that is pulling |
| 3231 | SetPullingFlag(false); |
| 3232 | SetReturningFlag(false); |
| 3233 | bot_owner->SetBotPulling(false); |
| 3234 | |
| 3235 | if (GetPet()) { |
| 3236 | GetPet()->SetPetOrder(PetOrder::Follow); |
| 3237 | GetPet()->CastToNPC()->SaveGuardSpot(true); |
| 3238 | } |
| 3239 | } |
| 3240 | |
| 3241 | BotMeditate(IsSitting()); |
| 3242 | } |
| 3243 | |
| 3244 | return t; |
| 3245 | } |
| 3246 | |
| 3247 | bool Bot::TargetValidation(Mob* other) { |
| 3248 | if (GetAppearance() == eaDead || GetHP() < 0) { |
nothing calls this directly
no test coverage detected