@@ -45,7 +45,7 @@ public class CombatLogServiceImpl implements CombatLogService {
45
45
private IDictService dictService ;
46
46
@ Autowired
47
47
private IGameDictService gameDictService ;
48
-
48
+
49
49
/**
50
50
* 通过时间获取分区表
51
51
*
@@ -66,14 +66,13 @@ public static String getTable(String dt) {
66
66
e .printStackTrace ();
67
67
}
68
68
}
69
- String t = " zl_log_info" + table_suffix + " " ;
69
+ String t = " zl_log_info" + table_suffix + " " ;
70
70
return t ;
71
71
}
72
72
73
73
public static void main (String [] args ) {
74
74
System .out .println (getTable ("2018-08-10 12:50:30" ));
75
75
}
76
-
77
76
78
77
@ Override
79
78
public PaginatorResult getPaginatorList (Paginator paginator , QueryCommBean bean ) {
@@ -156,7 +155,7 @@ public PaginatorResult getPaginatorList(Paginator paginator, QueryCommBean bean)
156
155
// 转换文件名
157
156
if (dicts .containsKey (log .getFile ())) {
158
157
log .setFileName (dicts .get (log .getFile ()));
159
- }else {
158
+ } else {
160
159
log .setFileName (log .getFile ());
161
160
}
162
161
// 转换服务器
@@ -216,7 +215,7 @@ public PaginatorResult getPaginatorList(Paginator paginator, QueryCommBean bean)
216
215
String skill_name = zl_effect_type .get (key );
217
216
jsonCont .put ("effect_Prob" , skill_name );
218
217
} else {
219
- jsonCont .put ("effect_Prob" , key );
218
+ jsonCont .put ("effect_Prob" , "末能翻译:" + key );
220
219
}
221
220
log .setCont (jsonCont .toJSONString ());
222
221
}
@@ -360,7 +359,7 @@ public PaginatorResult getPaginatorList(Paginator paginator, QueryCommBean bean)
360
359
exotics_array .add (exotics_json );
361
360
continue ;
362
361
}
363
- if ("EXOTIC_RAND_ATTR" .equals (exotics_Dict .getName ())){//他才有属性
362
+ if ("EXOTIC_RAND_ATTR" .equals (exotics_Dict .getName ())) {// 他才有属性
364
363
String attrs_key = "A_" + exotics_Dict .getArg1 ();
365
364
if (zl_attrs_types .containsKey (attrs_key )) {
366
365
exotics_json .put ("attr" , zl_attrs_types .get (attrs_key ).getName ());
@@ -378,7 +377,55 @@ public PaginatorResult getPaginatorList(Paginator paginator, QueryCommBean bean)
378
377
jsonCont .put ("add_pass_passive_skill_type" , add_pass_passive_skill_type .toJSONString ());
379
378
log .setCont (jsonCont .toJSONString ());
380
379
}
380
+ // 独特属性转换
381
+ if ("exotics_ids" .equals (log .getFile ())) {
382
+ JSONObject jsonCont = (JSONObject ) JSONObject .parse (log .getCont ());
383
+ if (!jsonCont .containsKey ("exotics_ids" )) {
384
+ continue ;
385
+ }
386
+ String exotics_ids = jsonCont .get ("exotics_ids" ).toString ();
387
+ if (StringUtils .isBlank (exotics_ids )) {
388
+ continue ;
389
+ }
390
+ String [] ids = exotics_ids .replace ("[" , "" ).replace ("]" , "" ).split ("," );
391
+ JSONArray exotics_array = new JSONArray ();
392
+
393
+ for (String id : ids ) {
394
+ JSONObject jsonCont_new = new JSONObject ();
395
+ if (!zl_exotics_type .containsKey (id )) {
396
+ jsonCont_new .put ("msg" , "配置表末能找到对应的id_" + id );
397
+ exotics_array .add (jsonCont_new );
398
+ continue ;
399
+ }
400
+ Dict exotics_Dict = zl_exotics_type .get (id );
401
+ // 独特属性
402
+ jsonCont_new .put ("id" , exotics_Dict .getValue ());
403
+ jsonCont_new .put ("type" , exotics_Dict .getName ());
404
+ jsonCont_new .put ("arg2" , exotics_Dict .getArg2 ());
405
+ jsonCont_new .put ("arg3" , exotics_Dict .getArg3 ());
406
+ // 接着翻译
407
+ if (StringUtils .isBlank (exotics_Dict .getArg1 ())) {
408
+ jsonCont_new .put ("attr" , "空" );
409
+ exotics_array .add (jsonCont_new );
410
+ continue ;
411
+ }
412
+ if ("EXOTIC_RAND_ATTR" .equals (exotics_Dict .getName ())) {// 他才有属性
413
+ String attrs_key = "A_" + exotics_Dict .getArg1 ();
414
+ if (zl_attrs_types .containsKey (attrs_key )) {
415
+ jsonCont_new .put ("attr" , zl_attrs_types .get (attrs_key ).getName ());
416
+ } else {
417
+ jsonCont_new .put ("属性:配置表末能翻译-" , attrs_key );
418
+ }
419
+ }
381
420
421
+ exotics_array .add (jsonCont_new );
422
+ }
423
+
424
+ JSONObject add_pass_passive_skill_type = new JSONObject ();
425
+ add_pass_passive_skill_type .put ("pass_list" , exotics_array );
426
+ jsonCont .put ("add_pass_passive_skill_type" , add_pass_passive_skill_type .toJSONString ());
427
+ log .setCont (jsonCont .toJSONString ());
428
+ }
382
429
}
383
430
384
431
// for (CombatLog log : data) {
0 commit comments