mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
trainer learn command
This commit is contained in:
@@ -89,11 +89,15 @@ bool TrainerAction::Execute(Event event)
|
||||
Player* master = GetMaster();
|
||||
|
||||
Creature* creature = botAI->GetCreature(bot->GetTarget());
|
||||
if (AI_VALUE(GuidPosition, "rpg target") != bot->GetTarget())
|
||||
if (master)
|
||||
creature = botAI->GetCreature(master->GetTarget());
|
||||
else
|
||||
return false;
|
||||
|
||||
if (master) {
|
||||
creature = master->GetSelectedUnit() ? master->GetSelectedUnit()->ToCreature() : nullptr;
|
||||
}
|
||||
// if (AI_VALUE(GuidPosition, "rpg target") != bot->GetTarget())
|
||||
// if (master)
|
||||
// creature = botAI->GetCreature(master->GetTarget());
|
||||
// else
|
||||
// return false;
|
||||
|
||||
if (!creature || !creature->IsTrainer())
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user