mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Merge pull request #334 from liyunfan1223/conf-reorder
Reorder config file
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -575,6 +575,13 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje
|
|||||||
return "ERROR: You can not use this command on non-summoned random bot.";
|
return "ERROR: You can not use this command on non-summoned random bot.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!admin) {
|
||||||
|
Player* master = ObjectAccessor::FindConnectedPlayer(masterguid);
|
||||||
|
if (master && (master->IsInCombat() || bot->IsInCombat())) {
|
||||||
|
return "ERROR: You can not use this command during combat.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GET_PLAYERBOT_AI(bot)) {
|
if (GET_PLAYERBOT_AI(bot)) {
|
||||||
if (Player* master = GET_PLAYERBOT_AI(bot)->GetMaster())
|
if (Player* master = GET_PLAYERBOT_AI(bot)->GetMaster())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ bool BGJoinAction::JoinQueue(uint32 type)
|
|||||||
// get BG MapId
|
// get BG MapId
|
||||||
uint32 bgTypeId_ = bgTypeId;
|
uint32 bgTypeId_ = bgTypeId;
|
||||||
uint32 instanceId = 0; // 0 = First Available
|
uint32 instanceId = 0; // 0 = First Available
|
||||||
bool joinAsGroup = bot->GetGroup() && bot->GetGroup()->GetLeaderGUID() == bot->GetGUID();
|
|
||||||
bool isPremade = false;
|
bool isPremade = false;
|
||||||
bool isArena = false;
|
bool isArena = false;
|
||||||
bool isRated = false;
|
bool isRated = false;
|
||||||
@@ -483,6 +483,11 @@ bool BGJoinAction::JoinQueue(uint32 type)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// refresh food/regs
|
||||||
|
sRandomPlayerbotMgr->Refresh(bot);
|
||||||
|
|
||||||
|
bool joinAsGroup = bot->GetGroup() && bot->GetGroup()->GetLeaderGUID() == bot->GetGUID();
|
||||||
|
|
||||||
// in wotlk only arena requires battlemaster guid
|
// in wotlk only arena requires battlemaster guid
|
||||||
ObjectGuid guid = isArena ? unit->GetGUID() : bot->GetGUID();
|
ObjectGuid guid = isArena ? unit->GetGUID() : bot->GetGUID();
|
||||||
|
|
||||||
@@ -546,8 +551,6 @@ bool BGJoinAction::JoinQueue(uint32 type)
|
|||||||
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str(), _bgType.c_str(),
|
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str(), _bgType.c_str(),
|
||||||
isRated ? "Rated Arena" : isArena ? "Arena" : "");
|
isRated ? "Rated Arena" : isArena ? "Arena" : "");
|
||||||
|
|
||||||
// refresh food/regs
|
|
||||||
sRandomPlayerbotMgr->Refresh(bot);
|
|
||||||
|
|
||||||
if (isArena)
|
if (isArena)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user