TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Battlenet::RealmHandle Struct Reference

#include <Realm.h>

Public Member Functions

 RealmHandle ()
 
 RealmHandle (uint8 region, uint8 battlegroup, uint32 index)
 
 RealmHandle (uint32 realmAddress)
 
bool operator< (RealmHandle const &r) const
 
uint32 GetAddress () const
 
std::string GetAddressString () const
 
std::string GetSubRegionAddress () const
 

Public Attributes

uint8 Region
 
uint8 Site
 
uint32 Realm
 

Constructor & Destructor Documentation

Battlenet::RealmHandle::RealmHandle ( )
inline
46 : Region(0), Site(0), Realm(0) { }
uint32 Realm
Definition: Realm.h:53
uint8 Region
Definition: Realm.h:51
uint8 Site
Definition: Realm.h:52
Battlenet::RealmHandle::RealmHandle ( uint8  region,
uint8  battlegroup,
uint32  index 
)
inline
48  : Region(region), Site(battlegroup), Realm(index) { }
uint32 Realm
Definition: Realm.h:53
uint8 Region
Definition: Realm.h:51
uint8 Site
Definition: Realm.h:52
Battlenet::RealmHandle::RealmHandle ( uint32  realmAddress)
inline
49 : Region((realmAddress >> 24) & 0xFF), Site((realmAddress >> 16) & 0xFF), Realm(realmAddress & 0xFFFF) { }
uint32 Realm
Definition: Realm.h:53
uint8 Region
Definition: Realm.h:51
uint8 Site
Definition: Realm.h:52

Member Function Documentation

uint32 Battlenet::RealmHandle::GetAddress ( ) const
inline
60 { return (Region << 24) | (Site << 16) | uint16(Realm); }
uint8 Region
Definition: Realm.h:51
Definition: Realm.h:84
uint16_t uint16
Definition: g3dmath.h:166
uint8 Site
Definition: Realm.h:52

+ Here is the caller graph for this function:

std::string Battlenet::RealmHandle::GetAddressString ( ) const
67 {
68  return Trinity::StringFormat("%u-%u-%u", Region, Site, Realm);
69 }
uint8 Region
Definition: Realm.h:51
Definition: Realm.h:84
uint8 Site
Definition: Realm.h:52
std::string StringFormat(Format &&fmt, Args &&...args)
Default TC string format function.
Definition: StringFormat.h:28

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string Battlenet::RealmHandle::GetSubRegionAddress ( ) const
72 {
73  return Trinity::StringFormat("%u-%u-0", Region, Site);
74 }
uint8 Region
Definition: Realm.h:51
uint8 Site
Definition: Realm.h:52
std::string StringFormat(Format &&fmt, Args &&...args)
Default TC string format function.
Definition: StringFormat.h:28

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Battlenet::RealmHandle::operator< ( RealmHandle const r) const
inline
56  {
57  return Realm < r.Realm;
58  }
Definition: Realm.h:84

Member Data Documentation

uint32 Battlenet::RealmHandle::Realm
uint8 Battlenet::RealmHandle::Region
uint8 Battlenet::RealmHandle::Site

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