mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
update course calculations
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
],
|
||||
"Courses": [
|
||||
{"Name": "HunterLife", "Enabled": true},
|
||||
{"Name": "ExtraA", "Enabled": true},
|
||||
{"Name": "Extra", "Enabled": true},
|
||||
{"Name": "Premium", "Enabled": true},
|
||||
{"Name": "Assist", "Enabled": false},
|
||||
{"Name": "Netcafe", "Enabled": false},
|
||||
|
||||
@@ -79,16 +79,17 @@ func Courses() []Course {
|
||||
var courses = []Course{
|
||||
{[]string{"Trial", "TL"}, 1, 0x00000002},
|
||||
{[]string{"HunterLife", "HL"}, 2, 0x00000004},
|
||||
{[]string{"ExtraA", "Extra", "EX"}, 3, 0x00000008},
|
||||
{[]string{"Extra", "ExtraA", "EX"}, 3, 0x00000008},
|
||||
{[]string{"ExtraB"}, 4, 0x00000010},
|
||||
{[]string{"Mobile"}, 5, 0x00000020},
|
||||
{[]string{"Premium"}, 6, 0x00000040},
|
||||
{[]string{"Pallone"}, 7, 0x00000080},
|
||||
{[]string{"Assist", "Legend", "Rasta"}, 8, 0x00000100}, // Legend
|
||||
{[]string{"Netcafe", "N", "Cafe"}, 9, 0x00000200},
|
||||
{[]string{"Netcafe", "N", "Cafe"}, 9, 0x40000200},
|
||||
{[]string{"Hiden", "Secret"}, 10, 0x00000400}, // Secret
|
||||
{[]string{"HunterSupport", "HunterAid", "Support", "Royal", "Aid"}, 11, 0x00000800}, // Royal
|
||||
{[]string{"NetcafeBoost", "NBoost", "Boost"}, 12, 0x00001000},
|
||||
{[]string{"ExtraC"}, 13, 0x00002000},
|
||||
}
|
||||
return courses
|
||||
}
|
||||
@@ -98,7 +99,7 @@ func GetCourseStruct(rights uint32) []Course {
|
||||
var resp []Course
|
||||
s := Courses()
|
||||
slices.SortStableFunc(s, func(i, j Course) bool {
|
||||
return i.ID > j.ID
|
||||
return i.Value > j.Value
|
||||
})
|
||||
for _, course := range s {
|
||||
if rights-course.Value < 0x80000000 {
|
||||
|
||||
Reference in New Issue
Block a user