public static Creature GetCreatureOrPetOrVehicle(WorldObject u, ObjectGuid guid) { if (guid.IsPet()) { return(GetPet(u, guid)); } if (guid.IsCreatureOrVehicle()) { return(GetCreature(u, guid)); } return(null); }
public Unit GetUnit(WorldObject u, ObjectGuid guid) { if (guid.IsPlayer()) { return(GetPlayer(u, guid)); } if (guid.IsPet()) { return(GetPet(u, guid)); } return(GetCreature(u, guid)); }