TrinityCore
Guild Class Reference

#include <Guild.h>

Classes

class  BankEventLogEntry
 
class  BankMoveItemData
 
class  BankTab
 
class  EventLogEntry
 
class  LogEntry
 
class  LogHolder
 
class  Member
 
class  MoveItemData
 
class  NewsLogEntry
 
class  PlayerMoveItemData
 
class  RankInfo
 

Public Member Functions

 Guild ()
 
 ~Guild ()
 
bool Create (Player *pLeader, std::string_view name)
 
void Disband ()
 
void SaveToDB ()
 
ObjectGuid::LowType GetId () const
 
ObjectGuid GetGUID () const
 
ObjectGuid GetLeaderGUID () const
 
std::string const & GetName () const
 
std::string const & GetMOTD () const
 
std::string const & GetInfo () const
 
time_t GetCreatedDate () const
 
uint64 GetBankMoney () const
 
bool SetName (std::string_view name)
 
void HandleRoster (WorldSession *session)
 
void SendQueryResponse (WorldSession *session)
 
void HandleSetAchievementTracking (WorldSession *session, uint32 const *achievementIdsBegin, uint32 const *achievementIdsEnd)
 
void HandleGetAchievementMembers (WorldSession *session, uint32 achievementId) const
 
void HandleSetMOTD (WorldSession *session, std::string_view motd)
 
void HandleSetInfo (WorldSession *session, std::string_view info)
 
void HandleSetEmblem (WorldSession *session, EmblemInfo const &emblemInfo)
 
void HandleSetNewGuildMaster (WorldSession *session, std::string_view name, bool isSelfPromote)
 
void HandleSetBankTabInfo (WorldSession *session, uint8 tabId, std::string_view name, std::string_view icon)
 
void HandleSetMemberNote (WorldSession *session, std::string_view note, ObjectGuid guid, bool isPublic)
 
void HandleSetRankInfo (WorldSession *session, GuildRankId rankId, std::string_view name, uint32 rights, uint32 moneyPerDay, std::array< GuildBankRightsAndSlots, GUILD_BANK_MAX_TABS > const &rightsAndSlots)
 
void HandleBuyBankTab (WorldSession *session, uint8 tabId)
 
void HandleInviteMember (WorldSession *session, std::string_view name)
 
void HandleAcceptMember (WorldSession *session)
 
void HandleLeaveMember (WorldSession *session)
 
void HandleRemoveMember (WorldSession *session, ObjectGuid guid)
 
void HandleUpdateMemberRank (WorldSession *session, ObjectGuid guid, bool demote)
 
void HandleSetMemberRank (WorldSession *session, ObjectGuid guid, ObjectGuid setterGuid, GuildRankOrder rank)
 
void HandleAddNewRank (WorldSession *session, std::string_view name)
 
void HandleRemoveRank (WorldSession *session, GuildRankOrder rankOrder)
 
void HandleShiftRank (WorldSession *session, GuildRankOrder rankOrder, bool shiftUp)
 
void HandleMemberDepositMoney (WorldSession *session, uint64 amount, bool cashFlow=false)
 
bool HandleMemberWithdrawMoney (WorldSession *session, uint64 amount, bool repair=false)
 
void HandleMemberLogout (WorldSession *session)
 
void HandleDelete (WorldSession *session)
 
void HandleGuildPartyRequest (WorldSession *session) const
 
void HandleNewsSetSticky (WorldSession *session, uint32 newsId, bool sticky)
 
void HandleGuildRequestChallengeUpdate (WorldSession *session) const
 
void UpdateMemberData (Player *player, uint8 dataid, uint32 value)
 
void OnPlayerStatusChange (Player *player, uint32 flag, bool state)
 
void SendGuildRankInfo (WorldSession *session) const
 
void SendEventLog (WorldSession *session) const
 
void SendBankLog (WorldSession *session, uint8 tabId) const
 
void SendBankList (WorldSession *session, uint8 tabId, bool fullUpdate) const
 
void SendBankTabText (WorldSession *session, uint8 tabId) const
 
void SendPermissions (WorldSession *session) const
 
void SendMoneyInfo (WorldSession *session) const
 
void SendLoginInfo (WorldSession *session)
 
void SendNewsUpdate (WorldSession *session) const
 
void SendEventAwayChanged (ObjectGuid const &memberGuid, bool afk, bool dnd)
 
void SendEventBankMoneyChanged () const
 
void SendEventMOTD (WorldSession *session, bool broadcast=false) const
 
void SendEventNewLeader (Member *newLeader, Member *oldLeader, bool isSelfPromoted=false) const
 
void SendEventPlayerLeft (Member *leaver, Member *remover=nullptr, bool isRemoved=false) const
 
void SendEventPresenceChanged (WorldSession *session, bool loggedOn, bool broadcast=false) const
 
bool LoadFromDB (Field *fields)
 
void LoadGuildNewsLogFromDB (Field *fields)
 
void LoadRankFromDB (Field *fields)
 
bool LoadMemberFromDB (Field *fields)
 
