back_recharge
gaojie 2019-03-12 14:03:08 +08:00
parent c5d0813b68
commit e5d66d4bd3
4 changed files with 137 additions and 11 deletions

View File

@ -15,9 +15,9 @@ int mut,float#float,2 mut,int#int,2 mut,float#float,2 float
1000213 20011#0.7|30011#0.7 1|3#4 1.35#1|0.8#3#6|1#0.2#6#1 0.0
1000214 2001#0.7 1 1.5#1 0.0
1000215 2001#0.7 1 1.5#1 0.0
1000221 20012#0.7|30011#0.7 1#9 1.66#1|6#0.5#6#0.45 2.4
1000222 20012#0.7|30011#0.7 1#9 1.66#1|6#0.5#6#0.45 2.4
1000223 20012#0.7|30011#0.7 1#9 1.66#1|6#0.5#6#0.45 2.4
1000221 20012#0.7|30011#0.7 1|9 1.66#1|6#0.5#6#0.45 2.4
1000222 20012#0.7|30011#0.7 1|9 1.66#1|6#0.5#6#0.45 2.4
1000223 20012#0.7|30011#0.7 1|9 1.66#1|6#0.5#6#0.45 2.4
1000224 2001#0.7 1 1.5#1 2.4
1000225 2001#0.7 1 1.5#1 2.4
1000311 20011#0.7 10 1.1#1#0.65 0.0
@ -120,9 +120,9 @@ int mut,float#float,2 mut,int#int,2 mut,float#float,2 float
1001223 20222#0.7 1#3 1.5#1|1#4#5 2.6
1001224 2001#0.7 1 1.5#1 2.6
1001225 2001#0.7 1 1.5#1 2.6
1001311 20011#0.7|30011#0.7 1#4#4 1#1|9#0.1#5#1|10#0.1#5#1 0.0
1001312 20011#0.7|30011#0.7 1#4#4 1#1|9#0.1#5#1|10#0.1#5#1 0.0
1001313 20011#0.7|30011#0.7 1#4#4 1#1|9#0.1#5#1|10#0.1#5#1 0.0
1001311 20011#0.7|30011#0.7 1|4#4 1#1|9#0.1#5#1|10#0.1#5#1 0.0
1001312 20011#0.7|30011#0.7 1|4#4 1#1|9#0.1#5#1|10#0.1#5#1 0.0
1001313 20011#0.7|30011#0.7 1|4#4 1#1|9#0.1#5#1|10#0.1#5#1 0.0
1001314 2001#0.7 1 1.5#1 0.0
1001315 2001#0.7 1 1.5#1 0.0
1001321 20312#0.7 19 1.35#1#0.5#5 2.3
@ -210,8 +210,8 @@ int mut,float#float,2 mut,int#int,2 mut,float#float,2 float
1002123 20010#0.7|20012#0.7 2|3 1.89#2|1#5#5 2.3
1002124 2001#0.7 1 1.5#1 2.3
1002125 2001#0.7 1 1.5#1 2.3
1002211 20011#0.7|30011#0.7 1#4#4 2.3#2|9#0.2#4#1|10#0.2#4#1 0.0
1002212 20011#0.7|30011#0.7 1#4#4 2.3#2|9#0.2#4#1|10#0.2#4#1 0.0
1002211 20011#0.7|30011#0.7 1|4#4 2.3#2|9#0.2#4#1|10#0.2#4#1 0.0
1002212 20011#0.7|30011#0.7 1|4#4 2.3#2|9#0.2#4#1|10#0.2#4#1 0.0
1002213 20011#0.7|30011#0.7 1|4#4 2.3#2|9#0.2#4#1|10#0.2#4#1 0.0
1002214 2001#0.7 0 1.5#1 0.0
1002215 2001#0.7 0 1.5#1 0.0
@ -220,9 +220,9 @@ int mut,float#float,2 mut,int#int,2 mut,float#float,2 float
1002223 20211#0.7 1#15 3.3#2|1.98#2#1.98 1.6
1002224 2001#0.7 0 1.5#1 1.6
1002225 2001#0.7 0 1.5#1 1.6
1002311 20011#0.7|30011#0.7 1#3 1.35#2|0#0#5 0.0
1002312 20011#0.7|30011#0.7 1#3 1.35#2|0#0#5 0.0
1002313 20011#0.7|30011#0.7 1#3 1.35#2|0#0#5 0.0
1002311 20011#0.7|30011#0.7 1|3 1.35#2|0#0#5 0.0
1002312 20011#0.7|30011#0.7 1|3 1.35#2|0#0#5 0.0
1002313 20011#0.7|30011#0.7 1|3 1.35#2|0#0#5 0.0
1002314 2001#0.7 0 1.5#1 0.0
1002315 2001#0.7 0 1.5#1 0.0
1002321 20010#0.7 14 1.55#2#1#10023#0.2 2.5

View File

@ -2,13 +2,18 @@ package com.ljsd.jieling.config;
import com.ljsd.jieling.logic.STableManager;
import com.ljsd.jieling.logic.Table;
import com.ljsd.jieling.util.StringUtil;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
@Table(name ="SkillLogicConfig")
public class SSkillLogicConfig implements BaseConfig {
public static Map<Integer, SSkillLogicConfig> sSkillLogicConfigMap;
public static Map<Integer,SSkillLogicVo> sSkillLogicVoMap;
private int id;
private float[][] target;
@ -23,6 +28,17 @@ public class SSkillLogicConfig implements BaseConfig {
@Override
public void init() throws Exception {
sSkillLogicConfigMap = STableManager.getConfig(SSkillLogicConfig.class);
Map<Integer,SSkillLogicVo> skillLogicVoMap = new ConcurrentHashMap<>();
for (Map.Entry<Integer,SSkillLogicConfig> entry :sSkillLogicConfigMap.entrySet()){
SSkillLogicConfig sSkillLogicConfig = entry.getValue();
SSkillLogicVo sSkillLogicVo = getSSkillLogicVo(sSkillLogicConfig);
skillLogicVoMap.put(entry.getKey(),sSkillLogicVo);
}
sSkillLogicVoMap = skillLogicVoMap;
}
public static SSkillLogicVo getsSkillLogicVoMap(int skillId) {
return sSkillLogicVoMap.get(skillId);
}
public static Map<Integer, SSkillLogicConfig> getsSkillLogicConfigMap() {
@ -48,4 +64,42 @@ public class SSkillLogicConfig implements BaseConfig {
public float getCd() {
return cd;
}
private SSkillLogicVo getSSkillLogicVo(SSkillLogicConfig sSkillLogicConfig) {
float[][] targets = sSkillLogicConfig.getTarget();
int[][] effect = sSkillLogicConfig.getEffect();
float[][] effectValue = sSkillLogicConfig.getEffectValue();
// System.out.println(sSkillLogicConfig.getId() +":"+targets.length + ":" +effect.length +":" + effectValue.length);
List<SkillTargetVo> skillTargetVos = new CopyOnWriteArrayList<>();
for (int i = 0; i < targets.length ; i++){
SkillTargetVo skillTargetVo = new SkillTargetVo();
skillTargetVo.setTargetId((int) targets[i][0]);
skillTargetVo.setContinuedTime(targets[i][1]);
skillTargetVo.setEffectVale(getEffectVal(effect[i],effectValue[i]));
skillTargetVos.add(skillTargetVo);
}
SSkillLogicVo sSkillLogicVo = new SSkillLogicVo();
sSkillLogicVo.setSkillId(sSkillLogicConfig.getId());
sSkillLogicVo.setCd(sSkillLogicConfig.getCd());
sSkillLogicVo.setSkillTargetVoList(skillTargetVos);
return sSkillLogicVo;
}
private float[][] getEffectVal(int[] effects, float[] effectValue) {
StringBuilder effectInfo = new StringBuilder();
for (int effect : effects) {
if (effectInfo.length() == 0){
effectInfo = new StringBuilder(String.valueOf(effect));
}else {
effectInfo.append("|").append(effect);
}
for (float effectVal :effectValue){
effectInfo.append("#").append(effectVal);
}
}
return StringUtil.parseFiledFloat2(effectInfo.toString());
}
}

View File

@ -0,0 +1,36 @@
package com.ljsd.jieling.config;
import java.util.List;
public class SSkillLogicVo{
private int skillId;
private float cd;
private List<SkillTargetVo> skillTargetVoList;
public int getSkillId() {
return skillId;
}
public void setSkillId(int skillId) {
this.skillId = skillId;
}
public float getCd() {
return cd;
}
public void setCd(float cd) {
this.cd = cd;
}
public List<SkillTargetVo> getSkillTargetVoList() {
return skillTargetVoList;
}
public void setSkillTargetVoList(List<SkillTargetVo> skillTargetVoList) {
this.skillTargetVoList = skillTargetVoList;
}
}

View File

@ -0,0 +1,36 @@
package com.ljsd.jieling.config;
public class SkillTargetVo {
private int targetId;
private float continuedTime; //技能效果持续时间
private float[][] effectVale; //技能效果
public int getTargetId() {
return targetId;
}
public void setTargetId(int targetId) {
this.targetId = targetId;
}
public float getContinuedTime() {
return continuedTime;
}
public void setContinuedTime(float continuedTime) {
this.continuedTime = continuedTime;
}
public float[][] getEffectVale() {
return effectVale;
}
public void setEffectVale(float[][] effectVale) {
this.effectVale = effectVale;
}
}