导表+逻辑处理

This commit is contained in:
yuexin 2020-12-30 20:50:09 +08:00
parent e4b8545fce
commit 8130c3088f
5 changed files with 27 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
[{"id":10002,"type_id":1,"count":0,"point":0,"weight":""},{"id":10012,"type_id":1,"count":20,"point":1,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10022,"type_id":1,"count":20,"point":2,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10032,"type_id":1,"count":20,"point":3,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10042,"type_id":1,"count":20,"point":4,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10052,"type_id":1,"count":20,"point":5,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10062,"type_id":1,"count":20,"point":6,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10072,"type_id":1,"count":20,"point":7,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10082,"type_id":1,"count":20,"point":8,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10092,"type_id":1,"count":20,"point":9,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10102,"type_id":1,"count":20,"point":10,"weight":"20012:100|20032:100|20042:100|20052:100|20062:100|20072:100|20082:100|20102:700"},{"id":10112,"type_id":2,"count":20,"point":10,"weight":"20112:100"},{"id":10122,"type_id":3,"count":8,"point":10,"weight":"20122:100"},{"id":10132,"type_id":4,"count":0,"point":10,"weight":"20132:0"}]
[{"id":10002,"type_id":1,"count":0,"point":0,"weight":""},{"id":10012,"type_id":1,"count":20,"point":1,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10022,"type_id":1,"count":20,"point":2,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10032,"type_id":1,"count":20,"point":3,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10042,"type_id":1,"count":20,"point":4,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10052,"type_id":1,"count":20,"point":5,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10062,"type_id":1,"count":20,"point":6,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10072,"type_id":1,"count":20,"point":7,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10082,"type_id":1,"count":20,"point":8,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10092,"type_id":1,"count":20,"point":9,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10102,"type_id":1,"count":20,"point":10,"weight":"20012:100|20032:100|20042:100|20052:150|20062:150|20072:150|20082:150|20102:750"},{"id":10112,"type_id":2,"count":20,"point":10,"weight":"20112:100"},{"id":10122,"type_id":3,"count":8,"point":10,"weight":"20122:100"},{"id":10132,"type_id":4,"count":0,"point":10,"weight":"20132:0"}]

View File

@ -39,7 +39,7 @@ export class SkillCfg implements Cfg{
public getskillid: number;
public getskill_times: number;
public getskill_timesmax: number;
public skill_owners: number;
public skill_ownersid: number;
public decode(data: any) {
this.id = data.id;
@ -78,7 +78,7 @@ export class SkillCfg implements Cfg{
this.getskillid = data.getskillid;
this.getskill_times = data.getskill_times;
this.getskill_timesmax = data.getskill_timesmax;
this.skill_owners = data.skill_owners;
this.skill_ownersid = data.skill_ownersid;
};
public isOK (uniqueID: number, param1: any, param2: any): boolean {

View File

@ -333,8 +333,16 @@ export class Skill {
if(ncount == 0){
ncount = 1;
}
let sp;
if(param.srcpet != this._petowner){
sp = param.clone();
sp.srcpet = this._petowner;
sp.srcplayer = sp.srcpet._owner;
}else{
sp = param;
}
for(let i=0; i<ncount;i++){
this._trigger(param, cb);
this._trigger(sp, cb);
}
};
@ -508,10 +516,19 @@ export class Skill {
sender = tgt.srcplayer._self;
}
}
if(this._data.skill_owners){
obj = tgt.dst;
}else{
obj = tgt.srcpet? tgt.srcpet: tgt.srcplayer;
switch(this._data.skill_ownersid){
case SkillUserType.NONE:
obj = tgt.srcpet? tgt.srcpet: tgt.srcplayer;
break;
case SkillUserType.TARGET:
obj = tgt.dst;
break;
case SkillUserType.SRC_HERO:
obj = tgt.srcplayer? tgt.srcplayer: tgt.srcpet._owner;
break;
case SkillUserType.SRC_PLAYER:
obj = tgt.srcplayer;
break;
}
let n = obj? obj.addSkill(this._data.getskillid, ncount, sender): 0;