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