bool LoadEventLogFromDB (Field *fields)
 
void LoadBankRightFromDB (Field *fields)
 
void LoadBankTabFromDB (Field *fields)
 
bool LoadBankEventLogFromDB (Field *fields)
 
bool LoadBankItemFromDB (Field *fields)
 
bool Validate ()
 
void BroadcastToGuild (WorldSession *session, bool officerOnly, std::string_view msg, uint32 language=LANG_UNIVERSAL) const
 
void BroadcastAddonToGuild (WorldSession *session, bool officerOnly, std::string_view msg, std::string_view prefix, bool isLogged) const
 
void BroadcastPacketToRank (WorldPacket const *packet, GuildRankId rankId) const
 
void BroadcastPacket (WorldPacket const *packet) const
 
void MassInviteToEvent (WorldSession *session, uint32 minLevel, uint32 maxLevel, GuildRankOrder minRank)
 
template<class Do >
void BroadcastWorker (Do &&_do, Player const *except=nullptr) const
 
bool AddMember (CharacterDatabaseTransaction trans, ObjectGuid guid, Optional< GuildRankId > rankId={})
 
bool DeleteMember (CharacterDatabaseTransaction trans, ObjectGuid guid, bool isDisbanding=false, bool isKicked=false)
 
bool ChangeMemberRank (CharacterDatabaseTransaction trans, ObjectGuid guid, GuildRankId newRank)
 
bool IsMember (ObjectGuid guid) const
 
uint32 GetMembersCount () const
 
std::unordered_map< ObjectGuid, Member > const & GetMembers () const
 
uint64 GetMemberAvailableMoneyForRepairItems (ObjectGuid guid) const
 
std::vector< Player * > GetMembersTrackingCriteria (uint32 criteriaId) const
 
void SwapItems (Player *player, uint8 tabId, uint8 slotId, uint8 destTabId, uint8 destSlotId, uint32 splitedAmount)
 
void SwapItemsWithInventory (Player *player, bool toChar, uint8 tabId, uint8 slotId, uint8 playerBag, uint8 playerSlotId, uint32 splitedAmount)
 
void SetBankTabText (uint8 tabId, std::string_view text)
 
GuildAchievementMgrGetAchievementMgr ()
 
GuildAchievementMgr const & GetAchievementMgr () const
 
uint8 GetLevel () const
 
void AddGuildNews (uint8 type, ObjectGuid guid, uint32 flags, uint32 value)
 
EmblemInfo const & GetEmblemInfo () const
 
void ResetTimes (bool weekly)
 
bool HasAchieved (uint32 achievementId) const
 
void UpdateCriteria (CriteriaType type, uint64 miscValue1, uint64 miscValue2, uint64 miscValue3, WorldObject const *ref, Player *player)
 
Trinity::unique_weak_ptr< GuildGetWeakPtr () const
 
void SetWeakPtr (Trinity::unique_weak_ptr< Guild > weakRef)
 
bool HasAnyRankRight (GuildRankId rankId, GuildRankRights rights) const
 
Member const * GetMember (ObjectGuid const &guid) const
 

Static Public Member Functions

static void SendCommandResult (WorldSession *session, GuildCommandType type, GuildCommandError errCode, std::string_view param="")
 
static void SendSaveEmblemResult (WorldSession *session, GuildEmblemError errCode)
 

Protected Attributes

ObjectGuid::LowType m_id
 
std::string m_name
 
ObjectGuid m_leaderGuid
 
std::string m_motd
 
std::string m_info
 
time_t m_createdDate
 
EmblemInfo m_emblemInfo
 
uint32 m_accountsNumber
 
uint64 m_bankMoney
 
std::vector< RankInfom_ranks
 
std::unordered_map< ObjectGuid, Memberm_members
 
std::vector< BankTabm_bankTabs
 
LogHolder< EventLogEntrym_eventLog
 
std::array< LogHolder< BankEventLogEntry >, GUILD_BANK_MAX_TABS+1 > m_bankEventLog = {}
 
LogHolder< NewsLogEntrym_newsLog
 
std::unique_ptr< GuildAchievementMgrm_achievementMgr
 
Trinity::unique_weak_ptr< Guildm_weakRef
 

Private Member Functions

uint8 _GetRanksSize () const
 
RankInfo const * GetRankInfo (GuildRankId rankId) const
 
RankInfoGetRankInfo (GuildRankId rankId)
 
RankInfo const * GetRankInfo (GuildRankOrder rankOrder) const
 
RankInfoGetRankInfo (GuildRankOrder rankOrder)
 
bool _HasRankRight (Player const *player, uint32 right) const
 
GuildRankId _GetLowestRankId () const
 
uint8 _GetPurchasedTabsSize () const
 
BankTabGetBankTab (uint8 tabId)
 
BankTab const * GetBankTab (uint8 tabId) const
 
MemberGetMember (ObjectGuid const &guid)
 
MemberGetMember (std::string_view name)
 
void _CreateNewBankTab ()
 
