public static RefreshOnGoodUpgrade ( Soomla.Store.VirtualGood vg, |
||
vg | Soomla.Store.VirtualGood | |
uvg | ||
리턴 | void |
public void onGoodUpgrade(string message, bool alsoPush) { SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onGoodUpgrade:" + message); var eventJSON = new JSONObject(message); VirtualGood vg = (VirtualGood)StoreInfo.GetItemByItemId(eventJSON["itemId"].str); UpgradeVG vgu = null; if (eventJSON.HasField("upgradeItemId") && !string.IsNullOrEmpty(eventJSON["upgradeItemId"].str)) { vgu = (UpgradeVG)StoreInfo.GetItemByItemId(eventJSON["upgradeItemId"].str); } StoreInventory.RefreshOnGoodUpgrade(vg, vgu); StoreEvents.OnGoodUpgrade(vg, vgu); if (alsoPush) { #if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR sep.PushEventOnGoodUpgrade(vg, vgu); #endif } }
public static void onGoodUpgrade(GoodUpgradeEvent _Event, bool alsoPush) { SoomlaWpStore.domain.virtualGoods.VirtualGood good = _Event.GetGood(); SoomlaWpStore.domain.virtualGoods.UpgradeVG upgradeVG = _Event.GetUpgradeVG(); SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onGoodUpgrade:" + good.getItemId() + " " + upgradeVG.getItemId()); VirtualGood vg = (VirtualGood)StoreInfo.GetItemByItemId(good.getItemId()); UpgradeVG vgu = null; if (upgradeVG != null) { vgu = (UpgradeVG)StoreInfo.GetItemByItemId(upgradeVG.getItemId()); } StoreInventory.RefreshOnGoodUpgrade(vg, vgu); StoreEvents.OnGoodUpgrade(vg, vgu); if (alsoPush) { sep.PushEventOnGoodUpgrade(_Event); } }