471 std::string targetName;
477 ObjectGuid parseGUID = ObjectGuid::Create<HighGuid::Player>(strtoull(args,
nullptr, 10));
482 targetGuid = parseGUID;
492 Field* fields = queryResult->Fetch();
495 std::string nameLink = handler->
playerLink(targetName);
507 Field* queryFields = queryResult->Fetch();
510 std::string sender = queryFields[2].
GetString();
512 std::string receiver = queryFields[4].
GetString();
513 std::string subject = queryFields[5].
GetString();
521 std::string receiverStr = handler->
playerLink(receiver);
522 std::string senderStr = handler->
playerLink(sender);
535 uint32 item_guid = (*result2)[0].GetUInt32();
543 Field* fields3 = result3->Fetch();
547 result4 =
WorldDatabase.
PQuery(
"SELECT name, quality FROM item_template WHERE entry = '%u'", item_entry);
548 Field* fields1 = result4->Fetch();
549 std::string item_name = fields1[0].
GetString();
550 int item_quality = fields1[1].
GetUInt8();
554 std::ostringstream itemStr;
555 itemStr <<
"|c" <<
std::hex << color <<
"|Hitem:" << item_entry <<
":0:0:0:0:0:0:0:0:0|h[" << item_name <<
"]|h|r";
561 while (result3->NextRow());
564 while (result2->NextRow());
569 while (queryResult->NextRow());
Definition: SharedDefines.h:231
Definition: Language.h:956
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
uint64 GetUInt64() const
Definition: Field.h:184
IntFormatSpec< int, TypeSpec<'x'> > hex(int value)
QueryResult PQuery(Format &&sql, T *conn, Args &&...args)
Definition: DatabaseWorkerPool.h:165
Definition: Language.h:958
Class used to access individual fields of database query result.
Definition: Field.h:56
arena_t NULL
Definition: jemalloc_internal.h:624
WorldDatabaseWorkerPool WorldDatabase
Accessor to the world database.
Definition: DatabaseEnv.cpp:20
uint64 LowType
Definition: ObjectGuid.h:199
bool extractPlayerTarget(char *args, Player **player, ObjectGuid *player_guid=NULL, std::string *player_name=NULL)
Definition: Chat.cpp:945
Definition: PreparedStatement.h:74
uint8 GetUInt8() const
Definition: Field.h:70
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
Definition: CharacterDatabase.h:48
Definition: CharacterDatabase.h:49
uint32_t uint32
Definition: Define.h:150
uint64_t uint64
Definition: Define.h:149
std::shared_ptr< ResultSet > QueryResult
Definition: QueryResult.h:61
std::string TimeToTimestampStr(time_t t)
Definition: Util.cpp:195
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
Definition: Language.h:955
Definition: SharedDefines.h:232
static bool GetPlayerNameByGUID(ObjectGuid const &guid, std::string &name)
Definition: ObjectMgr.cpp:2258
Definition: CharacterDatabase.h:50
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
Definition: Language.h:959
uint32 GetUInt32() const
Definition: Field.h:146
const uint32 ItemQualityColors[MAX_ITEM_QUALITY]
Definition: SharedDefines.h:338
void setUInt64(const uint8 index, const uint64 value)
Definition: PreparedStatement.cpp:124
WorldSession * GetSession()
Definition: Chat.h:59
uint8_t uint8
Definition: Define.h:152
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
void PSendSysMessage(const char *fmt, Args &&...args)
Definition: Chat.h:72
Definition: ObjectGuid.h:189
Definition: Language.h:881
std::string GetString() const
Definition: Field.h:276
std::string ToString() const
Definition: ObjectGuid.cpp:99
std::string playerLink(std::string const &name) const
Definition: Chat.h:132
Definition: Language.h:957
Definition: Language.h:954
LowType GetCounter() const
Definition: ObjectGuid.h:221