【登录】 【注册】
进入此贴详细完整版>> 079修复怪物打不死攻略 版主加分中华游戏网 > 单机游戏交流

主题:079修复怪物打不死攻略 版主加分
作者:532227868
时间:2010-05-30 11:31

引用

这个是仿照那个源码进行修改的!能看懂的就看吧!纯属技术研究!
应该还不是完美修复,没去试战神,不知道战神攻击会怎么样!
刚实验了下 果然战神的combo 没反应!呵呵不过总算有进步了!

该隐藏帖已经发布超过60天,已自动取消隐藏功能,无需回复即可查看!
1.打开源码找到net\sf\odinms\net\channel\handler\AbstractDealDamageHandler.java
找到这个函数parseDamage() 然后用下面的代码替换 注意替换前先备份!
---------------------------------------------------------------------------------
public AttackInfo parseDamage(MapleCharacter c, LittleEndianAccessor lea, boolean ranged) {
    AttackInfo ret = new AttackInfo();
    lea.readByte();
    lea.skip(8);
    ret.numAttackedAndDamage = lea.readByte();
    lea.skip(8);
    ret.numAttacked = (ret.numAttackedAndDamage >>> 4 & 0xF);
    ret.numDamage = (ret.numAttackedAndDamage & 0xF);
    ret.allDamage = new ArrayList();
    ret.skill = lea.readInt();
    lea.skip(8);
    if ((ret.skill == 2121001) || (ret.skill == 2221001) || (ret.skill == 2321001) || (ret.skill ==
5201002) || (ret.skill == 14111006) || (ret.skill == 5101004) || (ret.skill == 15101003))
      ret.charge = lea.readInt();
    else {
      ret.charge = 0;
    }
    if (ret.skill == 1221011)
      ret.isHH = true;
    lea.readInt();
    ret.aresCombo = lea.readByte();
    int sourceid = ret.skill;
    if ((sourceid == 21100004) || (sourceid == 21100005) || (sourceid == 21110003) || (sourceid ==
21110004) || (sourceid == 21120006) || (sourceid == 21120007))
      c.setCombo(1);
    ret.pos = lea.readByte();
    ret.stance = lea.readByte();
    if (ret.skill == 4211006) {
      return parseMesoExplosion(lea, ret);
    }
    if (ranged) {
      lea.readByte();
      ret.speed = lea.readByte();
      lea.readByte();
      ret.direction = lea.readByte();
      lea.skip(7);
      if ((ret.skill == 3121004) || (ret.skill == 3221001) || (ret.skill == 5221004) || (ret.skill ==
13111002))
        lea.skip(4);
    }
    else {
      lea.readByte();
      ret.speed = lea.readByte();
      lea.skip(4);
    }
    for (int i = 0; i < ret.numAttacked; ++i) {
      int oid = lea.readInt();
      lea.skip(14);
      List allDamageNumbers = new ArrayList();
      for (int j = 0; j < ret.numDamage; ++j) {
        int damage = lea.readInt();
        MapleStatEffect effect = null;
        if (ret.skill != 0)
          effect = SkillFactory.getSkill(ret.skill).getEffect(c.getSkillLevel(SkillFactory.getSkill
(ret.skill)));
        if ((damage != 0) && (effect != null) && (effect.getFixedDamage() != 0))
          damage = effect.getFixedDamage();
        allDamageNumbers.add(Integer.valueOf(damage));
      }
      if (ret.skill != 5221004)
        lea.skip(4);
      ret.allDamage.add(new Pair(Integer.valueOf(oid), allDamageNumbers));
    }
    return ret;
  }

---------------------------------------------------------------------------------
2.接着找到net\sf\odinms\client\MapleCharacter.java
查找
    //战神Combo
    private int combo = 0;
    private int comboCount = 0;
将其修改为
    //战神Combo
    private int combo = 0;
    private int comboCounter = 0;
此时应再查找comboCount 将其修改为comboCounter(不然原变量将不可用 导致变量未定义)
应该也可以重新定义comboCounter这个变量 没实验
然后在下面适当处增加两个函数
  public int getCombo() {
    return this.comboCounter;
  }
  public int setCombo(int combo) {
    return (this.comboCounter = combo);
  }
代码就修改完毕了 编译后 怪物就应该能掉血了!

大概原因分析:
攻击封包数据改变,原来处理封包的方式已经不能适用了 所以应当修改原来的处理结构!

1楼:qq1151809725(2010-05-30 12:12)

是什么东东啊
2楼:chjw1234(2010-06-10 00:17)

是什么东东啊
3楼:xincintian(2010-06-10 09:50)

是什么东东啊
4楼:a8832818(2010-06-14 15:03)

dddddddddddddddddd
5楼:q714467754(2010-06-16 15:33)

倒萨撒旦阿斯顿
6楼:秋风№飞霜★(2010-06-20 08:43)

我要了~~

进入此贴详细完整版>> 079修复怪物打不死攻略 版主加分 返回顶部


COPYRIGHT © 2006-2024 中华游戏网 cnyouw.cn. ALL RIGHTS RESERVED. SITEMAP