mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Merge branch 'master' into eots-fixes
This commit is contained in:
@@ -859,6 +859,21 @@ void MovementAction::UpdateMovementState()
|
||||
|
||||
if (bot->IsFlying())
|
||||
bot->UpdateSpeed(MOVE_FLIGHT, true);
|
||||
|
||||
Transport* newTransport = bot->GetMap()->GetTransportForPos(bot->GetPhaseMask(), bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ(), bot);
|
||||
if (newTransport != bot->GetTransport())
|
||||
{
|
||||
LOG_DEBUG("playerbots", "Bot {} is on a transport", bot->GetName());
|
||||
|
||||
if (bot->GetTransport())
|
||||
bot->GetTransport()->RemovePassenger(bot, true);
|
||||
|
||||
if (newTransport)
|
||||
newTransport->AddPassenger(bot, true);
|
||||
|
||||
bot->StopMovingOnCurrentPos();
|
||||
}
|
||||
|
||||
// Temporary speed increase in group
|
||||
//if (botAI->HasRealPlayerMaster())
|
||||
//bot->SetSpeedRate(MOVE_RUN, 1.1f);
|
||||
@@ -1565,7 +1580,7 @@ bool AvoidAoeAction::AvoidAuraWithDynamicObj()
|
||||
return false;
|
||||
}
|
||||
std::ostringstream name;
|
||||
name << spellInfo->SpellName[sWorld->GetDefaultDbcLocale()]; // << "] (aura)";
|
||||
name << spellInfo->SpellName[LOCALE_enUS]; // << "] (aura)";
|
||||
if (FleePosition(dynOwner->GetPosition(), radius)) {
|
||||
if (sPlayerbotAIConfig->tellWhenAvoidAoe && lastTellTimer < time(NULL) - 10) {
|
||||
lastTellTimer = time(NULL);
|
||||
@@ -1605,7 +1620,7 @@ bool AvoidAoeAction::AvoidGameObjectWithDamage()
|
||||
continue;
|
||||
}
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (spellInfo->IsPositive()) {
|
||||
if (!spellInfo || spellInfo->IsPositive()) {
|
||||
continue;
|
||||
}
|
||||
float radius = (float)goInfo->trap.diameter / 2;
|
||||
@@ -1623,7 +1638,7 @@ bool AvoidAoeAction::AvoidGameObjectWithDamage()
|
||||
continue;
|
||||
}
|
||||
std::ostringstream name;
|
||||
name << spellInfo->SpellName[sWorld->GetDefaultDbcLocale()]; // << "] (object)";
|
||||
name << spellInfo->SpellName[LOCALE_enUS]; // << "] (object)";
|
||||
if (FleePosition(go->GetPosition(), radius)) {
|
||||
if (sPlayerbotAIConfig->tellWhenAvoidAoe && lastTellTimer < time(NULL) - 10) {
|
||||
lastTellTimer = time(NULL);
|
||||
@@ -1672,7 +1687,7 @@ bool AvoidAoeAction::AvoidUnitWithDamageAura()
|
||||
break;
|
||||
}
|
||||
std::ostringstream name;
|
||||
name << triggerSpellInfo->SpellName[sWorld->GetDefaultDbcLocale()]; //<< "] (unit)";
|
||||
name << triggerSpellInfo->SpellName[LOCALE_enUS]; //<< "] (unit)";
|
||||
if (FleePosition(unit->GetPosition(), radius)) {
|
||||
if (sPlayerbotAIConfig->tellWhenAvoidAoe && lastTellTimer < time(NULL) - 10) {
|
||||
lastTellTimer = time(NULL);
|
||||
|
||||
Reference in New Issue
Block a user