Skip to content

Commit

Permalink
NPCBots: Prevent possible double spawns after recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
trickerer committed May 22, 2024
1 parent c32aa78 commit 0289fd9
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 @@ -61,6 +61,7 @@ CreatureMovementData::CreatureMovementData() : Ground(CreatureGroundMovementType

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

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

// xinef: this has to be assigned before Create function, properly loads equipment id from DB
m_creatureData = data;
m_spawnId = spawnId;
Expand Down

0 comments on commit 0289fd9

Please sign in to comment.