mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 23:14:36 +01:00
add DefaultCourses DevModeOption
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package mhfcourse
|
||||
|
||||
import (
|
||||
_config "erupe-ce/config"
|
||||
"math"
|
||||
"sort"
|
||||
"time"
|
||||
@@ -66,7 +67,10 @@ func CourseExists(ID uint16, c []Course) bool {
|
||||
|
||||
// GetCourseStruct returns a slice of Course(s) from a rights integer
|
||||
func GetCourseStruct(rights uint32) ([]Course, uint32) {
|
||||
resp := []Course{{ID: 1}, {ID: 23}, {ID: 24}}
|
||||
var resp []Course
|
||||
for _, c := range _config.ErupeConfig.DevModeOptions.DefaultCourses {
|
||||
resp = append(resp, Course{ID: c})
|
||||
}
|
||||
s := Courses()
|
||||
sort.Slice(s, func(i, j int) bool {
|
||||
return s[i].ID > s[j].ID
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"TournamentEvent": 0,
|
||||
"DisableTokenCheck": false,
|
||||
"QuestDebugTools": false,
|
||||
"DefaultCourses": [1, 23, 24],
|
||||
"EarthStatusOverride": 0,
|
||||
"EarthIDOverride": 0,
|
||||
"EarthMonsterOverride": [0, 0, 0, 0],
|
||||
|
||||
@@ -110,6 +110,7 @@ type DevModeOptions struct {
|
||||
TournamentEvent int // VS Tournament event status
|
||||
DisableTokenCheck bool // Disables checking login token exists in the DB (security risk!)
|
||||
QuestDebugTools bool // Enable various quest debug logs
|
||||
DefaultCourses []uint16
|
||||
EarthStatusOverride int32
|
||||
EarthIDOverride int32
|
||||
EarthMonsterOverride []int32
|
||||
|
||||
Reference in New Issue
Block a user