Sign in to follow this  
Sklo:D

Old slaying missions are crashing the server

Recommended Posts

All slaying missions from previous 1.5 will crash the server when finished.

 

Reason is that a NullPointerException is thrown. 

 

final EpicMissionEnum missionEnum = EpicMissionEnum.getMissionForType(em.getMissionType()); //em.getMissionType() will be 0 for old missions

 

//missionType=0 will result null => NPE will be thrown

    public static EpicMissionEnum getMissionForType(final byte missionType) {
        for (final EpicMissionEnum f : values()) {
            if (f.getMissionType() == missionType) {
                return f;
            }
        }
        return null;
    }

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this