MCPcopy Create free account
hub / github.com/EQEmu/EQEmu / GetBotTarget

Method GetBotTarget

zone/bot.cpp:3216–3245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3214}
3215
3216Mob* 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
3247bool Bot::TargetValidation(Mob* other) {
3248 if (GetAppearance() == eaDead || GetHP() < 0) {

Callers

nothing calls this directly

Calls 4

SetBotPullingMethod · 0.80
SetPetOrderMethod · 0.45
SaveGuardSpotMethod · 0.45
CastToNPCMethod · 0.45

Tested by

no test coverage detected