public void PrintObjectsType(ListBox listBox, ObjectTypeMask mask, CustomFilterMask customMask) { listBox.Items.Clear(); foreach (var pair in objects) { if ((pair.Value.GetType() & mask) != ObjectTypeMask.TYPEMASK_NONE) { continue; } if (customMask != CustomFilterMask.CUSTOM_FILTER_NONE) { var highGUID = (pair.Value.GetGUIDHigh() >> 16); if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_UNITS) && (highGUID == 0xF130 || highGUID == 0xF530)) { continue; } if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_PETS) && (highGUID == 0xF140 || highGUID == 0xF540)) { continue; } if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_VEHICLES) && (highGUID == 0xF150 || highGUID == 0xF550)) { continue; } if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_OBJECTS) && (highGUID == 0xF110 || highGUID == 0xF510)) { continue; } if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_TRANSPORT) && (highGUID == 0xF120 || highGUID == 0xF520)) { continue; } if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_MO_TRANSPORT) && (highGUID == 0x1FC0)) { continue; } } var guid = pair.Key; var type = pair.Value.TypeId; var final = String.Format("{0:X16} {1}", guid, type); listBox.Items.Add(final); } }
public void PrintObjectType(ObjectTypeMask mask, CustomFilterMask customMask) { m_parser.PrintObjectsType(listBox1, mask, customMask); }
public void PrintObjectsType(ListBox listBox, ObjectTypeMask mask, CustomFilterMask customMask) { listBox.Items.Clear(); foreach (var pair in objects) { if ((pair.Value.GetType() & mask) != ObjectTypeMask.TYPEMASK_NONE) continue; if (customMask != CustomFilterMask.CUSTOM_FILTER_NONE) { var highGUID = (pair.Value.GetGUIDHigh() >> 16); if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_UNITS) && (highGUID == 0xF130 || highGUID == 0xF530)) continue; if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_PETS) && (highGUID == 0xF140 || highGUID == 0xF540)) continue; if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_VEHICLES) && (highGUID == 0xF150 || highGUID == 0xF550)) continue; if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_OBJECTS) && (highGUID == 0xF110 || highGUID == 0xF510)) continue; if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_TRANSPORT) && (highGUID == 0xF120 || highGUID == 0xF520)) continue; if (customMask.HasFlag(CustomFilterMask.CUSTOM_FILTER_MO_TRANSPORT) && (highGUID == 0x1FC0)) continue; } var guid = pair.Key; var type = pair.Value.TypeId; var final = String.Format("{0:X16} {1}", guid, type); listBox.Items.Add(final); } }