mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Interaction] Set the group inviter as master instead of the group leader
This commit is contained in:
@@ -4,17 +4,24 @@
|
||||
|
||||
#include "AcceptInvitationAction.h"
|
||||
#include "Event.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "PlayerbotAIConfig.h"
|
||||
#include "Playerbots.h"
|
||||
#include "PlayerbotSecurity.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
bool AcceptInvitationAction::Execute(Event event)
|
||||
{
|
||||
Group* grp = bot->GetGroupInvite();
|
||||
if (!grp)
|
||||
return false;
|
||||
WorldPacket packet = event.getPacket();
|
||||
uint8 flag;
|
||||
std::string name;
|
||||
packet >> flag >> name;
|
||||
|
||||
Player* inviter = ObjectAccessor::FindPlayer(grp->GetLeaderGUID());
|
||||
// Player* inviter = ObjectAccessor::FindPlayer(grp->GetLeaderGUID());
|
||||
Player* inviter = ObjectAccessor::FindPlayerByName(name, true);
|
||||
if (!inviter)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user