Back to legacygamers.net
WARPGATE

Enchant

CEnchantMgr, CItemReformDB, CItemOptionDB, CPetEvolutionMgr, CSelectPackageItemMgr

Functions 349Code 86 KBAddresses 0x005F9590 to 0x0068DB00Group Systems
349 functions
AddressSizeNameDescription
0x005F9590116CItemReformDB__dtor_free_vector_and_nodeDestructs CItemReformDB internal vector via stub_005f99f0, then frees the 0x20-byte node at offset+4 if non-null.
0x005F961078CItemReformDB__dtor_free_node_0x20Simple destructor that frees the 0x20-byte rbtree node at offset+4 if non-null.
0x005F9660162CItemReformDB__dtor_strings_and_rbtreeDestructs two STL strings, clears/frees an rbtree, then frees the 0x88-byte node at offset+4 if non-null.
0x005F971078CItemReformDB__dtor_free_node_0x20_altSimple destructor that frees the 0x20-byte node at offset+4 if non-null. Nearly identical to dtor_free_node_0x20 at 005f9610.
0x005F976078CItemReformDB__dtor_free_node_0x20_alt2Simple destructor that frees the 0x20-byte node at offset+4 if non-null. Another variant for a different rbtree type.
0x005F97B081CItemReformDB__dtor_free_node_0x88Simple destructor that frees the 0x88-byte node at offset+4 if non-null (larger node with strings).
0x005F981087CItemReformDB__destroy_rbtree_with_string_nodesDestroys rbtree nodes that contain strings (via STL_rbtree_destroy_nodes_with_string_dtor), then frees the 0x20-byte sentinel node.
0x005F987065CItemReformDB__clear_rbtree_simpleClears and frees an rbtree using STL_rbtree_clear_and_free_simple. Wrapper with SEH frame.
0x005F98C090CItemReformDB__destroy_rbtree_with_two_string_nodesDestroys rbtree nodes that contain two strings (via STL_rbtree_destroy_nodes_with_two_strings), then frees the 0x88-byte sentinel node.
0x005F992068CItemReformDB__clear_vector_wrapperWrapper that delegates to stub_005f99f0 to clear an internal vector. SEH frame setup only.
0x005F9970122CItemReformDB__dtor_two_strings_and_rbtreeDestructs two STL strings and clears/frees an rbtree. Used as internal cleanup for reform data entries.
0x005F99F0129CItemReformDB__clear_and_free_vectorClears and frees a vector (pointer+size+capacity at param_1). Handles aligned allocation cleanup for blocks > 0xFFF bytes. Resets all 3 vector fields to 0.
0x005F9A80169CItemReformDB__dtorCItemReformDB destructor. Sets vtable pointer, destructs CLuaInstance, destroys two rbtrees (one with string nodes at offset+0xC, one with two-string nodes at offset+4), and frees their sentinel nodes.
0x005F9B30111CItemReformDB__dtor_entry_fieldsDestructs fields of a reform DB entry: two STL strings and one rbtree. Similar to dtor_two_strings_and_rbtree but with different unwind states.
0x005F9BA0353CItemReformDB__copy_entryCopy assignment for a CItemReformDB entry. Copies scalar fields, deep-copies an rbtree (via STL_rbtree_copy_node_recursive), and assigns two STL strings. Source fields at offsets 0-0x51+ are all copied.
0x005F9D1030CItemReformDB__scalar_deleting_dtor_4byteScalar deleting destructor for a 4-byte object. Frees memory via operator_delete if bit 0 of param_2 is set.
0x005F9D30190CItemReformDB__scalar_deleting_dtorCItemReformDB scalar deleting destructor. Sets vtable, destructs CLuaInstance, destroys two rbtrees, frees sentinel nodes. Conditionally frees this (0x20 bytes) based on param_2 bit 0.
0x005F9DF0354CItemReformDB__lookup_reform_entriesLooks up reform entries by item ID (int key) in the main rbtree, then for matching entries iterates their uint64 range pairs and collects matching entry pointers into a result vector (param_2). Uses STL_rbtree_lower_bound_int_key and STL_rbtree_lower_bound_uint64_key.
0x005F9F60140CItemReformDB__find_reform_entry_by_id_and_valueSearches for a specific reform entry by item ID (param_2) and a matching value (param_3). Returns pointer to the entry's value field, or NULL if not found. Uses int key rbtree for item ID lookup, then uint64 range rbtree for value matching.
0x005F9FF0324CItemReformDB__load_lua_dataLoads item reform data from Lua file "Lua_Files_ItemReform". Executes the Lua file via CLuaInstance__execute_file, then calls parse functions to populate the reform category rbtree and the reform material rbtree. Returns true on success.
0x005FA14057CItemReformDB__has_reform_entryChecks whether an item ID (param_2) exists in the reform database rbtree. Returns true if found, false otherwise. Uses STL_rbtree_lower_bound_int_key.
0x005FA1804190CItemReformDB__parse_reform_categories_from_luaParses item reform category data from Lua tables into the two-string rbtree (offset+4). For each Lua table entry: reads integer ID, looks up two item names via SpriteMap, reads nested material subtables (with int keys and quantities), reads numeric fields (base/max reform level, cost), reads boolean flags, reads a description string, and inserts each into the rbtree keyed by uint64 ID. Large ~4KB function.
0x005FB1E01114CItemReformDB__parse_reform_materials_from_luaParses item reform material data from Lua tables into the string-key rbtree (offset+0xC). For each Lua table entry: reads item name string, looks up sprite ID via SpriteMap, then iterates nested key-value pairs mapping item IDs (uint) to the rbtree keyed by int item ID, with uint64 range vectors per entry.
0x0061EB70177CSelectPackageItemMgr__set_item_fieldsSets item fields (class, level, price, type, refine, etc.) in a select package item array entry at the given index. Uses 0xF8-byte item structs.
0x0061EC30807CSelectPackageItemMgr__update_tab_dataUpdates tab/category data in the select package manager. Manages the red-black tree node for the tab, assigns string name, and resizes the item vector (0xF8-byte items) to match the desired count.
0x0061EF60140CSelectPackageItemMgr__find_item_data_by_keysLooks up an item in the select package tree using two keys. Returns a pointer to offset 0x2C within the found node, or sets a failure flag if not found.
0x0061EFF0761CSelectPackageItemMgr__load_lua_dataCreates a CLuaInstance, registers 'AddTab' and 'AddItem' as Lua global functions, executes 'Lua Files/SelectPackageItemList.lub', then calls the Lua 'LoadTable' function. Shows MessageBox on Lua error.
0x0061F2F0313CSelectPackageItemMgr__open_package_categoryOpens a select package category UI. Looks up item by slot in linked list, parses string to int for category ID, finds or creates window type 0x2731, and populates it with items for that category.
0x0061F860168CSelectPackageItemMgr__destroy_item_vectorDestroys and frees the item vector (0xF8-byte CShopItem entries). Calls destroy_range on all items, frees the backing memory, and zeroes the vector pointers.
0x0061F910132CSelectPackageItemMgr__fill_and_trim_itemsAppends new initialized items to an array by calling clear_tree_and_free for each new slot (0xF8-byte stride), then destroys the trailing unused range. Returns new end pointer.
0x0061F9A0170CSelectPackageItemMgr__get_instanceSingleton getter for CSelectPackageItemMgr. Allocates a 0xC-byte object with vtable on first call, creates a 0x1C-byte red-black tree sentinel node. Stores instance at DAT_01389c1c.
0x0061FA50830CSelectPackageItemMgr__lua_AddItemLua callback for 'AddItem' in SelectPackageItemList. Validates 10 numeric/boolean args (slot, category, class, level, price, refine count, amount, identified flag, enchant, type), then sets item fields in the package data.
0x0061FD90424CSelectPackageItemMgr__lua_AddTabLua callback for 'AddTab' in SelectPackageItemList. Validates 4 args (2 numbers, 1 string, 1 number), converts the string from codepage, and calls update_tab_data to create/update a tab entry.
0x00672360203CPetEvolutionMgr__ctorCPetEvolutionMgr constructor. Sets vtable, initializes two rbtree sentinels (0x20-byte for rewards, 0x30-byte for recipes), a vector for auto-feeding list, and sets initialized flag.
0x0067243067CPetEvolutionMgr__free_node_allocatorFrees the 0x20-byte rbtree sentinel/header node at this+4 if non-null.
0x0067249076CPetEvolutionMgr__destroy_recipe_treeDestroys recipe tree nodes (0x30-byte) recursively via STL_rbtree_destroy_nodes_recursive_30byte, then frees the sentinel node.
0x006724F076CPetEvolutionMgr__destroy_reward_treeDestroys reward tree nodes (0x20-byte) recursively via STL_rbtree_destroy_nodes_recursive_20byte, then frees the sentinel node.
0x00672550116CPetEvolutionMgr__clear_reward_tree_and_freeClears reward tree data via STL_vector_16byte_destroy_elements_and_free on the node at this+4, then frees the 0x20-byte sentinel node if non-null.
0x006725D078CPetEvolutionMgr__free_reward_node_allocatorFrees the reward rbtree sentinel node (0x20-byte allocation at this+4) if non-null.
0x0067262091CPetEvolutionMgr__destroy_all_recipe_vectorsIterates through all 16-byte elements in a vector and calls STL_vector_8byte_clear_and_free on each to destroy embedded sub-vectors.
0x0067268087CPetEvolutionMgr__destroy_recipe_tree_fullFull recipe tree destruction: recursively destroys 0x30-byte rbtree nodes (which contain strings) then frees the sentinel node.
0x006726E087CPetEvolutionMgr__destroy_reward_tree_fullFull reward tree destruction: recursively destroys 0x20-byte rbtree nodes then frees the sentinel node.
0x0067274068CPetEvolutionMgr__clear_reward_tree_wrapperWrapper that calls STL_vector_16byte_destroy_elements_and_free on the reward tree data member.
0x0067279068CPetEvolutionMgr__dtor_string_memberDestructor wrapper for a string member. Calls STL_string_dtor.
0x006727E068CPetEvolutionMgr__clear_auto_feeding_listClears the auto-feeding pet egg ID list (vector of 4-byte ints) via json__vector_clear_and_free_4byte.
0x0067283068CPetEvolutionMgr__dtor_helperDestructor helper that delegates to another cleanup function (CPacketBuffer__operation_00673a60).
0x006729D0236CPetEvolutionMgr__resetResets CPetEvolutionMgr to initial state. Sets vtable, clears both rbtrees (reward 0x20-byte and recipe 0x30-byte nodes), resets sentinels, clears auto-feeding vector, then frees tree allocations.
0x00672AC068CPetEvolutionMgr__clear_recipe_vectors_wrapperWrapper that calls STL_vector_8byte_clear_and_free to clear recipe material vectors.
0x00672B10257CPetEvolutionMgr__scalar_deleting_dtorCPetEvolutionMgr scalar deleting destructor. Resets all data (trees, vectors), frees allocations, optionally frees the 0x24-byte object itself.
0x00672C20327CPetEvolutionMgr__get_or_create_singletonSingleton accessor for CPetEvolutionMgr (stored in DAT_0138cf3c). Creates instance if null with two rbtrees and auto-feeding vector, then loads Lua config. Returns 1 on success, 0 on failure.
0x00672D7027CPetEvolutionMgr__destroy_singletonDestroys CPetEvolutionMgr singleton (DAT_0138cf3c). Calls virtual destructor then sets pointer to null.
0x00672D90553CPetEvolutionMgr__get_recipe_item_idsLooks up a pet evolution recipe by integer key in the rbtree. Returns a result struct: success flag + vector of item IDs (copied from the recipe node's item list at +0x14/+0x18). Returns empty result if key not found.
0x00672FC0664CPetEvolutionMgr__get_materials_for_recipeLooks up materials for a specific recipe entry. Finds recipe by key (param_3) in rbtree, then searches that recipe's entries for one matching param_4 (item ID). Returns a result struct with vector of (ITID, count) pairs. Returns empty if not found.
0x00673260371CPetEvolutionMgr__load_lua_configLoads pet evolution config from Lua. Creates CLuaHost, registers InsertEvolutionRecipeLGU and InsertPetAutoFeeding callbacks, loads PetEvolutionCln_true.lub, calls main(). Shows MessageBox on error via CPetEvolutionMgr caption.
0x006733E0224CPetEvolutionMgr__add_auto_feeding_pet_eggAdds a pet egg ID to the auto-feeding list. Checks for duplicates first; if already present returns error string, otherwise appends to the auto-feeding vector. Returns result struct with success flag and message.
0x006734C0760CPetEvolutionMgr__add_recipe_entryAdds a full recipe entry to the pet evolution system. Looks up or creates the rbtree node for the recipe key (param_3), then finds or creates the sub-entry for item ID (param_4), appending material pairs (param_5, param_6). Checks for duplicate materials.
0x006737C039CPetEvolutionMgr__has_auto_feeding_petChecks if a pet egg ID exists in the auto-feeding list. Iterates the vector at this+0x18 comparing each entry to param_2. Returns 1 if found, 0 if not.
0x00675870224CPetEvolutionDBNode__move_ctorCPetEvolutionDB node move constructor. Copies first member (type indicator), moves 7 strings via CPetEvolutionEntry__move_strings, moves a second string member, then copy-constructs a 3-element struct array.
0x0067595052CPetEvolutionDBNode__trivial_move_ctorCPetEvolutionDB node trivial move constructor for a 3-member (12-byte) struct. Moves 3 undefined4 values from source to destination, zeroing the source.
0x00675990450CPetEvolutionDB__ctorCPetEvolutionDB constructor. Sets vtable pointer, allocates and initializes 6 RB-tree sentinel nodes (sizes: 0x218, 0x104, 0x14, 0x14, 0x40, 0x34 bytes). Clears all tree counts and calls tree-clear operations. Sets initial state flag and size=0x18.
0x00675B60774CPetEvolutionEntry__move_ctorCPetEvolutionEntry move constructor. Moves a large (~0x200 byte) pet evolution entry structure including: string sub-structure (via move_strings), byte flags, vector data, multiple short fields, raw data blocks, two SSO strings, a vector of 8-byte pairs, and trailing int fields.
0x00675E70662CPetEvolutionEntry__copy_ctorCPetEvolutionEntry copy constructor. Deep-copies a ~0x200 byte pet evolution entry including: string sub-structure, byte flags, vector of 24-byte elements (copy-constructed), short fields, raw data, two SSO strings (copy-constructed), vector of 8-byte pairs (copy-constructed), and trailing ints.
0x00676110394CPetEvolutionEntry__resetResets a CPetEvolutionEntry to default state. Clears the sub-structure via CPacketManager__complex_handler_006765c0, sets flag byte to 1, clears vector of 24-byte elements (destroying strings within), clears both SSO strings, clears vector of 8-byte pairs, fills 3 numeric fields with 31999 and shorts with 0xFFFF, zeros 0x99 bytes of raw data.
0x006762A0573CPetEvolutionEntry__move_stringsMove-constructs the string sub-structure of a CPetEvolutionEntry. Moves 7 SSO strings (at offsets 0x04-0x94, each 0x18 bytes apart) plus 2 trailing int fields at 0xAC and 0xB0. Total sub-structure size ~0xB4 bytes.
0x006764E0222CItemOptionDB__entry_copy_ctorCopy constructor for item option DB entry. Copies 1 byte + 7 std::strings (at offsets 0x4, 0x1c, 0x34, 0x4c, 0x64, 0x7c, 0x94) + 2 ints (at 0xac, 0xb0) from source to destination.
0x006765C0424CItemOptionDB__entry_default_ctorDefault constructor for item option DB entry (0xB4 bytes). Initializes 1-byte type flag, 7 empty std::strings, and zeroes out 2 trailing ints at offsets 0xac and 0xb0.
0x00676770293CItemOptionDB__extended_entry_ctorExtended entry constructor. Calls entry_default_ctor for base 0xB4 fields, then initializes an additional string at 0xB4 and 3 vectors of string-structs (0xC-byte elements, 3 each) at 0xCC/0xD8/0xE4, clearing them immediately.
0x006768A067CItemOptionDB__delete_20byte_memberDeletes the 0x14-byte (20-byte) allocated member at this+4 if non-null. SEH-protected with security cookie.
0x006768F067CItemOptionDB__delete_52byte_memberDeletes the 0x34-byte (52-byte) allocated member at this+4 if non-null. SEH-protected with security cookie.
0x0067694070CItemOptionDB__delete_536byte_memberDeletes the 0x218-byte (536-byte) allocated member at this+4 if non-null. SEH-protected with security cookie.
0x0067699070CItemOptionDB__delete_260byte_memberDeletes the 0x104-byte (260-byte) allocated member at this+4 if non-null. SEH-protected with security cookie.
0x006769F076CItemOptionDB__destroy_rbtree_52byte_nodesDestroys an rbtree with 0x34-byte (52-byte) nodes. Recursively deletes all child nodes then frees the root sentinel node.
0x00676A5079CItemOptionDB__destroy_rbtree_536byte_nodesDestroys an rbtree with 0x218-byte (536-byte) nodes. Recursively deletes all child nodes then frees the root sentinel node.
0x00676AB079CItemOptionDB__destroy_rbtree_260byte_nodesDestroys an rbtree with 0x104-byte (260-byte) nodes. Recursively deletes all child nodes then frees the root sentinel node.
0x00676B10111CItemOptionDB__destroy_nested_rbtree_20byteDestroys a nested rbtree structure. Each 0x14-byte node contains a child rbtree of 20-byte nodes. Iterates through parent tree, recursively destroying child trees, then frees each parent node and the root.
0x00676B9078CItemOptionDB__eh_delete_20byte_memberException handler variant: deletes the 0x14-byte allocated member at this+4 if non-null. Used in EH unwind tables.
0x00676BE0139CItemOptionDB__destroy_52byte_entryDestroys a 0x34-byte entry: first destroys its string linked list and string members, then frees the 0x34-byte allocation at this+4.
0x00676C70107CItemOptionDB__destroy_536byte_entryDestroys a 0x218-byte entry: calls the extended entry destructor helper (00677010) then frees the 0x218-byte allocation at this+4.
0x00676CE0170CItemOptionDB__destroy_260byte_entryDestroys a 0x104-byte entry: destroys 3-element vector of structs, a string, and calls base string destructor chain (006773a0), then frees the 0x104-byte allocation at this+4.
0x00676D9078CItemOptionDB__eh_delete_20byte_member_00676d90Exception handler variant: deletes 0x14-byte allocated member at this+4 if non-null. Duplicate pattern used in a different EH unwind context.
0x00676DE078CItemOptionDB__eh_delete_52byte_memberException handler variant: deletes 0x34-byte allocated member at this+4 if non-null. Used in EH unwind tables.
0x00676E3081CItemOptionDB__eh_delete_536byte_memberException handler variant: deletes 0x218-byte allocated member at this+4 if non-null. Used in EH unwind tables.
0x00676E9081CItemOptionDB__eh_delete_260byte_memberException handler variant: deletes 0x104-byte allocated member at this+4 if non-null. Used in EH unwind tables.
0x00676EF087CItemOptionDB__eh_destroy_rbtree_52byteException handler variant: destroys rbtree with 0x34-byte nodes. Recursively deletes all child nodes then frees root sentinel. Used in EH unwind.
0x00676F5090CItemOptionDB__eh_destroy_rbtree_536byteException handler variant: destroys rbtree with 0x218-byte nodes. Recursively deletes all child nodes then frees root sentinel. Used in EH unwind.
0x00676FB090CItemOptionDB__eh_destroy_rbtree_260byteException handler variant: destroys rbtree with 0x104-byte nodes. Recursively deletes all child nodes then frees root sentinel. Used in EH unwind.
0x00677010147CItemOptionDB__destroy_extended_entry_fieldsDestroys extended entry fields: calls Ench__tree destructor, destroys 2 strings, destroys string vector, then calls base string destructor chain (006773a0) to clean up the 7 base strings.
0x006770B0127CItemOptionDB__destroy_260byte_entry_fieldsDestroys fields of a 260-byte entry: destroys 3-element vector of structs at offset 0xD0, a string, then calls base string destructor chain (006773a0).
0x0067713065CItemOptionDB__destroy_nested_rbtree_wrapperWrapper that calls CItemOptionDB__destroy_nested_rbtree_20byte to destroy a nested rbtree. SEH-protected.
0x00677190276CItemOptionDB__dtorCItemOptionDB destructor. Sets vtable pointer, then destroys 5 container members: 52-byte rbtree (offset 0xD*4), 0x40-byte rbtree (offset 0xB*4), 2 nested rbtrees, 260-byte rbtree (offset 3*4), and 536-byte rbtree (offset 1*4).
0x006772B086CItemOptionDB__destroy_52byte_entry_fieldsDestroys 52-byte entry fields: destroys string linked list, then destroys one string member.
0x00677310134CItemOptionDB__destroy_extended_entry_fields_00677310Destroys extended entry fields (variant): calls Ench__tree destructor, destroys 2 strings, destroys string vector, then calls base string destructor chain. Same pattern as 00677010 but in a different EH unwind context.
0x006773A0150CItemOptionDB__destroy_base_entry_stringsDestroys the 7 base std::string members of an item option entry. Calls STL_string_dtor 7 times sequentially with descending unwind state indices.
0x00677440114CItemOptionDB__destroy_260byte_entry_fields_00677440Destroys 260-byte entry fields (variant): destroys 3-element vector of structs at offset 0xCC, a string, then calls base string destructor chain. Different offset from 006770b0 variant.
0x006774C0243CItemOptionDB__find_or_insert_536byte_entryFinds or inserts an entry in a uint-keyed rbtree map of 0x218-byte (536-byte) values. Acts like std::map::operator[]: finds lower_bound, inserts new node with CPetEvolutionEntry__reset if not found, returns pointer to value at node+0x18.
0x00677870297CItemOptionDB__scalar_deleting_dtorCItemOptionDB scalar deleting destructor. Same as CItemOptionDB__dtor but additionally frees the 0x3C-byte object itself if bit 0 of param_2 is set (scalar delete flag).
0x006779A0604CItemOptionDB__insert_or_assign_string_entryFinds or inserts into a string-keyed rbtree map (at this+0x2C). If key not found, allocates a new 0x40-byte node using fmt__format_arg_store_move_ctor to initialize its string value. If found, overwrites the existing value string at node+0x28. Acts like std::map insert_or_assign for string-keyed entries.
0x00677C50159CItemOptionDB__get_instanceSingleton factory for CItemOptionDB. Allocates 0x3C bytes and calls CPetEvolutionDB__ctor if the global instance (DAT_0138cf40) is null. Returns 1 on success, 0 on failure. Destroys the instance via vtable call if the init flag at offset 0x14 is not set.
0x00677D0027CItemOptionDB__destroy_instanceDestroys the CItemOptionDB singleton. Calls the virtual destructor (with scalar delete flag=1) on the global instance at DAT_0138cf40, then sets it to null.
0x00677D2085CItemOptionDB__erase_entry_by_idErases an entry from an rbtree by uint key (param_2). Finds the node via lower_bound, compares key, and if found and not equal to end iterator, erases the node using CPacketSystem__bulk_processor_0067cb80 and frees the 0x14-byte node.
0x00677D80433CItemOptionDB__format_date_stringFormats an expiration/date string for item options. If version < 0x7B3, returns empty string. Otherwise uses message text 0x893 with format "{0:04}/{1:02}/{2:02}/{3:02}" to format year/month/day/hour from fields at this+0xC4..0xCC.
0x00677F40353CItemOptionDB__find_category_name_by_idLooks up a category name by integer key in a string-keyed rbtree (at this+0x34). Uses lower_bound to find the entry. If found, returns a copy of the value string at node+0x14. If not found, returns an empty string. Result is copy-constructed into output param.
0x006780B04584CItemOptionDB__build_option_descriptionBuilds a full item option description string from bitflags. Checks 21+ individual bitflags in param_2 (0x10, 0x20, 0x40, 0x80, 0x100-0x8000, 0x10000-0x4000000) and appends corresponding message text from CMessageStringTable (IDs 0x8D7-0x8ED). Also appends min/max range values (param_3/param_4) with appropriate separators. Uses {fmt} formatting throughout.
0x006792A0557CItemOptionDB__find_quest_name_by_string_keyLooks up a quest/category name by string key in the rbtree at this+0x2C. If found, copies the value string from node+0x28. If not found, returns the default literal "QUEST". Result is copy-constructed into output param.
0x006794D01091CItemOptionDB__build_skill_stat_descriptionBuilds a skill/stat description string for an item option slot (param_3=slot index 0-2). Returns empty string if slot index >= 3 or >= max slots (this+0xD2). Reads name string, min/max level values from slot-indexed fields. Formats as "Name Lv.X~Lv.Y" or "Name Lv.X" with level range info using message text 0x7EE and {fmt} formatting. Special case: if skill type is 31999, delegates to build_option_description.
0x00679920222CItemOptionDB__find_or_init_enchant_entryFinds an enchant entry by uint ID in the rbtree at this+4. If found, returns pointer to value at node+0x18. If not found, lazy-initializes a static default entry (DAT_0138cf50) using CPetEvolutionEntry__reset with atexit cleanup, and returns that default.
0x00679A0065CItemOptionDB__find_enchant_entry_by_idFinds an enchant entry by uint ID in the rbtree at this+4. Returns pointer to value at node+0x18 if found, or 0 (null) if not found. Simple lookup without lazy initialization.
0x00679A50160CItemOptionDB__find_in_selected_mapFinds an entry by uint ID in one of two rbtree maps depending on param_2 (bool selector). If param_2 is true, searches the map at this+4 and returns value at node+0x18. If false, searches the map at this+0xC and returns value at node+0x14. Returns 0 if not found.
0x00679AF0222CItemOptionDB__find_or_init_option_entryFinds an option entry by uint ID in the rbtree at this+0xC. If found, returns pointer to value at node+0x14. If not found, lazy-initializes a static default entry (DAT_0138d158) using extended_entry_ctor with atexit cleanup (atexit_packet_array_destroy), and returns that default.
0x00679BD065CItemOptionDB__find_option_entry_by_idFinds an option entry by uint ID in the rbtree at this+0xC. Returns pointer to value at node+0x14 if found, or 0 (null) if not found. Simple lookup without lazy initialization.
0x0067E9F092CEnchantMgr__lua_disable_enchant_by_idLua-exposed function: takes enchant ID from Lua stack via luaL_checknumber, finds the entry in the enchant RB-tree via _Find_lower_bound, and disables it by setting byte at offset 0x14 to 0. Returns 0 (no Lua results).
0x0067EA50192CEnchantMgr__ctor_dual_tree_containerConstructor for an enchant data container with two RB-trees. Copies initial value from param_3, zeroes out fields, allocates sentinel nodes: first tree with 0x18-byte nodes, second with 0x20-byte nodes. Both sentinels self-reference (left=right=parent=self, isNil=1, color=1).
0x0067EB10287CEnchantMgr__ctor_enchant_data_containerConstructor for a larger enchant data container. Copies 2 dwords from source, memsets 0x68 bytes to zero, initializes one RB-tree with 0x18-byte sentinel nodes, a std::string (SSO buffer size 0xF), and another RB-tree with 0x60-byte sentinel nodes.
0x0067EC30236CEnchantMgr__rbtree_deep_copy_node_0x20Recursive deep copy of an RB-tree with 0x20-byte nodes. For each non-nil node, allocates a new 0x20 node, copies 4 dwords of payload data (offsets 0x10-0x1C), links to parent, copies color, then recursively copies left and right subtrees.
0x0067ED40265CEnchantMgr__rbtree_deep_copy_node_0x2cRecursive deep copy of an RB-tree with 0x2c-byte nodes containing std::string keys. For each non-nil node, allocates a new 0x2c node, copy-constructs the string via STL_string_copy_construct, copies the int value at offset +0x28, then recursively copies left and right subtrees.
0x0067EE70337CEnchantMgr__vector_grow_and_insertstd::vector grow-and-insert for the enchant system. Checks capacity, grows by 1.5x (max 0x3FFFFFFF elements), allocates new buffer, copies element into position, memcpy's existing elements before and after insertion point, frees old buffer, updates vector pointers (begin/end/capacity).
0x0067EFE0103CEnchantMgr__rbtree_destroy_nodes_0x18Recursive RB-tree node destruction for 0x18-byte nodes. Traverses tree in post-order: recurses right subtree, then follows left chain while deleting each visited node (operator_delete with size 0x18). Stops at nil sentinel.
0x0067F050169CEnchantMgr__rbtree_destroy_nodes_0x1c_with_subtreeRecursive RB-tree node destruction for 0x1c-byte nodes with nested subtrees. For each node: recurses right, destroys inner RB-tree at node+0x14 via rbtree_destroy_nodes_0x28, deletes inner sentinel (0x28), then deletes the node itself (0x1c). Follows left chain.
0x0067F100187CEnchantMgr__rbtree_destroy_nodes_0x30_with_subtreeRecursive RB-tree node destruction for 0x30-byte nodes with nested subtrees. For each node: recurses right, calls STL_rbtree_clear_and_free_simple on inner data, then calls rbtree_clear_and_free_0x18, finally deletes the 0x30 node. Follows left chain.
0x0067F1C0163CEnchantMgr__rbtree_destroy_nodes_0x28Recursive RB-tree node destruction for 0x28-byte nodes. For each node: recurses right, calls rbtree_clear_and_free_0x18 to destroy inner tree data, then deletes the 0x28 node. Follows left chain until nil sentinel.
0x0067F270131CEnchantMgr__rbtree_destroy_nodes_0x60Recursive RB-tree node destruction for 0x60-byte nodes. For each node: recurses right, calls Ench__mgr_006817c0 (not in this batch) to clean up node data, then deletes the 0x60 node. Follows left chain until nil sentinel.
0x0067F300141CEnchantMgr__rbtree_destroy_nodes_0x1cRecursive RB-tree node destruction for 0x1c-byte nodes (simple). For each node: recurses right, calls STL_rbtree_clear_and_free_simple on inner data, then deletes the 0x1c node. Follows left chain until nil sentinel.
0x0067F390103CEnchantMgr__rbtree_destroy_nodes_0x20Recursive RB-tree node destruction for 0x20-byte nodes (plain data). Traverses post-order: recurses right, then follows left chain deleting each 0x20 node. No inner data cleanup needed.
0x0067F400128CEnchantMgr__rbtree_destroy_nodes_0x2c_with_stringRecursive RB-tree node destruction for 0x2c-byte nodes containing std::string. For each node: recurses right, calls STL_string_dtor to free the embedded string, then deletes the 0x2c node. Follows left chain.
0x0067F480128CEnchantMgr__rbtree_destroy_nodes_0x30_with_stringRecursive RB-tree node destruction for 0x30-byte nodes containing std::string. For each node: recurses right, calls STL_string_dtor to free the embedded string, then deletes the 0x30 node. Follows left chain.
0x0067F500134CEnchantMgr__rbtree_destroy_nodes_0x80Recursive RB-tree node destruction for 0x80-byte nodes. For each node: recurses right, calls Ench__mgr_006817c0 to clean up large node data, then deletes the 0x80 node. Follows left chain.
0x0067F590103CEnchantMgr__rbtree_destroy_nodes_0x20_simpleRecursive RB-tree node destruction for 0x20-byte nodes (simple variant). Same pattern as 0067f390 but with slightly different calling convention. Traverses post-order deleting each 0x20 node.
0x0067F600128CEnchantMgr__rbtree_destroy_nodes_0x2c_with_string_bRecursive RB-tree node destruction for 0x2c-byte nodes containing std::string (variant B). Same pattern as 0067f400: recurses right, calls STL_string_dtor, deletes 0x2c node, follows left chain.
0x0067F68087CEnchantMgr__rbtree_find_lower_bound_uint64RB-tree lower_bound search with uint64 key comparison. Traverses the tree comparing high and low dwords of key against node values at offsets +0x10/+0x14. Returns iterator-like struct with found node, comparison flag, and parent.
0x0067F6E0362CEnchantMgr__rbtree_find_or_insert_int_0x1cRB-tree find-or-insert with int key for 0x1c-byte nodes. Searches tree by int key at node+0x10. If found, returns existing node. If not found and tree not at max size (0x9249249), allocates new 0x1c node with inner 0x28 RB-tree, inserts via Insert_node, returns new node. Throws if tree too large.
0x0067F850379CEnchantMgr__rbtree_find_or_insert_int_0x28RB-tree find-or-insert with int key for 0x28-byte nodes. Searches tree by int key at node+0x10. If found, returns existing node. If not found and tree not at max size (0x6666666), allocates new 0x28 node with inner 0x18 RB-tree, inserts via Insert_node. Throws if tree too large.
0x0067F9D0466CEnchantMgr__rbtree_find_or_insert_string_0x2cRB-tree find-or-insert with std::string key for 0x2c-byte nodes. Searches tree comparing string keys via std::_Traits_compare. If found, returns existing node. If not found, allocates new 0x2c node, moves the string key in, inserts via Insert_node. Max size 0x5D1745D.
0x0067FBB0473CEnchantMgr__rbtree_find_or_insert_string_0x30RB-tree find-or-insert with std::string key for 0x30-byte nodes. Searches tree comparing string keys via std::_Traits_compare. If found, returns existing node. If not found, allocates new 0x30 node, moves the string key in, inserts via Insert_node. Max size 0x5555555.
0x0067FD90105CEnchantMgr__rbtree_init_sentinel_0x20Initializes an RB-tree with 0x20-byte sentinel node. Sets count to 0, allocates sentinel (0x20 bytes) with self-referencing pointers (left=right=parent=self), isNil=1, color=1.
0x0067FE00234CEnchantMgr__rbtree_copy_construct_0x2cRB-tree copy constructor for trees with 0x2c-byte nodes (string-keyed). Allocates new 0x2c sentinel, deep-copies all nodes via rbtree_deep_copy_node_0x2c, copies element count, then fixes up leftmost/rightmost pointers by traversing to min/max nodes.
0x0067FEF0105CEnchantMgr__rbtree_init_sentinel_0x2cInitializes an RB-tree with 0x2c-byte sentinel node. Sets count to 0, allocates sentinel (0x2c bytes) with self-referencing pointers (left=right=parent=self), isNil=1, color=1.
0x0067FF60166CEnchantMgr__ctorCEnchantMgr constructor. Sets vtable pointer, initializes RB-tree with 0x80-byte sentinel nodes for main enchant data, constructs embedded CLuaInstance for Lua scripting, sets default values: two uint16 fields to 0xFFFF, a bool to true, and zeroes counters.
0x00680010359CEnchantMgr__init_all_rbtreesInitializes all 6 internal RB-trees in CEnchantMgr at offsets 0x08-0x38. Trees use different node sizes: 0x18, 0x20, 0x1c, 0x28, 0x30, 0x1c. Each tree gets sentinel allocated with self-referencing pointers and count=0. Sets final byte at +0x40 to 0.
0x0068019067CEnchantMgr__delete_sentinel_0x18Deletes the RB-tree sentinel node (0x18 bytes) at param_1+4 if non-null. Simple cleanup for the smallest sentinel type.
0x006801E067CEnchantMgr__delete_sentinel_0x1cDeletes the RB-tree sentinel node (0x1c bytes) at param_1+4 if non-null.
0x0068023067CEnchantMgr__delete_sentinel_0x30Deletes the RB-tree sentinel node (0x30 bytes) at param_1+4 if non-null.
0x0068028067CEnchantMgr__delete_sentinel_0x28Deletes the RB-tree sentinel node (0x28 bytes) at param_1+4 if non-null.
0x006802D067CEnchantMgr__delete_sentinel_0x60Deletes the RB-tree sentinel node (0x60 bytes) at param_1+4 if non-null.
0x0068032067CEnchantMgr__delete_sentinel_0x1c_bDeletes the RB-tree sentinel node (0x1c bytes) at param_1+4 if non-null. Second instance for a different tree in the manager.
0x0068037067CEnchantMgr__delete_sentinel_0x20Deletes the RB-tree sentinel node (0x20 bytes) at param_1+4 if non-null.
0x006803C067CEnchantMgr__delete_sentinel_0x2cDeletes the RB-tree sentinel node (0x2c bytes) at param_1+4 if non-null.
0x0068041067CEnchantMgr__delete_sentinel_0x30_bDeletes the RB-tree sentinel node (0x30 bytes) at param_1+4 if non-null. Second instance for a different tree in the manager.
0x0068046070CEnchantMgr__delete_sentinel_0x80Deletes the RB-tree sentinel node (0x80 bytes) at param_1+4 if non-null. For the main enchant data tree with the largest node size.
0x006804B0111CEnchantMgr__rbtree_clear_and_free_0x18Full RB-tree clear and free for 0x18-byte node trees. Iterates all nodes from root's left child: recursively destroys right subtrees via rbtree_destroy_nodes_0x18, deletes each node (0x18), then deletes the sentinel (0x18). Resets tree to empty.
0x0068053076CEnchantMgr__rbtree_clear_and_free_0x1cFull RB-tree clear and free for 0x1c-byte node trees with nested subtrees. Calls rbtree_destroy_nodes_0x1c_with_subtree on all nodes, then deletes the sentinel (0x1c).
0x0068059076CEnchantMgr__rbtree_clear_and_free_0x30Full RB-tree clear and free for 0x30-byte node trees with nested subtrees. Calls rbtree_destroy_nodes_0x30_with_subtree on all nodes, then deletes the sentinel (0x30).
0x006805F076CEnchantMgr__rbtree_clear_and_free_0x28Full RB-tree clear and free for 0x28-byte node trees. Calls rbtree_destroy_nodes_0x28 on all nodes, then deletes the sentinel (0x28).
0x0068065076CEnchantMgr__rbtree_clear_and_free_0x60Full RB-tree clear and free for 0x60-byte node trees. Calls rbtree_destroy_nodes_0x60 on all nodes, then deletes the sentinel (0x60).
0x006806B076CEnchantMgr__rbtree_clear_and_free_0x1c_bFull RB-tree clear and free for 0x1c-byte node trees (simple variant). Calls rbtree_destroy_nodes_0x1c on all nodes (uses STL_rbtree_clear_and_free_simple for inner data), then deletes the sentinel (0x1c).
0x00680710111CEnchantMgr__rbtree_clear_and_free_0x20Full RB-tree clear and free for 0x20-byte node trees. Iterates all nodes from root's left child: recursively destroys right subtrees via rbtree_destroy_nodes_0x20, deletes each node (0x20), then deletes the sentinel (0x20).
0x0068079076CEnchantMgr__rbtree_clear_and_free_0x2cFull RB-tree clear and free for 0x2c-byte node trees with std::string keys. Calls rbtree_destroy_nodes_0x2c_with_string on all nodes, then deletes the sentinel (0x2c).
0x006807F076CEnchantMgr__rbtree_clear_and_free_0x30_bFull RB-tree clear and free for 0x30-byte node trees with std::string keys. Calls rbtree_destroy_nodes_0x30_with_string on all nodes, then deletes the sentinel (0x30).
0x0068085079CEnchantMgr__rbtree_clear_and_free_0x80Full RB-tree clear and free for 0x80-byte node trees (main enchant data). Calls rbtree_destroy_nodes_0x80 on all nodes, then deletes the sentinel (0x80).
0x006808B084CEnchantMgr__rbtree_clear_optional_0x2cOptional RB-tree clear for 0x2c-byte string-keyed nodes. Checks if inner tree pointer at param_1[1] is non-null before clearing. If non-null, calls rbtree_destroy_nodes_0x2c_with_string on the inner tree and deletes its sentinel (0x2c).
0x0068091078CEnchantMgr__delete_sentinel_0x18_bDeletes the RB-tree sentinel node (0x18 bytes) at param_1+4 if non-null. Second instance, identical pattern to delete_sentinel_0x18 at 00680190.
0x00680960152CEnchantMgr__dtor_rbtree_0x28_containerCEnchantMgr sub-container destructor: destroys rbtree nodes (0x28 node size) via recursive walk, then frees the sentinel node and the container object at param+4.
0x00680A00161CEnchantMgr__dtor_dual_rbtree_0x30_containerCEnchantMgr sub-container destructor: clears two rbtrees (STL simple clear + 0x18 clear), then frees 0x30-byte container at param+4.
0x00680AB0133CEnchantMgr__dtor_rbtree_0x28_simple_containerCEnchantMgr sub-container destructor: clears rbtree via 0x18 clear helper, then frees 0x28-byte container at param+4.
0x00680B40116CEnchantMgr__dtor_multi_rbtree_0x60_containerCEnchantMgr sub-container destructor: destroys multi-rbtree structure (calls dtor_all_enchant_group_rbtrees), then frees 0x60-byte container at param+4.
0x00680BC0123CEnchantMgr__dtor_rbtree_0x1c_simple_containerCEnchantMgr sub-container destructor: clears rbtree via STL simple clear, then frees 0x1c-byte container at param+4.
0x00680C4078CEnchantMgr__dtor_free_0x20_containerCEnchantMgr sub-container destructor: frees 0x20-byte plain object at param+4. No tree cleanup needed.
0x00680C90113CEnchantMgr__dtor_string_0x2c_containerCEnchantMgr sub-container destructor: destroys an STL string member, then frees 0x2c-byte container at param+4.
0x00680D10113CEnchantMgr__dtor_string_0x30_containerCEnchantMgr sub-container destructor: destroys an STL string member, then frees 0x30-byte container at param+4.
0x00680D90119CEnchantMgr__dtor_enchant_data_0x80_containerCEnchantMgr sub-container destructor: destroys enchant data members (multiple rbtrees, string, vector), then frees 0x80-byte container at param+4.
0x00680E1078CEnchantMgr__dtor_free_0x18_containerCEnchantMgr sub-container destructor: frees 0x18-byte plain object at param+4. No tree cleanup needed.
0x00680E6078CEnchantMgr__dtor_free_0x1c_containerCEnchantMgr sub-container destructor: frees 0x1c-byte plain object at param+4. No tree cleanup needed.
0x00680EB078CEnchantMgr__dtor_free_0x30_containerCEnchantMgr sub-container destructor: frees 0x30-byte plain object at param+4. No tree cleanup needed.
0x00680F0078CEnchantMgr__dtor_free_0x28_containerCEnchantMgr sub-container destructor: frees 0x28-byte plain object at param+4. No tree cleanup needed.
0x00680F5078CEnchantMgr__dtor_free_0x60_containerCEnchantMgr sub-container destructor: frees 0x60-byte plain object at param+4. No tree cleanup needed.
0x00680FA078CEnchantMgr__dtor_free_0x1c_container_2CEnchantMgr sub-container destructor: frees 0x1c-byte plain object at param+4. No tree cleanup. Second variant at different offset.
0x00680FF078CEnchantMgr__dtor_free_0x20_container_2CEnchantMgr sub-container destructor: frees 0x20-byte plain object at param+4. No tree cleanup. Second variant at different offset.
0x0068104078CEnchantMgr__dtor_free_0x2c_containerCEnchantMgr sub-container destructor: frees 0x2c-byte plain object at param+4. No tree cleanup needed.
0x0068109078CEnchantMgr__dtor_free_0x30_container_2CEnchantMgr sub-container destructor: frees 0x30-byte plain object at param+4. No tree cleanup. Second variant at different offset.
0x006810E081CEnchantMgr__dtor_free_0x80_containerCEnchantMgr sub-container destructor: frees 0x80-byte plain object at param+4. No tree cleanup needed.
0x0068114065CEnchantMgr__clear_rbtree_0x18CEnchantMgr rbtree cleanup wrapper: calls CEnchantMgr__rbtree_clear_and_free_0x18 to clear and free an rbtree with 0x18-byte nodes.
0x0068119087CEnchantMgr__destroy_rbtree_nodes_0x1c_and_free_sentinelCEnchantMgr rbtree destructor: recursively destroys all 0x1c-byte nodes (with subtree cleanup) in the rbtree, then frees the 0x1c-byte sentinel.
0x006811F087CEnchantMgr__destroy_rbtree_nodes_0x30_and_free_sentinelCEnchantMgr rbtree destructor: recursively destroys all 0x30-byte nodes (with subtree cleanup) in the rbtree, then frees the 0x30-byte sentinel.
0x0068125087CEnchantMgr__destroy_rbtree_nodes_0x28_and_free_sentinelCEnchantMgr rbtree destructor: recursively destroys all 0x28-byte nodes in the rbtree, then frees the 0x28-byte sentinel.
0x006812B087CEnchantMgr__destroy_rbtree_nodes_0x60_and_free_sentinelCEnchantMgr rbtree destructor: recursively destroys all 0x60-byte nodes in the rbtree, then frees the 0x60-byte sentinel.
0x0068131087CEnchantMgr__destroy_rbtree_nodes_0x1c_and_free_sentinel_2CEnchantMgr rbtree destructor: recursively destroys all 0x1c-byte nodes in the rbtree, then frees the 0x1c-byte sentinel. Second variant.
0x0068137065CEnchantMgr__clear_rbtree_0x20CEnchantMgr rbtree cleanup wrapper: calls CEnchantMgr__rbtree_clear_and_free_0x20 to clear and free an rbtree with 0x20-byte nodes.
0x006813C087CEnchantMgr__destroy_rbtree_nodes_0x2c_string_and_free_sentinelCEnchantMgr rbtree destructor: recursively destroys all 0x2c-byte nodes (with embedded STL string cleanup) in the rbtree, then frees the 0x2c-byte sentinel.
0x0068142087CEnchantMgr__destroy_rbtree_nodes_0x30_string_and_free_sentinelCEnchantMgr rbtree destructor: recursively destroys all 0x30-byte nodes (with embedded STL string cleanup) in the rbtree, then frees the 0x30-byte sentinel.
0x0068148090CEnchantMgr__destroy_rbtree_nodes_0x80_and_free_sentinelCEnchantMgr rbtree destructor: recursively destroys all 0x80-byte nodes in the rbtree, then frees the 0x80-byte sentinel.
0x006814E0112CEnchantMgr__destroy_inner_rbtree_0x28_and_free_sentinelCEnchantMgr rbtree destructor: destroys 0x28-byte rbtree nodes starting from an inner member (param+4), then frees the 0x28-byte sentinel.
0x00681550127CEnchantMgr__clear_dual_rbtreeCEnchantMgr dual rbtree cleanup: clears two rbtrees sequentially (STL simple clear + 0x18 clear). No param, operates on implicit this.
0x006815D093CEnchantMgr__clear_rbtree_with_offsets_0x08_0x10CEnchantMgr rbtree cleanup: clears rbtree via CEnchantMgr__rbtree_clear_and_free_0x18, passing offsets param+0x08 and param+0x10.
0x0068163068CEnchantMgr__clear_multi_rbtree_0x60CEnchantMgr multi-rbtree cleanup: delegates to dtor_all_enchant_group_rbtrees to destroy all sub-rbtrees in a 0x60-byte enchant group container.
0x0068168080CEnchantMgr__clear_rbtree_at_offset_0x04CEnchantMgr rbtree cleanup: clears rbtree at member offset +0x04 via STL_rbtree_clear_and_free_simple.
0x006816D065CEnchantMgr__dtor_string_memberCEnchantMgr string member destructor: destroys an STL string member within an enchant container node. SEH-protected.
0x0068172065CEnchantMgr__dtor_string_member_2CEnchantMgr string member destructor: destroys an STL string member within an enchant container node. Second variant. SEH-protected.
0x0068177068CEnchantMgr__clear_enchant_data_0x80CEnchantMgr enchant data cleanup: delegates to dtor_enchant_data_members to destroy all sub-members of a 0x80-byte enchant data node.
0x006817C0180CEnchantMgr__dtor_enchant_data_membersCEnchantMgr enchant data member destructor: destroys all sub-members of an enchant data structure, 0x60 rbtree nodes, STL string, 0x18 rbtree, 4-byte vector, and a json vector. Called from multiple node destructors.
0x00681880128CEnchantMgr__dtor_lua_and_rbtree_0x80CEnchantMgr destructor: sets vtable pointer, destroys CLuaInstance member, then destroys 0x80-byte rbtree (enchant data nodes) at param+4 and frees sentinel.
0x0068190099CEnchantMgr__destroy_rbtree_0x28_and_free_sentinelCEnchantMgr rbtree destructor: recursively destroys all 0x28-byte nodes in the rbtree pointed to by param, then frees the 0x28-byte sentinel.
0x00681970116CEnchantMgr__clear_dual_rbtree_2CEnchantMgr dual rbtree cleanup: clears two rbtrees sequentially (STL simple clear + 0x18 clear). Second variant, different index ordering.
0x006819F080CEnchantMgr__clear_rbtree_at_offset_0x08CEnchantMgr rbtree cleanup: clears rbtree via CEnchantMgr__rbtree_clear_and_free_0x18, passing member at offset +0x08.
0x00681A4093CEnchantMgr__clear_rbtree_with_offsets_0x10_0x18CEnchantMgr rbtree cleanup: clears rbtree via CEnchantMgr__rbtree_clear_and_free_0x18, passing offsets param+0x10 and param+0x18.
0x00681AA0274CEnchantMgr__dtor_all_enchant_group_rbtreesCEnchantMgr enchant group destructor: destroys 5 nested rbtrees (0x1c-subtree at +0x38, 0x30-subtree at +0x30, 0x28 at +0x28, 0x1c at +0x20) plus 0x20 and 0x18 clears. Called when destroying a 0x60-byte enchant group node.
0x00681BC0156CEnchantMgr__rbtree_swap_0x18CEnchantMgr rbtree swap: clears current tree by walking and destroying 0x18-byte nodes, then swaps root/count with param_2 tree. Used for move-assignment of rbtree maps.
0x00681C70279CEnchantMgr__rbtree_insert_or_find_0x30CEnchantMgr rbtree insert-or-find (0x30 nodes): searches rbtree by int key, returns pointer to value if found. If not found, allocates 0x30-byte node, initializes via ctor_dual_tree_container, inserts into tree. Max 0x5555555 entries.
0x00681D90274CEnchantMgr__rbtree_insert_or_find_0x20CEnchantMgr rbtree insert-or-find (0x20 nodes): searches rbtree by int key, returns pointer to value if found. If not found, allocates 0x20-byte node with two zero-initialized fields, inserts into tree. Max 0x7ffffff entries.
0x00681EB0299CEnchantMgr__rbtree_insert_or_find_0x60CEnchantMgr rbtree insert-or-find (0x60 nodes): searches rbtree by uint key, returns pointer to value if found. If not found, allocates 0x60-byte node, memsets payload to zero, initializes all sub-rbtrees via init_all_rbtrees, inserts. Max 0x2aaaaaa entries.
0x00681FE0257CEnchantMgr__rbtree_insert_or_find_enchant_data_0x80CEnchantMgr rbtree insert-or-find (0x80 enchant data nodes): searches rbtree by uint64 key via lower_bound. If not found, allocates 0x80-byte node, initializes enchant data container, inserts. Returns pointer to value at node+0x18. Max 0x1ffffff entries.
0x006820F030CEnchantMgr__scalar_deleting_dtor_006820f0CEnchantMgr scalar deleting destructor: if bit 0 of param_2 is set, frees the 4-byte object. Standard MSVC vftable destructor pattern.
0x00682110151CEnchantMgr__scalar_deleting_dtorCEnchantMgr scalar deleting destructor. Sets vtable, destroys CLuaInstance, destroys rbtree nodes (0x80 node size), frees sentinel, optionally deletes this (0x38 bytes).
0x006821B0341CEnchantMgr__add_enchant_entry_single_itemAdds an enchant entry for a single target item. Resolves item name to ID via SpriteMap, finds/inserts into rbtree keyed by item ID, sets properties at offsets +0x18/+0x1c, copies enchant option tree, then builds and stores the processed enchant data.
0x00682310490CEnchantMgr__add_enchant_entry_dual_itemAdds an enchant entry requiring two items (source + material). Resolves both item names to IDs via SpriteMap, inserts into two rbtrees (0x1c and 0x28 keyed), sets properties at +0x18/+0x1c, copies enchant option tree, builds processed enchant data.
0x00682500337CEnchantMgr__set_enchant_dual_item_propertiesSets enchant properties for a dual-item entry. Resolves two item names to IDs via SpriteMap, finds entries in rbtrees (0x1c and via Ench__mgr_00681d90), stores two property values from stack params.
0x00682660222CEnchantMgr__add_target_item_to_vectorResolves an item name to ID via SpriteMap and appends it to the enchant entry's target item vector (push_back with realloc fallback).
0x0068274070CEnchantMgr__add_upgrade_enchant_entry_dual_itemWrapper that sets the upgrade flag (+0x40 = 1) on the enchant entry, then delegates to CEnchantMgr__add_enchant_entry_dual_item for the actual data setup.
0x0068279025CEnchantMgr__set_approve_random_optionSets the approve-random-option flag (+0x14) on the enchant entry identified by the item key from stack params.
0x006827B0335CEnchantMgr__call_lua_check_functionCalls a named Lua function via lua_getfield/pcall, expecting it to return (boolean, string). On success returns the boolean result. On error or type mismatch, shows a MessageBox titled "CEnchantMgr" with the error message and returns false.
0x0068296063CEnchantMgr__send_enchant_request_packetBuilds and sends a network packet (header 0x0BA0) for an enchant request. Gets effect manager singletons, computes packet size via get_job_sprite_count, sends via CNetworkSession__send_data_timed, sets pending flag (+0x30 = 1).
0x006829A082CEnchantMgr__rbtree_find_by_uint64_keyFinds an entry in the enchant rbtree by a 64-bit key (uint64 composed of param_2/param_3). Uses lower_bound search, returns pointer to data at node+0x18 if found, or 0 if not found.
0x00682A00771CEnchantMgr__build_item_option_map_from_treeIterates an enchant option rbtree (string-keyed, 0x2c nodes), resolves each item name to an ID via SpriteMap, and builds a new int-keyed rbtree (map from item_id to option_value). Output map is stored in param_1. Used to convert Lua table data into the internal enchant option format.
0x00682D103760CEnchantMgr__init_lua_environmentInitializes the CEnchantMgr Lua environment. Sets global numbers (MAX_REFINE_LEVEL, MAX_GRADE_LEVEL, MAX_SLOT_NUM, MAX_MATERIAL_NUM), IS_CLIENT boolean, registers 14 Lua callback functions (C_SetSlotOrder, C_AddTargetItem, C_SetCondition, C_ApproveRandomOption, C_SetReset, C_SetCaution, C_SetRequire, C_SetSuccessRate, C_SetGradeBonus, C_SetEnchant, C_AddPerfectEnchant, C_AddUpgradeEnchant, C_SetRandomUpgradeRequire, C_AddRandomUpgradeEnchant, C_AddPerfectUpgradeEnchant, C_GetSlotCount), then executes Lua files from LuaFiles514/Lua Files/Enchant/ and runs CheckFile validation.
0x00683BC095CEnchantMgr__open_enchant_windowOpens or closes the enchant UI window (type 0x2716). If item weight ratio is below 70%, creates the window and renders the enchant panel. If above 70%, finds and closes the existing window. Clears pending flag (+0x30 = 0).
0x00683C20239CEnchantMgr__send_perfect_enchant_packetSends a perfect enchant request packet (header 0x0B9C) to the server. Checks weight ratio (rejects if >=70% with message 0xEFD). Builds packet with item IDs, slot, and enchant params, sends via CNetworkSession, stores request state at this+0x18..0x30, sets pending flag.
0x00683D10233CEnchantMgr__send_upgrade_enchant_packetSends an upgrade enchant request packet (header 0x0B9B) to the server. Checks weight ratio (rejects if >=70% with message 0xEFD). Builds packet with item IDs and slot params, sends via CNetworkSession, stores request state, sets pending flag.
0x00683E00232CEnchantMgr__send_reset_enchant_packetSends an enchant reset request packet (header 0x0B9E) to the server. Checks weight ratio (rejects if >=70% with message 0xEFD). Builds packet with item IDs and slot, sends via CNetworkSession, stores request state, sets pending flag.
0x00683EF0246CEnchantMgr__send_random_upgrade_enchant_packetSends a random upgrade enchant request packet (header 0x0BF1) to the server. Checks weight ratio (rejects if >=70%). Builds packet with item IDs, slots, enchant params and additional data (param_6), sends via CNetworkSession, stores request state, sets pending flag.
0x00683FF0240CEnchantMgr__send_random_enchant_packetSends a random enchant request packet (header 0x0B9D) to the server. Checks weight ratio (rejects if >=70%). Builds packet with item IDs and slot params, sends via CNetworkSession, stores request state, sets pending flag.
0x006840E0240CEnchantMgr__send_perfect_upgrade_enchant_packetSends a perfect upgrade enchant request packet (header 0x0BF0) to the server. Checks weight ratio (rejects if >=70%). Builds packet with item IDs and slot params, sends via CNetworkSession, stores request state, sets pending flag.
0x006841D0702CEnchantMgr__handle_enchant_resultHandles enchant result from server. If result=0xF11 (success): looks up enchant entry by stored item key, finds item in inventory by slot, applies enchant options based on request type (0xB9E resets all slots, others set specific slot), plays success effect (0x908/0x90B/0x90E by type). If result=0xF12 (failure): plays failure effect (0x909/0x90F). Otherwise displays error message. Closes enchant window and clears pending flag.
0x0068456047CEnchantMgr__set_caution_textSets the caution/warning text string at offset +0x48 of the enchant entry. Copies from the input STL string parameter unless it points to the same buffer.
0x0068459046CEnchantMgr__set_condition_valuesSets the condition values at offsets +0x0C and +0x10 of the enchant entry. Called by the C_SetCondition Lua callback to store min/max condition parameters.
0x006845C01203CEnchantMgr__build_enchant_option_map_and_storeIterates a string-keyed rbtree of enchant options, resolves each item name to ID via SpriteMap, builds a new int-keyed rbtree map (item_id -> pair of values). Then finds/creates the enchant entry in the manager's nested map (keyed by item_id from stack param) and copies the built map into the entry's sub-tree, replacing existing data.
0x00684A80213CEnchantMgr__copy_enchant_subtree_to_entryCopies an enchant option subtree into an enchant entry's rbtree at offset +0x18. Destroys existing nodes (0x20 size), deep-copies all nodes from the source tree, updates min/max pointers and count.
0x00684B60328CEnchantMgr__add_enchant_entry_single_item_with_gradeAdds an enchant entry for a single item with grade bonus. Resolves item name to ID via SpriteMap, finds/inserts into rbtree (0x1c key), sets grade properties from stack params, copies enchant option tree, builds processed enchant data.
0x00684CB0194CEnchantMgr__add_enchant_entry_with_requireAdds an enchant entry with require properties. Finds the entry by item key, sets require values from stack params, copies enchant option tree from param, builds processed enchant data and stores it.
0x00684D80207CEnchantMgr__set_random_upgrade_requireSets random upgrade require properties on an enchant entry. Stores flag at +0x28, two value pairs at +0x30/+0x34 and +0x38/+0x3C, copies enchant option tree, builds processed enchant data.
0x00684E5093CEnchantMgr__set_slot_order_vectorCopies a slot order vector into the enchant entry's vector at offset +0x18. If source differs from target, copies data via memcpy (with grow if needed), updates the size pointer at +0x1C.
0x00684EB043CEnchantMgr__set_success_rate_valuesSets success rate values at offsets +0x10 and +0x14 of the enchant entry. Takes two values from stack params.
0x00684EE066CEnchantMgr__store_request_stateStores enchant request state into this+0x18..0x2F. Saves packet header type, item IDs, slot params from the function arguments. Used internally before sending packets to remember what was requested.
0x006863F0220CEnchantMgr__get_singletonReturns (or creates) the CEnchantMgr singleton stored in DAT_0138d254. On first call allocates 0x38 bytes, sets vtable, initializes rbtree sentinel (0x80 node), constructs CLuaInstance, zeroes enchant state fields. Subsequent calls return the cached pointer.
0x006864D0860CEnchantMgr__lua_C_AddPerfectEnchantLua callback for C_AddPerfectEnchant(slot, grade, itemName, enchantId, optionTable). Validates 5 args: number, number, string, number, table. Parses slot/grade/enchantId as int64, resolves item name, iterates Lua table to build enchant option map (string->rate), then calls CEnchantMgr__add_enchant_entry_single_item. Returns 2 values (bool, errorMsg).
0x00686830959CEnchantMgr__lua_C_AddPerfectUpgradeEnchantLua callback for C_AddPerfectUpgradeEnchant(slot, grade, srcItem, dstItem, enchantId, optionTable). Validates 6 args: number, number, string, string, number, table. Similar to C_AddPerfectEnchant but for dual-item (source+destination). Calls CEnchantMgr__add_enchant_entry_dual_item. Returns 2 values.
0x00686BF0831CEnchantMgr__lua_C_AddRandomUpgradeEnchantLua callback for C_AddRandomUpgradeEnchant(slot, grade, srcItem, dstItem, enchantId). Validates 5 args: number, number, string, string, number. Resolves both item names to IDs, finds rbtree entries, sets dual-item properties with the enchantId. Returns 2 values.
0x00686F30682CEnchantMgr__lua_C_AddTargetItemLua callback for C_AddTargetItem(slot, itemName). Validates 2 args: number, string. Resolves item name to ID via SpriteMap, appends the item ID to the enchant entry's target item vector. Returns 2 values.
0x006871E01007CEnchantMgr__lua_C_AddUpgradeEnchantLua callback for C_AddUpgradeEnchant(slot, grade, srcItem, dstItem, enchantId, optionTable). Validates 6 args: number, number, string, string, number, table. Sets upgrade flag (+0x40=1), parses option table, calls add_enchant_entry_dual_item. Returns 2 values.
0x006875D0250CEnchantMgr__lua_C_ApproveRandomOptionLua callback for C_ApproveRandomOption(slot, approved). Validates 2 args: number, boolean. Converts slot to int64, sets the approve flag (+0x14) on the enchant entry. Returns 2 values.
0x006876D0403CEnchantMgr__lua_C_GetSlotCountLua callback for C_GetSlotCount(itemName). Takes an item name string, resolves to item ID via SpriteMap, looks up item info, gets class/level and refinement level, pushes the slot count as a number to Lua. Returns 1 value.
0x00687870466CEnchantMgr__lua_C_SetCautionLua callback for C_SetCaution(slot, cautionText). Validates 2 args: number, string. Converts slot to int64, finds the enchant entry, copies the caution text string into the entry's +0x48 field. Returns 2 values.
0x00687A50340CEnchantMgr__lua_C_SetConditionLua callback for C_SetCondition(slot, minLevel, maxLevel). Validates 3 args: all numbers. Converts slot to int64, converts min/max to uint32, finds the enchant entry and sets condition values at +0x0C and +0x10. Returns 2 values.
0x00687BB0818CEnchantMgr__lua_SetEnchantLua callback for L_SetEnchant. Takes 3 numeric args (enchant ID, slot, type) and a table of enchant option name->value pairs. Builds an RBTree of string->value mappings, then registers the enchant via CEnchantMgr.
0x00687EF0914CEnchantMgr__lua_SetGradeBonusLua callback for L_SetGradeBonus. Takes 2 numeric args (grade ID, bonus type) and a table of grade->bonus value pairs. Builds an RBTree of int->int64 mappings and stores them in the enchant grade bonus data via CEnchantMgr.
0x006882901094CEnchantMgr__lua_SetRandomUpgradeRequireLua callback for L_SetRandomUpgradeRequire. Takes 4 args: numeric ID, numeric type, string item name, numeric cost, plus a table of option name->value pairs. Looks up item ID by name via SpriteMap, builds RBTree of requirements, stores in CEnchantMgr.
0x006886E0897CEnchantMgr__lua_SetRequireLua callback for L_SetRequire. Takes 3 numeric args (enchant ID, slot, cost) and a table of requirement name->value pairs. Builds an RBTree of string->uint mappings for enchant requirements, stores via CEnchantMgr.
0x00688A701010CEnchantMgr__lua_SetResetLua callback for L_SetReset. Takes 5 args: numeric ID, boolean flag, numeric cost, numeric rate, and a table of option name->value pairs. Configures enchant reset parameters including cost multiplier and success rate via CEnchantMgr.
0x00688E70550CEnchantMgr__lua_SetSlotOrderLua callback for L_SetSlotOrder. Takes a numeric enchant ID and a table of slot order values. Builds a vector of slot indices from the table, then copies it into the enchant data's slot order array via CEnchantMgr.
0x006890A0401CEnchantMgr__lua_SetSuccessRateLua callback for L_SetSuccessRate. Takes 3 numeric args: enchant ID, slot index, and success rate value. Stores the success rate as an int64 at offset +0x10 in the enchant slot data via CEnchantMgr.
0x00689260238CEnchantMgr__rbtree_deep_copy_node_0x18Recursively deep-copies an RBTree with 0x18-byte nodes. Copies each node's key (2 int fields at offset +0x10,+0x14), allocates new 0x18 node, sets parent/child pointers and color, then recurses into left and right subtrees.
0x00689370241CEnchantMgr__rbtree_deep_copy_node_0x1cRecursively deep-copies an RBTree with 0x1c-byte nodes (which contain nested RBTree data at offset +0x10). Calls CEnchantMgr__rbtree_copy_construct_0x18 for the nested tree, then recurses into left and right subtrees.
0x00689480519CEnchantMgr__vector_grow_and_insert_0x40Grows and inserts into a vector of 0x40-byte tooltip elements. Allocates new buffer with 1.5x growth, copies existing elements around the insertion point, calls copy-construct for the new element at the insert position. Frees old buffer.
0x00689690118CEnchantMgr__rbtree_destroy_all_nodes_0x18Destroys all nodes in an RBTree with 0x18-byte nodes. Traverses via first child, recursively destroys right subtrees via rbtree_destroy_nodes_recursive_0x18, then frees each node. Also frees the sentinel node at the end.
0x00689710103CEnchantMgr__rbtree_destroy_nodes_recursive_0x14Recursively destroys RBTree nodes of 0x14 bytes each. Traverses right subtree first, then follows left child pointers, freeing each node. Used for simple key-only RBTree cleanup.
0x00689780103CEnchantMgr__rbtree_destroy_nodes_recursive_0x18Recursively destroys RBTree nodes of 0x18 bytes each. Traverses right subtree first, then follows left child pointers, freeing each node. Used for key-value RBTree cleanup.
0x006897F0142CEnchantMgr__rbtree_destroy_nodes_recursive_0x1cRecursively destroys RBTree nodes of 0x1c bytes each. Before freeing each node, also destroys its nested RBTree at offset +0x14 via rbtree_destroy_all_nodes_0x18. Used for composite enchant data cleanup.
0x00689880103CEnchantMgr__rbtree_destroy_nodes_recursive_0x18_v2Recursively destroys RBTree nodes of 0x18 bytes each (variant 2). Same structure as _v1 but used in a different context. Traverses right subtree, follows left pointers, frees each node.
0x006898F0142CEnchantMgr__rbtree_destroy_nodes_recursive_0x1c_v2Recursively destroys RBTree nodes of 0x1c bytes each (variant 2). Before freeing each node, destroys nested RBTree at offset +0x14 via rbtree_destroy_all_nodes_0x18. Same logic as _v1 but used in different cleanup paths.
0x00689980137CEnchantMgr__hashmap_find_by_stringFinds an entry in a hash map by string key. Computes FNV-1a hash of the key, looks up the bucket, then walks the collision chain comparing strings via std::_Traits_equal. Returns iterator pair (node pointer + found flag).
0x00689A10127CEnchantMgr__hashmap_destroy_nodes_0x38Destroys all nodes in a hash map with 0x38-byte entries containing two std::strings. Clears the node count, walks the linked list freeing each node after destroying both strings. Finally frees the sentinel.
0x00689B00153CEnchantMgr__format_bonus_stringFormats an enchant bonus value into a string using CFmt__format_to_string. Wraps a single int parameter from param_4 and passes it with format args (count=1, extra=0) to the formatter.
0x00689BA0609CEnchantMgr__hashmap_insert_from_rbtreeInserts entries from an RBTree (with string keys) into a hash map. Iterates RBTree nodes, computes FNV-1a hash of each string key, finds or creates hash map bucket entries. Handles rehashing when load factor exceeds threshold.
0x00689E1031CEnchantMgr__fill_rangeCEnchantMgr: fill range
0x00689E30251CEnchantMgr__rbtree_copy_construct_0x18Copy-constructs an RBTree with 0x18-byte nodes. Allocates a new sentinel, deep-copies all nodes via rbtree_deep_copy_node_0x18, copies the element count, then finds and sets the min/max node pointers.
0x00689F30108CEnchantTooltip__ctor_baseBase constructor for CEnchantTooltip. Sets vtable to base tooltip vtable, copies the tooltip type from param_2, initializes data to zero, calls enchant_data_init for the enchant data structure, and clears the active flag.
0x00689FA0135CEnchantTooltipValue__ctorConstructor for CEnchantTooltipValue (derived from CEnchantTooltip). Calls base ctor, then overrides vtable to CEnchantTooltipValue's vtable and stores two additional value fields from param_3 and param_4.
0x0068A030141CEnchantTooltipValue__copy_ctorCopy constructor for CEnchantTooltipValue. Copies vtable, type, and data from the source object, deep-copies the enchant data structure via enchant_data_copy_construct, copies the active flag, then overrides vtable and copies the two extra value fields.
0x0068A0C0121CEnchantTooltipSimple__ctorConstructor for CEnchantTooltipSimple (derived from CEnchantTooltip). Calls base ctor then overrides vtable to CEnchantTooltipSimple's vtable. No additional data fields beyond the base.
0x0068A140133CEnchantTooltipBool__ctorConstructor for CEnchantTooltipBool (derived from CEnchantTooltip). Calls base ctor, overrides vtable to CEnchantTooltipBool's vtable, stores a value from param_3, and sets the active flag to 1.
0x0068A1D0361CEnchantMgr__enchant_data_copy_constructDeep copy-constructs a full enchant data structure. Copies the 0x1c-node RBTree via rbtree_deep_copy_node_0x1c, the element count, the hash map bucket array, and the int vector. Also copies scalar config values (load factor, bucket count).
0x0068A340221CEnchantMgr__enchant_data_initInitializes a default enchant data structure. Creates sentinel nodes for both the RBTree (0x1c) and hash map (0x38), zeroes the vector fields, sets default load factor to 1.0f, bucket count to 8, and initial bucket capacity to 16.
0x0068A4201535CEnchantMgr__build_item_bonus_tooltipsConstructs an enchant item bonus tooltip object. Parses item bonus data from a source record, looks up bonus entries in CDataTable, converts equip locations to slot indices, creates tooltip entries for each enchant slot with bonus values. Handles SetWeaponAttr special cases with signed/negated values.
0x0068AA2067CEnchantMgr__delete_list_sentinel_0xcDeletes the list sentinel node (0xc bytes) at offset +4 of the object, if it exists. Used as a destructor helper for linked list containers in the enchant system.
0x0068AA7067CEnchantMgr__delete_hashmap_sentinel_0x38Deletes the hash map sentinel node (0x38 bytes) at offset +4 of the object, if it exists. Used as a destructor helper for hash map containers in the enchant system.
0x0068AAC067CEnchantMgr__delete_rbtree_sentinel_0x18Deletes the RBTree sentinel node (0x18 bytes) at offset +4 of the object, if it exists. Used as a destructor helper for RBTree containers in the enchant system.
0x0068AB1067CEnchantMgr__delete_rbtree_sentinel_0x1cDeletes the RBTree sentinel node (0x1c bytes) at offset +4 of the object, if it exists. Used as a destructor helper for RBTree containers with larger nodes in the enchant system.
0x0068AB60102CEnchantMgr__enchant_data_destroy_vectors_and_hashmapDestroys an enchant data structure's vector and hash map components. First clears the int vector via vector_clear_and_free, then destroys all hash map nodes (with strings) and frees the hash map sentinel (0x38 bytes).
0x0068ABD0125CEnchantMgr__vector_clear_and_freeClears and frees a vector's backing memory. Computes allocation size, handles aligned allocation cleanup (checking 0xFFF threshold), calls operator_delete, then zeroes all three vector fields (begin, end, capacity).
0x0068AC6078CEnchantMgr__delete_list_sentinel_0xc_v2Deletes the list sentinel node (0xc bytes) at offset +4 (variant 2). Same as delete_list_sentinel_0xc but with slightly different stack frame layout. Used in different destructor chains.
0x0068ACB0129CEnchantMgr__hashmap_node_destroy_strings_and_freeDestroys a hash map node's two embedded std::strings and frees the 0x38-byte node. Called during hash map cleanup when nodes contain string key-value pairs that need individual destruction.
0x0068AD407CEnchantMgr__rbtree_destroy_all_nodes_0x18_thunkThunk to CEnchantMgr__rbtree_destroy_all_nodes_0x18. Simple forwarding call used as a virtual destructor entry or callback target.
0x0068AD5076CEnchantMgr__rbtree_clear_and_free_0x1c_0068ad50Destroys all nodes in an RBTree with 0x1c-byte nodes (which contain nested RBTrees), then frees the sentinel. Calls rbtree_destroy_nodes_recursive_0x1c to walk and free all nodes before freeing the 0x1c sentinel.
0x0068ADB0111CEnchantMgr__rbtree_destroy_all_nodes_0x14Destroys all nodes in an RBTree with 0x14-byte nodes. Walks from first child, recursively destroys right subtrees via rbtree_destroy_nodes_recursive_0x14, frees each node (0x14 bytes), then frees the sentinel.
0x0068AE5084CEnchantMgr__rbtree_clear_and_free_0x1c_optionalOptionally clears and frees an RBTree with 0x1c-byte nodes. Checks if the inner pointer (param_1[1]) is non-null before destroying. Used when the RBTree may or may not have been initialized.
0x0068AEE0103CEnchantMgr__list_destroy_all_nodes_0xcDestroys all nodes in a singly-linked list with 0xc-byte nodes. Clears the node count, walks the linked list freeing each node, then frees the sentinel/head node.
0x0068AF5073CEnchantMgr__hashmap_clear_and_free_0x38Clears and frees a hash map with 0x38-byte nodes containing two strings. Calls hashmap_destroy_nodes_0x38 to free all entries, then frees the 0x38-byte sentinel/bucket array.
0x0068AFA066CEnchantMgr__rbtree_destroy_all_nodes_0x18_wrapperWrapper that destroys all nodes in an RBTree with 0x18-byte nodes. Forwards to rbtree_destroy_all_nodes_0x18 with SEH frame setup. Used in destructor chains.
0x0068AFF087CEnchantMgr__rbtree_clear_and_free_0x1c_wrapperWrapper that destroys all nodes in an RBTree with 0x1c-byte nodes (containing nested RBTrees), then frees the sentinel. Forwards to rbtree_destroy_nodes_recursive_0x1c with SEH frame setup.
0x0068B050126CEnchantMgr__rbtree_destroy_all_nodes_0x14_wrapperWrapper that destroys all nodes in an RBTree with 0x14-byte nodes. Same logic as rbtree_destroy_all_nodes_0x14 but with different SEH frame setup. Used in alternative destructor chains.
0x0068B0D0102CEnchantMgr__enchant_data_destroy_fullFull destructor for an enchant data structure. First clears the int vector, then destroys all hash map nodes (with strings) and frees the hash map sentinel, then frees the 0x38-byte bucket array.
0x0068B140156CEnchantMgr__tooltip_vector_destroy_and_freeDestroys and frees a vector of 0x40-byte tooltip objects. Iterates all elements calling each one's virtual destructor (via vtable[0]), then frees the vector's backing memory with aligned-delete handling.
0x0068B1F092CEnchantData__dtorDestructor for base CEnchantData class. Sets vtable, cleans up float format and buffer members.
0x0068B250105CEnchantDataDerived1__dtorDestructor for CEnchantDataDerived1. Sets derived vtable then falls through to base CEnchantData dtor. Object size 0x40.
0x0068B2C0105CEnchantDataDerived2__dtorDestructor for CEnchantDataDerived2. Sets derived vtable then falls through to base CEnchantData dtor. Object size 0x38.
0x0068B330105CEnchantDataDerived3__dtorDestructor for CEnchantDataDerived3. Sets derived vtable then falls through to base CEnchantData dtor. Object size 0x3c.
0x0068B3A071CEnchantRBTreeNode__dtorDestructor for enchant RB-tree node container (0x14 size). Sets vtable and delegates to CEnchantRBTree__dtor.
0x0068B3F0157CEnchantRBTreeContainer__dtorDestructor for enchant RB-tree container with 0x18-sized nodes. Iterates and frees all tree nodes recursively, then calls CEnchantRBTree__dtor for the inner tree.
0x0068B490142CEnchantRBTree__dtorDestructor for base enchant RB-tree. Sets vtable, iterates and frees all 0x14-sized tree nodes, then frees the sentinel node.
0x0068B520266CEnchantBonusSet__dtorDestructor for CEnchantBonusSet. Destroys linked list entries via virtual destructors, frees tooltip vector, then calls base CEnchantData dtor. Object size 0x58.
0x0068B630103CEnchantHashMap__clearClears the enchant hashmap. If element count is small enough relative to bucket count, erases via range erase; otherwise destroys all nodes and resets buckets to empty.
0x0068B6C0116CEnchantData__scalar_deleting_dtorScalar deleting destructor for base CEnchantData. Calls dtor then optionally frees 0x38 bytes if bit 0 of param is set.
0x0068B740129CEnchantDataDerived1__scalar_deleting_dtorScalar deleting destructor for CEnchantDataDerived1. Calls dtor then optionally frees 0x40 bytes.
0x0068B7D0129CEnchantDataDerived2__scalar_deleting_dtorScalar deleting destructor for CEnchantDataDerived2. Calls dtor then optionally frees 0x38 bytes.
0x0068B860129CEnchantDataDerived3__scalar_deleting_dtorScalar deleting destructor for CEnchantDataDerived3. Calls dtor then optionally frees 0x3c bytes.
0x0068B8F096CEnchantRBTreeNode__scalar_deleting_dtorScalar deleting destructor for enchant RB-tree node. Calls CEnchantRBTree__dtor then optionally frees 0x14 bytes.
0x0068B95035CEnchantRBTreeContainer__scalar_deleting_dtorScalar deleting destructor for enchant RB-tree container. Calls CEnchantRBTreeContainer__dtor then optionally frees 0x18 bytes.
0x0068B98035CEnchantRBTree__scalar_deleting_dtorScalar deleting destructor for enchant RB-tree. Calls CEnchantRBTree__dtor then optionally frees 0x10 bytes.
0x0068B9B0287CEnchantBonusSet__scalar_deleting_dtorScalar deleting destructor for CEnchantBonusSet. Calls full bonus set dtor (linked list + tooltip + base) then optionally frees 0x58 bytes.
0x0068BAD0727CEnchantMgr__lookup_and_apply_bonusLooks up an enchant bonus by JSON key string (DJB2 hash). Compares bonus name, checks min/max range params, and formats the result into an enchant data structure via CFmt helpers. Handles single-value and range-value bonuses differently.
0x0068BDB0228CEnchantMgr__check_item_enchant_stateChecks if an item has enchant data by looking up its index in the RB-tree. Updates bool flag at offset 0x38 indicating whether enchant data exists. Returns whether the state changed.
0x0068BEA0353CEnchantMgr__call_lua_OnStartEquipCalls the Lua OnStartEquip callback for the enchant system. Gets the function from Lua globals, calls it with pcall, and dispatches any error message to the chat window.
0x0068C0104CEnchantWnd__get_observer_vectorReturns pointer to the observer vector at this+0x44. Used by the enchant window to access registered observers.
0x0068C02088CEnchantHashMap__find_value_by_keyLooks up a value in the enchant hashmap by key. Walks the bucket chain matching by key. Returns the value if found, 0xFFFFFFFF if hashmap is null, or 0 if key not found.
0x0068C09070CEnchantWnd__get_state_color_stringReturns a color/format string pair based on the enchant state at offset 0x38. State 0 and 1 return color strings of length 3; other states return an empty string.
0x0068C0E04CEnchantWnd__get_enchant_stateReturns the enchant state byte from offset 0x38 of the enchant window object.
0x0068C0F04CEnchantWnd__get_enchant_id_ptrReturns pointer to the enchant ID field at this+4.
0x0068C1404CEnchantWnd__get_hashmap_ptrReturns pointer to the hashmap sub-object at this+0xc.
0x0068C15027CEnchantMgr__get_enchant_type_by_indexLooks up an enchant type ID by 1-based index (1 through 20) in a static lookup table at DAT_0110f64c. Returns 0 if index is out of range.
0x0068C170308CEnchantWnd__init_from_lua_enchant_tableInitializes enchant window from Lua enchant data table. Ensures CDataTable singleton, gets Lua table by enchant ID, calls OnStartEquip, and checks OnStartPretendEquip flag to set UI state.
0x0068C2B0353CEnchantWnd__init_from_lua_combiitemInitializes enchant window from Lua Combiitem table. Similar to enchant table init but uses the Combiitem Lua global. Also calls OnStartPretendEquip check and optionally dispatches state info to chat.
0x0068C420312CEnchantWnd__init_from_lua_and_show_stateInitializes enchant window from Lua enchant table and shows the current state. Calls OnStartEquip Lua callback and dispatches the state color string to the chat window if param_2 is true.
0x0068C5602209CEnchantWnd__compute_and_apply_bonusesMain enchant bonus computation. Loads enchant Lua table, iterates AddExtParam entries, computes item bonuses (ATK, MATK, etc.) based on equip type (weapon=1, armor=2/3). Handles 3-level bonus lookups for physical/magical damage. Sets pretend equip flag. Notifies all observers and dispatches result to chat.
0x0068CE108CEnchantWnd__reset_format_stateWrapper that resets the format state by calling CFmt__flt_00698ce0. Called between enchant operations to clear formatting context.
0x0068CE5067CEnchantWnd__send_state_color_to_chatSends the enchant state color string to the chat window. Maps state 0/1 to color codes, then dispatches via CEnchantWnd__dispatch_bonus_lines_to_chat with type=1 (status line).
0x0068CEA076CEnchantWnd__reset_and_notify_observersResets enchant state to default. If state was 1, dispatches empty string to chat. Iterates observer vector at offset 0x44 and calls each observer's reset callback.
0x0068CEF022CEnchantWnd__check_pretend_equip_flagChecks if pretend equip flag (offset 0x34 byte) is set to 1. If so, triggers a virtual callback at vtable+4 with param 0 (preview equip) and returns the updated flag value.
0x0068CF10800CEnchantWnd__dispatch_bonus_lines_to_chatFormats and dispatches enchant bonus description lines to the chat window. Iterates the bonus RB-tree, calls each entry's format method, splits output by newlines, strips color codes, and sends each line via CUIWindowMgr__dispatch_chat_message with the specified color.
0x0068D24013CEnchantWnd__set_flags_orORs the given byte flag into the flags field at offset 0x34 of the enchant window.
0x0068D25019CEnchantWnd__set_enchant_stateSets the enchant state byte at offset 0x38. Returns true if the state actually changed (old != new).
0x0068D27013CEnchantWnd__set_hashmapSets the hashmap pointer at offset 8 of the enchant window object.
0x0068D280235CEnchantWnd__vector_resize_and_fillResizes a vector of 4-byte elements to the given count and fills all entries with the specified value. If the new count is larger, allocates new aligned memory, frees old, and fills. If same or smaller, just fills in place.
0x0068D37037CEnchantWnd__destroy_observers_rangeCEnchantWnd: destroy observers range
0x0068D3A0512CEnchantHashMap__rehashRehashes the enchant string hashmap to the given bucket count. Computes next power-of-2 bucket size, resizes the bucket array, then re-inserts all nodes using FNV-1a hash. Handles collisions by relinking nodes within same-key chains.
0x0068D5D0196CEnchantWnd__copy_construct_entries_rangeCopy-constructs a range of enchant entries from [param_1, param_2) into destination starting at param_3. Each entry is 0x40 bytes with vtable, IDs, enchant data copy, and flags. Returns pointer past last constructed entry.
0x0068D6A0194CEnchantWnd__copy_construct_entries_range_voidCopy-constructs a range of enchant entries from [param_1, param_2) into destination at param_3. Same as copy_construct_entries_range but void return. Each entry is 0x40 bytes.
0x0068D770549CEnchantHashMap__erase_rangeErases a range of nodes [param_2, param_3) from the enchant hashmap. For each node, destroys string keys, frees the 0x38-byte node, updates bucket pointers, and decrements the element count. Uses FNV-1a hash to locate bucket heads.
0x0068D9A010CEnchantWnd__throw_vector_too_longThrows std::length_error with message "vector too long". Called when enchant vector exceeds maximum capacity.
0x0068D9B058CEnchantWnd__free_aligned_entry_blockFrees an aligned memory block of 0x40-byte enchant entries. Handles aligned allocation bookkeeping (checks header pointer for large allocations).
0x0068D9F0114CEnchantMgr__ensure_datatable_singletonEnsures the CDataTable singleton (DAT_0138d260) is initialized. If null, allocates 0x1fc bytes and calls CDataTable__construct_full. Used by all enchant functions that need data table access.
0x0068DA70124CEnchantRBTree__ctorConstructs an enchant RB-tree. Copies comparator from param_3, allocates 0x18-byte sentinel node with self-referencing pointers and initializes color/nil flags.
0x0068DB00238CEnchantRBTree__deep_copy_recursiveRecursively deep-copies an enchant RB-tree. For each non-nil node, allocates a new 0x18-byte node, copies key/value fields, copies color flag, then recursively copies left and right subtrees.