rsanchezsaez / wiatches-iphone

1 stars 0 forks source link

[ENH] No se comprueba que haya conexión a internet en la tienda InApp del mapa #1651

Closed rsanchezsaez closed 12 years ago

rsanchezsaez commented 12 years ago

En la tienda InApp del mapa (ShopLayer) se abre así:

- (void)openCoinShop {
[SinglePlayerInAppPurchases showShopInNode:self];
}

mientras que la de inGame (ShopInGame) se abre así:

 - (void)openCoinShop {
    if ([Config connectedToNetwork]) {
        // Internet available
        if ([[InAppPurchaseManager sharedIsAppPurchaseManager] canMakePurchases]) {
            // Purchases available

            [(GameLayer*)self.parent buyCoinsReorder:YES];
            [SinglePlayerInAppPurchases showShopInNode:self];
        } else {
            // Purchases not available
            [PopupShopPurchaseNotAvailable showPopupInNode:self];
        }
    } else {
        // Internet not available
        [PopupShopNetworkNotAvailable showPopupInNode:self];
    }
}

Creo que en el mapa habría que hacer la comprobación como en InGame.

No lo he cambiado yo porque no consigo que me vayan las microtransacciones en mis dispositivos y no tengo manera de probarlo.

Smauky commented 12 years ago

Ok, lo revisare haber... juraría que hacia la comprobación en ambos sitios, pero se me debió pasar algo...

2012/6/9 Ricardo Sánchez-Sáez < reply@reply.github.com

En la tienda InApp del mapa (ShopLayer) se abre así:

  • (void)openCoinShop { [SinglePlayerInAppPurchases showShopInNode:self]; }

mientras que la de inGame (ShopInGame) se abre así:

- (void)openCoinShop {
   if ([Config connectedToNetwork]) {
       // Internet available
       if ([[InAppPurchaseManager sharedIsAppPurchaseManager]

canMakePurchases]) { // Purchases available

           [(GameLayer*)self.parent buyCoinsReorder:YES];
           [SinglePlayerInAppPurchases showShopInNode:self];
       } else {
           // Purchases not available
           [PopupShopPurchaseNotAvailable showPopupInNode:self];
       }
   } else {
       // Internet not available
       [PopupShopNetworkNotAvailable showPopupInNode:self];
   }

}

Creo que en el mapa habría que hacer la comprobación como en InGame.

No lo he cambiado yo porque no consigo que me vayan las microtransacciones en mis dispositivos y no tengo manera de probarlo.


Reply to this email directly or view it on GitHub: https://github.com/rsanchezsaez/wiatches-iphone/issues/1651

rsanchezsaez commented 12 years ago

Me he dado cuenta que en ShopLayer hay dos metodos distintos que abren la tienda InApp:

Este la abre directamente al darle al botón, y este si que tiene la comprobación correspondiente:

- (void)showBuyCoinsShop

y este la abre directamente viniendo de un popup, este no tiene la comprobación:

 - (void)openCoinShop

habría que mirar si el segundo método se utiliza realmente, y en caso de que se use, habría que intentar unificarlos en uno solo, igual que hizimos ayer en ShopInGame. :-)

Smauky commented 12 years ago

No se usaba ya, lo he eliminado.