wstring CStVersionInfo::GetVersionString() { #if !defined(TARGET_OS_MAC) wchar_t ver[MAX_PATH]; swprintf_s(ver, MAX_PATH, L"%03d.%03d.%03d", GetHigh(), GetMid(), GetLow()); #else char ver[256]; //! \todo Figure out a clean way to handle the max path length. snprintf(ver, sizeof(ver)-sizeof(char), "%03d.%03d.%03d", GetHigh(), GetMid(), GetLow()); #endif return ver; }
bool CStVersionInfo::operator == (CStVersionInfo& _ver) { if( (_ver.GetHigh() == GetHigh()) && (_ver.GetMid() == GetMid()) && (_ver.GetLow() == GetLow()) ) { return true; } return false; }
char const* ObjectGuid::GetTypeName() const { switch(GetHigh()) { case HIGHGUID_ITEM: return "item"; case HIGHGUID_PLAYER: return !IsEmpty() ? "player" : "none"; case HIGHGUID_GAMEOBJECT: return "gameobject"; case HIGHGUID_TRANSPORT: return "transport"; case HIGHGUID_UNIT: return "creature"; case HIGHGUID_PET: return "pet"; case HIGHGUID_DYNAMICOBJECT:return "dynobject"; case HIGHGUID_CORPSE: return "corpse"; case HIGHGUID_MO_TRANSPORT: return "mo_transport"; default: return "<unknown>"; } }
bool SymTypeSubrange::IsEqualType(Symbol* symbol) { SymTypeSubrange* subrange = dynamic_cast<SymTypeSubrange*>(symbol); return subrange != nullptr && GetLow() == subrange->GetLow() && GetHigh() == subrange->GetHigh(); }