91 std::string playerName;
102 playerClass = player->getClass();
103 playerName = player->GetName();
107 playerName = characterInfo->Name;
108 playerClass = characterInfo->Class;
114 if ((player && player->GetArenaTeamId(
GetSlot())) || Player::GetArenaTeamIdFromDB(playerGuid,
GetType()) != 0)
116 TC_LOG_DEBUG(
"bg.arena",
"Arena: %s %s already has an arena team of type %u", playerGuid.ToString().c_str(), playerName.c_str(),
GetType());
121 uint32 personalRating = 0;
126 personalRating = 1000;
130 stmt->
setUInt64(0, playerGuid.GetCounter());
136 matchMakerRating = (*result)[0].GetUInt16();
146 newMember.
Name = playerName;
147 newMember.
Guid = playerGuid;
148 newMember.
Class = playerClass;
161 stmt->
setUInt64(1, playerGuid.GetCounter());
168 player->SetArenaTeamIdInvited(0);
172 player->SetArenaTeamInfoField(
GetSlot(), ARENA_TEAM_MEMBER, 1);
175 TC_LOG_DEBUG(
"bg.arena",
"Player: %s [%s] joined arena team type: %u [Id: %u, Name: %s].", playerName.c_str(), playerGuid.ToString().c_str(),
GetType(),
GetId(),
GetName().c_str());
size_t GetMembersSize() const
Definition: ArenaTeam.h:141
void Execute(const char *sql)
Definition: DatabaseWorkerPool.h:87
uint16 PersonalRating
Definition: ArenaTeam.h:93
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
uint8 Class
Definition: ArenaTeam.h:88
uint32 GetType() const
Definition: ArenaTeam.h:125
uint16 MatchMakerRating
Definition: ArenaTeam.h:94
std::string const & GetName() const
Definition: ArenaTeam.h:130
Definition: CharacterDatabase.h:153
void setUInt8(const uint8 index, const uint8 value)
Definition: PreparedStatement.cpp:97
uint16 WeekWins
Definition: ArenaTeam.h:90
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
#define sWorld
Definition: World.h:887
uint16 WeekGames
Definition: ArenaTeam.h:89
Definition: PreparedStatement.h:74
uint32 GetRating() const
Definition: ArenaTeam.h:133
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
ObjectGuid CaptainGuid
Definition: ArenaTeam.h:184
uint32 GetId() const
Definition: ArenaTeam.h:124
MemberList Members
Definition: ArenaTeam.h:192
uint32_t uint32
Definition: Define.h:150
Definition: CharacterDatabase.h:252
uint16 SeasonGames
Definition: ArenaTeam.h:91
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
ObjectGuid Guid
Definition: ArenaTeam.h:86
TeamId
Definition: SharedDefines.h:990
void setUInt32(const uint8 index, const uint32 value)
Definition: PreparedStatement.cpp:115
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
uint16 SeasonWins
Definition: ArenaTeam.h:92
void setUInt64(const uint8 index, const uint64 value)
Definition: PreparedStatement.cpp:124
uint8 GetSlot() const
Definition: ArenaTeam.h:126
uint8_t uint8
Definition: Define.h:152
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
std::string Name
Definition: ArenaTeam.h:87
Definition: ArenaTeam.h:84