xml&databind混淆后导致的一些引用错误
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.chwl.core.im.custom.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chwl.core.monsterhunting.bean.MonsterDataBean;
|
||||
import com.google.gson.Gson;
|
||||
import com.chwl.core.monsterhunting.bean.MonsterProtocol;
|
||||
|
||||
@@ -10,23 +11,23 @@ import com.chwl.core.monsterhunting.bean.MonsterProtocol;
|
||||
|
||||
public class MonsterStatusAttachment extends CustomAttachment {
|
||||
|
||||
private MonsterProtocol.DataBean dataBean;
|
||||
private MonsterDataBean dataBean;
|
||||
|
||||
public MonsterStatusAttachment(int second) {
|
||||
super(CUSTOM_MSG_HEADER_TYPE_MONSTER_HUNTING, second);
|
||||
}
|
||||
|
||||
public MonsterProtocol.DataBean getDataBean() {
|
||||
public MonsterDataBean getDataBean() {
|
||||
return dataBean;
|
||||
}
|
||||
|
||||
public void setDataBean(MonsterProtocol.DataBean dataBean) {
|
||||
public void setDataBean(MonsterDataBean dataBean) {
|
||||
this.dataBean = dataBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void parseData(JSONObject data) {
|
||||
dataBean = new Gson().fromJson(data.toJSONString(), MonsterProtocol.DataBean.class);
|
||||
dataBean = new Gson().fromJson(data.toJSONString(), MonsterDataBean.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -18,6 +18,7 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chwl.core.monsterhunting.bean.MonsterDataBean;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
@@ -1807,7 +1808,7 @@ public final class IMNetEaseManager {
|
||||
return true;
|
||||
}
|
||||
if (attachment.getSecond() == CustomAttachment.CUSTOM_MSG_SUB_TYPE_MONSTER_HUNTING) {
|
||||
MonsterProtocol.DataBean dataBean = ((MonsterStatusAttachment) attachment).getDataBean();
|
||||
MonsterDataBean dataBean = ((MonsterStatusAttachment) attachment).getDataBean();
|
||||
if (dataBean.getMonsterStatus() == MonsterInfo.MONSTER_STATUS_WILL_APPEAR) {
|
||||
if (dataBean.getBeforeAppearSeconds() > 15) {
|
||||
return true;
|
||||
|
@@ -0,0 +1,345 @@
|
||||
package com.chwl.core.monsterhunting.bean;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class MonsterDataBean implements Serializable, Parcelable {
|
||||
/**
|
||||
* appearDuration : 1200
|
||||
* appearRoomUid : 91288
|
||||
* appearSvg : https://image.zhongjialx.com/FlA63Rmw5CInHnJzWHkAXKoAk6OK?imageslim
|
||||
* appearTime : 1522638323000
|
||||
* attackSvg : https://image.zhongjialx.com/FpiHd4HMFgEKnrxto9yQpkUoSNxe?imageslim
|
||||
* beforeAppearSeconds : 0
|
||||
* beforeDisappearSeconds : 0
|
||||
* defeatSvg : https://image.zhongjialx.com/Fmg5EuDwbTiGthM1SjEXoCtHjF5e?imageslim
|
||||
* disappearTime : 1522639523000
|
||||
* escapeSvg : https://image.zhongjialx.com/Fvpz9ZdwngZ9sKXm_leOxxfIZlRB?imageslim
|
||||
* hallNotifyBg : https://image.zhongjialx.com/Fu6pOIzYRBSeTPeCpKkkxMXLGdSb?imageslim
|
||||
* hallNotifyClockImg : https://image.zhongjialx.com/Fu3tXK9klbKOzFW0WsrW3LvcxDky?imageslim
|
||||
* monsterId : 22
|
||||
* monsterImg : https://image.zhongjialx.com/Fqaqt-S0L6gAEDLRUH8TsZBvNAIx?imageslim
|
||||
* monsterName : 胡巴
|
||||
* monsterStatus : 3
|
||||
* normalSvg : https://image.zhongjialx.com/FrLbNe21dsepSLTZvfoRHxquJwrn?imageslim
|
||||
* notifyMessage : 怪兽来了快跑啊快跑啊快跑啊
|
||||
* remainBlood : 0
|
||||
* roomNotifyBg : https://image.zhongjialx.com/FqaYiYQ2QeFm53BW8BXAZjEoe7pm?imageslim
|
||||
* roomNotifyClockImg : https://image.zhongjialx.com/FgPUN5S6Qm8CiyI-BYlBmYEjX0V5?imageslim
|
||||
* serverTime : 1522753311041
|
||||
* totalBlood : 10000
|
||||
*/
|
||||
|
||||
protected int appearDuration;
|
||||
protected int appearRoomUid;
|
||||
protected String appearSvg;
|
||||
protected long appearTime;
|
||||
protected String attackSvg;
|
||||
protected long beforeAppearSeconds;
|
||||
protected long beforeDisappearSeconds;
|
||||
protected String defeatSvg;
|
||||
protected long disappearTime;
|
||||
protected String escapeSvg;
|
||||
protected String hallNotifyBg;
|
||||
protected String hallNotifyClockImg;
|
||||
protected int monsterId;
|
||||
protected String monsterImg;
|
||||
protected String monsterName;
|
||||
protected int monsterStatus;
|
||||
protected String normalSvg;
|
||||
protected String notifyMessage;
|
||||
protected int remainBlood;
|
||||
protected String roomNotifyBg;
|
||||
protected String roomNotifyClockImg;
|
||||
protected long serverTime;
|
||||
protected int totalBlood;
|
||||
|
||||
public MonsterDataBean() {
|
||||
}
|
||||
|
||||
protected MonsterDataBean(Parcel in) {
|
||||
appearDuration = in.readInt();
|
||||
appearRoomUid = in.readInt();
|
||||
appearSvg = in.readString();
|
||||
appearTime = in.readLong();
|
||||
attackSvg = in.readString();
|
||||
beforeAppearSeconds = in.readInt();
|
||||
beforeDisappearSeconds = in.readInt();
|
||||
defeatSvg = in.readString();
|
||||
disappearTime = in.readLong();
|
||||
escapeSvg = in.readString();
|
||||
hallNotifyBg = in.readString();
|
||||
hallNotifyClockImg = in.readString();
|
||||
monsterId = in.readInt();
|
||||
monsterImg = in.readString();
|
||||
monsterName = in.readString();
|
||||
monsterStatus = in.readInt();
|
||||
normalSvg = in.readString();
|
||||
notifyMessage = in.readString();
|
||||
remainBlood = in.readInt();
|
||||
roomNotifyBg = in.readString();
|
||||
roomNotifyClockImg = in.readString();
|
||||
serverTime = in.readLong();
|
||||
totalBlood = in.readInt();
|
||||
}
|
||||
|
||||
public static final Creator<MonsterDataBean> CREATOR = new Creator<MonsterDataBean>() {
|
||||
@Override
|
||||
public MonsterDataBean createFromParcel(Parcel in) {
|
||||
return new MonsterDataBean(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MonsterDataBean[] newArray(int size) {
|
||||
return new MonsterDataBean[size];
|
||||
}
|
||||
};
|
||||
|
||||
public int getAppearDuration() {
|
||||
return appearDuration;
|
||||
}
|
||||
|
||||
public void setAppearDuration(int appearDuration) {
|
||||
this.appearDuration = appearDuration;
|
||||
}
|
||||
|
||||
public int getAppearRoomUid() {
|
||||
return appearRoomUid;
|
||||
}
|
||||
|
||||
public void setAppearRoomUid(int appearRoomUid) {
|
||||
this.appearRoomUid = appearRoomUid;
|
||||
}
|
||||
|
||||
public String getAppearSvg() {
|
||||
return appearSvg;
|
||||
}
|
||||
|
||||
public void setAppearSvg(String appearSvg) {
|
||||
this.appearSvg = appearSvg;
|
||||
}
|
||||
|
||||
public long getAppearTime() {
|
||||
return appearTime;
|
||||
}
|
||||
|
||||
public void setAppearTime(long appearTime) {
|
||||
this.appearTime = appearTime;
|
||||
}
|
||||
|
||||
public String getAttackSvg() {
|
||||
return attackSvg;
|
||||
}
|
||||
|
||||
public void setAttackSvg(String attackSvg) {
|
||||
this.attackSvg = attackSvg;
|
||||
}
|
||||
|
||||
|
||||
public long getBeforeAppearSeconds() {
|
||||
return beforeAppearSeconds;
|
||||
}
|
||||
|
||||
public void setBeforeAppearSeconds(long beforeAppearSeconds) {
|
||||
this.beforeAppearSeconds = beforeAppearSeconds;
|
||||
}
|
||||
|
||||
public long getBeforeDisappearSeconds() {
|
||||
return beforeDisappearSeconds;
|
||||
}
|
||||
|
||||
public void setBeforeDisappearSeconds(long beforeDisappearSeconds) {
|
||||
this.beforeDisappearSeconds = beforeDisappearSeconds;
|
||||
}
|
||||
|
||||
public String getDefeatSvg() {
|
||||
return defeatSvg;
|
||||
}
|
||||
|
||||
public void setDefeatSvg(String defeatSvg) {
|
||||
this.defeatSvg = defeatSvg;
|
||||
}
|
||||
|
||||
public long getDisappearTime() {
|
||||
return disappearTime;
|
||||
}
|
||||
|
||||
public void setDisappearTime(long disappearTime) {
|
||||
this.disappearTime = disappearTime;
|
||||
}
|
||||
|
||||
public String getEscapeSvg() {
|
||||
return escapeSvg;
|
||||
}
|
||||
|
||||
public void setEscapeSvg(String escapeSvg) {
|
||||
this.escapeSvg = escapeSvg;
|
||||
}
|
||||
|
||||
public String getHallNotifyBg() {
|
||||
return hallNotifyBg;
|
||||
}
|
||||
|
||||
public void setHallNotifyBg(String hallNotifyBg) {
|
||||
this.hallNotifyBg = hallNotifyBg;
|
||||
}
|
||||
|
||||
public String getHallNotifyClockImg() {
|
||||
return hallNotifyClockImg;
|
||||
}
|
||||
|
||||
public void setHallNotifyClockImg(String hallNotifyClockImg) {
|
||||
this.hallNotifyClockImg = hallNotifyClockImg;
|
||||
}
|
||||
|
||||
public int getMonsterId() {
|
||||
return monsterId;
|
||||
}
|
||||
|
||||
public void setMonsterId(int monsterId) {
|
||||
this.monsterId = monsterId;
|
||||
}
|
||||
|
||||
public String getMonsterImg() {
|
||||
return monsterImg;
|
||||
}
|
||||
|
||||
public void setMonsterImg(String monsterImg) {
|
||||
this.monsterImg = monsterImg;
|
||||
}
|
||||
|
||||
public String getMonsterName() {
|
||||
return monsterName;
|
||||
}
|
||||
|
||||
public void setMonsterName(String monsterName) {
|
||||
this.monsterName = monsterName;
|
||||
}
|
||||
|
||||
public int getMonsterStatus() {
|
||||
return monsterStatus;
|
||||
}
|
||||
|
||||
public void setMonsterStatus(int monsterStatus) {
|
||||
this.monsterStatus = monsterStatus;
|
||||
}
|
||||
|
||||
public String getNormalSvg() {
|
||||
return normalSvg;
|
||||
}
|
||||
|
||||
public void setNormalSvg(String normalSvg) {
|
||||
this.normalSvg = normalSvg;
|
||||
}
|
||||
|
||||
public String getNotifyMessage() {
|
||||
return notifyMessage;
|
||||
}
|
||||
|
||||
public void setNotifyMessage(String notifyMessage) {
|
||||
this.notifyMessage = notifyMessage;
|
||||
}
|
||||
|
||||
public int getRemainBlood() {
|
||||
return remainBlood;
|
||||
}
|
||||
|
||||
public void setRemainBlood(int remainBlood) {
|
||||
this.remainBlood = remainBlood;
|
||||
}
|
||||
|
||||
public String getRoomNotifyBg() {
|
||||
return roomNotifyBg;
|
||||
}
|
||||
|
||||
public void setRoomNotifyBg(String roomNotifyBg) {
|
||||
this.roomNotifyBg = roomNotifyBg;
|
||||
}
|
||||
|
||||
public String getRoomNotifyClockImg() {
|
||||
return roomNotifyClockImg;
|
||||
}
|
||||
|
||||
public void setRoomNotifyClockImg(String roomNotifyClockImg) {
|
||||
this.roomNotifyClockImg = roomNotifyClockImg;
|
||||
}
|
||||
|
||||
public long getServerTime() {
|
||||
return serverTime;
|
||||
}
|
||||
|
||||
public void setServerTime(long serverTime) {
|
||||
this.serverTime = serverTime;
|
||||
}
|
||||
|
||||
public int getTotalBlood() {
|
||||
return totalBlood;
|
||||
}
|
||||
|
||||
public void setTotalBlood(int totalBlood) {
|
||||
this.totalBlood = totalBlood;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DataBean{" +
|
||||
"appearDuration=" + appearDuration +
|
||||
", appearRoomUid=" + appearRoomUid +
|
||||
", appearSvg='" + appearSvg + '\'' +
|
||||
", appearTime=" + appearTime +
|
||||
", attackSvg='" + attackSvg + '\'' +
|
||||
", beforeAppearSeconds=" + beforeAppearSeconds +
|
||||
", beforeDisappearSeconds=" + beforeDisappearSeconds +
|
||||
", defeatSvg='" + defeatSvg + '\'' +
|
||||
", disappearTime=" + disappearTime +
|
||||
", escapeSvg='" + escapeSvg + '\'' +
|
||||
", hallNotifyBg='" + hallNotifyBg + '\'' +
|
||||
", hallNotifyClockImg='" + hallNotifyClockImg + '\'' +
|
||||
", monsterId=" + monsterId +
|
||||
", monsterImg='" + monsterImg + '\'' +
|
||||
", monsterName='" + monsterName + '\'' +
|
||||
", monsterStatus=" + monsterStatus +
|
||||
", normalSvg='" + normalSvg + '\'' +
|
||||
", notifyMessage='" + notifyMessage + '\'' +
|
||||
", remainBlood=" + remainBlood +
|
||||
", roomNotifyBg='" + roomNotifyBg + '\'' +
|
||||
", roomNotifyClockImg='" + roomNotifyClockImg + '\'' +
|
||||
", serverTime=" + serverTime +
|
||||
", totalBlood=" + totalBlood +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(appearDuration);
|
||||
dest.writeInt(appearRoomUid);
|
||||
dest.writeString(appearSvg);
|
||||
dest.writeLong(appearTime);
|
||||
dest.writeString(attackSvg);
|
||||
dest.writeLong(beforeAppearSeconds);
|
||||
dest.writeLong(beforeDisappearSeconds);
|
||||
dest.writeString(defeatSvg);
|
||||
dest.writeLong(disappearTime);
|
||||
dest.writeString(escapeSvg);
|
||||
dest.writeString(hallNotifyBg);
|
||||
dest.writeString(hallNotifyClockImg);
|
||||
dest.writeInt(monsterId);
|
||||
dest.writeString(monsterImg);
|
||||
dest.writeString(monsterName);
|
||||
dest.writeInt(monsterStatus);
|
||||
dest.writeString(normalSvg);
|
||||
dest.writeString(notifyMessage);
|
||||
dest.writeInt(remainBlood);
|
||||
dest.writeString(roomNotifyBg);
|
||||
dest.writeString(roomNotifyClockImg);
|
||||
dest.writeLong(serverTime);
|
||||
dest.writeInt(totalBlood);
|
||||
}
|
||||
}
|
@@ -71,7 +71,7 @@ public class MonsterEvent {
|
||||
|
||||
private int type;
|
||||
|
||||
private MonsterProtocol.DataBean dataBean;
|
||||
private MonsterDataBean dataBean;
|
||||
|
||||
public MonsterEvent() {
|
||||
}
|
||||
@@ -93,11 +93,11 @@ public class MonsterEvent {
|
||||
return type;
|
||||
}
|
||||
|
||||
public MonsterProtocol.DataBean getDataBean() {
|
||||
public MonsterDataBean getDataBean() {
|
||||
return dataBean;
|
||||
}
|
||||
|
||||
public MonsterEvent setDataBean(MonsterProtocol.DataBean dataBean) {
|
||||
public MonsterEvent setDataBean(MonsterDataBean dataBean) {
|
||||
this.dataBean = dataBean;
|
||||
return this;
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ public class MonsterHuntingResult {
|
||||
|
||||
private List<MonsterHunter> ranking;
|
||||
|
||||
private MonsterProtocol.DataBean monster;
|
||||
private MonsterDataBean monster;
|
||||
|
||||
public MonsterHuntingResult() {
|
||||
}
|
||||
@@ -49,11 +49,11 @@ public class MonsterHuntingResult {
|
||||
this.ranking = ranking;
|
||||
}
|
||||
|
||||
public MonsterProtocol.DataBean getMonster() {
|
||||
public MonsterDataBean getMonster() {
|
||||
return monster;
|
||||
}
|
||||
|
||||
public void setMonster(MonsterProtocol.DataBean monster) {
|
||||
public void setMonster(MonsterDataBean monster) {
|
||||
this.monster = monster;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ import android.os.Parcel;
|
||||
* Created by MadisonRong on 30/03/2018.
|
||||
*/
|
||||
|
||||
public class MonsterInfo extends MonsterProtocol.DataBean {
|
||||
public class MonsterInfo extends MonsterDataBean {
|
||||
/**
|
||||
* 未开始 (即将出现)
|
||||
*/
|
||||
|
@@ -1,354 +1,12 @@
|
||||
package com.chwl.core.monsterhunting.bean;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.chwl.core.bean.BaseProtocol;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by huangmeng1 on 2018/4/2.
|
||||
*/
|
||||
|
||||
public class MonsterProtocol extends BaseProtocol<MonsterProtocol.DataBean> {
|
||||
|
||||
public static class DataBean implements Serializable,Parcelable {
|
||||
/**
|
||||
* appearDuration : 1200
|
||||
* appearRoomUid : 91288
|
||||
* appearSvg : https://image.zhongjialx.com/FlA63Rmw5CInHnJzWHkAXKoAk6OK?imageslim
|
||||
* appearTime : 1522638323000
|
||||
* attackSvg : https://image.zhongjialx.com/FpiHd4HMFgEKnrxto9yQpkUoSNxe?imageslim
|
||||
* beforeAppearSeconds : 0
|
||||
* beforeDisappearSeconds : 0
|
||||
* defeatSvg : https://image.zhongjialx.com/Fmg5EuDwbTiGthM1SjEXoCtHjF5e?imageslim
|
||||
* disappearTime : 1522639523000
|
||||
* escapeSvg : https://image.zhongjialx.com/Fvpz9ZdwngZ9sKXm_leOxxfIZlRB?imageslim
|
||||
* hallNotifyBg : https://image.zhongjialx.com/Fu6pOIzYRBSeTPeCpKkkxMXLGdSb?imageslim
|
||||
* hallNotifyClockImg : https://image.zhongjialx.com/Fu3tXK9klbKOzFW0WsrW3LvcxDky?imageslim
|
||||
* monsterId : 22
|
||||
* monsterImg : https://image.zhongjialx.com/Fqaqt-S0L6gAEDLRUH8TsZBvNAIx?imageslim
|
||||
* monsterName : 胡巴
|
||||
* monsterStatus : 3
|
||||
* normalSvg : https://image.zhongjialx.com/FrLbNe21dsepSLTZvfoRHxquJwrn?imageslim
|
||||
* notifyMessage : 怪兽来了快跑啊快跑啊快跑啊
|
||||
* remainBlood : 0
|
||||
* roomNotifyBg : https://image.zhongjialx.com/FqaYiYQ2QeFm53BW8BXAZjEoe7pm?imageslim
|
||||
* roomNotifyClockImg : https://image.zhongjialx.com/FgPUN5S6Qm8CiyI-BYlBmYEjX0V5?imageslim
|
||||
* serverTime : 1522753311041
|
||||
* totalBlood : 10000
|
||||
*/
|
||||
|
||||
protected int appearDuration;
|
||||
protected int appearRoomUid;
|
||||
protected String appearSvg;
|
||||
protected long appearTime;
|
||||
protected String attackSvg;
|
||||
protected long beforeAppearSeconds;
|
||||
protected long beforeDisappearSeconds;
|
||||
protected String defeatSvg;
|
||||
protected long disappearTime;
|
||||
protected String escapeSvg;
|
||||
protected String hallNotifyBg;
|
||||
protected String hallNotifyClockImg;
|
||||
protected int monsterId;
|
||||
protected String monsterImg;
|
||||
protected String monsterName;
|
||||
protected int monsterStatus;
|
||||
protected String normalSvg;
|
||||
protected String notifyMessage;
|
||||
protected int remainBlood;
|
||||
protected String roomNotifyBg;
|
||||
protected String roomNotifyClockImg;
|
||||
protected long serverTime;
|
||||
protected int totalBlood;
|
||||
|
||||
public DataBean() {
|
||||
}
|
||||
|
||||
protected DataBean(Parcel in) {
|
||||
appearDuration = in.readInt();
|
||||
appearRoomUid = in.readInt();
|
||||
appearSvg = in.readString();
|
||||
appearTime = in.readLong();
|
||||
attackSvg = in.readString();
|
||||
beforeAppearSeconds = in.readInt();
|
||||
beforeDisappearSeconds = in.readInt();
|
||||
defeatSvg = in.readString();
|
||||
disappearTime = in.readLong();
|
||||
escapeSvg = in.readString();
|
||||
hallNotifyBg = in.readString();
|
||||
hallNotifyClockImg = in.readString();
|
||||
monsterId = in.readInt();
|
||||
monsterImg = in.readString();
|
||||
monsterName = in.readString();
|
||||
monsterStatus = in.readInt();
|
||||
normalSvg = in.readString();
|
||||
notifyMessage = in.readString();
|
||||
remainBlood = in.readInt();
|
||||
roomNotifyBg = in.readString();
|
||||
roomNotifyClockImg = in.readString();
|
||||
serverTime = in.readLong();
|
||||
totalBlood = in.readInt();
|
||||
}
|
||||
|
||||
public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
|
||||
@Override
|
||||
public DataBean createFromParcel(Parcel in) {
|
||||
return new DataBean(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataBean[] newArray(int size) {
|
||||
return new DataBean[size];
|
||||
}
|
||||
};
|
||||
|
||||
public int getAppearDuration() {
|
||||
return appearDuration;
|
||||
}
|
||||
|
||||
public void setAppearDuration(int appearDuration) {
|
||||
this.appearDuration = appearDuration;
|
||||
}
|
||||
|
||||
public int getAppearRoomUid() {
|
||||
return appearRoomUid;
|
||||
}
|
||||
|
||||
public void setAppearRoomUid(int appearRoomUid) {
|
||||
this.appearRoomUid = appearRoomUid;
|
||||
}
|
||||
|
||||
public String getAppearSvg() {
|
||||
return appearSvg;
|
||||
}
|
||||
|
||||
public void setAppearSvg(String appearSvg) {
|
||||
this.appearSvg = appearSvg;
|
||||
}
|
||||
|
||||
public long getAppearTime() {
|
||||
return appearTime;
|
||||
}
|
||||
|
||||
public void setAppearTime(long appearTime) {
|
||||
this.appearTime = appearTime;
|
||||
}
|
||||
|
||||
public String getAttackSvg() {
|
||||
return attackSvg;
|
||||
}
|
||||
|
||||
public void setAttackSvg(String attackSvg) {
|
||||
this.attackSvg = attackSvg;
|
||||
}
|
||||
public class MonsterProtocol extends BaseProtocol<MonsterDataBean> {
|
||||
|
||||
|
||||
public long getBeforeAppearSeconds() {
|
||||
return beforeAppearSeconds;
|
||||
}
|
||||
|
||||
public void setBeforeAppearSeconds(long beforeAppearSeconds) {
|
||||
this.beforeAppearSeconds = beforeAppearSeconds;
|
||||
}
|
||||
|
||||
public long getBeforeDisappearSeconds() {
|
||||
return beforeDisappearSeconds;
|
||||
}
|
||||
|
||||
public void setBeforeDisappearSeconds(long beforeDisappearSeconds) {
|
||||
this.beforeDisappearSeconds = beforeDisappearSeconds;
|
||||
}
|
||||
|
||||
public String getDefeatSvg() {
|
||||
return defeatSvg;
|
||||
}
|
||||
|
||||
public void setDefeatSvg(String defeatSvg) {
|
||||
this.defeatSvg = defeatSvg;
|
||||
}
|
||||
|
||||
public long getDisappearTime() {
|
||||
return disappearTime;
|
||||
}
|
||||
|
||||
public void setDisappearTime(long disappearTime) {
|
||||
this.disappearTime = disappearTime;
|
||||
}
|
||||
|
||||
public String getEscapeSvg() {
|
||||
return escapeSvg;
|
||||
}
|
||||
|
||||
public void setEscapeSvg(String escapeSvg) {
|
||||
this.escapeSvg = escapeSvg;
|
||||
}
|
||||
|
||||
public String getHallNotifyBg() {
|
||||
return hallNotifyBg;
|
||||
}
|
||||
|
||||
public void setHallNotifyBg(String hallNotifyBg) {
|
||||
this.hallNotifyBg = hallNotifyBg;
|
||||
}
|
||||
|
||||
public String getHallNotifyClockImg() {
|
||||
return hallNotifyClockImg;
|
||||
}
|
||||
|
||||
public void setHallNotifyClockImg(String hallNotifyClockImg) {
|
||||
this.hallNotifyClockImg = hallNotifyClockImg;
|
||||
}
|
||||
|
||||
public int getMonsterId() {
|
||||
return monsterId;
|
||||
}
|
||||
|
||||
public void setMonsterId(int monsterId) {
|
||||
this.monsterId = monsterId;
|
||||
}
|
||||
|
||||
public String getMonsterImg() {
|
||||
return monsterImg;
|
||||
}
|
||||
|
||||
public void setMonsterImg(String monsterImg) {
|
||||
this.monsterImg = monsterImg;
|
||||
}
|
||||
|
||||
public String getMonsterName() {
|
||||
return monsterName;
|
||||
}
|
||||
|
||||
public void setMonsterName(String monsterName) {
|
||||
this.monsterName = monsterName;
|
||||
}
|
||||
|
||||
public int getMonsterStatus() {
|
||||
return monsterStatus;
|
||||
}
|
||||
|
||||
public void setMonsterStatus(int monsterStatus) {
|
||||
this.monsterStatus = monsterStatus;
|
||||
}
|
||||
|
||||
public String getNormalSvg() {
|
||||
return normalSvg;
|
||||
}
|
||||
|
||||
public void setNormalSvg(String normalSvg) {
|
||||
this.normalSvg = normalSvg;
|
||||
}
|
||||
|
||||
public String getNotifyMessage() {
|
||||
return notifyMessage;
|
||||
}
|
||||
|
||||
public void setNotifyMessage(String notifyMessage) {
|
||||
this.notifyMessage = notifyMessage;
|
||||
}
|
||||
|
||||
public int getRemainBlood() {
|
||||
return remainBlood;
|
||||
}
|
||||
|
||||
public void setRemainBlood(int remainBlood) {
|
||||
this.remainBlood = remainBlood;
|
||||
}
|
||||
|
||||
public String getRoomNotifyBg() {
|
||||
return roomNotifyBg;
|
||||
}
|
||||
|
||||
public void setRoomNotifyBg(String roomNotifyBg) {
|
||||
this.roomNotifyBg = roomNotifyBg;
|
||||
}
|
||||
|
||||
public String getRoomNotifyClockImg() {
|
||||
return roomNotifyClockImg;
|
||||
}
|
||||
|
||||
public void setRoomNotifyClockImg(String roomNotifyClockImg) {
|
||||
this.roomNotifyClockImg = roomNotifyClockImg;
|
||||
}
|
||||
|
||||
public long getServerTime() {
|
||||
return serverTime;
|
||||
}
|
||||
|
||||
public void setServerTime(long serverTime) {
|
||||
this.serverTime = serverTime;
|
||||
}
|
||||
|
||||
public int getTotalBlood() {
|
||||
return totalBlood;
|
||||
}
|
||||
|
||||
public void setTotalBlood(int totalBlood) {
|
||||
this.totalBlood = totalBlood;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DataBean{" +
|
||||
"appearDuration=" + appearDuration +
|
||||
", appearRoomUid=" + appearRoomUid +
|
||||
", appearSvg='" + appearSvg + '\'' +
|
||||
", appearTime=" + appearTime +
|
||||
", attackSvg='" + attackSvg + '\'' +
|
||||
", beforeAppearSeconds=" + beforeAppearSeconds +
|
||||
", beforeDisappearSeconds=" + beforeDisappearSeconds +
|
||||
", defeatSvg='" + defeatSvg + '\'' +
|
||||
", disappearTime=" + disappearTime +
|
||||
", escapeSvg='" + escapeSvg + '\'' +
|
||||
", hallNotifyBg='" + hallNotifyBg + '\'' +
|
||||
", hallNotifyClockImg='" + hallNotifyClockImg + '\'' +
|
||||
", monsterId=" + monsterId +
|
||||
", monsterImg='" + monsterImg + '\'' +
|
||||
", monsterName='" + monsterName + '\'' +
|
||||
", monsterStatus=" + monsterStatus +
|
||||
", normalSvg='" + normalSvg + '\'' +
|
||||
", notifyMessage='" + notifyMessage + '\'' +
|
||||
", remainBlood=" + remainBlood +
|
||||
", roomNotifyBg='" + roomNotifyBg + '\'' +
|
||||
", roomNotifyClockImg='" + roomNotifyClockImg + '\'' +
|
||||
", serverTime=" + serverTime +
|
||||
", totalBlood=" + totalBlood +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(appearDuration);
|
||||
dest.writeInt(appearRoomUid);
|
||||
dest.writeString(appearSvg);
|
||||
dest.writeLong(appearTime);
|
||||
dest.writeString(attackSvg);
|
||||
dest.writeLong(beforeAppearSeconds);
|
||||
dest.writeLong(beforeDisappearSeconds);
|
||||
dest.writeString(defeatSvg);
|
||||
dest.writeLong(disappearTime);
|
||||
dest.writeString(escapeSvg);
|
||||
dest.writeString(hallNotifyBg);
|
||||
dest.writeString(hallNotifyClockImg);
|
||||
dest.writeInt(monsterId);
|
||||
dest.writeString(monsterImg);
|
||||
dest.writeString(monsterName);
|
||||
dest.writeInt(monsterStatus);
|
||||
dest.writeString(normalSvg);
|
||||
dest.writeString(notifyMessage);
|
||||
dest.writeInt(remainBlood);
|
||||
dest.writeString(roomNotifyBg);
|
||||
dest.writeString(roomNotifyClockImg);
|
||||
dest.writeLong(serverTime);
|
||||
dest.writeInt(totalBlood);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ import android.util.Log;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chwl.core.monsterhunting.bean.MonsterDataBean;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.netease.nimlib.sdk.NIMSDK;
|
||||
import com.netease.nimlib.sdk.Observer;
|
||||
@@ -66,7 +67,7 @@ public class MonsterHuntingModel extends BaseModel implements IMonsterHuntingMod
|
||||
private Api api;
|
||||
private UiHandler handler = new UiHandler(this);
|
||||
private List<CustomAttachment> magicQueue;
|
||||
private final static List<MonsterProtocol.DataBean> monsterList = new LinkedList<>();
|
||||
private final static List<MonsterDataBean> monsterList = new LinkedList<>();
|
||||
private volatile static CountDownTimer countDownTimer;//这里不写成static 出现正在倒计时,但是null == countDownTimer 判读为 true??
|
||||
|
||||
private volatile static IMonsterHuntingModel instance;
|
||||
@@ -197,13 +198,13 @@ public class MonsterHuntingModel extends BaseModel implements IMonsterHuntingMod
|
||||
public void getMonsterList(String roomId, String ticket){
|
||||
monsterList.clear();
|
||||
api.getMonsterList(roomId, ticket).compose(new Transformer<>())
|
||||
.subscribe(new Consumer<ServiceResult<List<MonsterProtocol.DataBean>>>() {
|
||||
.subscribe(new Consumer<ServiceResult<List<MonsterDataBean>>>() {
|
||||
@Override
|
||||
public void accept(ServiceResult<List<MonsterProtocol.DataBean>> listServiceResult) throws Exception {
|
||||
List<MonsterProtocol.DataBean> data = listServiceResult.getData();
|
||||
public void accept(ServiceResult<List<MonsterDataBean>> listServiceResult) throws Exception {
|
||||
List<MonsterDataBean> data = listServiceResult.getData();
|
||||
if (!ListUtils.isListEmpty(data)) {
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
MonsterProtocol.DataBean monsterInfos = data.get(i);
|
||||
MonsterDataBean monsterInfos = data.get(i);
|
||||
if (monsterInfos.getBeforeAppearSeconds() <= 180) {
|
||||
refreshMonster(monsterInfos);
|
||||
}
|
||||
@@ -220,11 +221,11 @@ public class MonsterHuntingModel extends BaseModel implements IMonsterHuntingMod
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
private void refreshMonster(MonsterProtocol.DataBean data) {
|
||||
private void refreshMonster(MonsterDataBean data) {
|
||||
boolean isFindMonster = false;
|
||||
int size = monsterList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
MonsterProtocol.DataBean monsterInfos = monsterList.get(i);
|
||||
MonsterDataBean monsterInfos = monsterList.get(i);
|
||||
if (monsterInfos.getMonsterId() == data.getMonsterId()){
|
||||
isFindMonster = true;
|
||||
monsterList.set(i, data);
|
||||
@@ -254,7 +255,7 @@ public class MonsterHuntingModel extends BaseModel implements IMonsterHuntingMod
|
||||
boolean isNeedUpdate = false;
|
||||
int size = monsterList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
MonsterProtocol.DataBean monsterInfos = monsterList.get(i);
|
||||
MonsterDataBean monsterInfos = monsterList.get(i);
|
||||
if (monsterInfos.getBeforeAppearSeconds() > 0){
|
||||
monsterInfos.setBeforeAppearSeconds(monsterInfos.getBeforeAppearSeconds() - 1);
|
||||
isNeedUpdate = true;
|
||||
@@ -279,7 +280,7 @@ public class MonsterHuntingModel extends BaseModel implements IMonsterHuntingMod
|
||||
boolean isNeedCountTime = false;
|
||||
int size = monsterList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
MonsterProtocol.DataBean monsterInfos = monsterList.get(i);
|
||||
MonsterDataBean monsterInfos = monsterList.get(i);
|
||||
// if (monsterInfos.getBeforeAppearSeconds() > 0 || monsterInfos.getBeforeDisappearSeconds() > 0 ){
|
||||
if (monsterInfos.getBeforeAppearSeconds() > 0 ){
|
||||
isNeedCountTime = true;
|
||||
@@ -331,7 +332,7 @@ public class MonsterHuntingModel extends BaseModel implements IMonsterHuntingMod
|
||||
if (baseProtocol == null) return;
|
||||
if (baseProtocol.getFirst() == CUSTOM_MSG_HEADER_TYPE_MONSTER_HUNTING) {
|
||||
MonsterProtocol monsterProtocol;
|
||||
MonsterProtocol.DataBean data;
|
||||
MonsterDataBean data;
|
||||
switch (baseProtocol.getSecond()) {
|
||||
case CUSTOM_MSG_SUB_TYPE_MONSTER_HUNTING:
|
||||
monsterProtocol = JSON.parseObject(body, MonsterProtocol.class);
|
||||
@@ -358,7 +359,7 @@ public class MonsterHuntingModel extends BaseModel implements IMonsterHuntingMod
|
||||
//移除怪兽
|
||||
int size = monsterList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
MonsterProtocol.DataBean monsterInfos = monsterList.get(i);
|
||||
MonsterDataBean monsterInfos = monsterList.get(i);
|
||||
if (monsterInfos.getMonsterId() == data1.getMonsterId()){
|
||||
monsterList.remove(i);
|
||||
RxBusHelper.post(new MonsterUpdateEvent(monsterList));
|
||||
@@ -389,13 +390,13 @@ public class MonsterHuntingModel extends BaseModel implements IMonsterHuntingMod
|
||||
// 保留 30 秒,并且点击可以跳转到排行榜 H5 页面
|
||||
Single.just(result.getMonster()).delay(30,TimeUnit.SECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<MonsterProtocol.DataBean>() {
|
||||
.subscribe(new Consumer<MonsterDataBean>() {
|
||||
@Override
|
||||
public void accept(MonsterProtocol.DataBean data) throws Exception {
|
||||
public void accept(MonsterDataBean data) throws Exception {
|
||||
//移除怪兽
|
||||
int size = monsterList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
MonsterProtocol.DataBean monsterInfos = monsterList.get(i);
|
||||
MonsterDataBean monsterInfos = monsterList.get(i);
|
||||
if (monsterInfos.getMonsterId() == data.getMonsterId()){
|
||||
monsterList.remove(i);
|
||||
RxBusHelper.post(new MonsterUpdateEvent(monsterList));
|
||||
@@ -471,7 +472,7 @@ public class MonsterHuntingModel extends BaseModel implements IMonsterHuntingMod
|
||||
* @return
|
||||
*/
|
||||
@GET("v1/monster/list")
|
||||
Single<ServiceResult<List<MonsterProtocol.DataBean>>> getMonsterList(@Query("roomId") String roomId,
|
||||
Single<ServiceResult<List<MonsterDataBean>>> getMonsterList(@Query("roomId") String roomId,
|
||||
@Query("ticket") String ticket);
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package com.chwl.core.monsterhunting.rxevent;
|
||||
|
||||
import com.chwl.core.monsterhunting.bean.MonsterDataBean;
|
||||
import com.chwl.core.monsterhunting.bean.MonsterProtocol;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -14,9 +15,9 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class MonsterUpdateEvent implements Serializable {
|
||||
private List<MonsterProtocol.DataBean> monsterList ;
|
||||
private List<MonsterDataBean> monsterList ;
|
||||
|
||||
public MonsterUpdateEvent(List<MonsterProtocol.DataBean> monsterList) {
|
||||
public MonsterUpdateEvent(List<MonsterDataBean> monsterList) {
|
||||
this.monsterList = monsterList;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,88 @@
|
||||
package com.chwl.core.user.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class LiveSkillVoListBean implements Serializable {
|
||||
/**
|
||||
* id : 1
|
||||
* liveId : 3
|
||||
* skillName : 王者
|
||||
* skillPicture : picture
|
||||
* skillType : 1
|
||||
* status : 3
|
||||
* valid : 1
|
||||
*/
|
||||
|
||||
private long id;
|
||||
private long liveId;
|
||||
private String skillName;
|
||||
private String skillPicture;
|
||||
private String skillType;
|
||||
private int status; //技能状态 1--未认证 2--审核中 3--已认证
|
||||
private int valid;// 是否激活 0-未激活 1-已激活
|
||||
private int hasUse; //是否使用 0-未使用 | 1-使用
|
||||
|
||||
public int getHasUse() {
|
||||
return hasUse;
|
||||
}
|
||||
|
||||
public void setHasUse(int hasUse) {
|
||||
this.hasUse = hasUse;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public long getLiveId() {
|
||||
return liveId;
|
||||
}
|
||||
|
||||
public void setLiveId(int liveId) {
|
||||
this.liveId = liveId;
|
||||
}
|
||||
|
||||
public String getSkillName() {
|
||||
return skillName;
|
||||
}
|
||||
|
||||
public void setSkillName(String skillName) {
|
||||
this.skillName = skillName;
|
||||
}
|
||||
|
||||
public String getSkillPicture() {
|
||||
return skillPicture;
|
||||
}
|
||||
|
||||
public void setSkillPicture(String skillPicture) {
|
||||
this.skillPicture = skillPicture;
|
||||
}
|
||||
|
||||
public String getSkillType() {
|
||||
return skillType;
|
||||
}
|
||||
|
||||
public void setSkillType(String skillType) {
|
||||
this.skillType = skillType;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getValid() {
|
||||
return valid;
|
||||
}
|
||||
|
||||
public void setValid(int valid) {
|
||||
this.valid = valid;
|
||||
}
|
||||
}
|
@@ -49,89 +49,4 @@ public class LiveTagInfo implements Serializable {
|
||||
public void setLiveSkillVoList(List<LiveSkillVoListBean> liveSkillVoList) {
|
||||
this.liveSkillVoList = liveSkillVoList;
|
||||
}
|
||||
|
||||
public static class LiveSkillVoListBean implements Serializable {
|
||||
/**
|
||||
* id : 1
|
||||
* liveId : 3
|
||||
* skillName : 王者
|
||||
* skillPicture : picture
|
||||
* skillType : 1
|
||||
* status : 3
|
||||
* valid : 1
|
||||
*/
|
||||
|
||||
private long id;
|
||||
private long liveId;
|
||||
private String skillName;
|
||||
private String skillPicture;
|
||||
private String skillType;
|
||||
private int status; //技能状态 1--未认证 2--审核中 3--已认证
|
||||
private int valid;// 是否激活 0-未激活 1-已激活
|
||||
private int hasUse; //是否使用 0-未使用 | 1-使用
|
||||
|
||||
public int getHasUse() {
|
||||
return hasUse;
|
||||
}
|
||||
|
||||
public void setHasUse(int hasUse) {
|
||||
this.hasUse = hasUse;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public long getLiveId() {
|
||||
return liveId;
|
||||
}
|
||||
|
||||
public void setLiveId(int liveId) {
|
||||
this.liveId = liveId;
|
||||
}
|
||||
|
||||
public String getSkillName() {
|
||||
return skillName;
|
||||
}
|
||||
|
||||
public void setSkillName(String skillName) {
|
||||
this.skillName = skillName;
|
||||
}
|
||||
|
||||
public String getSkillPicture() {
|
||||
return skillPicture;
|
||||
}
|
||||
|
||||
public void setSkillPicture(String skillPicture) {
|
||||
this.skillPicture = skillPicture;
|
||||
}
|
||||
|
||||
public String getSkillType() {
|
||||
return skillType;
|
||||
}
|
||||
|
||||
public void setSkillType(String skillType) {
|
||||
this.skillType = skillType;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getValid() {
|
||||
return valid;
|
||||
}
|
||||
|
||||
public void setValid(int valid) {
|
||||
this.valid = valid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user