Erwan
-fixed shop refresh method problem (would not save correctly)
This commit is contained in:
@@ -33,6 +33,7 @@ class DeckDataWrapper{
|
||||
~DeckDataWrapper();
|
||||
|
||||
int Add(MTGCard * card, int quantity = 1);
|
||||
int Add(MTGDeck * deck);
|
||||
int Remove(MTGCard * card);
|
||||
MTGCard * getNext(MTGCard * previous = NULL, int color = -1);
|
||||
MTGCard * getPrevious(MTGCard * next = NULL, int color = -1);
|
||||
|
||||
@@ -777,7 +777,7 @@ class GameStateDeckViewer: public GameState, public JGuiListener
|
||||
{
|
||||
MTGCard * card = cardIndex[2];
|
||||
if (card){
|
||||
int rnd = (rand() % 20);
|
||||
int rnd = (rand() % 25);
|
||||
playerdata->credits += price;
|
||||
price = price - (rnd * price)/100;
|
||||
pricelist->setPrice(card->getMTGId(),price*2);
|
||||
|
||||
@@ -26,7 +26,6 @@ class ShopItem:public JGuiObject{
|
||||
JQuad * thumb;
|
||||
float mScale;
|
||||
float mTargetScale;
|
||||
DeckDataWrapper * mDDW;
|
||||
|
||||
|
||||
public:
|
||||
@@ -37,6 +36,7 @@ class ShopItem:public JGuiObject{
|
||||
ShopItem(int id, JLBFont * font, int _cardid, int x, int y, bool hasFocus, MTGAllCards * collection, int _price, DeckDataWrapper * ddw);
|
||||
ShopItem(int id, JLBFont * font, char* text, JQuad * _quad, JQuad * _thumb,int x, int y, bool hasFocus, int _price);
|
||||
~ShopItem();
|
||||
int updateCount(DeckDataWrapper * ddw);
|
||||
|
||||
virtual void Render();
|
||||
virtual void Update(float dt);
|
||||
|
||||
Reference in New Issue
Block a user