# 40250 stores SLOT_TYPE_SKILL quickslots as CPythonPlayer skill-slot numbers, # not raw skill vnums. playersettingmodule.RegisterSkill() maps those slots to # a job + skill-group specific skill id before the taskbar asks for its icon. extends RefCounted const ACTIVE := { 0: {0: [0, 0, 0, 0, 0, 0, 0, 0, 137, 0, 138, 0, 139, 0], 1: [1, 2, 3, 4, 5, 0, 0, 0, 137, 0, 138, 0, 139, 0], 2: [16, 17, 18, 19, 20, 0, 0, 0, 137, 0, 138, 0, 139, 0]}, 1: {0: [0, 0, 0, 0, 0, 0, 0, 0, 137, 0, 138, 0, 139, 0, 140], 1: [31, 32, 33, 34, 35, 0, 0, 0, 137, 0, 138, 0, 139, 0, 140], 2: [46, 47, 48, 49, 50, 0, 0, 0, 137, 0, 138, 0, 139, 0, 140]}, 2: {0: [0, 0, 0, 0, 0, 0, 0, 0, 137, 0, 138, 0, 139, 0], 1: [61, 62, 63, 64, 65, 66, 0, 0, 137, 0, 138, 0, 139, 0], 2: [76, 77, 78, 79, 80, 81, 0, 0, 137, 0, 138, 0, 139, 0]}, 3: {0: [0, 0, 0, 0, 0, 0, 0, 0, 137, 0, 138, 0, 139, 0], 1: [91, 92, 93, 94, 95, 96, 0, 0, 137, 0, 138, 0, 139, 0], 2: [106, 107, 108, 109, 110, 111, 0, 0, 137, 0, 138, 0, 139, 0]}, } const SUPPORT := [122, 123, 121, 124, 125, 129, 0, 0, 130, 131] const PASSIVE_GUILD := [151] const ACTIVE_GUILD := [152, 153, 154, 155, 156, 157] static func skill_id_for_slot(race: int, group: int, slot: int) -> int: var job := race & 3 if slot >= 1 and slot <= 14: var by_group: Dictionary = ACTIVE.get(job, {}) var ids: Array = by_group.get(group, []) return int(ids[slot - 1]) if slot <= ids.size() else 0 if slot >= 101 and slot < 101 + SUPPORT.size(): return int(SUPPORT[slot - 101]) if slot >= 200 and slot < 200 + PASSIVE_GUILD.size(): return int(PASSIVE_GUILD[slot - 200]) if slot >= 210 and slot < 210 + ACTIVE_GUILD.size(): return int(ACTIVE_GUILD[slot - 210]) return 0 static func skill_slot_for_id(race: int, group: int, skill_id: int) -> int: var job := race & 3 var by_group: Dictionary = ACTIVE.get(job, {}) var ids: Array = by_group.get(group, []) var at := ids.find(skill_id) if at >= 0: return at + 1 at = SUPPORT.find(skill_id) if at >= 0: return at + 101 at = PASSIVE_GUILD.find(skill_id) if at >= 0: return at + 200 at = ACTIVE_GUILD.find(skill_id) if at >= 0: return at + 210 return 0