```cpp ObjectGuid ObjectGuid::HousingSpecific(High...
# master
w
Copy code
cpp
ObjectGuid ObjectGuid::HousingSpecific(HighGuid type, HousingSubType subType, uint32 arg1, uint32 arg2, LowType counter)
{
    uint64 high = (uint64(type) << 58) | (uint64(uint32(subType) & 0x1F) << 53);
    switch (subType)
    {
        case HousingSubType::Decor:
            high |= (uint64(realm.Id.Realm) << 32);     //< RealmID
            high |= uint64(arg1);                       //< HouseDecorID
            break;
        case HousingSubType::Neighborhood:
            high |= (uint64(arg1) << 32);               //< NeighborhoodMapID
            high |= uint64(arg2);                       //< Unknown (always 0 in sniffs)
            break;
        case HousingSubType::RoomComponent:
            high |= uint64(arg1);                       //< HouseRoomID
            break;
        case HousingSubType::House:
            high |= uint64(arg1 & 0x7FFF);              //< NeighborhoodMapID (always 7 for House)
            high |= (uint64(arg2 & 0x3F) << 15);        //< Unknown (always 2 in sniffs)
            break;
    }

    return ObjectGuid(high, counter);
}