mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-23 04:37:16 +00:00
[Bot] Add GetBotOwnerByBotID Method (#2715)
* [Bot] Add GetBotOwnerByBotID Method * Cleanup. * Remove EVENT_DESPAWN exports in Lua. Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
1 parent
0d23ffe5e5
commit
8fe02b5ed1
11 files changed
+107
-10
No files matched your search
@@ -319,6 +319,20 @@ bool BotDatabase::LoadOwnerID(const uint32 bot_id, uint32& owner_id)
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 BotDatabase::GetOwnerID(const uint32 bot_id)
|
||||
{
|
||||
if (!bot_id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const auto& l = BotDataRepository::FindOne(database, bot_id);
|
||||
if (!l.bot_id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return l.owner_id;
|
||||
}
|
||||
|
||||
bool BotDatabase::LoadBotID(const uint32 owner_id, const std::string& bot_name, uint32& bot_id)
|
||||
{
|
||||
if (!owner_id || bot_name.empty()) {
|
||||
|
||||
Reference in new issue
Block a user