Skip to content

Commit

Permalink
-Mount fix: Bots now use a random mount or mountspell of the highest …
Browse files Browse the repository at this point in the history
…speed available.
  • Loading branch information
mostlikely4r committed May 9, 2023
1 parent df7a440 commit b5a38c8
Show file tree
Hide file tree
Showing 10 changed files with 381 additions and 265 deletions.
1 change: 1 addition & 0 deletions playerbot/ChatHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace ai
static uint32 parseSlot(string text);

static string formatSpell(SpellEntry const *sInfo);
static string formatSpell(uint32 spellId) {const SpellEntry* const spellInfo = sSpellTemplate.LookupEntry<SpellEntry>(spellId); if (!spellInfo) return ""; return formatSpell(spellInfo);};
uint32 parseSpell(string& text);

static string formatGameobject(GameObject* go);
Expand Down
3 changes: 3 additions & 0 deletions playerbot/strategy/ItemVisitors.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ namespace ai
{
for (int j = 0; j < MAX_ITEM_PROTO_SPELLS; j++)
{
if (proto->Spells[j].SpellId == 26656)
return true;

const SpellEntry* const spellInfo = sServerFacade.LookupSpellInfo(proto->Spells[j].SpellId);
if (!spellInfo)
return false;
Expand Down
2 changes: 1 addition & 1 deletion playerbot/strategy/actions/CastCustomSpellAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bool CastCustomSpellAction::Execute(Event& event)
ai->StopMoving();
}

if (CheckMountStateAction::CurrentMountSpeed(bot))
if (AI_VALUE2(uint32, "current mount speed", "self target"))
{
if (bot->IsFlying() && WorldPosition(bot).currentHeight() > 10.0f)
return false;
Expand Down
Loading

0 comments on commit b5a38c8

Please sign in to comment.