Fix for BotDatabase::LoadBotGroupIDForLoadBotGroup() failures when more than one bot-group exists and requested bg is not primary in retrieval order

This commit is contained in:
Uleat 2016-04-11 23:08:27 -04:00
parent daeec0f5ec
commit 89f46144e6
2 changed files with 2 additions and 1 deletions

View File

@ -6228,6 +6228,7 @@ bool Bot::DoFinishedSpellSingleTarget(uint16 spell_id, Mob* spellTarget, uint16
if((spelltypeequal || spelltypetargetequal) || spelltypeclassequal || slotequal) {
if(((spells[thespell].effectid[0] == 0) && (spells[thespell].base[0] < 0)) &&
(spellTarget->GetHP() < ((spells[thespell].base[0] * (-1)) + 100))) {
Log.Out(Logs::General, Logs::Spells, "Bot::DoFinishedSpellSingleTarget - GroupBuffing failure");
return false;
}

View File

@ -2322,7 +2322,7 @@ bool BotDatabase::LoadBotGroupIDForLoadBotGroup(const uint32 owner_id, const std
if (!owner_id || group_name.empty())
return false;
query = StringFormat("SELECT `groups_index`, `group_name` FROM `vw_bot_groups` WHERE `owner_id` = '%u' LIMIT 1", owner_id);
query = StringFormat("SELECT `groups_index`, `group_name` FROM `vw_bot_groups` WHERE `owner_id` = '%u'", owner_id);
auto results = QueryDatabase(query);
if (!results.Success())
return false;