예제 #1
0
 @Override
 public void execute(PlayerManager playerManager, Message_1003_14 message) throws Exception {
   for (UserDataAccumulateArrayItem item : message.getUserDataAccumulateArray().list()) {
     String key = DummyUtils.getCompositeKey(item.getType(), item.getParam());
     DataAccumulateData dataAccumulateData = new DataAccumulateData();
     dataAccumulateData.setType(item.getType());
     dataAccumulateData.setParam(item.getParam());
     dataAccumulateData.setValue(item.getValue());
     playerManager.getDataAccumulateManager().getDataAccumulateMap().put(key, dataAccumulateData);
   }
 }
예제 #2
0
/**
 * 请求 查看家族日志
 *
 * @author codeGenerator
 */
@SuppressWarnings("unused")
public class Message_27_14 implements IMessage {

  private static int MAIN = 27;
  private static int SUB = 14;
  private static String MESSAGE_KEY = DummyUtils.getCompositeKey(27, 14);

  public static Message_27_14 create() {
    return new Message_27_14();
  }

  /** 编码 */
  @Override
  public void encode(Data data) {}

  /** 解码 */
  @Override
  public void decode(Data data) {}

  @Override
  public boolean validate() {
    return true;
  }

  @Override
  public int getMain() {
    return MAIN;
  }

  @Override
  public int getSub() {
    return SUB;
  }

  @Override
  public String getMessageKey() {
    return MESSAGE_KEY;
  }

  public String toString() {
    StringBuilder bb = new StringBuilder();
    return bb.toString();
  }
}
예제 #3
0
/**
 * 返回 送花记录
 *
 * @author codeGenerator
 */
@SuppressWarnings("unused")
public class Message_1021_6 implements IMessage {

  private static int MAIN = 1021;
  private static int SUB = 6;
  private static String MESSAGE_KEY = DummyUtils.getCompositeKey(1021, 6);

  private FlowerHistoryArray flowerHistoryArray;

  public static Message_1021_6 create() {
    return new Message_1021_6();
  }

  /** @return the flowerHistoryArray */
  public FlowerHistoryArray getFlowerHistoryArray() {
    return flowerHistoryArray;
  }

  /** @param flowerHistoryArray the flowerHistoryArray to set */
  public void setFlowerHistoryArray(FlowerHistoryArray flowerHistoryArray) {
    this.flowerHistoryArray = flowerHistoryArray;
  }

  /** 编码 */
  @Override
  public void encode(Data data) {
    flowerHistoryArray.encode(data);
  }

  /** 解码 */
  @Override
  public void decode(Data data) {
    flowerHistoryArray = FlowerHistoryArray.create();
    flowerHistoryArray.decode(data);
  }

  @Override
  public boolean validate() {
    if (!flowerHistoryArray.validate()) {
      return false;
    }
    return true;
  }

  @Override
  public int getMain() {
    return MAIN;
  }

  @Override
  public int getSub() {
    return SUB;
  }

  @Override
  public String getMessageKey() {
    return MESSAGE_KEY;
  }

  public String toString() {
    StringBuilder bb = new StringBuilder();
    bb.append("flowerHistoryArray:").append(flowerHistoryArray.toString());
    return bb.toString();
  }
}
예제 #4
0
/**
 * 返回 领取满星奖励
 *
 * @author codeGenerator
 */
@SuppressWarnings("unused")
public class Message_1004_7 implements IMessage {

  private static int MAIN = 1004;
  private static int SUB = 7;
  private static String MESSAGE_KEY = DummyUtils.getCompositeKey(1004, 7);

  private int storyLineId;

  private static IntMessageParameterHandler storyLineIdHandler =
      MessageParameterContext.getInstance().getIntMessageParameterHandler("StoryLineId");

  public static Message_1004_7 create() {
    return new Message_1004_7();
  }

  /** @return the storyLineId */
  public int getStoryLineId() {
    return storyLineId;
  }

  /** @param storyLineId the storyLineId to set */
  public void setStoryLineId(int storyLineId) {
    this.storyLineId = storyLineId;
  }

