Skip to content

Commit

Permalink
NPCBots: Prevent possible double spawns after recent changes
Browse files Browse the repository at this point in the history
(cherry picked from commit 0289fd97dccb689e750c0780bbdd7e4c539667e9)

# Conflicts:
#	src/server/game/Entities/Creature/Creature.cpp
  • Loading branch information
trickerer committed May 22, 2024
1 parent ba4cedf commit 15385ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/server/game/Entities/Creature/Creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Random(CreatureRandomMovementType::Walk), InteractionPauseTimer(sWorld->getIntCo

//npcbot
#include "bot_ai.h"
#include "botdatamgr.h"
#include "botmgr.h"
#include "bpet_ai.h"
//end npcbot
Expand Down Expand Up @@ -1711,6 +1712,11 @@ bool Creature::LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap,
return false;
}

//npcbot
if (BotDataMgr::SelectNpcBotData(data->id))
return false;
//end npcbot

m_spawnId = spawnId;

m_respawnCompatibilityMode = ((data->spawnGroupData->flags & SPAWNGROUP_FLAG_COMPATIBILITY_MODE) != 0);
Expand Down

0 comments on commit 15385ee

Please sign in to comment.