void _CreateDefaultGuildRanks (CharacterDatabaseTransaction trans, LocaleConstant loc)
 
bool _CreateRank (CharacterDatabaseTransaction trans, std::string_view name, uint32 rights)
 
void _UpdateAccountsNumber ()
 
bool _IsLeader (Player *player) const
 
void _DeleteBankItems (CharacterDatabaseTransaction trans, bool removeItemsFromDB=false)
 
bool _ModifyBankMoney (CharacterDatabaseTransaction trans, uint64 amount, bool add)
 
void _SetLeader (CharacterDatabaseTransaction trans, Member &leader)
 
void _SetRankBankMoneyPerDay (GuildRankId rankId, uint32 moneyPerDay)
 
void _SetRankBankTabRightsAndSlots (GuildRankId rankId, GuildBankRightsAndSlots rightsAndSlots, bool saveToDB=true)
 
int8 _GetRankBankTabRights (GuildRankId rankId, uint8 tabId) const
 
uint32 _GetRankRights (GuildRankId rankId) const
 
uint32 _GetRankBankMoneyPerDay (GuildRankId rankId) const
 
int32 _GetRankBankTabSlotsPerDay (GuildRankId rankId, uint8 tabId) const
 
std::string _GetRankName (GuildRankId rankId) const
 
int32 _GetMemberRemainingSlots (Member const &member, uint8 tabId) const
 
int64 _GetMemberRemainingMoney (Member const &member) const
 
void _UpdateMemberWithdrawSlots (CharacterDatabaseTransaction trans, ObjectGuid guid, uint8 tabId)
 
bool _MemberHasTabRights (ObjectGuid guid, uint8 tabId, int32 rights) const
 
void _LogEvent (GuildEventLogTypes eventType, ObjectGuid::LowType playerGuid1, ObjectGuid::LowType playerGuid2=UI64LIT(0), uint8 newRank=0)
 
void _LogBankEvent (CharacterDatabaseTransaction trans, GuildBankEventLogTypes eventType, uint8 tabId, ObjectGuid::LowType playerGuid, uint64 itemOrMoney, uint16 itemStackCount=0, uint8 destTabId=0)
 
Item_GetItem (uint8 tabId, uint8 slotId) const
 
void _RemoveItem (CharacterDatabaseTransaction trans, uint8 tabId, uint8 slotId)
 
void _MoveItems (MoveItemData *pSrc, MoveItemData *pDest, uint32 splitedAmount) const
 
void _SendBankContentUpdate (MoveItemData *pSrc, MoveItemData *pDest) const
 
void _SendBankContentUpdate (uint8 tabId, SlotIds slots) const
 
void SendGuildRanksUpdate (ObjectGuid setterGuid, ObjectGuid targetGuid, GuildRankId rank)
 

Static Private Member Functions

static void _DeleteMemberFromDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType lowguid)
 
static InventoryResult _DoItemsMove (MoveItemData *pSrc, MoveItemData *pDest, bool sendError, uint32 splitedAmount=0)
 

Detailed Description

Definition at line 328 of file Guild.h.

Constructor & Destructor Documentation

◆ Guild()

Guild::Guild ( )

Definition at line 1119 of file Guild.cpp.

◆ ~Guild()

Guild::~Guild ( )

Definition at line 1129 of file Guild.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ _CreateDefaultGuildRanks()

void Guild::_CreateDefaultGuildRanks ( CharacterDatabaseTransaction  trans,
LocaleConstant  loc 
)
private

Definition at line 3173 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _CreateNewBankTab()

void Guild::_CreateNewBankTab ( )
private

Definition at line 3149 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _CreateRank()

bool Guild::_CreateRank ( CharacterDatabaseTransaction  trans,
std::string_view  name,
uint32  rights 
)
private

Definition at line 3192 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _DeleteBankItems()

void Guild::_DeleteBankItems ( CharacterDatabaseTransaction  trans,
bool  removeItemsFromDB = false 
)
private

Definition at line 3247 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _DeleteMemberFromDB()

void Guild::_DeleteMemberFromDB ( CharacterDatabaseTransaction  trans,
ObjectGuid::LowType  lowguid 
)
staticprivate

Definition at line 3141 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _DoItemsMove()

InventoryResult Guild::_DoItemsMove ( MoveItemData pSrc,
MoveItemData pDest,
bool  sendError,
uint32  splitedAmount = 0 
)
staticprivate

Definition at line 3494 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetItem()

Item * Guild::_GetItem ( uint8  tabId,
uint8  slotId 
) const
inlineprivate

Definition at line 3424 of file Guild.cpp.

+ Here is the call graph for this function:

◆ _GetLowestRankId()

GuildRankId Guild::_GetLowestRankId ( ) const
inlineprivate

Definition at line 914 of file Guild.h.

+ Here is the caller graph for this function:

◆ _GetMemberRemainingMoney()

int64 Guild::_GetMemberRemainingMoney ( Member const &  member) const
inlineprivate

Definition at line 3359 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetMemberRemainingSlots()

