示例#1
0
 private bool onIglooDataUpdated(IglooServiceEvents.IglooDataUpdated evt)
 {
     if (evt.SignedIglooData.Data.activeLayout == null)
     {
         return(false);
     }
     if (dataEntityCollection.TryGetComponent <SavedIgloosMetaData>(dataEntityCollection.LocalPlayerHandle, out var component))
     {
         IglooData data = evt.SignedIglooData.Data;
         UpdateSavedIgloosMetaDataFromIglooData(data, component);
         foreach (SavedIglooMetaData savedIgloo in component.SavedIgloos)
         {
             if (savedIgloo.LayoutId == data.activeLayoutId)
             {
                 SceneLayoutToSavedIglooMetaData(data.activeLayoutId.Value, data.activeLayout, savedIgloo);
                 savedIgloo.SceneLayout = data.activeLayout;
                 break;
             }
         }
         component.IsDirty = false;
     }
     if (evt.SignedIglooData.Data.activeLayout != null)
     {
         dataEntityCollection.GetComponent <ProfileData>(dataEntityCollection.LocalPlayerHandle).ZoneId.name = evt.SignedIglooData.Data.activeLayout.zoneId;
     }
     return(false);
 }
示例#2
0
 private bool onDataUpdated(IglooServiceEvents.IglooDataUpdated evt)
 {
     eventChannel.RemoveListener <IglooServiceEvents.IglooDataUpdated>(onDataUpdated);
     successCount++;
     checkStatus();
     return(false);
 }
        private bool onIglooDataUpdated(IglooServiceEvents.IglooDataUpdated evt)
        {
            eventChannel.RemoveListener <IglooServiceEvents.IglooDataUpdated>(onIglooDataUpdated);
            SceneLayoutData sceneLayoutData = new SceneLayoutData();

            if (evt.SignedIglooData.Data.activeLayoutId.HasValue)
            {
                layoutManager.UpdateSceneLayoutData(evt.SignedIglooData.Data.activeLayoutId.Value, evt.SignedIglooData.Data.activeLayout, sceneLayoutData);
            }
            else
            {
                Log.LogError(this, "Null layoutId returned, it's possible membership exipired at this point");
                if (layoutManager.HasCachedLayoutData())
                {
                    sceneLayoutData = layoutManager.GetCachedSceneLayoutData();
                }
            }
            logBIForSavingIglooLayout(sceneLayoutData);
            if (updateDataCallback != null)
            {
                updateDataCallback.InvokeSafe(arg1: true, sceneLayoutData);
                updateDataCallback = null;
            }
            return(false);
        }