mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
Impl usefull functions
This commit is contained in:
@@ -7391,6 +7391,20 @@ uint32 Player::GetArenaTeamIdFromStorage(uint32 guid, uint8 slot)
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 Player::GetArenaTeamIdFromDB(uint64 guid, uint8 type)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ARENA_TEAM_ID_BY_PLAYER_GUID);
|
||||
stmt->setUInt32(0, GUID_LOPART(guid));
|
||||
stmt->setUInt8(1, type);
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (!result)
|
||||
return 0;
|
||||
|
||||
uint32 id = (*result)[0].GetUInt32();
|
||||
return id;
|
||||
}
|
||||
|
||||
uint32 Player::GetZoneIdFromDB(uint64 guid)
|
||||
{
|
||||
uint32 guidLow = GUID_LOPART(guid);
|
||||
|
||||
Reference in New Issue
Block a user