Attendance
CCheckAttendanceMgr, CAdventureGuideMgr
| Address | Size | Name | Description |
|---|---|---|---|
| 0x00663470 | 334 | CAdventureGuideMgr__lua_callback_validate | CAdventureGuideMgr Lua callback validator. Calls Lua function by name, expects (boolean, string) return. If boolean is false, shows MessageBox with the string as error. Returns 1 on success, 0 on failure. Uses 'CAdventureGuideMgr' as MessageBox caption. |
| 0x00670B70 | 123 | CCheckAttendanceMgr__destroy_tree_nodes_recursive | Recursively destroys RB-tree nodes. Traverses left and right children, resets each node's vtable pointer to PTR__scalar_deleting_destructor, then frees the 0x20-byte node. Stops at sentinel nodes (is_nil flag set). |
| 0x00670BF0 | 75 | CCheckAttendanceMgr__rbtree_lower_bound | Performs lower_bound search in the achievement RB-tree. Traverses from root, comparing keys. Returns a result struct with the found node pointer, comparison flag, and parent/bound pointers for potential insertion. |
| 0x00670C40 | 146 | CCheckAttendanceMgr__ctor | Constructor for CAchievementMgr. Sets vtable, initializes fields (count=0, stride=0, total=0, initialized flag=0), allocates a 0x20-byte RB-tree sentinel node with self-referencing pointers and is_nil flags set. |
| 0x00670CE0 | 67 | CCheckAttendanceMgr__free_sentinel | Frees the RB-tree sentinel node (at this+4) if it's not NULL. Frees 0x20 bytes. |
| 0x00670D30 | 76 | CCheckAttendanceMgr__destroy_tree | Destroys the full RB-tree. Recursively destroys all child nodes via destroy_tree_nodes_recursive, then frees the sentinel/header node (0x20 bytes). |
| 0x00670D90 | 111 | CCheckAttendanceMgr__reset_and_free_sentinel | Resets the vtable pointer on a tree node to PTR__scalar_deleting_destructor, then frees the sentinel node (0x20 bytes) if non-null. |
| 0x00670E00 | 78 | CCheckAttendanceMgr__free_sentinel_simple | Simple sentinel node free. Frees the 0x20-byte node at this+4 if non-null. Simpler version without vtable reset. |
| 0x00670E50 | 87 | CCheckAttendanceMgr__destroy_tree_and_sentinel | Destroys RB-tree and frees sentinel. Recursively destroys all child nodes via destroy_tree_nodes_recursive, then frees the 0x20-byte sentinel/header node. |
| 0x00670EB0 | 67 | CCheckAttendanceMgr__set_node_vtable | Sets the vtable pointer on a tree node (at this+4 offset 0x14) to PTR__scalar_deleting_destructor. Used during tree node initialization or cleanup. |
| 0x00670F00 | 108 | CCheckAttendanceMgr__dtor | CCheckAttendanceMgr destructor. Sets vtable, recursively destroys rbtree nodes, frees sentinel node. |
| 0x00670F80 | 133 | CCheckAttendanceMgr__scalar_deleting_dtor | CCheckAttendanceMgr scalar deleting destructor. Calls dtor logic then optionally frees the 0x18-byte object. |
| 0x00671040 | 266 | CCheckAttendanceMgr__get_or_create_singleton | Singleton accessor for CCheckAttendanceMgr (stored in DAT_0138cf38). Creates instance if null, initializes rbtree sentinel, then loads Lua config via load_lua_config. Returns 1 on success, 0 on failure. |
| 0x00671150 | 27 | CCheckAttendanceMgr__destroy_singleton | Destroys CCheckAttendanceMgr singleton (DAT_0138cf38). Calls virtual destructor then sets pointer to null. |
| 0x00671170 | 94 | CCheckAttendanceMgr__find_config_by_key | Looks up attendance config by integer key in the rbtree. Uses rbtree_lower_bound, returns the 8-byte value pair at offset +0x18/+0x1c if found, or zeroes if not. |
| 0x006711E0 | 28 | CCheckAttendanceMgr__is_key_in_range | Checks if param_2 is within the range [this+8, this+0xc]. Returns 1 if in range, 0 otherwise. Used to validate attendance day/key bounds. |
| 0x00671200 | 422 | CCheckAttendanceMgr__load_lua_config | Loads attendance config from Lua. Creates CLuaHost, registers InsertCheckAttendanceConfig and InsertCheckAttendanceReward callbacks, loads System_CheckAttendance.lub, calls main(). Shows MessageBox on error. Returns 1 on success. |
| 0x006713B0 | 543 | CCheckAttendanceMgr__reload_lua_config | Reloads attendance config for a specific .lub file (path from string param). Clears existing rbtree data first, then loads the specified Lua file with InsertCheckAttendanceConfig/InsertCheckAttendanceReward callbacks. Shows MessageBox on error. |
| 0x006715D0 | 13 | CCheckAttendanceMgr__set_max_reward_count | Sets max reward count field at this+0xc. |
| 0x006715E0 | 349 | CCheckAttendanceMgr__insert_reward_entry | Inserts a reward entry into the attendance rbtree. Key is param_2, value is (param_3, param_4). Uses rbtree_lower_bound to check for existing key; if not found, allocates a 0x20-byte node and inserts via Insert_node. |
| 0x00671740 | 13 | CCheckAttendanceMgr__set_start_day | Sets the start day field at this+8. |
| 0x00671960 | 184 | CCheckAttendanceMgr__lua_insert_config | Lua callback for InsertCheckAttendanceConfig. Takes 2 numeric args from Lua stack: start day and max reward count. Stores them in the singleton at offsets +8 and +0xc. Returns (true, "OK") or (false, error_msg). |
| 0x00671A20 | 710 | CCheckAttendanceMgr__lua_insert_reward | Lua callback for InsertCheckAttendanceReward. Takes 3 args: day (number), check type (string), reward item ID (number). Validates args, inserts into singleton rbtree via insert_reward_entry. Returns (true, "OK") or (false, error_msg). |
No function here matches that. Search all 47,061 functions instead.