Пример #1
0
    public static Creature GetCreatureOrPetOrVehicle(WorldObject u, ObjectGuid guid)
    {
        if (guid.IsPet())
        {
            return(GetPet(u, guid));
        }

        if (guid.IsCreatureOrVehicle())
        {
            return(GetCreature(u, guid));
        }

        return(null);
    }
Пример #2
0
    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));
    }