예제 #1
0
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;
}
예제 #2
0
bool CStVersionInfo::operator == (CStVersionInfo& _ver)
{
	if( (_ver.GetHigh() == GetHigh()) && (_ver.GetMid() == GetMid()) &&
		(_ver.GetLow() == GetLow()) )
	{
		return true;
	}
	return false;
}
예제 #3
0
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>";
    }
}
예제 #4
0
bool SymTypeSubrange::IsEqualType(Symbol* symbol)
{
	SymTypeSubrange* subrange = dynamic_cast<SymTypeSubrange*>(symbol);
	return subrange != nullptr && GetLow() == subrange->GetLow() && GetHigh() == subrange->GetHigh();
}