示例#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));
    }