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
43186dac42
commit
ccfcb1dfb0
@ -1423,13 +1423,12 @@ TravelNodeRoute TravelNodeMap::GetNodeRoute(TravelNode* start, TravelNode* goal,
|
|||||||
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
|
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
|
||||||
if (botAI)
|
if (botAI)
|
||||||
{
|
{
|
||||||
|
AiObjectContext* context = botAI->GetAiObjectContext();
|
||||||
|
|
||||||
if (botAI->HasCheat(BotCheatMask::gold))
|
if (botAI->HasCheat(BotCheatMask::gold))
|
||||||
startStub->currentGold = 10000000;
|
startStub->currentGold = 10000000;
|
||||||
else
|
else
|
||||||
{
|
|
||||||
AiObjectContext* context = botAI->GetAiObjectContext();
|
|
||||||
startStub->currentGold = AI_VALUE2(uint32, "free money for", (uint32)NeedMoneyFor::travel);
|
startStub->currentGold = AI_VALUE2(uint32, "free money for", (uint32)NeedMoneyFor::travel);
|
||||||
}
|
|
||||||
|
|
||||||
// Hearthstone (item 6948 / spell 8690): inject a synthetic
|
// Hearthstone (item 6948 / spell 8690): inject a synthetic
|
||||||
// teleport edge from start to the node nearest the bot's
|
// teleport edge from start to the node nearest the bot's
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user