[Megameknet-cvs] MegaMekNET/src/server/campaign/market Market.java,1.22,1.23
Status: Inactive
Brought to you by:
mcwizard
From: Immanuel S. <im...@us...> - 2005-04-11 20:02:10
|
Update of /cvsroot/megameknet/MegaMekNET/src/server/campaign/market In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15726/src/server/campaign/market Modified Files: Market.java Log Message: fixed xml saving, now featuring asynchron saves. Index: Market.java =================================================================== RCS file: /cvsroot/megameknet/MegaMekNET/src/server/campaign/market/Market.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Market.java 26 Mar 2005 17:44:24 -0000 1.22 --- Market.java 11 Apr 2005 20:01:27 -0000 1.23 *************** *** 61,68 **** public Market() { marketStatistic = new MarketStatisticKeeper(); ! ReadMarketStatistic(); addStatusListener(CampaignMain.cm); } public Collection getAllUnits() { return Collections.unmodifiableCollection(units.values()); --- 61,77 ---- public Market() { marketStatistic = new MarketStatisticKeeper(); ! readMarketStatistic(); addStatusListener(CampaignMain.cm); } + /** + * Copy constructor + */ + public Market(Market market) { + marketStatistic = market.marketStatistic; + units = new Hashtable(market.units); + newMechsSinceTick = market.newMechsSinceTick; + } + public Collection getAllUnits() { return Collections.unmodifiableCollection(units.values()); *************** *** 387,391 **** } ! public void ReadMarketStatistic() { if (CampaignMain.cm.useHibernate()) { marketStatistic = new MarketStatisticKeeper(); --- 396,400 ---- } ! public void readMarketStatistic() { if (CampaignMain.cm.useHibernate()) { marketStatistic = new MarketStatisticKeeper(); |