class_name Constants enum Gender { Female, Male, Both, Server, } ## rAthena: enum pincode_state enum PinCodeState { Ok = 0, Ask = 1, NotSet = 2, Expired = 3, New = 4, Illegal = 5, KSSN = 6, Passed = 7, Wrong = 8, } enum StatusType { Weight, MaximumWeight, MovementSpeed, BaseLevel, JobLevel, } enum EmotionType { Surprise, Question, Delight, Throb, Sweat, Aha, Fret, Anger, Money, Think, Scissor, Rock, Wrap, Flag, BigThrob, Thanks, Kek, Sorry, Smile, # ... TODO } static var PacketDB = { #LoginServerLoginPacket.HEADER: LoginServerLoginPacket, LoginServerLoginSuccessPacket.HEADER: LoginServerLoginSuccessPacket, #CharacterServerLoginPacket.HEADER: CharacterServerLoginPacket, CharacterServerLoginSuccessPacket.HEADER: CharacterServerLoginSuccessPacket, CharacterServerLoginSuccessCharacterListPacket.HEADER: CharacterServerLoginSuccessCharacterListPacket, CharacterListSizePacket.HEADER: CharacterListSizePacket, BlockCharacterPacket.HEADER: BlockCharacterPacket, PinCodeStatePacket.HEADER: PinCodeStatePacket, #RequestCharacterListPacket.HEADER: RequestCharacterListPacket, RequestCharacterListSuccessPacket.HEADER: RequestCharacterListSuccessPacket, #SelectCharacterPacket.HEADER: SelectCharacterPacket, CharacterSelectionSuccessPacket.HEADER: CharacterSelectionSuccessPacket, CharacterSelectionFailedPacket.HEADER: CharacterSelectionFailedPacket, #MapServerLoginPacket.HEADER: MapServerLoginPacket, MapServerLoginSuccessPacket.HEADER: MapServerLoginSuccessPacket, FriendListPacket.HEADER: FriendListPacket, ServerMessagePacket.HEADER: ServerMessagePacket, ChangeMapPacket.HEADER: ChangeMapPacket, ParameterChangePacket.HEADER: ParameterChangePacket, CoupleStatusPacket.HEADER: CoupleStatusPacket, UpdateAttackRangePacket.HEADER: UpdateAttackRangePacket, NewMailStatusPacket.HEADER: NewMailStatusPacket, QuestListPacket.HEADER: QuestListPacket, AchievementUpdatePacket.HEADER: AchievementUpdatePacket, AchievementListPacket.HEADER: AchievementListPacket, UpdateCriticalWeightPacket.HEADER: UpdateCriticalWeightPacket, #MapLoadedPacket.HEADER: MapLoadedPacket, SpriteChangePacket.HEADER: SpriteChangePacket, InventoryStartPacket.HEADER: InventoryStartPacket, RegularItemListPacket.HEADER: RegularItemListPacket, EquippableItemListPacket.HEADER: EquippableItemListPacket, InventoryEndPacket.HEADER: InventoryEndPacket, EquippableSwitchItemListPacket.HEADER: EquippableSwitchItemListPacket, MapTypePacket.HEADER: MapTypePacket, EntityAppeared2Packet.HEADER: EntityAppeared2Packet, UpdateSkillTreePacket.HEADER: UpdateSkillTreePacket, UpdateHotkeysPacket.HEADER: UpdateHotkeysPacket, ParameterChange2Packet.HEADER: ParameterChange2Packet, InitialStatusPacket.HEADER: InitialStatusPacket, ParameterChange3Packet.HEADER: ParameterChange3Packet, UpdatePartyInvitationState.HEADER: UpdatePartyInvitationState, UpdateShowEquipPacket.HEADER: UpdateShowEquipPacket, UpdateConfigurationPacket.HEADER: UpdateConfigurationPacket, ReputationPacket.HEADER: ReputationPacket, QuestEffectPacket.HEADER: QuestEffectPacket, MovingEntityAppearedPacket.HEADER: MovingEntityAppearedPacket, EntityDisappearedPacket.HEADER: EntityDisappearedPacket, NavigateToTargetPacket.HEADER: NavigateToTargetPacket, BroadcastFormattedMessagePacket.HEADER: BroadcastFormattedMessagePacket, DisplayEmotionPacket.HEADER: DisplayEmotionPacket, CloseDialogButtonPacket.HEADER: CloseDialogButtonPacket, } class FilePaths: const female := "¿©" const male := "³²" const player_head := "Àΰ£Á·/¸Ó¸®Åë" const player_body := "Àΰ£Á·/¸öÅë" const male_head_lookup := [2, 2, 1, 7, 5, 4, 3, 6, 8, 9, 10, 12, 11] const female_head_lookup := [2, 2, 4, 7, 1, 5, 3, 6, 12, 10, 9, 11, 8] static func get_gender_path(gender: Gender) -> String: if gender == Gender.Female: return female else: return male static func get_job_path(job_id: int) -> String: match job_id: 0: # NOVICE return "Ãʺ¸ÀÚ" 1: # SWORDMAN return "°Ë»Ç" 2: # MAGICIAN return "À§Àúµå" 3: # ARCHER return "±Ã¼Ö" 4: # ACOLYTE return "¼ºÁ÷ÀÚ" 5: # MERCHANT return "»ÓÀÎ" 6: # THIEF return "µµµÏ" 7: # KNIGHT return "±â»ç" 8: # PRIEST return "¼ºÅõ»ç" 9: # WIZARD return "¸¶¹Ý»Ç" 10: # BLACKSMITH return "Á¦Ã¶°ø" 11: # HUNTER return "ÇåÅÍ" # ... TODO _: # NOVICE return "Ãʺ¸ÀÚ" static func get_player_head(gender: Gender, head_id: int) -> String: var real_head_id := head_id if gender == Gender.Female and head_id < female_head_lookup.size(): real_head_id = female_head_lookup[head_id] elif gender == Gender.Male and head_id < male_head_lookup.size(): real_head_id = male_head_lookup[head_id] return "%s/%s/%s_%s" % [ player_head, get_gender_path(gender), real_head_id, get_gender_path(gender), ] static func get_player_body(gender: Gender, job_id: int): return "%s/%s/%s_%s" % [ player_body, get_gender_path(gender), get_job_path(job_id), get_gender_path(gender), ]