mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
[MIscs] Equips, avoid aoe tell
This commit is contained in:
@@ -1540,8 +1540,8 @@ bool AvoidAoeAction::AvoidAuraWithDynamicObj()
|
||||
return false;
|
||||
}
|
||||
std::ostringstream name;
|
||||
name << "[" << spellInfo->SpellName[0] << "] (aura)";
|
||||
if (FleePostion(dynOwner->GetPosition(), radius, name.str())) {
|
||||
name << spellInfo->SpellName[0]; // << "] (aura)";
|
||||
if (FleePosition(dynOwner->GetPosition(), radius, name.str())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1591,8 +1591,8 @@ bool AvoidAoeAction::AvoidGameObjectWithDamage()
|
||||
continue;
|
||||
}
|
||||
std::ostringstream name;
|
||||
name << "[" << spellInfo->SpellName[0] << "] (object)";
|
||||
if (FleePostion(go->GetPosition(), radius, name.str())) {
|
||||
name << spellInfo->SpellName[0]; // << "] (object)";
|
||||
if (FleePosition(go->GetPosition(), radius, name.str())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1633,8 +1633,8 @@ bool AvoidAoeAction::AvoidUnitWithDamageAura()
|
||||
break;
|
||||
}
|
||||
std::ostringstream name;
|
||||
name << "[" << triggerSpellInfo->SpellName[0] << "] (unit)";
|
||||
if (FleePostion(unit->GetPosition(), radius, name.str())) {
|
||||
name << triggerSpellInfo->SpellName[0]; //<< "] (unit)";
|
||||
if (FleePosition(unit->GetPosition(), radius, name.str())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1645,7 +1645,7 @@ bool AvoidAoeAction::AvoidUnitWithDamageAura()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AvoidAoeAction::FleePostion(Position pos, float radius, std::string name)
|
||||
bool AvoidAoeAction::FleePosition(Position pos, float radius, std::string name)
|
||||
{
|
||||
Unit* currentTarget = AI_VALUE(Unit*, "current target");
|
||||
std::vector<float> possibleAngles;
|
||||
@@ -1676,7 +1676,7 @@ bool AvoidAoeAction::FleePostion(Position pos, float radius, std::string name)
|
||||
if (MoveTo(bot->GetMapId(), bestPos.GetPositionX(), bestPos.GetPositionY(), bestPos.GetPositionZ(), false, false, true)) {
|
||||
if (sPlayerbotAIConfig->tellWhenAvoidAoe) {
|
||||
std::ostringstream out;
|
||||
out << "Avoiding spell " << name << "...";
|
||||
out << "I'm avoiding " << name << "...";
|
||||
bot->Say(out.str(), LANG_UNIVERSAL);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user