int32 Guild::_GetMemberRemainingSlots ( Member const &  member,
uint8  tabId 
) const
inlineprivate

Definition at line 3343 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetPurchasedTabsSize()

uint8 Guild::_GetPurchasedTabsSize ( ) const
inlineprivate

Definition at line 916 of file Guild.h.

+ Here is the caller graph for this function:

◆ _GetRankBankMoneyPerDay()

uint32 Guild::_GetRankBankMoneyPerDay ( GuildRankId  rankId) const
inlineprivate

Definition at line 3321 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetRankBankTabRights()

int8 Guild::_GetRankBankTabRights ( GuildRankId  rankId,
uint8  tabId 
) const
inlineprivate

Definition at line 3336 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetRankBankTabSlotsPerDay()

int32 Guild::_GetRankBankTabSlotsPerDay ( GuildRankId  rankId,
uint8  tabId 
) const
inlineprivate

Definition at line 3328 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetRankName()

std::string Guild::_GetRankName ( GuildRankId  rankId) const
inlineprivate

Definition at line 3307 of file Guild.cpp.

+ Here is the call graph for this function:

◆ _GetRankRights()

uint32 Guild::_GetRankRights ( GuildRankId  rankId) const
inlineprivate

Definition at line 3314 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetRanksSize()

uint8 Guild::_GetRanksSize ( ) const
inlineprivate

Definition at line 904 of file Guild.h.

+ Here is the caller graph for this function:

◆ _HasRankRight()

bool Guild::_HasRankRight ( Player const *  player,
uint32  right 
) const
private

Definition at line 3128 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _IsLeader()

bool Guild::_IsLeader ( Player player) const
private

Definition at line 3238 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _LogBankEvent()

void Guild::_LogBankEvent ( CharacterDatabaseTransaction  trans,
GuildBankEventLogTypes  eventType,
uint8  tabId,
ObjectGuid::LowType  playerGuid,
uint64  itemOrMoney,
uint16  itemStackCount = 0,
uint8  destTabId = 0 
)
private

Definition at line 3403 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _LogEvent()

void Guild::_LogEvent ( GuildEventLogTypes  eventType,
ObjectGuid::LowType  playerGuid1,
ObjectGuid::LowType  playerGuid2 = UI64LIT(0),
uint8  newRank = 0 
)
inlineprivate

Definition at line 3393 of file Guild.cpp.

+ Here is the caller graph for this function:

◆ _MemberHasTabRights()

bool Guild::_MemberHasTabRights ( ObjectGuid  guid,
uint8  tabId,
int32  rights 
) const
inlineprivate

Definition at line 3380 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _ModifyBankMoney()

bool Guild::_ModifyBankMoney ( CharacterDatabaseTransaction  trans,
uint64  amount,
bool  add 
)
private

Definition at line 3255 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _MoveItems()

void Guild::_MoveItems ( MoveItemData pSrc,
MoveItemData pDest,
uint32  splitedAmount 
) const
private

Definition at line 3437 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _RemoveItem()

void Guild::_RemoveItem ( CharacterDatabaseTransaction  trans,
uint8  tabId,
uint8  slotId 
)
inlineprivate

Definition at line 3431 of file Guild.cpp.

+ Here is the call graph for this function:

◆ _SendBankContentUpdate() [1/2]

void Guild::_SendBankContentUpdate ( MoveItemData pSrc,
MoveItemData pDest 
) const
private

Definition at line 3542 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _SendBankContentUpdate() [2/2]

void Guild::_SendBankContentUpdate ( uint8  tabId,
SlotIds  slots 
) const
private

Definition at line 3574 of file Guild.cpp.

+ Here is the call graph for this function:

◆ _SetLeader()

void Guild::_SetLeader ( CharacterDatabaseTransaction  trans,
Member leader 
)
private

Definition at line 3274 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _SetRankBankMoneyPerDay()

void Guild::_SetRankBankMoneyPerDay ( GuildRankId  rankId,
uint32  moneyPerDay 
)
private

Definition at line 3292 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _SetRankBankTabRightsAndSlots()

void Guild::_SetRankBankTabRightsAndSlots ( GuildRankId  rankId,
GuildBankRightsAndSlots  rightsAndSlots,
bool  saveToDB = true 
)
private

Definition at line 3298 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _UpdateAccountsNumber()

void Guild::_UpdateAccountsNumber ( )
private

Definition at line 3225 of file Guild.cpp.

+ Here is the caller graph for this function:

◆ _UpdateMemberWithdrawSlots()

void Guild::_UpdateMemberWithdrawSlots ( CharacterDatabaseTransaction  trans,
ObjectGuid  guid,
uint8  tabId 
)
inlineprivate

Definition at line 3374 of file Guild.cpp.

+ Here is the call graph for this function:

◆ AddGuildNews()

void Guild::AddGuildNews ( uint8  type,
ObjectGuid  guid,
uint32  flags,
uint32  value 
)

Definition at line 3758 of file Guild.cpp.

+ Here is the call graph for this function:

