TrinityCore
Loading...
Searching...
No Matches
CliHandler Class Reference

#include <Chat.h>

+ Inheritance diagram for CliHandler:

Public Types

using Print = void(void *, std::string_view)
 

Public Member Functions

 CliHandler (void *callbackArg, Print *zprint)
 
char const * GetTrinityString (uint32 entry) const override
 
bool HasPermission (uint32) const override
 
void SendSysMessage (std::string_view, bool escapeCharacters) override
 
bool ParseCommands (std::string_view str) override
 
std::string GetNameLink () const override
 
bool needReportToTarget (Player *chr) const override
 
LocaleConstant GetSessionDbcLocale () const override
 
int GetSessionDbLocaleIndex () const override
 
- Public Member Functions inherited from ChatHandler
bool IsConsole () const
 
WorldSessionGetSession ()
 
WorldSession const * GetSession () const
 
PlayerGetPlayer () const
 
 ChatHandler (WorldSession *session)
 
virtual ~ChatHandler ()
 
void SendSysMessage (uint32 entry)
 
template<typename... Args>
void PSendSysMessage (char const *fmt, Args &&... args)
 
template<typename... Args>
void PSendSysMessage (uint32 entry, Args &&... args)
 
template<typename... Args>
std::string PGetParseString (uint32 entry, Args &&... args) const
 
bool _ParseCommands (std::string_view text)
 
void SendGlobalSysMessage (const char *str)
 
virtual bool IsHumanReadable () const
 
bool HasLowerSecurity (Player *target, ObjectGuid guid, bool strong=false)
 
bool HasLowerSecurityAccount (WorldSession *target, uint32 account, bool strong=false)
 
void SendGlobalGMSysMessage (const char *str)
 
PlayergetSelectedPlayer ()
 
CreaturegetSelectedCreature ()
 
UnitgetSelectedUnit ()
 
WorldObjectgetSelectedObject ()
 
PlayergetSelectedPlayerOrSelf ()
 
char * extractKeyFromLink (char *text, char const *linkType, char **something1=nullptr)
 
char * extractKeyFromLink (char *text, char const *const *linkTypes, int *found_idx, char **something1=nullptr)
 
char * extractQuotedArg (char *args)
 
ObjectGuid::LowType extractLowGuidFromLink (char *text, HighGuid &guidHigh)
 
bool GetPlayerGroupAndGUIDByName (char const *cname, Player *&player, Group *&group, ObjectGuid &guid, bool offline=false)
 
std::string extractPlayerNameFromLink (char *text)
 
bool extractPlayerTarget (char *args, Player **player, ObjectGuid *player_guid=nullptr, std::string *player_name=nullptr)
 
std::string playerLink (std::string const &name) const
 
std::string GetNameLink (Player const *chr) const
 
GameObjectGetNearbyGameObject ()
 
GameObjectGetObjectFromPlayerMapByDbGuid (ObjectGuid::LowType lowguid)
 
CreatureGetCreatureFromPlayerMapByDbGuid (ObjectGuid::LowType lowguid)
 
bool HasSentErrorMessage () const
 
void SetSentErrorMessage (bool val)
 

Private Attributes

void * m_callbackArg
 
Printm_print
 

Additional Inherited Members

- Static Public Member Functions inherited from ChatHandler
static size_t BuildChatPacket (WorldPacket &data, ChatMsg chatType, Language language, ObjectGuid senderGUID, ObjectGuid receiverGUID, std::string_view message, uint8 chatTag, std::string const &senderName="", std::string const &receiverName="", uint32 achievementId=0, bool gmMessage=false, std::string const &channelName="")
 
static size_t BuildChatPacket (WorldPacket &data, ChatMsg chatType, Language language, WorldObject const *sender, WorldObject const *receiver, std::string_view message, uint32 achievementId=0, std::string const &channelName="", LocaleConstant locale=DEFAULT_LOCALE)
 
static char * LineFromMessage (char *&pos)
 
template<typename... Args>
static std::string PGetParseString (std::string_view fmt, Args &&... args)
 
static std::string StringVPrintf (std::string_view messageFormat, fmt::printf_args messageFormatArgs)
 
- Protected Member Functions inherited from ChatHandler
 ChatHandler ()
 

Detailed Description

Definition at line 145 of file Chat.h.

Member Typedef Documentation

◆ Print

using CliHandler::Print = void(void*, std::string_view)

Definition at line 148 of file Chat.h.

Constructor & Destructor Documentation

◆ CliHandler()

CliHandler::CliHandler ( void *  callbackArg,
Print zprint 
)
inlineexplicit

Definition at line 149 of file Chat.h.

Member Function Documentation

◆ GetNameLink()

std::string CliHandler::GetNameLink ( ) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 728 of file Chat.cpp.

+ Here is the call graph for this function:

◆ GetSessionDbcLocale()

LocaleConstant CliHandler::GetSessionDbcLocale ( ) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 782 of file Chat.cpp.

◆ GetSessionDbLocaleIndex()

int CliHandler::GetSessionDbLocaleIndex ( ) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 787 of file Chat.cpp.

◆ GetTrinityString()

char const * CliHandler::GetTrinityString ( uint32  entry) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 707 of file Chat.cpp.

+ Here is the caller graph for this function:

◆ HasPermission()

bool CliHandler::HasPermission ( uint32  ) const
inlineoverridevirtual

Reimplemented from ChatHandler.

Definition at line 153 of file Chat.h.

◆ needReportToTarget()

bool CliHandler::needReportToTarget ( Player chr) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 733 of file Chat.cpp.

◆ ParseCommands()

bool CliHandler::ParseCommands ( std::string_view  str)
overridevirtual

Reimplemented from ChatHandler.

Definition at line 718 of file Chat.cpp.

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

◆ SendSysMessage()

void CliHandler::SendSysMessage ( std::string_view  str,
bool  escapeCharacters 
)
overridevirtual

Reimplemented from ChatHandler.

Definition at line 712 of file Chat.cpp.

Member Data Documentation

◆ m_callbackArg

void* CliHandler::m_callbackArg
private

Definition at line 162 of file Chat.h.

◆ m_print

Print* CliHandler::m_print
private

Definition at line 163 of file Chat.h.


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