竞技场
parent
c16ce68134
commit
0b4ff12894
|
|
@ -35,3 +35,10 @@ int int mut,int#int,2 mut,int#int,2
|
||||||
44 5 100#1 16#100|3#5003
|
44 5 100#1 16#100|3#5003
|
||||||
45 5 100#2 16#100|3#5004
|
45 5 100#2 16#100|3#5004
|
||||||
46 5 100#3 16#100|3#5005
|
46 5 100#3 16#100|3#5005
|
||||||
|
51 6 9#10 16#100
|
||||||
|
52 6 9#20 16#200
|
||||||
|
53 6 9#30 16#300
|
||||||
|
54 6 9#40 16#400
|
||||||
|
55 6 9#50 16#500
|
||||||
|
56 6 9#60 16#600
|
||||||
|
57 6 9#70 16#700
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
Id Type Values Reward
|
Id Type Values Reward
|
||||||
int int mut,int#int,1 mut,int#int,2
|
int int mut,int#int,1 mut,int#int,2
|
||||||
|
1 20 0#10 14#10000
|
||||||
|
2 21 0#3 3#100
|
||||||
|
3 22 0#10 14#10000
|
||||||
4 23 0#5 3#100
|
4 23 0#5 3#100
|
||||||
5 24 0#5 14#10000
|
5 24 0#5 14#10000
|
||||||
6 25 0#5 3#100
|
6 25 0#5 3#100
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,4 @@ int int string string int
|
||||||
3 3 0 0 1
|
3 3 0 0 1
|
||||||
4 4 0 0 1
|
4 4 0 0 1
|
||||||
5 5 0 0 1
|
5 5 0 0 1
|
||||||
|
6 6 0 0 1
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
Id Type Price FirstMultiple BaseReward ExtraReward Limit FirstInvest IsDiscount DiscountType
|
Id Type Price FirstMultiple BaseReward ExtraReward Limit FirstInvest IsDiscount DiscountType Order
|
||||||
int int int mut,int#int,2 mut,int#int,2 mut,int#int,2 int int int mut,int#int,1
|
int int int mut,int#int,2 mut,int#int,2 mut,int#int,2 int int int mut,int#int,1 int
|
||||||
1 3 6 16#60 16#60 null 0 1 0 null
|
1 3 6 16#60 16#60 null 0 1 0 null 0
|
||||||
2 3 30 16#300 16#300 null 0 1 0 null
|
2 3 30 16#300 16#300 null 0 1 0 null 0
|
||||||
3 3 98 16#980 16#980 null 0 1 0 null
|
3 3 98 16#980 16#980 null 0 1 0 null 0
|
||||||
4 3 198 16#1980 16#1980 null 0 1 0 null
|
4 3 198 16#1980 16#1980 null 0 1 0 null 0
|
||||||
5 3 328 16#3280 16#3280 null 0 1 0 null
|
5 3 328 16#3280 16#3280 null 0 1 0 null 0
|
||||||
6 3 648 16#6480 16#6480 null 0 1 0 null
|
6 3 648 16#6480 16#6480 null 0 1 0 null 0
|
||||||
|
7 4 30 16#3000 null 16#20000 1 1 5 2#18 1
|
||||||
|
8 4 60 16#3000 null null 1 1 0 null 2
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
package com.ljsd.jieling.config;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.STableManager;
|
||||||
|
import com.ljsd.jieling.logic.Table;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Table(name ="RechargeCommodityConfig")
|
||||||
|
public class SRechargeCommodityConfig implements BaseConfig {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int type;
|
||||||
|
|
||||||
|
private int price;
|
||||||
|
|
||||||
|
private int[][] firstMultiple;
|
||||||
|
|
||||||
|
private int[][] baseReward;
|
||||||
|
|
||||||
|
private int[][] extraReward;
|
||||||
|
|
||||||
|
private int limit;
|
||||||
|
|
||||||
|
private int firstInvest;
|
||||||
|
|
||||||
|
private int isDiscount;
|
||||||
|
|
||||||
|
private int[] discountType;
|
||||||
|
|
||||||
|
private int order;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getFirstMultiple() {
|
||||||
|
return firstMultiple;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getBaseReward() {
|
||||||
|
return baseReward;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getExtraReward() {
|
||||||
|
return extraReward;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLimit() {
|
||||||
|
return limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFirstInvest() {
|
||||||
|
return firstInvest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIsDiscount() {
|
||||||
|
return isDiscount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getDiscountType() {
|
||||||
|
return discountType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getOrder() {
|
||||||
|
return order;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -58,8 +58,6 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
||||||
ActivityLogic.getInstance().flushEveryDay(user);
|
ActivityLogic.getInstance().flushEveryDay(user);
|
||||||
//商店刷新次数重置
|
//商店刷新次数重置
|
||||||
StoreLogic.resetStoreRefreshNum(userId);
|
StoreLogic.resetStoreRefreshNum(userId);
|
||||||
//竞技场免费次数刷新
|
|
||||||
ArenaLogic.getInstance().flushFreeUseTimes(user);
|
|
||||||
PlayerLogic.getInstance().vipflushEveryDay(user);
|
PlayerLogic.getInstance().vipflushEveryDay(user);
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_REFRESH);
|
user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_REFRESH);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ public class GlobalDataManaager {
|
||||||
long seasonOpenLong = sGlobalSystemConfig.getSeasonOpenLong();
|
long seasonOpenLong = sGlobalSystemConfig.getSeasonOpenLong();
|
||||||
long seasonEndLong = sGlobalSystemConfig.getSeasonEndLong();
|
long seasonEndLong = sGlobalSystemConfig.getSeasonEndLong();
|
||||||
long diffTime = seasonEndLong - seasonOpenLong;
|
long diffTime = seasonEndLong - seasonOpenLong;
|
||||||
int seasonInterval = sGlobalSystemConfig.getSeasonInterval() * 3600;
|
int seasonInterval = sGlobalSystemConfig.getSeasonInterval() * 3600*1000;
|
||||||
|
|
||||||
long passTims = now - seasonOpenLong;
|
long passTims = now - seasonOpenLong;
|
||||||
if(passTims>0){
|
if(passTims>0){
|
||||||
|
|
@ -75,7 +75,7 @@ public class GlobalDataManaager {
|
||||||
openList.add(id);
|
openList.add(id);
|
||||||
//计算开启时间、关闭时间
|
//计算开启时间、关闭时间
|
||||||
long turns = passTims / ((diffTime + seasonInterval));
|
long turns = passTims / ((diffTime + seasonInterval));
|
||||||
long addTim = turns * diffTime;
|
long addTim = turns * (diffTime + seasonInterval);
|
||||||
long timeOpenOfThis =seasonOpenLong+addTim;
|
long timeOpenOfThis =seasonOpenLong+addTim;
|
||||||
long timeCloseOfThis =seasonEndLong+addTim;
|
long timeCloseOfThis =seasonEndLong+addTim;
|
||||||
openTimeOfFuntionCache.put(id,new TimeControllerOfFunction(id,1,timeOpenOfThis,timeCloseOfThis));
|
openTimeOfFuntionCache.put(id,new TimeControllerOfFunction(id,1,timeOpenOfThis,timeCloseOfThis));
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,9 @@ public class ArenaLogic {
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
int level = user.getPlayerInfoManager().getLevel();
|
int level = user.getPlayerInfoManager().getLevel();
|
||||||
ArenaManager arenaManager = user.getArenaManager();
|
ArenaManager arenaManager = user.getArenaManager();
|
||||||
|
if(arenaManager.getSeason()!=curSeason){
|
||||||
|
arenaManager.resetSeason(curSeason);
|
||||||
|
}
|
||||||
if(arenaManager.getFlushNums() == 0){
|
if(arenaManager.getFlushNums() == 0){
|
||||||
List<ArenaEnemy> arenaEnemies = new ArrayList<>();
|
List<ArenaEnemy> arenaEnemies = new ArrayList<>();
|
||||||
Set<Integer> robotIds = randomRobot(level, 5);
|
Set<Integer> robotIds = randomRobot(level, 5);
|
||||||
|
|
@ -569,6 +572,9 @@ public class ArenaLogic {
|
||||||
content = SErrorCodeEerverConfig.getI18NMessage("arena_season_reward_txt");
|
content = SErrorCodeEerverConfig.getI18NMessage("arena_season_reward_txt");
|
||||||
}
|
}
|
||||||
Set<ZSetOperations.TypedTuple<String>> arenaRankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.ARENA_RANK,Integer.toString(curSeason), 0, -1);
|
Set<ZSetOperations.TypedTuple<String>> arenaRankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.ARENA_RANK,Integer.toString(curSeason), 0, -1);
|
||||||
|
if(type == GlobalsDef.ARENA_SEASON_REWARD){
|
||||||
|
curSeason=0;
|
||||||
|
}
|
||||||
int rank = 1;
|
int rank = 1;
|
||||||
int nowTime =(int) (TimeUtils.now()/1000);
|
int nowTime =(int) (TimeUtils.now()/1000);
|
||||||
for(ZSetOperations.TypedTuple<String> item : arenaRankInfo){
|
for(ZSetOperations.TypedTuple<String> item : arenaRankInfo){
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,6 @@ import java.util.Set;
|
||||||
|
|
||||||
public class ArenaManager extends MongoBase {
|
public class ArenaManager extends MongoBase {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private int score; //积分
|
|
||||||
|
|
||||||
private int failNums; //失败次数
|
private int failNums; //失败次数
|
||||||
|
|
||||||
private int successNums; //胜利次数
|
private int successNums; //胜利次数
|
||||||
|
|
@ -25,6 +21,8 @@ public class ArenaManager extends MongoBase {
|
||||||
|
|
||||||
private int flushNums; //刷新次数
|
private int flushNums; //刷新次数
|
||||||
|
|
||||||
|
private int season;
|
||||||
|
|
||||||
private List<ArenaEnemy> arenaEnemies;
|
private List<ArenaEnemy> arenaEnemies;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -41,10 +39,6 @@ public class ArenaManager extends MongoBase {
|
||||||
updateString("count",count);
|
updateString("count",count);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getScore() {
|
|
||||||
return score;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getFailNums() {
|
public int getFailNums() {
|
||||||
return failNums;
|
return failNums;
|
||||||
}
|
}
|
||||||
|
|
@ -88,4 +82,25 @@ public class ArenaManager extends MongoBase {
|
||||||
public int getFlushNums() {
|
public int getFlushNums() {
|
||||||
return flushNums;
|
return flushNums;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getSeason() {
|
||||||
|
return season;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resetSeason(int curSeason) {
|
||||||
|
this.season = curSeason;
|
||||||
|
this.failNums =0;
|
||||||
|
this.successNums=0;
|
||||||
|
this.count=0;
|
||||||
|
this.flushTime=0;
|
||||||
|
this.flushNums=0;
|
||||||
|
updateString("season",season);
|
||||||
|
updateString("failNums",failNums);
|
||||||
|
updateString("successNums",successNums);
|
||||||
|
updateString("count",count);
|
||||||
|
updateString("flushTime",flushTime);
|
||||||
|
updateString("flushNums",flushNums);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public class UserMissionManager extends MongoBase {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DAILY_REFRESH:
|
case DAILY_REFRESH:
|
||||||
Set<Integer> missionIds = SDailyTasksConfig.config.keySet();
|
/* Set<Integer> missionIds = SDailyTasksConfig.config.keySet();
|
||||||
int type = (int)parm[0];
|
int type = (int)parm[0];
|
||||||
if(type == 0){
|
if(type == 0){
|
||||||
dailyMissionIdsType.getDoingMissionIds().clear();
|
dailyMissionIdsType.getDoingMissionIds().clear();
|
||||||
|
|
@ -46,7 +46,7 @@ public class UserMissionManager extends MongoBase {
|
||||||
dailyCumulationData.reset();
|
dailyCumulationData.reset();
|
||||||
updateString("dailyCumulationData",dailyCumulationData);
|
updateString("dailyCumulationData",dailyCumulationData);
|
||||||
}
|
}
|
||||||
dailyMissionIdsType.getDoingMissionIds().addAll(missionIds);
|
dailyMissionIdsType.getDoingMissionIds().addAll(missionIds);*/
|
||||||
|
|
||||||
updateString("dailyMissionIdsType",dailyMissionIdsType);
|
updateString("dailyMissionIdsType",dailyMissionIdsType);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ljsd.jieling.logic.store;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 真钱购买东西
|
||||||
|
*/
|
||||||
|
public class BuyGoodsLogic {
|
||||||
|
|
||||||
|
public void buyGoods(ISession session,int goodsId){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ljsd.jieling.util;
|
package com.ljsd.jieling.util;
|
||||||
|
|
||||||
import com.google.protobuf.GeneratedMessage;
|
import com.google.protobuf.GeneratedMessage;
|
||||||
|
import com.googlecode.protobuf.format.JsonFormat;
|
||||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||||
import com.ljsd.jieling.netty.PackageConstant;
|
import com.ljsd.jieling.netty.PackageConstant;
|
||||||
import com.ljsd.jieling.netty.cocdex.Tea;
|
import com.ljsd.jieling.netty.cocdex.Tea;
|
||||||
|
|
@ -22,6 +23,7 @@ public class MessageUtil {
|
||||||
backMessage = new byte[0];
|
backMessage = new byte[0];
|
||||||
} else {
|
} else {
|
||||||
backMessage = generatedMessage.toByteArray();
|
backMessage = generatedMessage.toByteArray();
|
||||||
|
LOGGER.info(JsonFormat.printToString(generatedMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
int length = PackageConstant.UID_FIELD_LEN + PackageConstant.TOKEN_LEN
|
int length = PackageConstant.UID_FIELD_LEN + PackageConstant.TOKEN_LEN
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue