Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
9593490df6
|
@ -87318,6 +87318,24 @@ public final class PlayerInfoProto {
|
|||
* </pre>
|
||||
*/
|
||||
int getType();
|
||||
|
||||
// optional int32 activiteId = 2;
|
||||
/**
|
||||
* <code>optional int32 activiteId = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*活动id
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasActiviteId();
|
||||
/**
|
||||
* <code>optional int32 activiteId = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*活动id
|
||||
* </pre>
|
||||
*/
|
||||
int getActiviteId();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code com.ljsd.jieling.protocols.RankRequest}
|
||||
|
@ -87375,6 +87393,11 @@ public final class PlayerInfoProto {
|
|||
type_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
bitField0_ |= 0x00000002;
|
||||
activiteId_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
|
@ -87439,8 +87462,33 @@ public final class PlayerInfoProto {
|
|||
return type_;
|
||||
}
|
||||
|
||||
// optional int32 activiteId = 2;
|
||||
public static final int ACTIVITEID_FIELD_NUMBER = 2;
|
||||
private int activiteId_;
|
||||
/**
|
||||
* <code>optional int32 activiteId = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*活动id
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasActiviteId() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 activiteId = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*活动id
|
||||
* </pre>
|
||||
*/
|
||||
public int getActiviteId() {
|
||||
return activiteId_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
type_ = 0;
|
||||
activiteId_ = 0;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
|
@ -87457,6 +87505,9 @@ public final class PlayerInfoProto {
|
|||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
output.writeInt32(1, type_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
output.writeInt32(2, activiteId_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
|
@ -87470,6 +87521,10 @@ public final class PlayerInfoProto {
|
|||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(1, type_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(2, activiteId_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
|
@ -87588,6 +87643,8 @@ public final class PlayerInfoProto {
|
|||
super.clear();
|
||||
type_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
activiteId_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -87620,6 +87677,10 @@ public final class PlayerInfoProto {
|
|||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.type_ = type_;
|
||||
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
to_bitField0_ |= 0x00000002;
|
||||
}
|
||||
result.activiteId_ = activiteId_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
|
@ -87639,6 +87700,9 @@ public final class PlayerInfoProto {
|
|||
if (other.hasType()) {
|
||||
setType(other.getType());
|
||||
}
|
||||
if (other.hasActiviteId()) {
|
||||
setActiviteId(other.getActiviteId());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
return this;
|
||||
}
|
||||
|
@ -87715,6 +87779,55 @@ public final class PlayerInfoProto {
|
|||
return this;
|
||||
}
|
||||
|
||||
// optional int32 activiteId = 2;
|
||||
private int activiteId_ ;
|
||||
/**
|
||||
* <code>optional int32 activiteId = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*活动id
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasActiviteId() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 activiteId = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*活动id
|
||||
* </pre>
|
||||
*/
|
||||
public int getActiviteId() {
|
||||
return activiteId_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 activiteId = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*活动id
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setActiviteId(int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
activiteId_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 activiteId = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*活动id
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearActiviteId() {
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
activiteId_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.RankRequest)
|
||||
}
|
||||
|
||||
|
@ -94832,25 +94945,26 @@ public final class PlayerInfoProto {
|
|||
"protocols.Hero\0220\n\005equip\030\002 \003(\0132!.com.ljsd" +
|
||||
".jieling.protocols.Equip\022B\n\016SpecialEffec" +
|
||||
"ts\030\003 \003(\0132*.com.ljsd.jieling.protocols.Sp" +
|
||||
"ecialEffects\022\r\n\005force\030\004 \001(\005\"\033\n\013RankReque" +
|
||||
"st\022\014\n\004type\030\001 \001(\005\"}\n\014RankResponse\0223\n\005rank" +
|
||||
"s\030\001 \003(\0132$.com.ljsd.jieling.protocols.Use" +
|
||||
"rRank\0228\n\nmyRankInfo\030\002 \001(\0132$.com.ljsd.jie",
|
||||
"ling.protocols.RankInfo\")\n\023NextActivityR" +
|
||||
"equest\022\022\n\nactivityId\030\001 \001(\005\"0\n\024NextActivi" +
|
||||
"tyResponse\022\n\n\002id\030\001 \001(\005\022\014\n\004time\030\002 \001(\005\"+\n\031" +
|
||||
"RefreshRechargeIndication\022\016\n\006amount\030\001 \001(" +
|
||||
"\005\"\024\n\022VipTakeDilyRequest\"E\n\023VipTakeDilyRe" +
|
||||
"sponse\022.\n\004drop\030\001 \001(\0132 .com.ljsd.jieling." +
|
||||
"protocols.Drop\"X\n\032MissingRoomRefreshResp" +
|
||||
"onse\022:\n\005infos\030\001 \003(\0132+.com.ljsd.jieling.p" +
|
||||
"rotocols.UserMissionInfo\"@\n\032MissingRoomS" +
|
||||
"endHeroRequest\022\017\n\007heroIds\030\001 \003(\t\022\021\n\tmissi",
|
||||
"onId\030\002 \001(\005\"1\n\034MissingRoomAccelerateReque" +
|
||||
"st\022\021\n\tmissionId\030\001 \001(\005\"\037\n\020SexChangeReques" +
|
||||
"t\022\013\n\003sex\030\001 \001(\005\"\023\n\021SexChangeResponse\"K\n\023P" +
|
||||
"rivilegeIndication\0224\n\005infos\030\001 \003(\0132%.com." +
|
||||
"ljsd.jieling.protocols.PrivilegeB\002H\001"
|
||||
"ecialEffects\022\r\n\005force\030\004 \001(\005\"/\n\013RankReque" +
|
||||
"st\022\014\n\004type\030\001 \001(\005\022\022\n\nactiviteId\030\002 \001(\005\"}\n\014" +
|
||||
"RankResponse\0223\n\005ranks\030\001 \003(\0132$.com.ljsd.j" +
|
||||
"ieling.protocols.UserRank\0228\n\nmyRankInfo\030",
|
||||
"\002 \001(\0132$.com.ljsd.jieling.protocols.RankI" +
|
||||
"nfo\")\n\023NextActivityRequest\022\022\n\nactivityId" +
|
||||
"\030\001 \001(\005\"0\n\024NextActivityResponse\022\n\n\002id\030\001 \001" +
|
||||
"(\005\022\014\n\004time\030\002 \001(\005\"+\n\031RefreshRechargeIndic" +
|
||||
"ation\022\016\n\006amount\030\001 \001(\005\"\024\n\022VipTakeDilyRequ" +
|
||||
"est\"E\n\023VipTakeDilyResponse\022.\n\004drop\030\001 \001(\013" +
|
||||
"2 .com.ljsd.jieling.protocols.Drop\"X\n\032Mi" +
|
||||
"ssingRoomRefreshResponse\022:\n\005infos\030\001 \003(\0132" +
|
||||
"+.com.ljsd.jieling.protocols.UserMission" +
|
||||
"Info\"@\n\032MissingRoomSendHeroRequest\022\017\n\007he",
|
||||
"roIds\030\001 \003(\t\022\021\n\tmissionId\030\002 \001(\005\"1\n\034Missin" +
|
||||
"gRoomAccelerateRequest\022\021\n\tmissionId\030\001 \001(" +
|
||||
"\005\"\037\n\020SexChangeRequest\022\013\n\003sex\030\001 \001(\005\"\023\n\021Se" +
|
||||
"xChangeResponse\"K\n\023PrivilegeIndication\0224" +
|
||||
"\n\005infos\030\001 \003(\0132%.com.ljsd.jieling.protoco" +
|
||||
"ls.PrivilegeB\002H\001"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
|
@ -95606,7 +95720,7 @@ public final class PlayerInfoProto {
|
|||
internal_static_com_ljsd_jieling_protocols_RankRequest_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_com_ljsd_jieling_protocols_RankRequest_descriptor,
|
||||
new java.lang.String[] { "Type", });
|
||||
new java.lang.String[] { "Type", "ActiviteId", });
|
||||
internal_static_com_ljsd_jieling_protocols_RankResponse_descriptor =
|
||||
getDescriptor().getMessageTypes().get(125);
|
||||
internal_static_com_ljsd_jieling_protocols_RankResponse_fieldAccessorTable = new
|
||||
|
|
|
@ -9,12 +9,14 @@ import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
|
|||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.util.Properties;
|
||||
|
||||
public class DbClear {
|
||||
public static void main(String[] args) throws IOException {
|
||||
Properties properties = new Properties();
|
||||
File file = new File("serverlogic/src/main/resources/application.properties");
|
||||
URL resource = DbClear.class.getClassLoader().getResource("application.properties");
|
||||
File file = new File(resource.getFile());
|
||||
//BufferedInputStream bufferedInputStream = new BufferedInputStream(DbClear.class.getResourceAsStream("application.properties"));
|
||||
System.out.println(file.getAbsolutePath());
|
||||
properties.load(new FileReader(file));
|
||||
|
@ -24,6 +26,7 @@ public class DbClear {
|
|||
mongoClient.dropDatabase(mongoClientURI.getDatabase());
|
||||
StringRedisTemplate redisTemplate = getRedisTemplate();
|
||||
redisTemplate.delete(redisTemplate.keys(properties.get("server.id")+"*"));
|
||||
System.out.println("the mongo url=" + property);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ public class GMRequestHandler extends BaseHandler{
|
|||
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = STableManager.getFigureConfig(HeroStaticConfig.class).getScHeroRankUpConfigByShow(GlobalsDef.UP_STAR_TYPE,scHero.getStar());
|
||||
SCHeroRankUpConfig scHeroRankUpConfig = scHeroRankUpConfigByType.get(prarm2-1);
|
||||
hero.setLevel(cUser,scHeroRankUpConfig.getLimitLevel());
|
||||
hero.setLevel(cUser,scHeroRankUpConfig.getOpenLevel());
|
||||
hero.setStarBreakId(scHeroRankUpConfig.getId());
|
||||
|
||||
scHeroRankUpConfigByType = STableManager.getFigureConfig(HeroStaticConfig.class).getScHeroRankUpConfigByShow(GlobalsDef.BREAK_TYPE,scHero.getStar());
|
||||
|
|
|
@ -37,6 +37,8 @@ public class FightEndRequestHandler extends BaseHandler {
|
|||
MapLogic.getInstance().endMonsterAttackFight(iSession, frames,MessageTypeProto.MessageType.FIGHT_END_RESPONSE);
|
||||
}else if(type == 6){
|
||||
MapLogic.getInstance().endMainLevelFight(iSession, frames,fightId,MessageTypeProto.MessageType.FIGHT_END_RESPONSE);
|
||||
}else if(type == 7){
|
||||
|
||||
} else {
|
||||
// MapLogic.getInstance().endFight(iSession, frames, MessageTypeProto.MessageType.FIGHT_END_RESPONSE);
|
||||
|
||||
|
|
|
@ -67,7 +67,9 @@ public class StartFightRequestHandler extends BaseHandler<FightInfoProto.FightSt
|
|||
MapLogic.getInstance().startMonsterAttackFight(iSession,fightId,teamId, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
||||
}else if(type == 6){
|
||||
MapLogic.getInstance().startMainLevelFight(iSession,fightId,teamId, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
||||
} else {
|
||||
} else if(type == 7){
|
||||
MapLogic.getInstance().startMainLevelFight(iSession,fightId,teamId, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
||||
}else {
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("type is wrong:" + type));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,9 @@ public enum KTGameType {
|
|||
ARENA("竞技场",5),
|
||||
CHALLENGE_SECURE("挑战秘境BOSS",6),
|
||||
TAKE_SECURE_REWARD("领取秘境奖励",7),
|
||||
CHALLENGE_MONSTERATTACK("挑战兽潮",8);
|
||||
CHALLENGE_MONSTERATTACK("挑战兽潮",8),
|
||||
CHALLENGE_GUILD_BOSS("工会boss",9),
|
||||
;
|
||||
// 成员变量
|
||||
private String name;
|
||||
private int index;
|
||||
|
|
|
@ -13,6 +13,7 @@ public class GuildMyInfo extends MongoBase {
|
|||
private List<Integer> path = new ArrayList<>(); //行走路线
|
||||
private int curPos=STableManager.getFigureConfig(CommonStaticConfig.class).getInitPos();//当前位置
|
||||
private long preMoveTimestamp; //上次更新时间
|
||||
private int maxBossHurt; //工会boss最高伤害
|
||||
public void clearOfLevelGuild(){
|
||||
path.clear();
|
||||
curPos = STableManager.getFigureConfig(CommonStaticConfig.class).getInitPos();
|
||||
|
@ -74,6 +75,15 @@ public class GuildMyInfo extends MongoBase {
|
|||
this.path = path;
|
||||
}
|
||||
|
||||
public int getMaxBossHurt() {
|
||||
return maxBossHurt;
|
||||
}
|
||||
|
||||
public void setMaxBossHurt(int maxBossHurt) {
|
||||
updateString("maxBossHurt",maxBossHurt);
|
||||
this.maxBossHurt = maxBossHurt;
|
||||
}
|
||||
|
||||
public List<Integer> getPath() {
|
||||
return path;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
package com.ljsd.jieling.logic.family;
|
||||
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.fight.FightType;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.handler.map.behavior.BehaviorUtil;
|
||||
import com.ljsd.jieling.ktbeans.KTGameType;
|
||||
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
||||
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
||||
import com.ljsd.jieling.logic.blood.BloodLogic;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.GuildCache;
|
||||
|
@ -20,6 +26,7 @@ import com.ljsd.jieling.logic.mission.GameEvent;
|
|||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import com.ljsd.jieling.protocols.Family;
|
||||
import com.ljsd.jieling.protocols.FightInfoProto;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.thread.ThreadManager;
|
||||
import com.ljsd.jieling.thread.task.GuildFightMatchingTask;
|
||||
|
@ -1027,4 +1034,36 @@ public class GuildFightLogic {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public static void startFight(ISession session) throws Exception {
|
||||
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
int teamId = 901;
|
||||
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
if (teamPosHeroInfos == null || teamPosHeroInfos.size() == 0) {
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("阵容有误!!"));
|
||||
}
|
||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserGameType, KTGameType.CHALLENGE_GUILD_BOSS.getIndex(),1);
|
||||
user.getTeamPosManager().setCurTeamPosId(teamId);
|
||||
String fightInfo = 1 + "#" + teamId;
|
||||
String key = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_INFO, String.valueOf(uid), false);
|
||||
RedisUtil.getInstence().set(key, fightInfo, -1);
|
||||
//扣除预先道具
|
||||
FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
|
||||
/* BehaviorUtil.getLevelDifficultyifficuFightInfo(user, FightType.StoryFight,sMainLevelConfig.getMonsterGroup(), teamId, sMainLevelConfig.getRankTime(), fightStartResponse, RedisKey.LEVE_DIFFICULTY_FIGHT);
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightStartResponse.build(), true);*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void endBossFight(ISession session){
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Random random = new Random();
|
||||
long seed = System.currentTimeMillis();
|
||||
random.setSeed(seed);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package config;
|
||||
|
||||
|
||||
import manager.Table;
|
||||
|
||||
|
||||
|
||||
@Table(name ="GuildBossConfig")
|
||||
public class SGuildBossConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int monsterId;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getMonsterId() {
|
||||
return monsterId;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package config;
|
||||
|
||||
import manager.STableManager;
|
||||
import manager.Table;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
@Table(name ="GuildBossRewardConfig")
|
||||
public class SGuildBossRewardConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int damage;
|
||||
|
||||
private int[] reward;
|
||||
|
||||
private static TreeMap<Integer, SGuildBossRewardConfig> sGuildBossHurtRewardConfig;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
Map<Integer, SGuildBossRewardConfig> config = STableManager.getConfig(SGuildBossRewardConfig.class);
|
||||
TreeMap<Integer, SGuildBossRewardConfig> sGuildBossHurtRewardConfigTmp = new TreeMap<>();
|
||||
config.values().forEach(item ->sGuildBossHurtRewardConfigTmp.put(item.getDamage(),item));
|
||||
sGuildBossHurtRewardConfig = sGuildBossHurtRewardConfigTmp;
|
||||
}
|
||||
|
||||
public static SGuildBossRewardConfig getIndexByHurt(int hurtValue){
|
||||
return sGuildBossHurtRewardConfig.lowerEntry(hurtValue).getValue();
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
public int[] getReward() {
|
||||
return reward;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -70,6 +70,10 @@ public class SGuildSetting implements BaseConfig {
|
|||
|
||||
public static SGuildSetting sGuildSetting;
|
||||
|
||||
private int bossTime;
|
||||
|
||||
private int[][] bossReward;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue