魂晶累计
parent
c19d6b2e26
commit
ce71b8a4db
|
@ -436,7 +436,7 @@ public class PlayerManager extends MongoBase {
|
|||
|
||||
public void addOnlineTime(long onlineTime) {
|
||||
this.onlineTime += onlineTime;
|
||||
setOnlineTimeOfDay(onlineTime);
|
||||
//setOnlineTimeOfDay(onlineTime);
|
||||
updateString("onlineTime", this.onlineTime);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import java.util.*;
|
|||
public class RechargeInfo extends MongoBase{
|
||||
|
||||
private int saveAmt;//累计充值
|
||||
private int soulCrystalAmt;//累计充值购买魂晶
|
||||
private int isFirst;
|
||||
private long createTime;
|
||||
private int hadBuyFound;
|
||||
|
@ -152,4 +153,13 @@ public class RechargeInfo extends MongoBase{
|
|||
updateString("goodseSendDailyMap." + goodsType,sendTime);
|
||||
this.goodseSendDailyMap.put(goodsType,sendTime);
|
||||
}
|
||||
|
||||
public int getSoulCrystalAmt() {
|
||||
return soulCrystalAmt;
|
||||
}
|
||||
|
||||
public void addSoulCrystalAmt(int soulCrystalAmt) {
|
||||
this.soulCrystalAmt += soulCrystalAmt;
|
||||
updateString("soulCrystalAmt",soulCrystalAmt);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,6 +171,13 @@ public class BuyGoodsLogic {
|
|||
}
|
||||
if(sRechargeCommodityConfig.getAccumulativeRecharge() == 1){
|
||||
int saveAmt = rechargeInfo.getSaveAmt();
|
||||
|
||||
int[][] costItemArr = StringUtil.parseFiledInt2(rewardStr);
|
||||
for (int i = 0; i <costItemArr.length ; i++) {
|
||||
if(costItemArr[i][0]==Global.SOULCRYSTAL){
|
||||
rechargeInfo.addSoulCrystalAmt(costItemArr[i][1]);
|
||||
}
|
||||
}
|
||||
rechargeInfo.setSaveAmt(price+saveAmt);
|
||||
user.getPlayerInfoManager().addRechargedaily(price);
|
||||
//TODO 用事件分发
|
||||
|
|
Loading…
Reference in New Issue