  /** 编码 */
  @Override
  public void encode(Data data) {
    data.writeInt(this.storyLineId);
  }

  /** 解码 */
  @Override
  public void decode(Data data) {
    this.storyLineId = data.getInt();
  }

  @Override
  public boolean validate() {
    if (!storyLineIdHandler.validate(storyLineId)) {
      return false;
    }
    return true;
  }

  @Override
  public int getMain() {
    return MAIN;
  }

  @Override
  public int getSub() {
    return SUB;
  }

  @Override
  public String getMessageKey() {
    return MESSAGE_KEY;
  }

  public String toString() {
    StringBuilder bb = new StringBuilder();
    bb.append("storyLineId:").append(this.storyLineId);
    return bb.toString();
  }
}
예제 #5
0
/**
 * 返回 比武大会英雄信息
 *
 * @author codeGenerator
 */
public class Message_1016_6 implements IMessage {

  private static int MAIN = 1016;
  private static int SUB = 6;
  private static String MESSAGE_KEY = DummyUtils.getCompositeKey(1016, 6);

  private long userId;
  private int formationId;
  private PlaceIDArray2 placeIDArray2;
  private int zhanli;

  private static LongMessageParameterHandler userIdHandler =
      MessageParameterContext.getInstance().getLongMessageParameterHandler("UserId");
  private static IntMessageParameterHandler formationIdHandler =
      MessageParameterContext.getInstance().getIntMessageParameterHandler("FormationId");
  private static IntMessageParameterHandler zhanliHandler =
      MessageParameterContext.getInstance().getIntMessageParameterHandler("Zhanli");

  public static Message_1016_6 create() {
    return new Message_1016_6();
  }

  /** @return the userId */
  public long getUserId() {
    return userId;
  }

  /** @param userId the userId to set */
  public void setUserId(long userId) {
    this.userId = userId;
  }

  /** @return the formationId */
  public int getFormationId() {
    return formationId;
  }

  /** @param formationId the formationId to set */
  public void setFormationId(int formationId) {
    this.formationId = formationId;
  }

  /** @return the placeIDArray2 */
  public PlaceIDArray2 getPlaceIDArray2() {
    return placeIDArray2;
  }

  /** @param placeIDArray2 the placeIDArray2 to set */
  public void setPlaceIDArray2(PlaceIDArray2 placeIDArray2) {
    this.placeIDArray2 = placeIDArray2;
  }

  /** @return the zhanli */
  public int getZhanli() {
    return zhanli;
  }

  /** @param zhanli the zhanli to set */
  public void setZhanli(int zhanli) {
    this.zhanli = zhanli;
  }

  /** 编码 */
  @Override
  public void encode(Data data) {
    data.writeLong(this.userId);
    data.writeInt(this.formationId);
    placeIDArray2.encode(data);
    data.writeInt(this.zhanli);
  }

  /** 解码 */
  @Override
  public void decode(Data data) {
    this.userId = data.getLong();
    this.formationId = data.getInt();
    placeIDArray2 = PlaceIDArray2.create();
    placeIDArray2.decode(data);
    this.zhanli = data.getInt();
  }

  @Override
  public boolean validate() {
    if (!userIdHandler.validate(userId)) {
      return false;
    }
    if (!formationIdHandler.validate(formationId)) {
      return false;
    }
    if (!placeIDArray2.validate()) {
      return false;
    }
    if (!zhanliHandler.validate(zhanli)) {
      return false;
    }
    return true;
  }

  @Override
  public int getMain() {
    return MAIN;
  }

  @Override
  public int getSub() {
    return SUB;
  }

  @Override
  public String getMessageKey() {
    return MESSAGE_KEY;
  }

  public String toString() {
    StringBuilder bb = new StringBuilder();
    bb.append("userId:").append(this.userId).append(", ");
    bb.append("formationId:").append(this.formationId).append(", ");
    bb.append("placeIDArray2:").append(placeIDArray2.toString()).append(", ");
    bb.append("zhanli:").append(this.zhanli);
    return bb.toString();
  }
}