◆ AddMember()

bool Guild::AddMember ( CharacterDatabaseTransaction  trans,
ObjectGuid  guid,
Optional< GuildRankId rankId = {} 
)

Definition at line 2813 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BroadcastAddonToGuild()

void Guild::BroadcastAddonToGuild ( WorldSession session,
bool  officerOnly,
std::string_view  msg,
std::string_view  prefix,
bool  isLogged 
) const

Definition at line 2739 of file Guild.cpp.

+ Here is the call graph for this function:

◆ BroadcastPacket()

void Guild::BroadcastPacket ( WorldPacket const *  packet) const

Definition at line 2763 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BroadcastPacketToRank()

void Guild::BroadcastPacketToRank ( WorldPacket const *  packet,
GuildRankId  rankId 
) const

Definition at line 2755 of file Guild.cpp.

+ Here is the call graph for this function:

◆ BroadcastToGuild()

void Guild::BroadcastToGuild ( WorldSession session,
bool  officerOnly,
std::string_view  msg,
uint32  language = LANG_UNIVERSAL 
) const

Definition at line 2724 of file Guild.cpp.

+ Here is the call graph for this function:

◆ BroadcastWorker()

template<class Do >
void Guild::BroadcastWorker ( Do &&  _do,
Player const *  except = nullptr 
) const
inline

Definition at line 836 of file Guild.h.

+ Here is the caller graph for this function:

◆ ChangeMemberRank()

bool Guild::ChangeMemberRank ( CharacterDatabaseTransaction  trans,
ObjectGuid  guid,
GuildRankId  newRank 
)

Definition at line 3018 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Create()

bool Guild::Create ( Player pLeader,
std::string_view  name 
)

Definition at line 1136 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteMember()

bool Guild::DeleteMember ( CharacterDatabaseTransaction  trans,
ObjectGuid  guid,
bool  isDisbanding = false,
bool  isKicked = false 
)

Definition at line 2955 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Disband()

void Guild::Disband ( )

Definition at line 1197 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAchievementMgr() [1/2]

GuildAchievementMgr & Guild::GetAchievementMgr ( )
inline

Definition at line 862 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetAchievementMgr() [2/2]

GuildAchievementMgr const & Guild::GetAchievementMgr ( ) const
inline

Definition at line 863 of file Guild.h.

◆ GetBankMoney()

uint64 Guild::GetBankMoney ( ) const
inline

Definition at line 759 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetBankTab() [1/2]

BankTab * Guild::GetBankTab ( uint8  tabId)
inlineprivate

Definition at line 917 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetBankTab() [2/2]

BankTab const * Guild::GetBankTab ( uint8  tabId) const
inlineprivate

Definition at line 918 of file Guild.h.

◆ GetCreatedDate()

time_t Guild::GetCreatedDate ( ) const
inline

Definition at line 758 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetEmblemInfo()

EmblemInfo const & Guild::GetEmblemInfo ( ) const
inline

Definition at line 870 of file Guild.h.

◆ GetGUID()

ObjectGuid Guild::GetGUID ( ) const
inline

Definition at line 753 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetId()

ObjectGuid::LowType Guild::GetId ( ) const
inline

Definition at line 752 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetInfo()

std::string const & Guild::GetInfo ( ) const
inline

Definition at line 757 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetLeaderGUID()

ObjectGuid Guild::GetLeaderGUID ( ) const
inline

Definition at line 754 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetLevel()

uint8 Guild::GetLevel ( ) const
inline

Definition at line 866 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetMember() [1/3]

Member * Guild::GetMember ( ObjectGuid const &  guid)
inlineprivate

Definition at line 928 of file Guild.h.

◆ GetMember() [2/3]

Member const * Guild::GetMember ( ObjectGuid const &  guid) const
inline

Definition at line 921 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetMember() [3/3]

Member * Guild::GetMember ( std::string_view  name)
inlineprivate

Definition at line 934 of file Guild.h.

◆ GetMemberAvailableMoneyForRepairItems()

uint64 Guild::GetMemberAvailableMoneyForRepairItems ( ObjectGuid  guid) const

Definition at line 3037 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMembers()

std::unordered_map< ObjectGuid, Member > const & Guild::GetMembers ( ) const
inline

Definition at line 851 of file Guild.h.

◆ GetMembersCount()

uint32 Guild::GetMembersCount ( ) const
inline

Definition at line 850 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetMembersTrackingCriteria()

std::vector< Player * > Guild::GetMembersTrackingCriteria ( uint32  criteriaId) const

Definition at line 2770 of file Guild.cpp.

+ Here is the caller graph for this function:

◆ GetMOTD()

std::string const & Guild::GetMOTD ( ) const
inline

Definition at line 756 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetName()

std::string const & Guild::GetName ( ) const
inline

Definition at line 755 of file Guild.h.

+ Here is the caller graph for this function:

◆ GetRankInfo() [1/4]

Guild::RankInfo * Guild::GetRankInfo ( GuildRankId  rankId)
private

Definition at line 3098 of file Guild.cpp.

◆ GetRankInfo() [2/4]

Guild::Guild::RankInfo const * Guild::GetRankInfo ( GuildRankId  rankId) const
private

Definition at line 3088 of file Guild.cpp.

+ Here is the caller graph for this function:

◆ GetRankInfo() [3/4]

Guild::Guild::RankInfo * Guild::GetRankInfo ( GuildRankOrder  rankOrder)
private

Definition at line 3118 of file Guild.cpp.

◆ GetRankInfo() [4/4]

Guild::Guild::RankInfo const * Guild::GetRankInfo ( GuildRankOrder  rankOrder) const
private

Definition at line 3108 of file Guild.cpp.

◆ GetWeakPtr()

Trinity::unique_weak_ptr< Guild > Guild::GetWeakPtr ( ) const
inline

Definition at line 876 of file Guild.h.

◆ HandleAcceptMember()

void Guild::HandleAcceptMember ( WorldSession session)

Definition at line 1750 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleAddNewRank()

void Guild::HandleAddNewRank ( WorldSession session,
std::string_view  name 
)

Definition at line 1927 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleBuyBankTab()

void Guild::HandleBuyBankTab ( WorldSession session,
uint8  tabId 
)

Hack to force client to update permissions

Definition at line 1637 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleDelete()

void Guild::HandleDelete ( WorldSession session)

Definition at line 2136 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleGetAchievementMembers()

void Guild::HandleGetAchievementMembers ( WorldSession session,
uint32  achievementId 
) const

Definition at line 1464 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleGuildPartyRequest()

void Guild::HandleGuildPartyRequest ( WorldSession session) const

Definition at line 2146 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleGuildRequestChallengeUpdate()

void Guild::HandleGuildRequestChallengeUpdate ( WorldSession session) const
Todo:
current count

Definition at line 2165 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleInviteMember()

void Guild::HandleInviteMember ( WorldSession session,
std::string_view  name 
)

Definition at line 1675 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleLeaveMember()

void Guild::HandleLeaveMember ( WorldSession session)

Definition at line 1761 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleMemberDepositMoney()

void Guild::HandleMemberDepositMoney ( WorldSession session,
uint64  amount,
bool  cashFlow = false 
)

Definition at line 2036 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleMemberLogout()

void Guild::HandleMemberLogout ( WorldSession session)

Definition at line 2122 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleMemberWithdrawMoney()

bool Guild::HandleMemberWithdrawMoney ( WorldSession session,
uint64  amount,
bool  repair = false 
)

Definition at line 2076 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNewsSetSticky()

void Guild::HandleNewsSetSticky ( WorldSession session,
uint32  newsId,
bool  sticky 
)

Definition at line 3786 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleRemoveMember()

void Guild::HandleRemoveMember ( WorldSession session,
ObjectGuid  guid 
)

Definition at line 1791 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleRemoveRank()

void Guild::HandleRemoveRank ( WorldSession session,
GuildRankOrder  rankOrder 
)

Definition at line 1945 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleRoster()

void Guild::HandleRoster ( WorldSession session)

Definition at line 1329 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleSetAchievementTracking()

void Guild::HandleSetAchievementTracking ( WorldSession session,
uint32 const *  achievementIdsBegin,
uint32 const *  achievementIdsEnd 
)

Definition at line 1432 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleSetBankTabInfo()

void Guild::HandleSetBankTabInfo ( WorldSession session,
uint8  tabId,
std::string_view  name,
std::string_view  icon 
)

Definition at line 1578 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleSetEmblem()

void Guild::HandleSetEmblem ( WorldSession session,
EmblemInfo const &  emblemInfo 
)

Definition at line 1511 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleSetInfo()

void Guild::HandleSetInfo ( WorldSession session,
std::string_view  info 
)

Definition at line 1492 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleSetMemberNote()

void Guild::HandleSetMemberNote ( WorldSession session,
std::string_view  note,
ObjectGuid  guid,
bool  isPublic 
)

Definition at line 1597 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleSetMemberRank()

void Guild::HandleSetMemberRank ( WorldSession session,
ObjectGuid  guid,
ObjectGuid  setterGuid,
GuildRankOrder  rank 
)

Definition at line 1890 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleSetMOTD()

void Guild::HandleSetMOTD ( WorldSession session,
std::string_view  motd 
)

Definition at line 1469 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleSetNewGuildMaster()

void Guild::HandleSetNewGuildMaster ( WorldSession session,
std::string_view  name,
bool  isSelfPromote 
)

Definition at line 1531 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleSetRankInfo()

void Guild::HandleSetRankInfo ( WorldSession session,
GuildRankId  rankId,
std::string_view  name,
uint32  rights,
uint32  moneyPerDay,
std::array< GuildBankRightsAndSlots, GUILD_BANK_MAX_TABS > const &  rightsAndSlots 
)

Definition at line 1617 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleShiftRank()

void Guild::HandleShiftRank ( WorldSession session,
GuildRankOrder  rankOrder,
bool  shiftUp 
)

Definition at line 1996 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HandleUpdateMemberRank()

void Guild::HandleUpdateMemberRank ( WorldSession session,
ObjectGuid  guid,
bool  demote 
)

Definition at line 1829 of file Guild.cpp.

+ Here is the call graph for this function:

◆ HasAchieved()

bool Guild::HasAchieved ( uint32  achievementId) const

Definition at line 3776 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasAnyRankRight()

bool Guild::HasAnyRankRight ( GuildRankId  rankId,
GuildRankRights  rights 
) const

Definition at line 3136 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsMember()

bool Guild::IsMember ( ObjectGuid  guid) const

Definition at line 3032 of file Guild.cpp.

+ Here is the caller graph for this function:

◆ LoadBankEventLogFromDB()

bool Guild::LoadBankEventLogFromDB ( Field fields)

Definition at line 2579 of file Guild.cpp.

+ Here is the call graph for this function:

◆ LoadBankItemFromDB()

bool Guild::LoadBankItemFromDB ( Field fields)

Definition at line 2643 of file Guild.cpp.

+ Here is the call graph for this function:

◆ LoadBankRightFromDB()

void Guild::LoadBankRightFromDB ( Field fields)

Definition at line 2554 of file Guild.cpp.

+ Here is the call graph for this function:

◆ LoadBankTabFromDB()

void Guild::LoadBankTabFromDB ( Field fields)

Definition at line 2634 of file Guild.cpp.

+ Here is the call graph for this function:

◆ LoadEventLogFromDB()

bool Guild::LoadEventLogFromDB ( Field fields)

Definition at line 2562 of file Guild.cpp.

◆ LoadFromDB()

bool Guild::LoadFromDB ( Field fields)

Definition at line 2491 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadGuildNewsLogFromDB()

void Guild::LoadGuildNewsLogFromDB ( Field fields)

Definition at line 2619 of file Guild.cpp.

◆ LoadMemberFromDB()

bool Guild::LoadMemberFromDB ( Field fields)

Definition at line 2529 of file Guild.cpp.

+ Here is the call graph for this function:

◆ LoadRankFromDB()

void Guild::LoadRankFromDB ( Field fields)

Definition at line 2520 of file Guild.cpp.

+ Here is the call graph for this function:

◆ MassInviteToEvent()

void Guild::MassInviteToEvent ( WorldSession session,
uint32  minLevel,
uint32  maxLevel,
GuildRankOrder  minRank 
)

Definition at line 2781 of file Guild.cpp.

+ Here is the call graph for this function:

◆ OnPlayerStatusChange()

void Guild::OnPlayerStatusChange ( Player player,
uint32  flag,
bool  state 
)

Definition at line 1300 of file Guild.cpp.

+ Here is the call graph for this function:

◆ ResetTimes()

void Guild::ResetTimes ( bool  weekly)

Definition at line 3745 of file Guild.cpp.

+ Here is the call graph for this function:

◆ SaveToDB()

void Guild::SaveToDB ( )

Definition at line 1268 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendBankList()

void Guild::SendBankList ( WorldSession session,
uint8  tabId,
bool  fullUpdate 
) const

Definition at line 3632 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendBankLog()

void Guild::SendBankLog ( WorldSession session,
uint8  tabId 
) const

Definition at line 2217 of file Guild.cpp.

+ Here is the call graph for this function:

◆ SendBankTabText()

void Guild::SendBankTabText ( WorldSession session,
uint8  tabId 
) const

Definition at line 2240 of file Guild.cpp.

+ Here is the call graph for this function:

◆ SendCommandResult()

void Guild::SendCommandResult ( WorldSession session,
GuildCommandType  type,
GuildCommandError  errCode,
std::string_view  param = "" 
)
static

Definition at line 62 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendEventAwayChanged()

void Guild::SendEventAwayChanged ( ObjectGuid const &  memberGuid,
bool  afk,
bool  dnd 
)

Definition at line 2330 of file Guild.cpp.

+ Here is the call graph for this function:

◆ SendEventBankMoneyChanged()

void Guild::SendEventBankMoneyChanged ( ) const

Definition at line 2353 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendEventLog()

void Guild::SendEventLog ( WorldSession session) const

Definition at line 2184 of file Guild.cpp.

+ Here is the call graph for this function:

◆ SendEventMOTD()

void Guild::SendEventMOTD ( WorldSession session,
bool  broadcast = false 
) const

Definition at line 2360 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendEventNewLeader()

void Guild::SendEventNewLeader ( Member newLeader,
Member oldLeader,
bool  isSelfPromoted = false 
) const

Definition at line 2374 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendEventPlayerLeft()

void Guild::SendEventPlayerLeft ( Member leaver,
Member remover = nullptr,
bool  isRemoved = false 
) const

Definition at line 2416 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendEventPresenceChanged()

void Guild::SendEventPresenceChanged ( WorldSession session,
bool  loggedOn,
bool  broadcast = false 
) const

Definition at line 2473 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendGuildRankInfo()

