mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 17:09:08 +00:00
Run clang-format
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it
|
||||
* and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "GuildManagementActions.h"
|
||||
|
||||
#include "GuildMgr.h"
|
||||
#include "GuildPackets.h"
|
||||
#include "Playerbots.h"
|
||||
@@ -38,9 +40,9 @@ Player* GuidManageAction::GetPlayer(Event event)
|
||||
|
||||
Player* master = GetMaster();
|
||||
if (!master)
|
||||
guid = bot->GetTarget();
|
||||
guid = bot->GetTarget();
|
||||
else
|
||||
guid = master->GetTarget();
|
||||
guid = master->GetTarget();
|
||||
|
||||
player = ObjectAccessor::FindPlayer(guid);
|
||||
|
||||
@@ -50,7 +52,7 @@ Player* GuidManageAction::GetPlayer(Event event)
|
||||
player = event.getOwner();
|
||||
|
||||
if (player)
|
||||
return player;
|
||||
return player;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@@ -69,10 +71,7 @@ bool GuidManageAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GuidManageAction::PlayerIsValid(Player* member)
|
||||
{
|
||||
return !member->GetGuildId();
|
||||
}
|
||||
bool GuidManageAction::PlayerIsValid(Player* member) { return !member->GetGuildId(); }
|
||||
|
||||
uint8 GuidManageAction::GetRankId(Player* member)
|
||||
{
|
||||
@@ -90,10 +89,7 @@ void GuildInviteAction::SendPacket(WorldPacket packet)
|
||||
bot->GetSession()->HandleGuildInviteOpcode(data);
|
||||
}
|
||||
|
||||
bool GuildInviteAction::PlayerIsValid(Player* member)
|
||||
{
|
||||
return !member->GetGuildId();
|
||||
}
|
||||
bool GuildInviteAction::PlayerIsValid(Player* member) { return !member->GetGuildId(); }
|
||||
|
||||
bool GuildPromoteAction::isUseful()
|
||||
{
|
||||
@@ -158,7 +154,7 @@ bool GuildManageNearbyAction::Execute(Event event)
|
||||
if (!player || bot == player)
|
||||
continue;
|
||||
|
||||
if (player->GetGuildId()) //Promote or demote nearby members based on chance.
|
||||
if (player->GetGuildId()) // Promote or demote nearby members based on chance.
|
||||
{
|
||||
Guild::Member* member = guild->GetMember(player->GetGUID());
|
||||
uint32 dCount = AI_VALUE(uint32, "death count");
|
||||
@@ -196,12 +192,11 @@ bool GuildManageNearbyAction::Execute(Event event)
|
||||
|
||||
if (botAI)
|
||||
{
|
||||
|
||||
if (botAI->GetGuilderType() == GuilderType::SOLO && !botAI->HasRealPlayerMaster()) //Do not invite solo players.
|
||||
if (botAI->GetGuilderType() == GuilderType::SOLO &&
|
||||
!botAI->HasRealPlayerMaster()) // Do not invite solo players.
|
||||
continue;
|
||||
|
||||
|
||||
if (botAI->HasActivePlayerMaster()) //Do not invite alts of active players.
|
||||
if (botAI->HasActivePlayerMaster()) // Do not invite alts of active players.
|
||||
continue;
|
||||
}
|
||||
else
|
||||
@@ -245,7 +240,4 @@ bool GuildLeaveAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GuildLeaveAction::isUseful()
|
||||
{
|
||||
return bot->GetGuildId();
|
||||
}
|
||||
bool GuildLeaveAction::isUseful() { return bot->GetGuildId(); }
|
||||
|
||||
Reference in New Issue
Block a user