mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-14 07:43:44 +00:00
Port fixes until b4094bf - flying, mount animations, bot attack range, free food option
This commit is contained in:
@@ -15,6 +15,14 @@ bool AcceptDuelAction::Execute(Event event)
|
||||
ObjectGuid playerGuid;
|
||||
p >> playerGuid;
|
||||
|
||||
// do not auto duel with low hp
|
||||
if ((!botAI->HasRealPlayerMaster() || (botAI->GetMaster() && botAI->GetMaster()->GetGUID() != playerGuid)) && AI_VALUE2(uint8, "health", "self target") < 90)
|
||||
{
|
||||
WorldPacket packet(CMSG_DUEL_CANCELLED, 8);
|
||||
packet << flagGuid;
|
||||
bot->GetSession()->HandleDuelCancelledOpcode(packet);
|
||||
}
|
||||
|
||||
WorldPacket packet(CMSG_DUEL_ACCEPTED, 8);
|
||||
packet << flagGuid;
|
||||
bot->GetSession()->HandleDuelAcceptedOpcode(packet);
|
||||
|
||||
Reference in New Issue
Block a user