mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-05 03:43:50 +00:00
Remove some annoying emotes
This commit is contained in:
@@ -1984,11 +1984,6 @@ bool PlayerbotAI::CastSpell(uint32 spellId, Unit* target, Item* itemTarget)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!urand(0, 50) && bot->IsInCombat())
|
|
||||||
{
|
|
||||||
PlaySound(RAND(TEXT_EMOTE_OPENFIRE, TEXT_EMOTE_CHARGE, TEXT_EMOTE_ATTACKMYTARGET));
|
|
||||||
}
|
|
||||||
|
|
||||||
WaitForSpellCast(spell);
|
WaitForSpellCast(spell);
|
||||||
aiObjectContext->GetValue<LastSpellCast&>("last spell cast")->Get().Set(spellId, target->GetGUID(), time(nullptr));
|
aiObjectContext->GetValue<LastSpellCast&>("last spell cast")->Get().Set(spellId, target->GetGUID(), time(nullptr));
|
||||||
aiObjectContext->GetValue<PositionMap&>("position")->Get()["random"].Reset();
|
aiObjectContext->GetValue<PositionMap&>("position")->Get()["random"].Reset();
|
||||||
@@ -2119,14 +2114,6 @@ bool PlayerbotAI::CastSpell(uint32 spellId, float x, float y, float z, Item* ite
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!urand(0, 50) && bot->IsInCombat() && HasStrategy("emote", BOT_STATE_NON_COMBAT))
|
|
||||||
{
|
|
||||||
std::vector<uint32> sounds;
|
|
||||||
sounds.push_back(TEXT_EMOTE_OPENFIRE);
|
|
||||||
sounds.push_back(305);
|
|
||||||
sounds.push_back(307);
|
|
||||||
PlayEmote(sounds[urand(0, sounds.size() - 1)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
WaitForSpellCast(spell);
|
WaitForSpellCast(spell);
|
||||||
aiObjectContext->GetValue<LastSpellCast&>("last spell cast")->Get().Set(spellId, bot->GetGUID(), time(nullptr));
|
aiObjectContext->GetValue<LastSpellCast&>("last spell cast")->Get().Set(spellId, bot->GetGUID(), time(nullptr));
|
||||||
|
|||||||
@@ -111,15 +111,6 @@ bool AttackAction::Attack(Unit* target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!urand(0, 300) && botAI->HasStrategy("emote", BOT_STATE_NON_COMBAT))
|
|
||||||
{
|
|
||||||
std::vector<uint32> sounds;
|
|
||||||
sounds.push_back(TEXT_EMOTE_OPENFIRE);
|
|
||||||
sounds.push_back(305);
|
|
||||||
sounds.push_back(307);
|
|
||||||
botAI->PlayEmote(sounds[urand(0, sounds.size() - 1)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IsMovingAllowed() && !bot->HasInArc(CAST_ANGLE_IN_FRONT, target))
|
if (IsMovingAllowed() && !bot->HasInArc(CAST_ANGLE_IN_FRONT, target))
|
||||||
bot->SetFacingToObject(target);
|
bot->SetFacingToObject(target);
|
||||||
|
|
||||||
|
|||||||
@@ -86,24 +86,6 @@ bool DropTargetAction::Execute(Event event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!urand(0, 50) && botAI->HasStrategy("emote", BOT_STATE_NON_COMBAT))
|
|
||||||
{
|
|
||||||
std::vector<uint32> sounds;
|
|
||||||
if (target && target->isDead())
|
|
||||||
{
|
|
||||||
sounds.push_back(TEXT_EMOTE_CHEER);
|
|
||||||
sounds.push_back(TEXT_EMOTE_CONGRATULATE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sounds.push_back(304); // guard
|
|
||||||
sounds.push_back(325); // stay
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sounds.empty())
|
|
||||||
botAI->PlayEmote(sounds[urand(0, sounds.size() - 1)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1081,17 +1081,6 @@ bool MovementAction::Flee(Unit *target)
|
|||||||
{
|
{
|
||||||
foundFlee = MoveNear(master);
|
foundFlee = MoveNear(master);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foundFlee)
|
|
||||||
{
|
|
||||||
if (!urand(0, 50) && botAI->HasStrategy("emote", BOT_STATE_NON_COMBAT))
|
|
||||||
{
|
|
||||||
std::vector<uint32> sounds;
|
|
||||||
sounds.push_back(304); // guard
|
|
||||||
sounds.push_back(306); // flee
|
|
||||||
botAI->PlayEmote(sounds[urand(0, sounds.size() - 1)]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // bot is not targeted, try to flee dps/healers
|
else // bot is not targeted, try to flee dps/healers
|
||||||
@@ -1166,16 +1155,6 @@ bool MovementAction::Flee(Unit *target)
|
|||||||
foundFlee = MoveNear(master);
|
foundFlee = MoveNear(master);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foundFlee)
|
|
||||||
{
|
|
||||||
if (!urand(0, 50) && botAI->HasStrategy("emote", BOT_STATE_NON_COMBAT))
|
|
||||||
{
|
|
||||||
std::vector<uint32> sounds;
|
|
||||||
sounds.push_back(304); // guard
|
|
||||||
sounds.push_back(306); // flee
|
|
||||||
botAI->PlayEmote(sounds[urand(0, sounds.size() - 1)]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1208,13 +1187,6 @@ bool MovementAction::Flee(Unit *target)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool result = MoveTo(target->GetMapId(), rx, ry, rz);
|
bool result = MoveTo(target->GetMapId(), rx, ry, rz);
|
||||||
if (result && !urand(0, 50) && botAI->HasStrategy("emote", BOT_STATE_NON_COMBAT))
|
|
||||||
{
|
|
||||||
std::vector<uint32> sounds;
|
|
||||||
sounds.push_back(304); // guard
|
|
||||||
sounds.push_back(306); // flee
|
|
||||||
botAI->PlayEmote(sounds[urand(0, sounds.size() - 1)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
AI_VALUE(LastMovement&, "last movement").lastFlee = time(nullptr);
|
AI_VALUE(LastMovement&, "last movement").lastFlee = time(nullptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user