本文整理汇总了Java中logbook.dto.QuestDto.setProgressFlag方法的典型用法代码示例。如果您正苦于以下问题:Java QuestDto.setProgressFlag方法的具体用法?Java QuestDto.setProgressFlag怎么用?Java QuestDto.setProgressFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类logbook.dto.QuestDto
的用法示例。
在下文中一共展示了QuestDto.setProgressFlag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doQuest
import logbook.dto.QuestDto; //导入方法依赖的package包/类
/**
* 任務を更新します
*
* @param data
*/
private static void doQuest(Data data) {
try {
JsonObject apidata = data.getJsonObject().getJsonObject("api_data");
if (!apidata.isNull("api_list")) {
JsonArray apilist = apidata.getJsonArray("api_list");
for (JsonValue value : apilist) {
if (value instanceof JsonObject) {
JsonObject questobject = (JsonObject) value;
// 任務を作成
QuestDto quest = new QuestDto();
quest.setNo(questobject.getInt("api_no"));
quest.setCategory(questobject.getInt("api_category"));
quest.setType(questobject.getInt("api_type"));
quest.setState(questobject.getInt("api_state"));
quest.setTitle(questobject.getString("api_title"));
quest.setDetail(questobject.getString("api_detail"));
JsonArray material = questobject.getJsonArray("api_get_material");
quest.setFuel(material.getJsonNumber(0).toString());
quest.setAmmo(material.getJsonNumber(1).toString());
quest.setMetal(material.getJsonNumber(2).toString());
quest.setBauxite(material.getJsonNumber(3).toString());
quest.setBonusFlag(questobject.getInt("api_bonus_flag"));
quest.setProgressFlag(questobject.getInt("api_progress_flag"));
questMap.put(quest.getNo(), quest);
}
}
}
addConsole("任務を更新しました");
} catch (Exception e) {
LoggerHolder.LOG.warn("任務を更新しますに失敗しました", e);
LoggerHolder.LOG.warn(data);
}
}
示例2: doQuest
import logbook.dto.QuestDto; //导入方法依赖的package包/类
/**
* 任務を更新します
*
* @param data
*/
private static void doQuest(Data data) {
try {
JsonObject apidata = data.getJsonObject().getJsonObject("api_data");
if (!apidata.isNull("api_list")) {
JsonArray apilist = apidata.getJsonArray("api_list");
for (JsonValue value : apilist) {
if (value instanceof JsonObject) {
JsonObject questobject = (JsonObject) value;
// 任務を作成
QuestDto quest = new QuestDto();
quest.setNo(questobject.getInt("api_no"));
quest.setCategory(questobject.getInt("api_category"));
quest.setType(questobject.getInt("api_type"));
quest.setState(questobject.getInt("api_state"));
quest.setTitle(questobject.getString("api_title"));
quest.setDetail(questobject.getString("api_detail"));
JsonArray material = questobject.getJsonArray("api_get_material");
quest.setFuel(material.getJsonNumber(0).toString());
quest.setAmmo(material.getJsonNumber(1).toString());
quest.setMetal(material.getJsonNumber(2).toString());
quest.setBauxite(material.getJsonNumber(3).toString());
quest.setBonusFlag(questobject.getInt("api_bonus_flag"));
quest.setProgressFlag(questobject.getInt("api_progress_flag"));
questMap.put(quest.getNo(), quest);
}
}
}
addConsole("任務を更新しました");
} catch (Exception e) {
LOG.warn("任務を更新しますに失敗しました", e);
LOG.warn(data);
}
}
示例3: doQuest
import logbook.dto.QuestDto; //导入方法依赖的package包/类
/**
* 任務を更新します
*
* @param data
*/
private static void doQuest(Data data) {
try {
JsonObject apidata = data.getJsonObject().getJsonObject("api_data");
if (!apidata.isNull("api_list")) {
JsonArray apilist = apidata.getJsonArray("api_list");
for (JsonValue value : apilist) {
if (value instanceof JsonObject) {
JsonObject questobject = (JsonObject) value;
// 任務を作成
QuestDto quest = new QuestDto();
quest.setNo(questobject.getInt("api_no"));
quest.setCategory(questobject.getInt("api_category"));
quest.setType(questobject.getInt("api_type"));
quest.setState(questobject.getInt("api_state"));
quest.setTitle(questobject.getString("api_title"));
quest.setDetail(questobject.getString("api_detail"));
JsonArray material = questobject.getJsonArray("api_get_material");
quest.setFuel(material.getJsonNumber(0).toString());
quest.setAmmo(material.getJsonNumber(1).toString());
quest.setMetal(material.getJsonNumber(2).toString());
quest.setBauxite(material.getJsonNumber(3).toString());
quest.setBonusFlag(questobject.getInt("api_bonus_flag"));
quest.setProgressFlag(questobject.getInt("api_progress_flag"));
questMap.put(quest.getNo(), quest);
}
}
}
addConsole("Quest info updated");
} catch (Exception e) {
LOG.warn("Failed to update quest data", e);
LOG.warn(data);
}
}