[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)

This commit is contained in:
bashermens
2026-01-19 22:45:28 +01:00
committed by GitHub
parent fd07e02a8a
commit 41c53365ae
1119 changed files with 27 additions and 27 deletions

View File

@@ -0,0 +1,66 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 of the License, or (at your option), any later version.
*/
#include "ReachTargetActions.h"
#include "Event.h"
#include "PlayerbotAIConfig.h"
#include "Playerbots.h"
#include "ServerFacade.h"
bool ReachTargetAction::Execute(Event event) { return ReachCombatTo(AI_VALUE(Unit*, GetTargetName()), distance); }
bool ReachTargetAction::isUseful()
{
// do not move while staying
if (botAI->HasStrategy("stay", botAI->GetState()))
{
return false;
}
// do not move while casting
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr)
{
return false;
}
Unit* target = GetTarget();
// float dis = distance + CONTACT_DISTANCE;
return target &&
!bot->IsWithinCombatRange(target, distance); // sServerFacade->IsDistanceGreaterThan(AI_VALUE2(float,
// "distance", GetTargetName()), distance);
}
std::string const ReachTargetAction::GetTargetName() { return "current target"; }
bool CastReachTargetSpellAction::isUseful()
{
// do not move while staying
if (botAI->HasStrategy("stay", botAI->GetState()))
{
return false;
}
return sServerFacade->IsDistanceGreaterThan(AI_VALUE2(float, "distance", "current target"),
(distance + sPlayerbotAIConfig->contactDistance));
}
ReachSpellAction::ReachSpellAction(PlayerbotAI* botAI)
: ReachTargetAction(botAI, "reach spell", botAI->GetRange("spell"))
{
}
ReachPartyMemberToHealAction::ReachPartyMemberToHealAction(PlayerbotAI* botAI)
: ReachTargetAction(botAI, "reach party member to heal", botAI->GetRange("heal"))
{
}
std::string const ReachPartyMemberToHealAction::GetTargetName() { return "party member to heal"; }
ReachPartyMemberToResurrectAction::ReachPartyMemberToResurrectAction(PlayerbotAI* botAI)
: ReachTargetAction(botAI, "reach party member to resurrect", botAI->GetRange("spell"))
{
}
std::string const ReachPartyMemberToResurrectAction::GetTargetName() { return "party member to resurrect"; }