GM Skill Point Remaining BugFix *AstralMS Based*

Results 1 to 13 of 13
  1. #1
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    GM Skill Point Remaining BugFix *AstralMS Based*

    I think pretty much those of you who were familar with astralms source was pretty much noticed this bug..
    here is a fix which took me sometime to get it working

    In GameConstants:

    Code:
    public static boolean isGM(int job) {
            return job == 910 || job == 900 || (job >= 900 && job <= 910);
        }
    In MapleCharacter:

    Go to changeJob -> Search for it

    Find

    Code:
    if (!GameConstants.isBeginnerJob(newJob) && !GameConstants.isDualBladeNoSP(newJob) && !GameConstants.isZero(newJob)  {
                    addJobSkills();
    Add

    Code:
    && !GameConstants.isGM(newJob))



    I know pretty much even I have contribute a fix I will be flamed for no reason etc, people will be calling it a useless fix.. but after all I know it matters to some... have fun :) maybe I aspire some of you guys to release fixes too..

    also this is for AstralMS Based Sources.


  2. #2
    C# developer xStr0nGx is offline
    MemberRank
    Dec 2013 Join Date
    UnknownLocation
    659Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Allow me to make it shorter.

    public static boolean isGM(final int jobid) {
    return jobid / 10 == 90 || jobid / 10 == 91;
    }

    Great release btw,

    Definitely worth a like.

  3. #3
    Wut. QuietCrystal is offline
    MemberRank
    Aug 2010 Join Date
    SingaporeLocation
    346Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Quote Originally Posted by xStr0nGx View Post
    Allow me to make it shorter.

    Code:
    public static boolean isGM(final int jobid) {
    
            return jobid / 10 == 90 || jobid / 10 == 91;
    
        }
    Or you know,
    PHP Code:
    return jobid 100 == 9

  4. #4
    C# developer xStr0nGx is offline
    MemberRank
    Dec 2013 Join Date
    UnknownLocation
    659Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Quote Originally Posted by QuietCrystal View Post
    Or you know,
    PHP Code:
    return jobid 100 == 9
    lol I didnt put much thought into this :P

    gj!

  5. #5
    Account Upgraded | Title Enabled! AristoCat is offline
    MemberRank
    Apr 2012 Join Date
    947Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Your isGM is genius though 910 is not gm is supergm so it sucks.

  6. #6
    <3 Dynamik is offline
    MemberRank
    Feb 2011 Join Date
    TorontoLocation
    532Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Code:
    (job >= 900 && job <= 910);
    That part is redundant, no? Since there is only two GM jobs. GM and SuperGM, which is at 900 and 910. No point of checking between, is there?

  7. #7
    Banned SilentThief is offline
    BannedRank
    Sep 2012 Join Date
    The MatrixLocation
    466Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Quote Originally Posted by Dynamik View Post
    Code:
    (job >= 900 && job <= 910);
    That part is redundant, no? Since there is only two GM jobs. GM and SuperGM, which is at 900 and 910. No point of checking between, is there?
    Agreed, just do
    Code:
    (job == 900 && job == 910);
    :P

  8. #8
    C# developer xStr0nGx is offline
    MemberRank
    Dec 2013 Join Date
    UnknownLocation
    659Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Quote Originally Posted by SilentThief View Post
    Agreed, just do
    Code:
    (job == 900 && job == 910);
    :P
    No, this is shorter:

    return jobid / 100 == 9;

  9. #9
    Banned SilentThief is offline
    BannedRank
    Sep 2012 Join Date
    The MatrixLocation
    466Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Quote Originally Posted by xStr0nGx View Post
    No, this is shorter:
    Either way is fine, no matter how short the code is.

  10. #10
    C# developer xStr0nGx is offline
    MemberRank
    Dec 2013 Join Date
    UnknownLocation
    659Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Quote Originally Posted by SilentThief View Post
    Either way is fine, no matter how short the code is.
    Shorter equals proer.

  11. #11
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    I suggest you actually describe the issue you are fixing, because honestly I didn't get what it does/fix.

  12. #12
    Account Upgraded | Title Enabled! SuperLol is offline
    MemberRank
    Jun 2010 Join Date
    801Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Quote Originally Posted by SilentThief View Post
    Agreed, just do
    Code:
    (job == 900 && job == 910);
    :P
    That doesn't work.
    edit: Try or instead of and

    Quote Originally Posted by xStr0nGx View Post
    Shorter equals proer.
    Hardly, especially in algorithms. Many of the shortest algorithms for a certain problem is O(N^2) -- let's say traverse through 2 data lists or something idk, which is definitely not that pro. The longer implementations take advantage of certain data structures and reduce the runtime complexity. It does work faster in this case though, at least for the job / 100 == 9 (unless the implementation of division really, really sucks). return jobid / 10 == 90 || jobid / 10 == 91; should run slower than return jobid == 900 || jobid == 910 though.
    Last edited by SuperLol; 16-04-14 at 10:21 PM.

  13. #13
    Banned SilentThief is offline
    BannedRank
    Sep 2012 Join Date
    The MatrixLocation
    466Posts

    Re: GM Skill Point Remaining BugFix *AstralMS Based*

    Quote Originally Posted by SuperLol View Post
    That doesn't work.
    edit: Try or instead of and



    Hardly, especially in algorithms. Many of the shortest algorithms for a certain problem is O(N^2) -- let's say traverse through 2 data lists or something idk, which is definitely not that pro. The longer implementations take advantage of certain data structures and reduce the runtime complexity. It does work faster in this case though, at least for the job / 100 == 9 (unless the implementation of division really, really sucks). return jobid / 10 == 90 || jobid / 10 == 91; should run slower than return jobid == 900 || jobid == 910 though.
    My bad, got the two mixed up. :P



Advertisement