[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)

This commit is contained in:
bashermens
2026-01-19 22:45:28 +01:00
committed by GitHub
parent fd07e02a8a
commit 41c53365ae
1119 changed files with 27 additions and 27 deletions

View File

@@ -0,0 +1,57 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 of the License, or (at your option), any later version.
*/
#include "ArenaTeamActions.h"
#include "ArenaTeamMgr.h"
#include "Playerbots.h"
bool ArenaTeamAcceptAction::Execute(Event event)
{
WorldPacket p(event.getPacket());
p.rpos(0);
Player* inviter = nullptr;
std::string Invitedname;
p >> Invitedname;
if (normalizePlayerName(Invitedname))
inviter = ObjectAccessor::FindPlayerByName(Invitedname.c_str());
if (!inviter)
return false;
ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(bot->GetArenaTeamIdInvited());
if (!at)
return false;
bool accept = true;
if (bot->GetArenaTeamId(at->GetSlot()))
{
// bot is already in an arena team
bot->Say("Sorry, I am already in such team", LANG_UNIVERSAL);
accept = false;
}
if (accept)
{
WorldPacket data(CMSG_ARENA_TEAM_ACCEPT);
bot->GetSession()->HandleArenaTeamAcceptOpcode(data);
bot->Say("Thanks for the invite!", LANG_UNIVERSAL);
LOG_INFO("playerbots", "Bot {} <{}> accepts Arena Team invite", bot->GetGUID().ToString().c_str(),
bot->GetName().c_str());
return true;
}
else
{
WorldPacket data(CMSG_ARENA_TEAM_DECLINE);
bot->GetSession()->HandleArenaTeamDeclineOpcode(data);
LOG_INFO("playerbots", "Bot {} <{}> declines Arena Team invite", bot->GetGUID().ToString().c_str(),
bot->GetName().c_str());
return false;
}
return false;
}