public static void EarnFreeGold(ShopItemId goldId) { //Debug.Log("Earn Free gold " + goldId); if (!ShopDataBridge.Instance.IsFreeGold(goldId)) { return; } E_FundID fundId = (E_FundID)(goldId.Id); if (fundId == E_FundID.TapJoyWeb) { #if UNITY_IPHONE MFNativeUtils.OpenURLExternal(TAPJOY_DEADZONE_URL); //Tapjoy has to be opened in external browser on iOS due to Apple's restrictions #elif UNITY_ANDROID EtceteraWrapper.ShowWeb(TAPJOY_DEADZONE_URL); #endif } else if (fundId == E_FundID.TapJoyInApp) { TapJoy.ShowOffers(); } else if (fundId == E_FundID.FreeOffer) { // Used to be SponsorPay Plugin - now unused } else if (fundId == E_FundID.FreeWeb) { #if (UNITY_ANDROID || UNITY_IPHONE) //SponsorPay plugin has been removed in r16601 // string sponsorPayStr = string.Format("http://iframe.sponsorpay.com/mbrowser?appid={0}&device_id={1}&uid={2}&pub0=", Game.SponsorPayCredentials.AppId, SysUtils.GetUniqueDeviceID(), CloudUser.instance.userName); // EtceteraWrapper.ShowWeb(sponsorPayStr); #endif } }
public static int FreeGoldType(E_FundID id) { switch (id) { case E_FundID.TapJoyInApp: return(1); case E_FundID.TapJoyWeb: return(2); case E_FundID.FreeOffer: return(3); case E_FundID.FreeWeb: return(4); default: return(0); } }