![]() |
TrinityCore
|
#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 | BroadcastPacketIfTrackingAchievement (WorldPacket const *packet, uint32 criteriaId) const |
void | MassInviteToEvent (WorldSession *session, uint32 minLevel, uint32 maxLevel, GuildRankOrder minRank) |
template<class Do > | |
void | BroadcastWorker (Do &_do, Player *except=nullptr) |
bool | AddMember (CharacterDatabaseTransaction trans, ObjectGuid guid, Optional< GuildRankId > rankId={}) |
void | DeleteMember (CharacterDatabaseTransaction trans, ObjectGuid guid, bool isDisbanding=false, bool isKicked=false, bool canDeleteGuild=false) |
bool | ChangeMemberRank (CharacterDatabaseTransaction trans, ObjectGuid guid, GuildRankId newRank) |
bool | IsMember (ObjectGuid guid) const |
uint32 | GetMembersCount () const |
uint64 | GetMemberAvailableMoneyForRepairItems (ObjectGuid guid) 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) |
GuildAchievementMgr & | GetAchievementMgr () |
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) |
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< RankInfo > | m_ranks |
std::unordered_map< ObjectGuid, Member > | m_members |
std::vector< BankTab > | m_bankTabs |
LogHolder< EventLogEntry > | m_eventLog |
std::array< LogHolder< BankEventLogEntry >, GUILD_BANK_MAX_TABS+1 > | m_bankEventLog = {} |
LogHolder< NewsLogEntry > | m_newsLog |
std::unique_ptr< GuildAchievementMgr > | m_achievementMgr |
Static Private Member Functions | |
static void | _DeleteMemberFromDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType lowguid) |
static InventoryResult | _DoItemsMove (MoveItemData *pSrc, MoveItemData *pDest, bool sendError, uint32 splitedAmount=0) |
Guild::Guild | ( | ) |
Definition at line 1114 of file Guild.cpp.
Guild::~Guild | ( | ) |
Definition at line 1124 of file Guild.cpp.
|
private |
Definition at line 3030 of file Guild.cpp.
|
private |
Definition at line 3006 of file Guild.cpp.
|
private |
Definition at line 3049 of file Guild.cpp.
|
private |
Definition at line 3104 of file Guild.cpp.
|
staticprivate |
Definition at line 2998 of file Guild.cpp.
|
staticprivate |
Definition at line 3351 of file Guild.cpp.
|
inlineprivate |
Definition at line 3216 of file Guild.cpp.
Definition at line 3200 of file Guild.cpp.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
Definition at line 3260 of file Guild.cpp.
|
inlineprivate |
Definition at line 3250 of file Guild.cpp.
|
inlineprivate |
|
private |
Definition at line 3112 of file Guild.cpp.
|
private |
Definition at line 3294 of file Guild.cpp.
|
inlineprivate |
|
private |
Definition at line 3399 of file Guild.cpp.
Definition at line 3431 of file Guild.cpp.
|
private |
Definition at line 3131 of file Guild.cpp.
|
private |
|
private |
|
private |
Definition at line 3082 of file Guild.cpp.
|
inlineprivate |
void Guild::AddGuildNews | ( | uint8 | type, |
ObjectGuid | guid, | ||
uint32 | flags, | ||
uint32 | value | ||
) |
Definition at line 3597 of file Guild.cpp.
bool Guild::AddMember | ( | CharacterDatabaseTransaction | trans, |
ObjectGuid | guid, | ||
Optional< GuildRankId > | rankId = {} |
||
) |
Definition at line 2732 of file Guild.cpp.
void Guild::BroadcastAddonToGuild | ( | WorldSession * | session, |
bool | officerOnly, | ||
std::string_view | msg, | ||
std::string_view | prefix, | ||
bool | isLogged | ||
) | const |
Definition at line 2661 of file Guild.cpp.
void Guild::BroadcastPacket | ( | WorldPacket const * | packet | ) | const |
void Guild::BroadcastPacketIfTrackingAchievement | ( | WorldPacket const * | packet, |
uint32 | criteriaId | ||
) | const |
void Guild::BroadcastPacketToRank | ( | WorldPacket const * | packet, |
GuildRankId | rankId | ||
) | const |
void Guild::BroadcastToGuild | ( | WorldSession * | session, |
bool | officerOnly, | ||
std::string_view | msg, | ||
uint32 | language = LANG_UNIVERSAL |
||
) | const |
Definition at line 2646 of file Guild.cpp.
|
inline |
bool Guild::ChangeMemberRank | ( | CharacterDatabaseTransaction | trans, |
ObjectGuid | guid, | ||
GuildRankId | newRank | ||
) |
bool Guild::Create | ( | Player * | pLeader, |
std::string_view | name | ||
) |
Definition at line 1131 of file Guild.cpp.
void Guild::DeleteMember | ( | CharacterDatabaseTransaction | trans, |
ObjectGuid | guid, | ||
bool | isDisbanding = false , |
||
bool | isKicked = false , |
||
bool | canDeleteGuild = false |
||
) |
Definition at line 2823 of file Guild.cpp.
void Guild::Disband | ( | ) |
Definition at line 1192 of file Guild.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
uint64 Guild::GetMemberAvailableMoneyForRepairItems | ( | ObjectGuid | guid | ) | const |
Definition at line 2899 of file Guild.cpp.
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
void Guild::HandleAcceptMember | ( | WorldSession * | session | ) |
Definition at line 1724 of file Guild.cpp.
void Guild::HandleAddNewRank | ( | WorldSession * | session, |
std::string_view | name | ||
) |
Definition at line 1906 of file Guild.cpp.
void Guild::HandleBuyBankTab | ( | WorldSession * | session, |
uint8 | tabId | ||
) |
Hack to force client to update permissions
Definition at line 1611 of file Guild.cpp.
void Guild::HandleDelete | ( | WorldSession * | session | ) |
void Guild::HandleGetAchievementMembers | ( | WorldSession * | session, |
uint32 | achievementId | ||
) | const |
Definition at line 1438 of file Guild.cpp.
void Guild::HandleGuildPartyRequest | ( | WorldSession * | session | ) | const |
Definition at line 2126 of file Guild.cpp.
void Guild::HandleGuildRequestChallengeUpdate | ( | WorldSession * | session | ) | const |
Definition at line 2145 of file Guild.cpp.
void Guild::HandleInviteMember | ( | WorldSession * | session, |
std::string_view | name | ||
) |
Definition at line 1649 of file Guild.cpp.
void Guild::HandleLeaveMember | ( | WorldSession * | session | ) |
Definition at line 1735 of file Guild.cpp.
void Guild::HandleMemberDepositMoney | ( | WorldSession * | session, |
uint64 | amount, | ||
bool | cashFlow = false |
||
) |
Definition at line 2015 of file Guild.cpp.
void Guild::HandleMemberLogout | ( | WorldSession * | session | ) |
Definition at line 2101 of file Guild.cpp.
bool Guild::HandleMemberWithdrawMoney | ( | WorldSession * | session, |
uint64 | amount, | ||
bool | repair = false |
||
) |
Definition at line 2055 of file Guild.cpp.
void Guild::HandleNewsSetSticky | ( | WorldSession * | session, |
uint32 | newsId, | ||
bool | sticky | ||
) |
Definition at line 3619 of file Guild.cpp.
void Guild::HandleRemoveMember | ( | WorldSession * | session, |
ObjectGuid | guid | ||
) |
Definition at line 1770 of file Guild.cpp.
void Guild::HandleRemoveRank | ( | WorldSession * | session, |
GuildRankOrder | rankOrder | ||
) |
Definition at line 1924 of file Guild.cpp.
void Guild::HandleRoster | ( | WorldSession * | session | ) |
Definition at line 1305 of file Guild.cpp.
void Guild::HandleSetAchievementTracking | ( | WorldSession * | session, |
uint32 const * | achievementIdsBegin, | ||
uint32 const * | achievementIdsEnd | ||
) |
Definition at line 1406 of file Guild.cpp.
void Guild::HandleSetBankTabInfo | ( | WorldSession * | session, |
uint8 | tabId, | ||
std::string_view | name, | ||
std::string_view | icon | ||
) |
Definition at line 1552 of file Guild.cpp.
void Guild::HandleSetEmblem | ( | WorldSession * | session, |
EmblemInfo const & | emblemInfo | ||
) |
Definition at line 1485 of file Guild.cpp.
void Guild::HandleSetInfo | ( | WorldSession * | session, |
std::string_view | info | ||
) |
Definition at line 1466 of file Guild.cpp.
void Guild::HandleSetMemberNote | ( | WorldSession * | session, |
std::string_view | note, | ||
ObjectGuid | guid, | ||
bool | isPublic | ||
) |
Definition at line 1571 of file Guild.cpp.
void Guild::HandleSetMemberRank | ( | WorldSession * | session, |
ObjectGuid | guid, | ||
ObjectGuid | setterGuid, | ||
GuildRankOrder | rank | ||
) |
Definition at line 1869 of file Guild.cpp.
void Guild::HandleSetMOTD | ( | WorldSession * | session, |
std::string_view | motd | ||
) |
Definition at line 1443 of file Guild.cpp.
void Guild::HandleSetNewGuildMaster | ( | WorldSession * | session, |
std::string_view | name, | ||
bool | isSelfPromote | ||
) |
Definition at line 1505 of file Guild.cpp.
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 1591 of file Guild.cpp.
void Guild::HandleShiftRank | ( | WorldSession * | session, |
GuildRankOrder | rankOrder, | ||
bool | shiftUp | ||
) |
Definition at line 1975 of file Guild.cpp.
void Guild::HandleUpdateMemberRank | ( | WorldSession * | session, |
ObjectGuid | guid, | ||
bool | demote | ||
) |
Definition at line 1808 of file Guild.cpp.
bool Guild::HasAchieved | ( | uint32 | achievementId | ) | const |
Definition at line 3609 of file Guild.cpp.
bool Guild::IsMember | ( | ObjectGuid | guid | ) | const |
bool Guild::LoadBankEventLogFromDB | ( | Field * | fields | ) |
Definition at line 2496 of file Guild.cpp.
bool Guild::LoadBankItemFromDB | ( | Field * | fields | ) |
void Guild::LoadBankRightFromDB | ( | Field * | fields | ) |
Definition at line 2471 of file Guild.cpp.
void Guild::LoadBankTabFromDB | ( | Field * | fields | ) |
Definition at line 2551 of file Guild.cpp.
bool Guild::LoadEventLogFromDB | ( | Field * | fields | ) |
Definition at line 2479 of file Guild.cpp.
bool Guild::LoadFromDB | ( | Field * | fields | ) |
Definition at line 2408 of file Guild.cpp.
void Guild::LoadGuildNewsLogFromDB | ( | Field * | fields | ) |
Definition at line 2536 of file Guild.cpp.
bool Guild::LoadMemberFromDB | ( | Field * | fields | ) |
Definition at line 2446 of file Guild.cpp.
void Guild::LoadRankFromDB | ( | Field * | fields | ) |
void Guild::MassInviteToEvent | ( | WorldSession * | session, |
uint32 | minLevel, | ||
uint32 | maxLevel, | ||
GuildRankOrder | minRank | ||
) |
Definition at line 2700 of file Guild.cpp.
void Guild::ResetTimes | ( | bool | weekly | ) |
Definition at line 3584 of file Guild.cpp.
void Guild::SaveToDB | ( | ) |
Definition at line 1244 of file Guild.cpp.
void Guild::SendBankList | ( | WorldSession * | session, |
uint8 | tabId, | ||
bool | fullUpdate | ||
) | const |
Definition at line 3489 of file Guild.cpp.
void Guild::SendBankLog | ( | WorldSession * | session, |
uint8 | tabId | ||
) | const |
Definition at line 2194 of file Guild.cpp.
void Guild::SendBankTabText | ( | WorldSession * | session, |
uint8 | tabId | ||
) | const |
|
static |
Definition at line 57 of file Guild.cpp.
void Guild::SendEventAwayChanged | ( | ObjectGuid const & | memberGuid, |
bool | afk, | ||
bool | dnd | ||
) |
Definition at line 2307 of file Guild.cpp.
void Guild::SendEventBankMoneyChanged | ( | ) | const |
Definition at line 2330 of file Guild.cpp.
void Guild::SendEventLog | ( | WorldSession * | session | ) | const |
Definition at line 2164 of file Guild.cpp.
void Guild::SendEventMOTD | ( | WorldSession * | session, |
bool | broadcast = false |
||
) | const |
Definition at line 2337 of file Guild.cpp.
void Guild::SendEventNewLeader | ( | Member * | newLeader, |
Member * | oldLeader, | ||
bool | isSelfPromoted = false |
||
) | const |
Definition at line 2351 of file Guild.cpp.
void Guild::SendEventPlayerLeft | ( | Member * | leaver, |
Member * | remover = nullptr , |
||
bool | isRemoved = false |
||
) | const |
Definition at line 2372 of file Guild.cpp.
void Guild::SendEventPresenceChanged | ( | WorldSession * | session, |
bool | loggedOn, | ||
bool | broadcast = false |
||
) | const |
Definition at line 2390 of file Guild.cpp.
void Guild::SendGuildRankInfo | ( | WorldSession * | session | ) | const |
Definition at line 1377 of file Guild.cpp.
|
private |
Definition at line 3565 of file Guild.cpp.
void Guild::SendLoginInfo | ( | WorldSession * | session | ) |
Definition at line 2264 of file Guild.cpp.
void Guild::SendMoneyInfo | ( | WorldSession * | session | ) | const |
Definition at line 2249 of file Guild.cpp.
void Guild::SendNewsUpdate | ( | WorldSession * | session | ) | const |
Definition at line 2179 of file Guild.cpp.
void Guild::SendPermissions | ( | WorldSession * | session | ) | const |
Definition at line 2223 of file Guild.cpp.
void Guild::SendQueryResponse | ( | WorldSession * | session | ) |
Definition at line 1353 of file Guild.cpp.
|
static |
Definition at line 69 of file Guild.cpp.
void Guild::SetBankTabText | ( | uint8 | tabId, |
std::string_view | text | ||
) |
Definition at line 2937 of file Guild.cpp.
bool Guild::SetName | ( | std::string_view | name | ) |
Definition at line 1286 of file Guild.cpp.
void Guild::SwapItems | ( | Player * | player, |
uint8 | tabId, | ||
uint8 | slotId, | ||
uint8 | destTabId, | ||
uint8 | destSlotId, | ||
uint32 | splitedAmount | ||
) |
Definition at line 2909 of file Guild.cpp.
void Guild::SwapItemsWithInventory | ( | Player * | player, |
bool | toChar, | ||
uint8 | tabId, | ||
uint8 | slotId, | ||
uint8 | playerBag, | ||
uint8 | playerSlotId, | ||
uint32 | splitedAmount | ||
) |
Definition at line 2923 of file Guild.cpp.
void Guild::UpdateCriteria | ( | CriteriaType | type, |
uint64 | miscValue1, | ||
uint64 | miscValue2, | ||
uint64 | miscValue3, | ||
WorldObject const * | ref, | ||
Player * | player | ||
) |
Definition at line 3614 of file Guild.cpp.
Definition at line 1253 of file Guild.cpp.
bool Guild::Validate | ( | ) |
Definition at line 2573 of file Guild.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |