Skip to content

Commit

Permalink
NPCBots: Fix CI build 1
Browse files Browse the repository at this point in the history
(cherry picked from commit 24d8460d68b67375f70673300847838afa34f8cf)
  • Loading branch information
trickerer committed Dec 5, 2024
1 parent b44d931 commit 6e18edc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/server/game/AI/NpcBots/bot_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19360,7 +19360,7 @@ WanderNode const* bot_ai::GetNextWanderNode(Position const* fromPos, uint8 lvl,
if (me->IsFFAPvP())
{
ChrRacesEntry const* rentry = sChrRacesStore.LookupEntry(me->GetRace());
faction = (_botclass >= BOT_CLASS_EX_START) ? FACTION_TEMPLATE_NEUTRAL_HOSTILE : rentry ? rentry->FactionID : FACTION_TEMPLATE_NEUTRAL_HOSTILE;
faction = (_botclass >= BOT_CLASS_EX_START) ? uint32(FACTION_TEMPLATE_NEUTRAL_HOSTILE) : rentry ? rentry->FactionID : uint32(FACTION_TEMPLATE_NEUTRAL_HOSTILE);
}

//Node got deleted (or forced)! Select close point and go from there
Expand Down
3 changes: 1 addition & 2 deletions src/server/game/AI/NpcBots/botcommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3371,8 +3371,7 @@ class script_bot_commands : public CommandScript

if (teamid)
{
ChrRacesEntry const* rentry = sChrRacesStore.LookupEntry(race);
uint32 faction = rentry ? rentry->FactionID : FACTION_TEMPLATE_NEUTRAL_HOSTILE;
uint32 faction = BotDataMgr::GetDefaultFactionForBotRace(race);
TeamId team = BotDataMgr::GetTeamIdForFaction(faction);

if (*teamid != uint8(team))
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/AI/NpcBots/botdatamgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3226,7 +3226,7 @@ int32 BotDataMgr::GetBotBaseReputation(Creature const* bot, FactionEntry const*
uint32 BotDataMgr::GetDefaultFactionForBotRace(uint8 bot_race)
{
ChrRacesEntry const* rentry = sChrRacesStore.LookupEntry(bot_race);
return rentry ? rentry->FactionID : FACTION_TEMPLATE_NEUTRAL_HOSTILE;
return rentry ? rentry->FactionID : uint32(FACTION_TEMPLATE_NEUTRAL_HOSTILE);
}

TeamId BotDataMgr::GetTeamIdForFaction(uint32 factionTemplateId)
Expand Down

0 comments on commit 6e18edc

Please sign in to comment.