void Guild::SendGuildRankInfo ( WorldSession session) const

Definition at line 1403 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendGuildRanksUpdate()

void Guild::SendGuildRanksUpdate ( ObjectGuid  setterGuid,
ObjectGuid  targetGuid,
GuildRankId  rank 
)
private

Definition at line 3708 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendLoginInfo()

void Guild::SendLoginInfo ( WorldSession session)

Definition at line 2287 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendMoneyInfo()

void Guild::SendMoneyInfo ( WorldSession session) const

Definition at line 2272 of file Guild.cpp.

+ Here is the call graph for this function:

◆ SendNewsUpdate()

void Guild::SendNewsUpdate ( WorldSession session) const

Definition at line 2199 of file Guild.cpp.

+ Here is the call graph for this function:

◆ SendPermissions()

void Guild::SendPermissions ( WorldSession session) const

Definition at line 2246 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendQueryResponse()

void Guild::SendQueryResponse ( WorldSession session)

Definition at line 1379 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendSaveEmblemResult()

void Guild::SendSaveEmblemResult ( WorldSession session,
GuildEmblemError  errCode 
)
static

Definition at line 74 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBankTabText()

void Guild::SetBankTabText ( uint8  tabId,
std::string_view  text 
)

Definition at line 3075 of file Guild.cpp.

+ Here is the call graph for this function:

◆ SetName()

bool Guild::SetName ( std::string_view  name)

Definition at line 1310 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWeakPtr()

void Guild::SetWeakPtr ( Trinity::unique_weak_ptr< Guild weakRef)
inline

Definition at line 877 of file Guild.h.

+ Here is the caller graph for this function:

◆ SwapItems()

void Guild::SwapItems ( Player player,
uint8  tabId,
uint8  slotId,
uint8  destTabId,
uint8  destSlotId,
uint32  splitedAmount 
)

Definition at line 3047 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SwapItemsWithInventory()

void Guild::SwapItemsWithInventory ( Player player,
bool  toChar,
uint8  tabId,
uint8  slotId,
uint8  playerBag,
uint8  playerSlotId,
uint32  splitedAmount 
)

Definition at line 3061 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateCriteria()

void Guild::UpdateCriteria ( CriteriaType  type,
uint64  miscValue1,
uint64  miscValue2,
uint64  miscValue3,
WorldObject const *  ref,
Player player 
)

Definition at line 3781 of file Guild.cpp.

+ Here is the call graph for this function:

◆ UpdateMemberData()

void Guild::UpdateMemberData ( Player player,
uint8  dataid,
uint32  value 
)

Definition at line 1277 of file Guild.cpp.

+ Here is the call graph for this function:

◆ Validate()

bool Guild::Validate ( )

Definition at line 2656 of file Guild.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_accountsNumber

uint32 Guild::m_accountsNumber
protected

Definition at line 888 of file Guild.h.

◆ m_achievementMgr

std::unique_ptr<GuildAchievementMgr> Guild::m_achievementMgr
protected

Definition at line 899 of file Guild.h.

◆ m_bankEventLog

std::array<LogHolder<BankEventLogEntry>, GUILD_BANK_MAX_TABS + 1> Guild::m_bankEventLog = {}
protected

Definition at line 897 of file Guild.h.

◆ m_bankMoney

uint64 Guild::m_bankMoney
protected

Definition at line 889 of file Guild.h.

◆ m_bankTabs

std::vector<BankTab> Guild::m_bankTabs
protected

Definition at line 893 of file Guild.h.

◆ m_createdDate

time_t Guild::m_createdDate
protected

Definition at line 885 of file Guild.h.

◆ m_emblemInfo

EmblemInfo Guild::m_emblemInfo
protected

Definition at line 887 of file Guild.h.

◆ m_eventLog

LogHolder<EventLogEntry> Guild::m_eventLog
protected

Definition at line 896 of file Guild.h.

◆ m_id

ObjectGuid::LowType Guild::m_id
protected

Definition at line 880 of file Guild.h.

◆ m_info

std::string Guild::m_info
protected

Definition at line 884 of file Guild.h.

◆ m_leaderGuid

ObjectGuid Guild::m_leaderGuid
protected

Definition at line 882 of file Guild.h.

◆ m_members

std::unordered_map<ObjectGuid, Member> Guild::m_members
protected

Definition at line 892 of file Guild.h.

◆ m_motd

std::string Guild::m_motd
protected

Definition at line 883 of file Guild.h.

◆ m_name

std::string Guild::m_name
protected

Definition at line 881 of file Guild.h.

◆ m_newsLog

LogHolder<NewsLogEntry> Guild::m_newsLog
protected

Definition at line 898 of file Guild.h.

◆ m_ranks

std::vector<RankInfo> Guild::m_ranks
protected

Definition at line 891 of file Guild.h.

◆ m_weakRef

Trinity::unique_weak_ptr<Guild> Guild::m_weakRef
protected

Definition at line 901 of file Guild.h.


The documentation for this class was generated from the following files: