Ejemplo n.º 1
0
    // Token: 0x06002C3D RID: 11325 RVA: 0x000A5AE4 File Offset: 0x000A3CE4
    private bool ValidatePrefab()
    {
        if (string.IsNullOrEmpty(this._sleepingAvatarPrefab))
        {
            return(false);
        }
        GameObject gameObject;

        global::NetCull.PrefabSearch prefabSearch = global::NetCull.LoadPrefab(this._sleepingAvatarPrefab, out gameObject);
        if ((int)prefabSearch != 1)
        {
            Debug.LogError(string.Format("sleeping avatar prefab named \"{0}\" resulted in {1} which was not {2}(required)", this.prefab, prefabSearch, global::NetCull.PrefabSearch.NGC));
            return(false);
        }
        IDMain component = gameObject.GetComponent <IDMain>();

        if (!(component is global::SleepingAvatar))
        {
            Debug.LogError(string.Format("Theres no Sleeping avatar on prefab \"{0}\"", this.prefab), gameObject);
            return(false);
        }
        this._hasInventory = component.GetLocal <global::Inventory>();
        global::TakeDamage local = component.GetLocal <global::TakeDamage>();

        this._hasTakeDamage  = local;
        this._takeDamageType = ((!this._hasTakeDamage) ? null : local.GetType());
        return(true);
    }