public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style) { switch (method) { case PlayFabAPIMethods.MakePurchase: // refresh after purchase. if (PF_PlayerData.activeCharacter == null) { PF_PlayerData.GetUserAccountInfo(); } else { PF_PlayerData.GetCharacterInventory(PF_PlayerData.activeCharacter.characterDetails.CharacterId); } break; case PlayFabAPIMethods.GetCharacterInventory: DialogCanvasController.RequestStore(this.StoreName.text); break; case PlayFabAPIMethods.GetAccountInfo: DialogCanvasController.RequestStore(this.StoreName.text); break; } }
public void RefreshInventory() { if (this.activeMode == InventoryMode.Character) { PF_PlayerData.GetUserInventory(); DialogCanvasController.RequestInventoryPrompt(null, this.activeFilter, this.showTransUi, FloatingInventoryController.InventoryMode.Character); } else { PF_PlayerData.GetCharacterInventory(PF_PlayerData.activeCharacter.characterDetails.CharacterId); DialogCanvasController.RequestInventoryPrompt(null, this.activeFilter, this.showTransUi, FloatingInventoryController.InventoryMode.Player); } }
/// <summary> /// Raises the retrieve quest items success event. /// </summary> /// <param name="result">Result.</param> private static void OnRetrieveQuestItemsSuccess(ExecuteCloudScriptResult result) { if (!PF_Bridge.VerifyErrorFreeCloudScriptResult(result)) { return; } //Debug.Log(result.ToString()); QuestProgress.ItemsGranted = PlayFab.Json.JsonWrapper.DeserializeObject <List <ItemGrantResult> >(result.FunctionResult.ToString()); PF_GamePlay.QuestProgress.areItemsAwarded = true; PF_PlayerData.GetCharacterInventory(PF_PlayerData.activeCharacter.characterDetails.CharacterId); PF_Bridge.RaiseCallbackSuccess("Items granted", PlayFabAPIMethods.RetriveQuestItems, MessageDisplayStyle.none); }
void HandleInventoryRequest(Action <string> callback = null, InventoryFilters filter = InventoryFilters.AllItems, bool enableTransUi = true, FloatingInventoryController.InventoryMode displayMode = FloatingInventoryController.InventoryMode.Character) { Action afterGetInventory = () => { // ENABLE THIS AFTER WE HAVE A CONSISTENT WAY TO HIDE TINTS //ShowTint(); this.floatingInvPrompt.Init(callback, filter, enableTransUi, displayMode); }; if (displayMode == FloatingInventoryController.InventoryMode.Character) { PF_PlayerData.GetCharacterInventory(PF_PlayerData.activeCharacter.characterDetails.CharacterId, afterGetInventory); } else { PF_PlayerData.GetUserInventory(afterGetInventory); } }
public void CharacterProfileDataRefresh() { PF_PlayerData.GetCharacterDataById(PF_PlayerData.activeCharacter.characterDetails.CharacterId); PF_PlayerData.GetCharacterInventory(PF_PlayerData.activeCharacter.characterDetails.CharacterId); }