Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
feaa5fb4f5
|
@ -90242,6 +90242,547 @@ public final class CommonProto {
|
|||
// @@protoc_insertion_point(class_scope:com.ljsd.jieling.protocols.CarGrapRecordItem)
|
||||
}
|
||||
|
||||
public interface GuildHelpInfoOrBuilder
|
||||
extends com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
// optional int32 type = 1;
|
||||
/**
|
||||
* <code>optional int32 type = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
*阵营
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasType();
|
||||
/**
|
||||
* <code>optional int32 type = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
*阵营
|
||||
* </pre>
|
||||
*/
|
||||
int getType();
|
||||
|
||||
// optional int32 num = 2;
|
||||
/**
|
||||
* <code>optional int32 num = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*碎片数量
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasNum();
|
||||
/**
|
||||
* <code>optional int32 num = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*碎片数量
|
||||
* </pre>
|
||||
*/
|
||||
int getNum();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code com.ljsd.jieling.protocols.GuildHelpInfo}
|
||||
*/
|
||||
public static final class GuildHelpInfo extends
|
||||
com.google.protobuf.GeneratedMessage
|
||||
implements GuildHelpInfoOrBuilder {
|
||||
// Use GuildHelpInfo.newBuilder() to construct.
|
||||
private GuildHelpInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
|
||||
super(builder);
|
||||
this.unknownFields = builder.getUnknownFields();
|
||||
}
|
||||
private GuildHelpInfo(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
|
||||
|
||||
private static final GuildHelpInfo defaultInstance;
|
||||
public static GuildHelpInfo getDefaultInstance() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
public GuildHelpInfo getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
private final com.google.protobuf.UnknownFieldSet unknownFields;
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private GuildHelpInfo(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
initFields();
|
||||
int mutable_bitField0_ = 0;
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownField(input, unknownFields,
|
||||
extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
bitField0_ |= 0x00000001;
|
||||
type_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
bitField0_ |= 0x00000002;
|
||||
num_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e.getMessage()).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return com.ljsd.jieling.protocols.CommonProto.internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return com.ljsd.jieling.protocols.CommonProto.internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo.class, com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo.Builder.class);
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Parser<GuildHelpInfo> PARSER =
|
||||
new com.google.protobuf.AbstractParser<GuildHelpInfo>() {
|
||||
public GuildHelpInfo parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new GuildHelpInfo(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<GuildHelpInfo> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
// optional int32 type = 1;
|
||||
public static final int TYPE_FIELD_NUMBER = 1;
|
||||
private int type_;
|
||||
/**
|
||||
* <code>optional int32 type = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
*阵营
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasType() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 type = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
*阵营
|
||||
* </pre>
|
||||
*/
|
||||
public int getType() {
|
||||
return type_;
|
||||
}
|
||||
|
||||
// optional int32 num = 2;
|
||||
public static final int NUM_FIELD_NUMBER = 2;
|
||||
private int num_;
|
||||
/**
|
||||
* <code>optional int32 num = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*碎片数量
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasNum() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 num = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*碎片数量
|
||||
* </pre>
|
||||
*/
|
||||
public int getNum() {
|
||||
return num_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
type_ = 0;
|
||||
num_ = 0;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized != -1) return isInitialized == 1;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
output.writeInt32(1, type_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
output.writeInt32(2, num_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(1, type_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(2, num_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
protected java.lang.Object writeReplace()
|
||||
throws java.io.ObjectStreamException {
|
||||
return super.writeReplace();
|
||||
}
|
||||
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input, extensionRegistry);
|
||||
}
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseDelimitedFrom(input);
|
||||
}
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseDelimitedFrom(input, extensionRegistry);
|
||||
}
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static Builder newBuilder() { return Builder.create(); }
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder(com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code com.ljsd.jieling.protocols.GuildHelpInfo}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessage.Builder<Builder>
|
||||
implements com.ljsd.jieling.protocols.CommonProto.GuildHelpInfoOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return com.ljsd.jieling.protocols.CommonProto.internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return com.ljsd.jieling.protocols.CommonProto.internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo.class, com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
private static Builder create() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
type_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
num_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(buildPartial());
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return com.ljsd.jieling.protocols.CommonProto.internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_descriptor;
|
||||
}
|
||||
|
||||
public com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo getDefaultInstanceForType() {
|
||||
return com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo.getDefaultInstance();
|
||||
}
|
||||
|
||||
public com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo build() {
|
||||
com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo buildPartial() {
|
||||
com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo result = new com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.type_ = type_;
|
||||
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
to_bitField0_ |= 0x00000002;
|
||||
}
|
||||
result.num_ = num_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo) {
|
||||
return mergeFrom((com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo other) {
|
||||
if (other == com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo.getDefaultInstance()) return this;
|
||||
if (other.hasType()) {
|
||||
setType(other.getType());
|
||||
}
|
||||
if (other.hasNum()) {
|
||||
setNum(other.getNum());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (com.ljsd.jieling.protocols.CommonProto.GuildHelpInfo) e.getUnfinishedMessage();
|
||||
throw e;
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
// optional int32 type = 1;
|
||||
private int type_ ;
|
||||
/**
|
||||
* <code>optional int32 type = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
*阵营
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasType() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 type = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
*阵营
|
||||
* </pre>
|
||||
*/
|
||||
public int getType() {
|
||||
return type_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 type = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
*阵营
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setType(int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
type_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 type = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
*阵营
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearType() {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
type_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// optional int32 num = 2;
|
||||
private int num_ ;
|
||||
/**
|
||||
* <code>optional int32 num = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*碎片数量
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasNum() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 num = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*碎片数量
|
||||
* </pre>
|
||||
*/
|
||||
public int getNum() {
|
||||
return num_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 num = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*碎片数量
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setNum(int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
num_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 num = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
*碎片数量
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearNum() {
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
num_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.GuildHelpInfo)
|
||||
}
|
||||
|
||||
static {
|
||||
defaultInstance = new GuildHelpInfo(true);
|
||||
defaultInstance.initFields();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:com.ljsd.jieling.protocols.GuildHelpInfo)
|
||||
}
|
||||
|
||||
private static com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_com_ljsd_jieling_protocols_ErrorResponse_descriptor;
|
||||
private static
|
||||
|
@ -90737,6 +91278,11 @@ public final class CommonProto {
|
|||
private static
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internal_static_com_ljsd_jieling_protocols_CarGrapRecordItem_fieldAccessorTable;
|
||||
private static com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_descriptor;
|
||||
private static
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
|
@ -91016,7 +91562,8 @@ public final class CommonProto {
|
|||
"\001 \001(\005\022\022\n\nendingTime\030\002 \001(\005\022\r\n\005state\030\003 \001(\005" +
|
||||
"\022\020\n\010totleAmt\030\004 \001(\005\"?\n\021CarGrapRecordItem\022" +
|
||||
"\014\n\004time\030\001 \001(\005\022\013\n\003uid\030\002 \001(\005\022\017\n\007content\030\003 ",
|
||||
"\001(\tB\002H\001"
|
||||
"\001(\t\"*\n\rGuildHelpInfo\022\014\n\004type\030\001 \001(\005\022\013\n\003nu" +
|
||||
"m\030\002 \001(\005B\002H\001"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
|
@ -91617,6 +92164,12 @@ public final class CommonProto {
|
|||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_com_ljsd_jieling_protocols_CarGrapRecordItem_descriptor,
|
||||
new java.lang.String[] { "Time", "Uid", "Content", });
|
||||
internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_descriptor =
|
||||
getDescriptor().getMessageTypes().get(98);
|
||||
internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_com_ljsd_jieling_protocols_GuildHelpInfo_descriptor,
|
||||
new java.lang.String[] { "Type", "Num", });
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,6 @@ package com.ljsd;
|
|||
|
||||
|
||||
|
||||
import com.mongodb.Mongo;
|
||||
import com.mongodb.MongoClient;
|
||||
import com.mongodb.MongoClientURI;
|
||||
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
|
||||
|
|
|
@ -102,8 +102,8 @@ public class CommonStaticConfig extends AbstractClassStaticConfig {
|
|||
calendar.set(Calendar.MINUTE,0);
|
||||
calendar.set(Calendar.SECOND,0);
|
||||
long timeInMillis = calendar.getTimeInMillis();
|
||||
sGlobalSystemConfig.setSeasonOpenLong(timeInMillis + Integer.parseInt(sGlobalSystemConfig.getSeasonOpen()) * 1000);
|
||||
sGlobalSystemConfig.setSeasonEndLong(timeInMillis + Integer.parseInt(sGlobalSystemConfig.getSeasonEnd()) * 1000);
|
||||
sGlobalSystemConfig.setSeasonOpenLong(timeInMillis + Integer.parseInt(sGlobalSystemConfig.getSeasonOpen()) * 1000L);
|
||||
sGlobalSystemConfig.setSeasonEndLong(timeInMillis + Integer.parseInt(sGlobalSystemConfig.getSeasonEnd()) * 1000L);
|
||||
} else {
|
||||
sGlobalSystemConfig.setSeasonOpenLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonOpen(), TimeUtils.Stand_CeHua_Data_format));
|
||||
sGlobalSystemConfig.setSeasonEndLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonEnd(), TimeUtils.Stand_CeHua_Data_format));
|
||||
|
|
|
@ -60,6 +60,7 @@ public enum FunctionIdEnum {
|
|||
WorkShopRebuildEquip(104,null,MessageTypeProto.MessageType.WORKSHOP_REBUILD_REQUEST_VALUE),
|
||||
Expedition(64,null),
|
||||
Achieve(65,null),
|
||||
DeathPath(72,null),
|
||||
Car_Delay(73,new CarDelayFunction()),
|
||||
;
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@ public interface GlobalsDef {
|
|||
int BLOODY_TEAM =701; //血战队伍
|
||||
int CHAMPION_ATTACK_TEAM =801; //
|
||||
int CAR_DELAY_TEAM =1101; //车迟斗法
|
||||
int DEATH_PATH_TEAM = 1201;//十绝阵
|
||||
|
||||
//特权解锁类型
|
||||
int LEVEL_UNLOCK_PRIVILEGE = 1;
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
|
||||
//todo 对用户频繁访问加限流处理。
|
||||
public class HandlerLogicThread extends Thread{
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(HandlerLogicThread.class);
|
||||
private static Set<Integer> whiteMsg = new HashSet<>();
|
||||
|
|
|
@ -65,6 +65,7 @@ public interface Global {
|
|||
int GMMSG = 4; //gm
|
||||
int LUCKWHEEL = 5; //幸运探宝
|
||||
int LUCKWHEEL_ADVANCE = 6; //高级探宝
|
||||
int DEATH_PATH_FIRST = 7;//十绝阵第一名公会
|
||||
|
||||
|
||||
int VIPSTORID = 20; //vip商店id
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.ljsd.jieling.logic.activity.ActivityLogic;
|
|||
import com.ljsd.jieling.logic.activity.FightMainEventHandler;
|
||||
import com.ljsd.jieling.logic.activity.RemoveEventHeroHandler;
|
||||
import com.ljsd.jieling.logic.activity.UserLevelEventHandler;
|
||||
import com.ljsd.jieling.logic.activity.eventhandler.ActivityStateChangeHandler;
|
||||
import com.ljsd.jieling.logic.activity.eventhandler.BuyGoodsDirectHandler;
|
||||
import com.ljsd.jieling.logic.arena.ArenaLogic;
|
||||
import com.ljsd.jieling.logic.championship.ChampionshipLogic;
|
||||
|
@ -243,6 +244,7 @@ public class GlobalDataManaager implements IManager {
|
|||
new RemoveEventHeroHandler();
|
||||
new FightMainEventHandler();
|
||||
new BuyGoodsDirectHandler();
|
||||
new ActivityStateChangeHandler();
|
||||
ChampionshipLogic.minuteCheck(true);
|
||||
GuildFightLogic.minuteCheckForCarFight();
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -8,8 +8,11 @@ import com.ljsd.jieling.jbean.*;
|
|||
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
||||
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.activity.event.ActivityStateChangeEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.BuyGoodsDirectEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.IEvent;
|
||||
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
|
@ -19,6 +22,7 @@ import com.ljsd.jieling.protocols.MessageTypeProto;
|
|||
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import com.ljsd.jieling.util.ToolsUtil;
|
||||
import util.TimeUtils;
|
||||
import config.SActivityRewardConfig;
|
||||
import config.SErrorCodeEerverConfig;
|
||||
|
@ -281,6 +285,11 @@ public abstract class AbstractActivity implements IActivity, IEventHandler {
|
|||
public void onActivityEndOnMySelf(User user) throws Exception {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private final void activityCLoseInvoke(){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -325,10 +334,11 @@ public abstract class AbstractActivity implements IActivity, IEventHandler {
|
|||
}
|
||||
|
||||
|
||||
void setOpenState(User user,int openState){
|
||||
public void setOpenState(User user,int openState){
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
||||
if(activityMission != null){
|
||||
activityMission.setActivityState(openState);
|
||||
Poster.getPoster().dispatchEvent(new ActivityStateChangeEvent(user.getId(),id,openState));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -325,13 +325,6 @@ public class ActivityLogic implements IEventHandler{
|
|||
}
|
||||
//非角色活动开启通知
|
||||
openNewActivityIds.add(openActivityId);
|
||||
if(sGlobalActivity.getShopId()!=null && sGlobalActivity.getShopId().length>0){
|
||||
long startTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),0, 1);
|
||||
long endTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),0, 2);
|
||||
for (int shopId : sGlobalActivity.getShopId()) {
|
||||
checkNeedOpenStore(user,shopId,startTime,endTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<Integer, ActivityMission> activityMissionMap = activityManager.getActivityMissionMap();
|
||||
for (SGlobalActivity sGlobalActivity : sGlobalActivityMap.values()) {
|
||||
|
@ -377,9 +370,6 @@ public class ActivityLogic implements IEventHandler{
|
|||
continue;
|
||||
}
|
||||
openNewActivityIds.add(activityId);
|
||||
for (int shopID : sGlobalActivity.getShopId()) {
|
||||
checkNeedOpenStore(user,shopID,startTime,endTime);
|
||||
}
|
||||
|
||||
} else {
|
||||
long endTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),userCreateTime, 2);
|
||||
|
@ -399,6 +389,7 @@ public class ActivityLogic implements IEventHandler{
|
|||
if(activityMission.getOpenType()!=ActivityType.CLOSE_STATE){
|
||||
abstractActivity.onActivityEndSelfWithDealReward(user);
|
||||
abstractActivity.setOpenState(user,ActivityType.CLOSE_STATE);
|
||||
Poster.getPoster().dispatchEvent(new ActivityStateChangeEvent(user.getId(),activityId,ActivityType.CLOSE_STATE));
|
||||
}
|
||||
|
||||
if(isRemoveInfo){
|
||||
|
|
|
@ -17,6 +17,7 @@ import config.SGlobalSystemConfig;
|
|||
import config.SMainLevelConfig;
|
||||
import manager.STableManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
@ -41,30 +42,28 @@ public class FightMainEventHandler implements IEventHandler{
|
|||
}
|
||||
//检测更新vip是否有新开
|
||||
user.getPlayerInfoManager().updateVipInfo(GlobalsDef.MAIN_LEVEL_UNLOCK_PRIVILEGE,10_000_000 * (fightId % 10) + fightId);
|
||||
for(SGlobalActivity sGlobalActivity : SGlobalActivity.getsGlobalActivityMap().values()){
|
||||
List<SGlobalActivity> sGlobalActivityList = SGlobalActivity.sGlobalActivityMapByOpenRules.getOrDefault(1, new ArrayList<>(0));
|
||||
for(SGlobalActivity sGlobalActivity : sGlobalActivityList){
|
||||
int[] openRules = sGlobalActivity.getOpenRules();
|
||||
if(openRules!=null && openRules.length>0 && openRules[0] == 1){
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(sGlobalActivity.getId());
|
||||
if(activityMission!=null && activityMission.getActivityState() == ActivityType.UNOPEN_STATE){
|
||||
int virtureId = SMainLevelConfig.config.get( openRules[1]).getVirtureId();
|
||||
SMainLevelConfig mineMainLevelConfig = SMainLevelConfig.config.get(fightId);
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(sGlobalActivity.getId());
|
||||
if(activityMission!=null && activityMission.getActivityState() == ActivityType.UNOPEN_STATE){
|
||||
int virtureId = SMainLevelConfig.config.get( openRules[1]).getVirtureId();
|
||||
SMainLevelConfig mineMainLevelConfig = SMainLevelConfig.config.get(fightId);
|
||||
// if(user.getMainLevelManager().getState() == 2 ){
|
||||
// mineMainLevelConfig = SMainLevelConfig.config.get(user.getMainLevelManager().getFightId());
|
||||
// }
|
||||
if(mineMainLevelConfig!=null && virtureId <= mineMainLevelConfig.getVirtureId()){
|
||||
activityMission.setActivityState(ActivityType.OPEN_STATE);
|
||||
ActivityLogic.getInstance().sendActivityInfo(user,sGlobalActivity.getId());
|
||||
if(sGlobalActivity.getShopId().length>0){
|
||||
long startTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),user.getPlayerInfoManager().getCreateTime(), 1);
|
||||
long endTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),user.getPlayerInfoManager().getCreateTime(), 2);
|
||||
for (int shopId : sGlobalActivity.getShopId()) {
|
||||
ActivityLogic.getInstance().checkNeedOpenStore(user,shopId,startTime,endTime);
|
||||
}
|
||||
|
||||
if(mineMainLevelConfig!=null && virtureId <= mineMainLevelConfig.getVirtureId()){
|
||||
activityMission.setActivityState(ActivityType.OPEN_STATE);
|
||||
ActivityLogic.getInstance().sendActivityInfo(user,sGlobalActivity.getId());
|
||||
if(sGlobalActivity.getShopId().length>0){
|
||||
long startTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),user.getPlayerInfoManager().getCreateTime(), 1);
|
||||
long endTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),user.getPlayerInfoManager().getCreateTime(), 2);
|
||||
for (int shopId : sGlobalActivity.getShopId()) {
|
||||
ActivityLogic.getInstance().checkNeedOpenStore(user,shopId,startTime,endTime);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
List<SGlobalSystemConfig> sGlobalSystemConfigs = STableManager.getFigureConfig(CommonStaticConfig.class).getsGlobalSystemConfigMapByTypeAndConditionMap().get(1).get(fightId);
|
||||
|
|
|
@ -15,8 +15,12 @@ class GrowthFundActivity extends AbstractActivity {
|
|||
|
||||
@Override
|
||||
boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception {
|
||||
|
||||
int[][] values = sActivityRewardConfig.getValues();
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
if(user.getPlayerInfoManager().getRechargeInfo().getHadBuyFound() == 0){
|
||||
return false;
|
||||
}
|
||||
int type = values[0][0];
|
||||
int value = values[0][1];
|
||||
if(type == 9){
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.ljsd.jieling.core.GlobalsDef;
|
|||
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
import com.ljsd.jieling.logic.activity.event.ActivityStateChangeEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.IEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserLevelEvent;
|
||||
|
@ -20,6 +21,7 @@ import config.SPrivilegeTypeConfig;
|
|||
import manager.STableManager;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UserLevelEventHandler implements IEventHandler,IPrivilegeChange{
|
||||
|
@ -49,25 +51,16 @@ public class UserLevelEventHandler implements IEventHandler,IPrivilegeChange{
|
|||
}
|
||||
|
||||
}
|
||||
for(SGlobalActivity sGlobalActivity : SGlobalActivity.getsGlobalActivityMap().values()){
|
||||
List<SGlobalActivity> sGlobalActivities = SGlobalActivity.sGlobalActivityMapByOpenRules.getOrDefault(2,new ArrayList<>(0));
|
||||
for(SGlobalActivity sGlobalActivity : sGlobalActivities){
|
||||
int[] openRules = sGlobalActivity.getOpenRules();
|
||||
if(openRules!=null && openRules.length>0 && openRules[0] == 2){
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(sGlobalActivity.getId());
|
||||
if(activityMission!=null && activityMission.getActivityState() == ActivityType.UNOPEN_STATE){
|
||||
if(userLevelEvent.getLevel()>=openRules[1]){
|
||||
activityMission.setActivityState(ActivityType.OPEN_STATE);
|
||||
ActivityLogic.getInstance().sendActivityInfo(user,sGlobalActivity.getId());
|
||||
if(sGlobalActivity.getShopId().length>0){
|
||||
long startTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),user.getPlayerInfoManager().getCreateTime(), 1);
|
||||
long endTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),user.getPlayerInfoManager().getCreateTime(), 2);
|
||||
for (int shopId : sGlobalActivity.getShopId()) {
|
||||
ActivityLogic.getInstance().checkNeedOpenStore(user,shopId,startTime,endTime);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(sGlobalActivity.getId());
|
||||
if(activityMission!=null && activityMission.getActivityState() == ActivityType.UNOPEN_STATE){
|
||||
if(userLevelEvent.getLevel()>=openRules[1]){
|
||||
activityMission.setActivityState(ActivityType.OPEN_STATE);
|
||||
ActivityLogic.getInstance().sendActivityInfo(user,sGlobalActivity.getId());
|
||||
Poster.getPoster().dispatchEvent(new ActivityStateChangeEvent(user.getId(),sGlobalActivity.getId(),ActivityType.OPEN_STATE));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(sGlobalSystemConfigs == null){
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package com.ljsd.jieling.logic.activity.event;
|
||||
|
||||
public class ActivityStateChangeEvent implements IEvent{
|
||||
private int uid;
|
||||
private int activityId;
|
||||
private int state;
|
||||
|
||||
public ActivityStateChangeEvent(int uid, int activityId, int state) {
|
||||
this.uid = uid;
|
||||
this.activityId = activityId;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public int getActivityId() {
|
||||
return activityId;
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return state;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.ljsd.jieling.logic.activity.eventhandler;
|
||||
|
||||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
import com.ljsd.jieling.logic.activity.*;
|
||||
import com.ljsd.jieling.logic.activity.event.ActivityStateChangeEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.BuyGoodsDirectEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.IEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.util.ToolsUtil;
|
||||
import config.SGlobalActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ActivityStateChangeHandler implements IEventHandler {
|
||||
public ActivityStateChangeHandler() {
|
||||
Poster.getPoster().listenEvent(this, ActivityStateChangeEvent.class);
|
||||
}
|
||||
@Override
|
||||
public void onEvent(IEvent event) throws Exception {
|
||||
if( ! (event instanceof ActivityStateChangeEvent) ){
|
||||
return;
|
||||
}
|
||||
ActivityStateChangeEvent activityStateChangeEvent = (ActivityStateChangeEvent) event;
|
||||
int uid = activityStateChangeEvent.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
int activityId = activityStateChangeEvent.getActivityId();
|
||||
int state = activityStateChangeEvent.getState();
|
||||
if(state == ActivityType.OPEN_STATE){
|
||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(activityId);
|
||||
if(sGlobalActivity.getShopId().length>0){
|
||||
long startTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),user.getPlayerInfoManager().getCreateTime(), 1);
|
||||
long endTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),user.getPlayerInfoManager().getCreateTime(), 2);
|
||||
for (int shopId : sGlobalActivity.getShopId()) {
|
||||
ActivityLogic.getInstance().checkNeedOpenStore(user,shopId,startTime,endTime);
|
||||
}
|
||||
}
|
||||
if(sGlobalActivity.getCanBuyRechargeId()!=0){
|
||||
user.getPlayerInfoManager().getRechargeInfo().putDyGoodsCanBuyTimes(sGlobalActivity.getCanBuyRechargeId(),1);
|
||||
}
|
||||
}else if(state == ActivityType.CLOSE_STATE){
|
||||
List<SGlobalActivity> sGlobalActivities = SGlobalActivity.sGlobalActivityMapByType.getOrDefault(3, new ArrayList<>(0));
|
||||
sGlobalActivities.stream().filter(s->s.getOpenRules()[1] == activityId).forEach(s->{
|
||||
ActivityMission activityMissionWillOpen = user.getActivityManager().getActivityMissionMap().get(s.getId());
|
||||
if(activityMissionWillOpen!=null && activityMissionWillOpen.getActivityState() == ActivityType.UNOPEN_STATE){
|
||||
AbstractActivity abstractActivity = ActivityTypeEnum.getActicityType(s.getId());
|
||||
abstractActivity.setOpenState(user,ActivityType.OPEN_STATE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,14 +1,19 @@
|
|||
package com.ljsd.jieling.logic.family;
|
||||
|
||||
import com.ljsd.common.mogodb.util.BlockingUniqueQueue;
|
||||
import com.ljsd.jieling.chat.logic.ChatLogic;
|
||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
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.BIReason;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||
import com.ljsd.jieling.logic.dao.TimeControllerOfFunction;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.GuildInfo;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -16,6 +21,7 @@ import com.ljsd.jieling.logic.fight.FightDispatcher;
|
|||
import com.ljsd.jieling.logic.fight.GameFightType;
|
||||
import com.ljsd.jieling.logic.fight.PVEFightEvent;
|
||||
import com.ljsd.jieling.logic.fight.result.FightResult;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
import com.ljsd.jieling.logic.rank.RankContext;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
||||
|
@ -25,24 +31,24 @@ import com.ljsd.jieling.protocols.Family;
|
|||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import config.SErrorCodeEerverConfig;
|
||||
import config.SGuildSetting;
|
||||
import config.SGuildWarConfig;
|
||||
import config.SGuildWarRewardConfig;
|
||||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
import util.StringUtil;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2020/5/6
|
||||
* @discribe 十绝阵相关
|
||||
* @discribe 十绝阵相关-----难。。。
|
||||
*/
|
||||
public class DeathPathLogic {
|
||||
private DeathPathLogic(){
|
||||
|
@ -75,62 +81,108 @@ public class DeathPathLogic {
|
|||
* 检查是否在开启状态
|
||||
*/
|
||||
public void statusCheck(){
|
||||
Runnable runnable = this::doCheck;
|
||||
runnable.run();
|
||||
}
|
||||
|
||||
|
||||
private void doCheck(){
|
||||
TimeControllerOfFunction timeControllerOfFunction = GlobalDataManaager.getInstance().getTimeControllerOfFunctionByFunctinoType(FunctionIdEnum.DeathPath);
|
||||
if(timeControllerOfFunction==null){
|
||||
status = -1;
|
||||
return;
|
||||
}
|
||||
if(guildWarOpenTime==null){
|
||||
guildWarOpenTime = SGuildSetting.sGuildSetting.getGuildWarOpenTime();
|
||||
guildWarOpenTime = new int[8];
|
||||
int[] setting = SGuildSetting.sGuildSetting.getGuildWarOpenTime();
|
||||
if(setting[0]==2){
|
||||
for(int i = 1;i<setting.length;i++){
|
||||
guildWarOpenTime[setting[i]]= 1;
|
||||
if(setting[i]!=7){
|
||||
guildWarOpenTime[setting[i]+1]= -1;
|
||||
}else{
|
||||
guildWarOpenTime[1] = -1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for(int i = 0 ; i<guildWarOpenTime.length;i++){
|
||||
guildWarOpenTime[i] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(guildWarTime==null){
|
||||
guildWarTime = SGuildSetting.sGuildSetting.getGuildWarTime();
|
||||
}
|
||||
boolean result = false;
|
||||
if(guildWarOpenTime[0]==2){
|
||||
int dayOfWeek = TimeUtils.getDayOfWeek();
|
||||
for(int i = 1;i<guildWarOpenTime.length;i++){
|
||||
if(guildWarOpenTime[i]!=dayOfWeek){
|
||||
continue;
|
||||
}
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}else if(guildWarOpenTime[0]==1){
|
||||
result = true;
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
if(result) {
|
||||
Runnable runnable = this::isOpen;
|
||||
runnable.run();
|
||||
}
|
||||
}
|
||||
isOpen();
|
||||
|
||||
}
|
||||
private void isOpen(){
|
||||
int hourOfDay = TimeUtils.getHourOfDay();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int minute = calendar.get(Calendar.MINUTE);
|
||||
int tempTime = hourOfDay*100+minute;
|
||||
int currStatus = 0;
|
||||
for(int i = 0;i<guildWarTime.length-1;i++){
|
||||
int tempSmall = guildWarTime[i][0]*100+guildWarTime[i][1];
|
||||
int tempBig = guildWarTime[i+1][0]*100+guildWarTime[i+1][1];
|
||||
int dayOfWeek = TimeUtils.getDayOfWeek();
|
||||
int currStatus=0;
|
||||
int dayStats = guildWarOpenTime[dayOfWeek];
|
||||
//当前时间与表配置时间判断 获得 currStatus
|
||||
if(dayStats==-1){
|
||||
//领奖阶段
|
||||
currStatus = 2;
|
||||
}else if (dayStats==1){
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int hourOfDay = TimeUtils.getHourOfDay();
|
||||
int minute = calendar.get(Calendar.MINUTE);
|
||||
int tempTime = hourOfDay*100+minute;
|
||||
if(guildWarTime.length!=2){
|
||||
return;
|
||||
}
|
||||
|
||||
int tempSmall = guildWarTime[0][0]*100+guildWarTime[0][1];
|
||||
|
||||
int tempBig = guildWarTime[1][0]*100+guildWarTime[1][1];
|
||||
|
||||
if(tempTime>=tempSmall&&tempTime<tempBig){
|
||||
currStatus = i+1;
|
||||
break;
|
||||
currStatus = 1;
|
||||
}else if(tempTime>=tempBig){
|
||||
currStatus = 2;
|
||||
}
|
||||
}
|
||||
// currStatus与服务器当前status比较,如果不同,认为状态修改
|
||||
if(currStatus!=status){
|
||||
status = currStatus;
|
||||
overTime = (int)(TimeUtils.getAppointTime(guildWarTime[status][0],guildWarTime[status][1])/1000);
|
||||
if(status==1){
|
||||
if (taskExecutor == null) {
|
||||
taskExecutor = new DeathPathExecutor(tasks);
|
||||
taskExecutor.start();
|
||||
}
|
||||
switch (status){
|
||||
case 0:
|
||||
try {
|
||||
deleteDeathPathInfo();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
overTime = (int)(TimeUtils.getAppointTime(guildWarTime[status][0],guildWarTime[status][1])/1000);
|
||||
if (taskExecutor == null) {
|
||||
taskExecutor = new DeathPathExecutor(tasks);
|
||||
taskExecutor.start();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
AbstractRank guildTotalRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
Set<ZSetOperations.TypedTuple<String>> firstGuild = guildTotalRank.getRankByKey("", 0, 1);
|
||||
if(firstGuild.isEmpty()||firstGuild.size()>1){
|
||||
break;
|
||||
}
|
||||
String gid = firstGuild.iterator().next().getValue();
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(Integer.parseInt(gid));
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("guildwar_content", new Object[]{guildInfo.getName()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DEATH_PATH_FIRST, 0, 0, 0, 0, 0, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
System.out.println("状态修改-------");
|
||||
//阶段信息改变发送推送
|
||||
for(Map.Entry<Integer, ISession> sessionEntry:OnlineUserManager.sessionMap.entrySet()) {
|
||||
Family.DeathPathStatusChangeIndication indication = Family.DeathPathStatusChangeIndication.newBuilder().setStatus(status).build();
|
||||
MessageUtil.sendIndicationMessage(sessionEntry.getValue(),1, MessageTypeProto.MessageType.DEATH_PATH_STATUS_CHANGE_INDICATION.getNumber(),indication,true);
|
||||
}
|
||||
}
|
||||
System.out.println("status="+status);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,7 +216,7 @@ public class DeathPathLogic {
|
|||
ZSetOperations.TypedTuple<String> next = iterator.next();
|
||||
int guildId = Integer.valueOf(next.getValue());
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(guildId);
|
||||
Family.DeathPathInfo info = Family.DeathPathInfo.newBuilder().setGuildName(guildInfo.getName()).setPathId(i).build();
|
||||
Family.DeathPathInfo info = Family.DeathPathInfo.newBuilder().setGuildName(guildInfo.getName()).setPathId(i).setGid(guildId).build();
|
||||
response.addInfos(info);
|
||||
}
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||
|
@ -178,14 +230,18 @@ public class DeathPathLogic {
|
|||
* @param messageType
|
||||
*/
|
||||
public void challenge(ISession session, int pathId, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
int uid = session.getUid();
|
||||
String count = RedisUtil.getInstence().get(RedisKey.DEATH_PATH_CHALLENGE_COUNT, String.valueOf(uid),String.class);
|
||||
if(!StringUtil.isEmpty(count)&&Integer.parseInt(count)>=SGuildSetting.sGuildSetting.getChallengeMaxTime()){
|
||||
throw new ErrorCodeException(ErrorCode.REFRESH_WHEL_TIME_NOT);
|
||||
}
|
||||
if(status!=1){
|
||||
throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN);
|
||||
}
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
SGuildWarConfig config = STableManager.getConfig(SGuildWarConfig.class).get(pathId);
|
||||
PVEFightEvent pveFightEvent = new PVEFightEvent(user.getId(), GlobalsDef.FORMATION_NORMAL, 1000, "", GameFightType.DeathPathChallenge, config.getMonsterId(), 3);
|
||||
PVEFightEvent pveFightEvent = new PVEFightEvent(user.getId(), GlobalsDef.DEATH_PATH_TEAM, 1000, "", GameFightType.DeathPathChallenge, config.getMonsterId(), 3);
|
||||
FightResult fightResult = FightDispatcher.dispatcher(pveFightEvent);
|
||||
int damage = fightResult.getCheckResult()[1];
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder()
|
||||
|
@ -232,6 +288,7 @@ public class DeathPathLogic {
|
|||
private void taskDoExecute(DeathPathTask task){
|
||||
|
||||
//公会总进攻人数
|
||||
// task.setDamage(20000000);
|
||||
DeathChallengeCount countInfo = RedisUtil.getInstence().get(RedisKey.DEATH_PAHT_TOTAL_CHALLENGE_COUNT, String.valueOf(task.getGuildId()), DeathChallengeCount.class);
|
||||
if (countInfo==null){
|
||||
countInfo = new DeathChallengeCount();
|
||||
|
@ -273,7 +330,7 @@ public class DeathPathLogic {
|
|||
guildTotalRank.addRank(task.getGuildId(),"",task.getDamage());
|
||||
}else{
|
||||
guildTotalRank.addRank(currFirstGuildId,"",task.getDamage(),1);
|
||||
guildTotalRank.addRank(firstGuildId,"",task.getDamage(),-1);
|
||||
guildTotalRank.addRank(firstGuildId,"",0,-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,7 +360,7 @@ public class DeathPathLogic {
|
|||
if(userReward!=null){
|
||||
for(Map.Entry<Integer, DeathReward> entry:userReward.entrySet()){
|
||||
DeathReward value = entry.getValue();
|
||||
Family.RewardInfo info = Family.RewardInfo.newBuilder().setUid(entry.getKey()).setItemCount(value.getItemCount()).setItemId(value.getItemId()).setPosition(value.getPosition()).build();
|
||||
Family.RewardInfo info = Family.RewardInfo.newBuilder().setUid(entry.getKey()).setItemCount(value.getItemCount()).setItemId(value.getItemId()).setPosition(value.getPosition()).setUsername(value.getUsername()).build();
|
||||
response.addInfo(info);
|
||||
}
|
||||
}
|
||||
|
@ -321,7 +378,7 @@ public class DeathPathLogic {
|
|||
public void getDeathPathReward(ISession session,int position, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
int[] reward = new int[]{4,10};
|
||||
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
DeathChallengeCount countInfo = RedisUtil.getInstence().get(RedisKey.DEATH_PAHT_TOTAL_CHALLENGE_COUNT, String.valueOf(guildId), DeathChallengeCount.class);
|
||||
if (countInfo==null||!countInfo.getUserReward().containsKey(uid)){
|
||||
|
@ -332,17 +389,98 @@ public class DeathPathLogic {
|
|||
//您已领取过奖励
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
countInfo = new DeathChallengeCount();
|
||||
|
||||
countInfo.putUserReward(uid,new DeathReward(reward[0],reward[1],position));
|
||||
// 根据排名进行随机奖励
|
||||
Long rank = RedisUtil.getInstence().getZSetreverseRank(RedisKey.DEATH_PATH_TOTAL_GUILD_RANK, "", String.valueOf(user.getPlayerInfoManager().getGuildId()));
|
||||
if(rank==-1){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
int[] reward = getRewardByRank(rank.intValue());
|
||||
countInfo.putUserReward(uid,new DeathReward(reward[0],reward[1],position,user.getPlayerInfoManager().getNickName()));
|
||||
RedisUtil.getInstence().set(RedisKey.DEATH_PAHT_TOTAL_CHALLENGE_COUNT, String.valueOf(guildId),countInfo);
|
||||
ItemUtil.drop(user,new int[][]{reward},BIReason.DEATH_PAHT_RANDOM_REWARD);
|
||||
Family.RewardInfo info = Family.RewardInfo.newBuilder().setUid(uid).setItemCount(reward[1]).setItemId(reward[0]).setPosition(position).build();
|
||||
|
||||
GuildLogic.sendIndicationToMember(GuilidManager.guildInfoMap.get(guildId), MessageTypeProto.MessageType.DEATH_PATH_DO_REWARD_INDICATION,info);
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),null,true);
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[][]{reward}, BIReason.DEATH_PAHT_RANDOM_REWARD);
|
||||
Family.DoRewardDeathPathResponse response =Family.DoRewardDeathPathResponse.newBuilder().setDrop(drop).build();
|
||||
Family.RewardInfo info = Family.RewardInfo.newBuilder().setUid(uid).setItemCount(reward[1]).setItemId(reward[0]).setPosition(position).setUsername(user.getPlayerInfoManager().getNickName()).build();
|
||||
Family.DoRewardIndication indication =Family.DoRewardIndication.newBuilder().setInfo(info).build();
|
||||
GuildLogic.sendIndicationToMember(GuilidManager.guildInfoMap.get(guildId), MessageTypeProto.MessageType.DEATH_PATH_DO_REWARD_INDICATION,indication);
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response,true);
|
||||
}
|
||||
|
||||
|
||||
private int[] getRewardByRank(int rank){
|
||||
TreeMap<Integer,SGuildWarRewardConfig> treeReward = (TreeMap<Integer,SGuildWarRewardConfig>)SGuildWarRewardConfig.treeReward;
|
||||
|
||||
Map.Entry<Integer, SGuildWarRewardConfig> entry = treeReward.floorEntry(rank);
|
||||
|
||||
SGuildWarRewardConfig value = entry.getValue();
|
||||
int[][] rewardArray = value.getReward();
|
||||
double[] randomArray = new double[rewardArray.length];
|
||||
for(int i = 0;i< randomArray.length;i++){
|
||||
if(rewardArray[i].length<3){
|
||||
continue;
|
||||
}
|
||||
randomArray[i] = rewardArray[i][2];
|
||||
}
|
||||
int[] reward= rewardArray[nextDiscrete(randomArray)];
|
||||
return new int[]{reward[0],reward[1]};
|
||||
}
|
||||
//清除排行信息
|
||||
private void deleteDeathPathInfo() throws Exception {
|
||||
//todo 邮件自动发奖
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
AbstractRank guildRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
AbstractRank personRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_PERSON_RANK.getType());
|
||||
Set<ZSetOperations.TypedTuple<String>> guildRankSet = guildRank.getRankByKey("", 0, -1);
|
||||
Set<ZSetOperations.TypedTuple<String>> personRankSet = personRank.getRankByKey("", 0, -1);
|
||||
if(guildRankSet.isEmpty()&&personRankSet.isEmpty()){
|
||||
return;
|
||||
}
|
||||
String[] removeGuildKey = new String[guildRankSet.size()];
|
||||
String[] removePersonKey = new String[personRankSet.size()];
|
||||
int index = 0;
|
||||
for(ZSetOperations.TypedTuple<String> item:guildRankSet){
|
||||
removeGuildKey[index] = RedisKey.getKey(RedisKey.DEATH_PAHT_TOTAL_CHALLENGE_COUNT, item.getValue(),false);
|
||||
index++;
|
||||
}
|
||||
index = 0;
|
||||
for(ZSetOperations.TypedTuple<String> item:personRankSet){
|
||||
removePersonKey[index] = RedisKey.getKey(RedisKey.DEATH_PATH_CHALLENGE_COUNT, item.getValue(),false);
|
||||
index++;
|
||||
}
|
||||
String mailTitle = SErrorCodeEerverConfig.getI18NMessage("guildwar_reward_title");
|
||||
String mailContent = SErrorCodeEerverConfig.getI18NMessage("guildwar_reward_txt");
|
||||
for(String key:removeGuildKey){
|
||||
DeathChallengeCount reward = redisUtil.getObject(key, DeathChallengeCount.class);
|
||||
if(reward!=null&&reward.getUserReward().size()!=0){
|
||||
Map<Integer, DeathReward> userReward = reward.getUserReward();
|
||||
for(Map.Entry<Integer, DeathReward> rewardEntry:userReward.entrySet()){
|
||||
if(rewardEntry.getValue().getPosition()==0){
|
||||
MailLogic.getInstance().sendMail(rewardEntry.getKey(),mailTitle,mailContent,"16#100",TimeUtils.nowInt(), Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
redisUtil.del(removeGuildKey);
|
||||
redisUtil.del(removePersonKey);
|
||||
for(int i = 1; i <=10;i++){
|
||||
redisUtil.del(RedisKey.getKey(RankEnum.DEATH_PATH_EVERY_GUILD_RANK.getRedisKey(),String.valueOf(i),false));
|
||||
redisUtil.del(RedisKey.getKey(RankEnum.DEATH_PATH_EVERY_PERSON_RANK.getRedisKey(),String.valueOf(i),false));
|
||||
}
|
||||
redisUtil.del(RedisKey.getKey(guildRank.getRedisKey(),"",false));
|
||||
redisUtil.del(RedisKey.getKey(personRank.getRedisKey(),"",false));
|
||||
}
|
||||
|
||||
public static int nextDiscrete(double[] probs) {
|
||||
double sum = 0.0;
|
||||
for (int i = 0; i < probs.length; i++)
|
||||
sum += probs[i];
|
||||
|
||||
double r = Math.random() * sum;
|
||||
sum = 0.0;
|
||||
for (int i = 0; i < probs.length; i++) {
|
||||
sum += probs[i];
|
||||
if (sum > r)
|
||||
return i;
|
||||
}
|
||||
return probs.length - 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ package com.ljsd.jieling.logic.family;
|
|||
* @discribe
|
||||
*/
|
||||
public class DeathReward {
|
||||
|
||||
private String username="";
|
||||
private int itemId;
|
||||
private int itemCount ;
|
||||
private int position;
|
||||
|
@ -35,12 +35,21 @@ public class DeathReward {
|
|||
this.position = position;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public DeathReward() {
|
||||
}
|
||||
|
||||
public DeathReward(int itemId, int itemCount, int position) {
|
||||
public DeathReward(int itemId, int itemCount, int position,String username) {
|
||||
this.itemId = itemId;
|
||||
this.itemCount = itemCount;
|
||||
this.position = position;
|
||||
this.username = username;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,10 +51,7 @@ public class GuildLogic {
|
|||
}
|
||||
|
||||
public void flushEveryDay(User user, PlayerInfoProto.FivePlayerUpdateIndication.Builder fBuilder)throws Exception {
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
if(guildId != 0){
|
||||
takeAllReward(user);
|
||||
}
|
||||
takeAllReward(user);
|
||||
|
||||
user.getGuildMyInfo().setFetetype(0);
|
||||
user.getGuildMyInfo().clearHadTakeReward();
|
||||
|
|
|
@ -43,7 +43,7 @@ public enum GameFightType {
|
|||
|
||||
GuildBossFight(FightType.GuildBossFight,new DefaultOfRedisCacheFightHandler(),RedisKey.GUILD_MONSTER_FIGHT),
|
||||
DailyChallenge(FightType.StoryFight,new DefaultWithoutHandFightHandler(),null),
|
||||
DeathPathChallenge(FightType.StoryFight,new DefaultWithoutHandFightHandler(),null),
|
||||
DeathPathChallenge(FightType.CarBossFight,new DefaultWithoutHandFightHandler(),null),
|
||||
|
||||
CarBossChallenge(FightType.CarBossFight,new DefaultWithoutHandFightHandler(),null),
|
||||
CarPersonChallenge(FightType.CarBossFight,new PVPFightHandler(),null),
|
||||
|
|
|
@ -1012,9 +1012,7 @@ public class HeroLogic{
|
|||
Map<Integer, Integer> soulEquipByPositionMap = hero.getSoulEquipByPositionMap();
|
||||
Map<Integer, SEquipConfig> config = STableManager.getConfig(SEquipConfig.class);
|
||||
soulEquipByPositionMap.values().forEach(e->{
|
||||
if(config.get(e).getPassiveSkill()!=0){
|
||||
skillList.add(config.get(e).getPassiveSkill());
|
||||
}
|
||||
Arrays.stream(config.get(e).getPassiveSkill()).forEach(skillList::add);
|
||||
});
|
||||
//法宝技能
|
||||
int[] equipTalismana = tempHero.getEquipTalismana();
|
||||
|
|
|
@ -735,9 +735,10 @@ public class MissionLoigc {
|
|||
break;
|
||||
case FINISH_MISSING_ROOM:
|
||||
if(missionSubType[0] == 0){
|
||||
cumulationData.finishMissionTimes.values().stream().collect(Collectors.summarizingInt(x->x));
|
||||
count = (int)(cumulationData.finishMissionTimes.values().stream().collect(Collectors.summarizingInt(x->x)).getSum());
|
||||
}else{
|
||||
count = cumulationData.finishMissionTimes.get(missionSubType[0]);
|
||||
}
|
||||
count = cumulationData.finishMissionTimes.get(missionSubType[0]);
|
||||
break;
|
||||
case REFRESH_MISSING_ROOM:
|
||||
count = cumulationData.refreshMrTimes;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package com.ljsd.jieling.logic.rank.rankImpl;
|
||||
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||
import com.ljsd.jieling.logic.dao.root.GuildInfo;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
|
@ -13,36 +15,6 @@ public class CarDealyGuildRank extends AbstractRank{
|
|||
super(type, redisKey);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected PlayerInfoProto.RankResponse.Builder getAllUserResponse(Set<ZSetOperations.TypedTuple<String>> zsetreverseRangeWithScores, int start) throws Exception {
|
||||
// PlayerInfoProto.RankResponse.Builder allUserResponse = super.getAllUserResponse(zsetreverseRangeWithScores, start);
|
||||
// List<CommonProto.UserRank> ranksBuilderList = allUserResponse.getRanksList();
|
||||
// if(ranksBuilderList.size()<2){
|
||||
// return allUserResponse;
|
||||
// }
|
||||
// List<CommonProto.UserRank> builders = new ArrayList<>(ranksBuilderList);
|
||||
// Collections.sort(builders,(o1, o2) -> {
|
||||
// if(o1.getRankInfo().getParam1()==o2.getRankInfo().getParam1()){
|
||||
// if(o1.getForce()>o2.getForce() &&o1.getRankInfo().getRank()>o2.getRankInfo().getRank()){
|
||||
// CommonProto.UserRank rankInfo1 = o1 ;
|
||||
// o1 = o2;
|
||||
// o2 = rankInfo1;
|
||||
// }
|
||||
// }
|
||||
// return o1.getRankInfo().getRank()-o2.getRankInfo().getRank();
|
||||
// });
|
||||
// List<CommonProto.UserRank> buildersCopy = new ArrayList<>(ranksBuilderList.size());
|
||||
// for(CommonProto.UserRank userRank : builders){
|
||||
// buildersCopy.add(userRank.toBuilder().setRankInfo(userRank.toBuilder().getRankInfo().toBuilder().setRank(start).build()).build());
|
||||
// start++;
|
||||
// }
|
||||
// PlayerInfoProto.RankResponse.Builder response = PlayerInfoProto.RankResponse.newBuilder();
|
||||
// response.setMyRankInfo(allUserResponse.getMyRankInfo()).addAllRanks(buildersCopy);
|
||||
// return response;
|
||||
return super.getAllUserResponse(zsetreverseRangeWithScores,start);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDataByScore(Double score) {
|
||||
return new int[]{(int) (score.longValue()/1000),(int) (score.longValue()%1000)};
|
||||
|
@ -72,4 +44,17 @@ public class CarDealyGuildRank extends AbstractRank{
|
|||
.build();
|
||||
builder.addRanks(everyRank);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void getMyInfo(User user, String rkey, PlayerInfoProto.RankResponse.Builder allUserResponse) {
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
int myRank= RedisUtil.getInstence().getZSetreverseRank(redisKey,rkey,Integer.toString(guildId)).intValue();
|
||||
Double zSetScore = RedisUtil.getInstence().getZSetScore(redisKey, rkey, Integer.toString(guildId));
|
||||
CommonProto.RankInfo towerRankInfo = CommonProto.RankInfo.newBuilder()
|
||||
.setRank(myRank)
|
||||
.setParam1(getParam1(zSetScore))
|
||||
.setParam2(getParam2(zSetScore)).build();
|
||||
allUserResponse.setMyRankInfo(towerRankInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import com.ljsd.jieling.protocols.CommonProto;
|
|||
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
|
|
|
@ -24,14 +24,14 @@ public class DeathPathTotalGuildRank extends AbstractRank{
|
|||
|
||||
@Override
|
||||
public int[] getDataByScore(Double score) {
|
||||
BigDecimal bigDecimal = new BigDecimal(score.toString()).subtract(new BigDecimal(score.intValue())).multiply(new BigDecimal(String.valueOf(Math.pow(10,8))));
|
||||
BigDecimal bigDecimal = new BigDecimal(score.toString()).subtract(new BigDecimal(score.intValue())).multiply(new BigDecimal(String.valueOf(Math.pow(10,15))));
|
||||
return new int[]{bigDecimal.intValue(),score.intValue()};
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getScore(double... data) {
|
||||
BigDecimal decimal = null;
|
||||
decimal = new BigDecimal(String.valueOf(data[0])).divide(new BigDecimal(String.valueOf(Math.pow(10,8))));
|
||||
decimal = new BigDecimal(String.valueOf(data[0])).divide(new BigDecimal(String.valueOf(Math.pow(10,15))));
|
||||
if(data.length>1){
|
||||
decimal = decimal.add(new BigDecimal(data[1]));
|
||||
}
|
||||
|
|
|
@ -418,10 +418,6 @@ public class BuyGoodsLogic {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if(sRechargeCommodityConfig.getType() == 4 && rechargeInfo.getHadBuyFound() !=0){
|
||||
continue;
|
||||
}
|
||||
|
||||
int[] discountType = sRechargeCommodityConfig.getDiscountType();
|
||||
int time = sRechargeCommodityConfig.getTime();
|
||||
long startTime=0;
|
||||
|
@ -471,7 +467,6 @@ public class BuyGoodsLogic {
|
|||
}else {
|
||||
rechargeInfo.getCacheSendedTypes().put(value, startTime);
|
||||
}
|
||||
dybuytime = rechargeInfo.getDyGoodsCanBuyTimes().getOrDefault(goodsId,0);
|
||||
}
|
||||
|
||||
}else{
|
||||
|
@ -516,6 +511,7 @@ public class BuyGoodsLogic {
|
|||
}
|
||||
CommonProto.GiftGoodsInfo.Builder builder = CommonProto.GiftGoodsInfo.newBuilder();
|
||||
builder.setGoodsId(goodsId).setStartTime((int)(startTime/1000)).setBuyTimes(buyTimes).setEndTime((int)(endTime/1000));
|
||||
dybuytime = rechargeInfo.getDyGoodsCanBuyTimes().getOrDefault(goodsId,0);
|
||||
if(dybuytime!=-1){
|
||||
builder.setDynamicBuyTimes(dybuytime);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class SEquipConfig implements BaseConfig {
|
|||
|
||||
private int limit;
|
||||
|
||||
private int passiveSkill;
|
||||
private int[] passiveSkill;
|
||||
|
||||
|
||||
|
||||
|
@ -161,7 +161,7 @@ public class SEquipConfig implements BaseConfig {
|
|||
return limit;
|
||||
}
|
||||
|
||||
public int getPassiveSkill() {
|
||||
public int[] getPassiveSkill() {
|
||||
return passiveSkill;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,15 +48,22 @@ public class SGlobalActivity implements BaseConfig {
|
|||
|
||||
private int gapTime;
|
||||
|
||||
private int canBuyRechargeId;
|
||||
|
||||
public static Map<Integer, List<SGlobalActivity>> sGlobalActivityMapByType;
|
||||
public static Map<Integer, List<SGlobalActivity>> sGlobalActivityMapByOpenRules;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
sGlobalActivityMapByType = new HashMap<>();
|
||||
Map<Integer, List<SGlobalActivity>> sGlobalActivityMapByTypeTmp = new HashMap<>();
|
||||
Map<Integer, List<SGlobalActivity>> sGlobalActivityMapByOpenRulesTmp = new HashMap<>();
|
||||
Map<Integer, SGlobalActivity> config = STableManager.getConfig(SGlobalActivity.class);
|
||||
for(SGlobalActivity sGlobalActivity : config.values()){
|
||||
sGlobalActivityMapByType.computeIfAbsent(sGlobalActivity.getType(),n->new ArrayList<>()).add(sGlobalActivity);
|
||||
sGlobalActivityMapByTypeTmp.computeIfAbsent(sGlobalActivity.getType(),n->new ArrayList<>()).add(sGlobalActivity);
|
||||
if(sGlobalActivity.getOpenRules().length>0){
|
||||
sGlobalActivityMapByOpenRulesTmp.computeIfAbsent(sGlobalActivity.getOpenRules()[0],n->new ArrayList<>()).add(sGlobalActivity);
|
||||
}
|
||||
int time = sGlobalActivity.getTime();
|
||||
String startTime = sGlobalActivity.getStartTime();
|
||||
String endtime = sGlobalActivity.getEndtime();
|
||||
|
@ -74,6 +81,8 @@ public class SGlobalActivity implements BaseConfig {
|
|||
|
||||
}
|
||||
sGlobalActivityMap = config;
|
||||
sGlobalActivityMapByType = sGlobalActivityMapByTypeTmp;
|
||||
sGlobalActivityMapByOpenRules = sGlobalActivityMapByOpenRulesTmp;
|
||||
}
|
||||
|
||||
public static Map<Integer, SGlobalActivity> getsGlobalActivityMap() {
|
||||
|
@ -159,4 +168,8 @@ public class SGlobalActivity implements BaseConfig {
|
|||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getCanBuyRechargeId() {
|
||||
return canBuyRechargeId;
|
||||
}
|
||||
}
|
|
@ -76,6 +76,8 @@ public class SGuildSetting implements BaseConfig {
|
|||
|
||||
private int[] giveLikeReward;
|
||||
|
||||
private int challengeMaxTime;
|
||||
|
||||
public static SGuildSetting sGuildSetting;
|
||||
|
||||
|
||||
|
@ -225,4 +227,8 @@ public class SGuildSetting implements BaseConfig {
|
|||
public int[][] getGuildWarTime() {
|
||||
return guildWarTime;
|
||||
}
|
||||
|
||||
public int getChallengeMaxTime() {
|
||||
return challengeMaxTime;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package config;
|
||||
|
||||
import manager.STableManager;
|
||||
import manager.Table;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
@Table(name ="GuildWarRewardConfig")
|
||||
public class SGuildWarRewardConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int section;
|
||||
|
||||
private int[][] reward;
|
||||
|
||||
public static Map<Integer,SGuildWarRewardConfig> treeReward = new TreeMap<>();
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
Map<Integer, SGuildWarRewardConfig> config = STableManager.getConfig(SGuildWarRewardConfig.class);
|
||||
for(Map.Entry<Integer,SGuildWarRewardConfig> entry:config.entrySet()){
|
||||
treeReward.putIfAbsent(entry.getValue().getSection(),entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public int[][] getReward() {
|
||||
return reward;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue