Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

L2J 안녕하세요 L2J (SHARE)L2jMobius Essence_7.1_Assassin build pack

Initiate Mage
Joined
May 7, 2023
Messages
3
Reaction score
4
안녕하세요 모비우스 어쌔신 7.1 버전 입니다.

im korean

Fix cast for teleport​

On retail, the teleport cast time is not affected by casting speed or other stuff. So I make a little change in code to prevent this to happen on l2mobius assassin.

L2J (SHARE)L2jMobius Essence_7.1_Assassin​

자체적으로 일부 스킬 오류 관련 수정 하였습니다.

연구용으로 쓰실분은 쓰세요

If you're thankful, please leave a comment.

감사합니다.

 
Last edited:
Newbie Spellweaver
Joined
Dec 27, 2008
Messages
35
Reaction score
1
Why don't you post the fix only so people can apply it to their own files?
Downloading the entire thing is not really useful
 
Initiate Mage
Joined
Dec 6, 2023
Messages
4
Reaction score
1
lol you just copy my post from the l2jmobius forum and set in a file... you even don`t change the text xD
The code if some one need it (Should work in any version of essence by the way)
L2J_Mobius_Essence_7.1_Assassin\java\org\l2jmobius\gameserver\model\skill\SkillCaster.java
Finde this code

Java:
private void calcSkillTiming(Creature creature, Skill skill, int castTime)
{
    final double timeFactor = Formulas.calcSkillTimeFactor(creature, skill);
    final double cancelTime = Formulas.calcSkillCancelTime(creature, skill);
 
    if (skill.getOperateType().isChanneling())
    {
        _hitTime = (int) Math.max(skill.getHitTime() - cancelTime, 0);
        _cancelTime = 2866;
    }
    else
    {
        int addedTime = 0;
        if (skill.hasEffectType(EffectType.TELEPORT) && creature.isPlayer())
        {
            switch (creature.getActingPlayer().getEinhasadOverseeingLevel())
            {
                case 6:
                {
                    addedTime = 2000;
                    break;
                }
                case 7:
                {
                    addedTime = 3000;
                    break;
                }
                case 8:
                {
                    addedTime = 4000;
                    break;
                }
                case 9:
                {
                    addedTime = 5000;
                    break;
                }
                case 10:
                {
                    addedTime = 6000;
                    break;
                }
            }
        }
     
        if (castTime > -1)
        {
            _hitTime = (int) Math.max((castTime / timeFactor) - cancelTime, 0) + addedTime;
        }
        else
        {
            // Use the original hit time of the skill
            _hitTime = skill.getHitTime();
        }
        _cancelTime = (int) cancelTime;
    }
    _coolTime = (int) (skill.getCoolTime() / timeFactor); // cooltimeMillis / timeFactor
}
And change for this

Java:
private void calcSkillTiming(Creature creature, Skill skill, int castTime)
    {
        final double timeFactor = Formulas.calcSkillTimeFactor(creature, skill);
        final double cancelTime = Formulas.calcSkillCancelTime(creature, skill);
       
        if (skill.getId() == 60018) // Skill ID of teleport, this code prevent to skill teleport be afected by casting speed
        {
            _hitTime = 4000; // retail time 4 seconds
        }
        else if (skill.getOperateType().isChanneling())
        {
            _hitTime = (int) Math.max(skill.getHitTime() - cancelTime, 0);
            _cancelTime = 2866;
        }
        else
        {
            int addedTime = 0;
            if (skill.hasEffectType(EffectType.TELEPORT) && creature.isPlayer())
            {
                switch (creature.getActingPlayer().getEinhasadOverseeingLevel())
                {
                    case 6:
                    {
                        addedTime = 2000;
                        break;
                    }
                    case 7:
                    {
                        addedTime = 3000;
                        break;
                    }
                    case 8:
                    {
                        addedTime = 4000;
                        break;
                    }
                    case 9:
                    {
                        addedTime = 5000;
                        break;
                    }
                    case 10:
                    {
                        addedTime = 6000;
                        break;
                    }
                }
            }
           
            if (castTime > -1)
            {
                _hitTime = (int) Math.max((castTime / timeFactor) - cancelTime, 0) + addedTime;
            }
            else
            {
                _hitTime = (int) Math.max((skill.getHitTime() / timeFactor) - cancelTime, 0) + addedTime;
            }
            _cancelTime = (int) cancelTime;
        }
        _coolTime = (int) (skill.getCoolTime() / timeFactor); // cooltimeMillis / timeFactor
    }
 
Initiate Mage
Joined
May 7, 2023
Messages
3
Reaction score
4
그냥 공유 해줬으면 고맙게 받아
내가 좋아서 올린거지 기분 나쁘게 하려고 올린건 아니잖아.

I'd appreciate it if you could just share it with me

I posted it because I liked it, but I didn't post it to make you feel bad.
 
Initiate Mage
Joined
Dec 6, 2023
Messages
4
Reaction score
1
It's okay, next time put the source. I shared it for whoever needs it. If anyone has a problem that is not the same as in retail, tell me and I will share the fix. I don't have much time to go looking for bugs.
 
Back
Top