인앱 결제 추가 지급 처리
This commit is contained in:
parent
e5a4ebc32e
commit
7d9cfa7269
|
|
@ -29,6 +29,58 @@ public class shoptabledata
|
||||||
if (n_RewardGacha > 0) return n_RewardGacha.ToString();
|
if (n_RewardGacha > 0) return n_RewardGacha.ToString();
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Get_BuyItemMsg()
|
||||||
|
{
|
||||||
|
var msg = "";
|
||||||
|
|
||||||
|
if (n_RewardHeart > 0)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"앨범 오픈 재화 {n_RewardHeart}개를 획득했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (n_RewardChatCoin > 0)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"채팅 코인 {n_RewardChatCoin}개를 획득했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (n_RewardGacha > 0)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"뽑기 재화 {n_RewardGacha}개를 획득했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (b_AdRemove)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"광고 제거권을 획득했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (m_Data.n_BonusGameRefill > 0)
|
||||||
|
//{
|
||||||
|
// if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
// msg += $"보너스 게임 리필 횟수가 {m_Data.n_BonusGameRefill} 추가 되었습니다.";
|
||||||
|
//}
|
||||||
|
|
||||||
|
if (b_InfinityMiniGame)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"미니 게임 무제한 입장을 획득했습니다.\n";
|
||||||
|
msg += $"미니 게임 피버 지속시간이 2배 증가 했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (b_LuckyGameCharge)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"뽑기 비용이 50% 감소 했습니다.\n";
|
||||||
|
msg += $"뽑기 확률이 대폭 증가 했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(msg)) msg = "보상이 없습니다.\n보상을 설정해 주세요!";
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class table_shop : table_base
|
public class table_shop : table_base
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
1
|
4
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
using OneStore.Auth;
|
|
||||||
using OneStore.Common;
|
|
||||||
using OneStore.Purchasing;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using OneStore.Auth;
|
||||||
|
using OneStore.Common;
|
||||||
|
using OneStore.Purchasing;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Purchasing;
|
using UnityEngine.Purchasing;
|
||||||
|
|
||||||
|
|
@ -15,7 +15,7 @@ public class InappInfo : MonoBehaviourSingletonTemplate<InappInfo>
|
||||||
StoreController m_StoreController;
|
StoreController m_StoreController;
|
||||||
|
|
||||||
// 원스토어
|
// 원스토어
|
||||||
string onstore_publickey = "";
|
string onstore_publickey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVjiMhlWYsiHCTLA01r6F+7tlFtaqU5p2b/wx32NSGqZm0GGCwyEFcGGtKP0eE5/UAS9qj2EG8AWV3OmLn4SViYGW8UIS1I01Az5HfWNrrmL31cy/pND+PwMltx4vmAUBRmlGp1ysRVi5/17VF4mQlAzNdUeq30aYQncU0I6Xq3QIDAQAB";
|
||||||
PurchaseClientImpl m_PurchaseClientImpl;
|
PurchaseClientImpl m_PurchaseClientImpl;
|
||||||
OneStoreIapCallBack m_OneStoreIapCallBack = new OneStoreIapCallBack();
|
OneStoreIapCallBack m_OneStoreIapCallBack = new OneStoreIapCallBack();
|
||||||
|
|
||||||
|
|
@ -164,9 +164,10 @@ public class InappInfo : MonoBehaviourSingletonTemplate<InappInfo>
|
||||||
public void OnConsumeSucceeded(PurchaseData purchase)
|
public void OnConsumeSucceeded(PurchaseData purchase)
|
||||||
{
|
{
|
||||||
Debug.Log("OnConsumeSucceeded " + purchase.ProductId);
|
Debug.Log("OnConsumeSucceeded " + purchase.ProductId);
|
||||||
act_success?.Invoke();
|
if (act_success != null)
|
||||||
//GameManager.IAP.AddProductItem(purchase.ProductId);
|
act_success();
|
||||||
//GameManager.UI.ShowNStackPopup(EPopupType.SuccessIAPPopup);
|
else
|
||||||
|
SaveMgr.Ins.list_inapp.Add(purchase.ProductId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnManageRecurringProduct(IapResult iapResult, PurchaseData purchase, RecurringAction action)
|
public void OnManageRecurringProduct(IapResult iapResult, PurchaseData purchase, RecurringAction action)
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
public SaveData m_SaveData;
|
public SaveData m_SaveData;
|
||||||
public ProtectedInt32 m_SelectMiniGameTab, m_SelectMiniGameGirl;
|
public ProtectedInt32 m_SelectMiniGameTab, m_SelectMiniGameGirl;
|
||||||
|
|
||||||
|
public List<string> list_inapp = new List<string>();
|
||||||
|
|
||||||
IEnumerator Start()
|
IEnumerator Start()
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
|
|
@ -26,6 +28,23 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
SoundInfo.Ins.Play_OneShot(eSound.s012_Title);
|
SoundInfo.Ins.Play_OneShot(eSound.s012_Title);
|
||||||
while (!LobbyUI.Ins) yield return null;
|
while (!LobbyUI.Ins) yield return null;
|
||||||
LobbyUI.Ins.Set_Money();
|
LobbyUI.Ins.Set_Money();
|
||||||
|
|
||||||
|
string inappmsg = "";
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
yield return null;
|
||||||
|
for (int i = 0; i < list_inapp.Count; i++)
|
||||||
|
{
|
||||||
|
var data = table_shop.Ins.Get_Data(list_inapp[i]);
|
||||||
|
Set_ShopReward(data);
|
||||||
|
inappmsg += data.Get_BuyItemMsg() + "\n";
|
||||||
|
}
|
||||||
|
if (list_inapp.Count > 0)
|
||||||
|
{
|
||||||
|
LobbyUI.Ins.m_ToastUI.Set(inappmsg);
|
||||||
|
list_inapp.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool isLoad() { return m_SaveData != null; }
|
public bool isLoad() { return m_SaveData != null; }
|
||||||
|
|
|
||||||
|
|
@ -221,56 +221,5 @@ public class ShopCard : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string Get_BuyItemMsg()
|
string Get_BuyItemMsg() { return m_Data.Get_BuyItemMsg(); }
|
||||||
{
|
|
||||||
var msg = "";
|
|
||||||
|
|
||||||
if (m_Data.n_RewardHeart > 0)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
|
||||||
msg += $"앨범 오픈 재화 {m_Data.n_RewardHeart}개를 획득했습니다.";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_Data.n_RewardChatCoin > 0)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
|
||||||
msg += $"채팅 코인 {m_Data.n_RewardChatCoin}개를 획득했습니다.";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_Data.n_RewardGacha > 0)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
|
||||||
msg += $"뽑기 재화 {m_Data.n_RewardGacha}개를 획득했습니다.";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_Data.b_AdRemove)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
|
||||||
msg += $"광고 제거권을 획득했습니다.";
|
|
||||||
}
|
|
||||||
|
|
||||||
//if (m_Data.n_BonusGameRefill > 0)
|
|
||||||
//{
|
|
||||||
// if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
|
||||||
// msg += $"보너스 게임 리필 횟수가 {m_Data.n_BonusGameRefill} 추가 되었습니다.";
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (m_Data.b_InfinityMiniGame)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
|
||||||
msg += $"미니 게임 무제한 입장을 획득했습니다.\n";
|
|
||||||
msg += $"미니 게임 피버 지속시간이 2배 증가 했습니다.";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_Data.b_LuckyGameCharge)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
|
||||||
msg += $"뽑기 비용이 50% 감소 했습니다.\n";
|
|
||||||
msg += $"뽑기 확률이 대폭 증가 했습니다.";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(msg)) msg = "보상이 없습니다.\n보상을 설정해 주세요!";
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue