mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
fix(Core/Travel): Hoist AiObjectContext* context in GetNodeRoute so PortalNode injection blocks see it
This commit is contained in:
parent
ea69b56829
commit
1c12d8ff3e
@ -1423,13 +1423,12 @@ TravelNodeRoute TravelNodeMap::GetNodeRoute(TravelNode* start, TravelNode* goal,
|
||||
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
|
||||
if (botAI)
|
||||
{
|
||||
AiObjectContext* context = botAI->GetAiObjectContext();
|
||||
|
||||
if (botAI->HasCheat(BotCheatMask::gold))
|
||||
startStub->currentGold = 10000000;
|
||||
else
|
||||
{
|
||||
AiObjectContext* context = botAI->GetAiObjectContext();
|
||||
startStub->currentGold = AI_VALUE2(uint32, "free money for", (uint32)NeedMoneyFor::travel);
|
||||
}
|
||||
|
||||
// Hearthstone (item 6948 / spell 8690): inject a synthetic
|
||||
// teleport edge from start to the node nearest the bot's
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user