Back to legacygamers.net
WARPGATE

CharMode

CCharMode char select, slot management, packets

Functions 57Code 30 KBAddresses 0x00C9C360 to 0x00D224C0
57 functions
AddressSizeNameDescription
0x00C9C360883CCharMode__ConnectToMapServerInitializes game state and sends CZ_ENTER2 (0x0436) packet to map server with account ID and auth credentials.
0x00CAD5303257CCharMode__OnDisconnect_ShowReasonHandles character server disconnect by reading reason code, disconnecting, and displaying localized error message via dialog.
0x00CAE2B0232CCharMode__SetHotkeySlotValueSets hotkey slot value in red-black tree; allocates new node if slot key doesn't exist, stores value at offset +0x14
0x00CAE3D0318CCharMode__StoreCharDataCopies character data to global slot buffers (0 or 1) and dispatches UI update event 0x8f via vtable callback.
0x00CAE510580CCharMode__UpdateHotkeyIconsUpdates hotkey bar icon states by iterating red-black tree, skipping IDs 0x377-0x379, calling HandleEntitySpawn with bitmask-filtered enabled states.
0x00CAE800906CCharMode__InsertOrUpdateCharInfoInserts or updates character info in red-black tree map by char ID; allocates 0x218-byte node and copies stats/equipment/guild data from source struct.
0x00CAEB90506CCharMode__OnRankingListDisplays ranking leaderboard with 10 entries from packet, formats as ranked list with separator lines, shows player's own score.
0x00CAEDC0263CCharMode__OnMakeCharResultHandles character creation response packet, stores character/account data on success (code 0) or displays error dialog for failure codes (2/3/4/default).
0x00CAEED0234CCharMode__OnMakeChar2ResultHandles character creation result for alternate classes; stores char data on success or displays error dialog based on result code.
0x00CAEFE0227CCharMode__OnDeleteCharResultProcesses character deletion server response: success stores IDs and opens window 0x113, error code 2 shows msg 0xbd7, else shows msg 0x996.
0x00CAF0E0561CItemOwner__ProcessItemListUpdateProcesses and validates items from inventory list, filtering by equipment type and adding valid items to shop/display structure.
0x00CAF320930CCharMode__OnCharSelectResponseProcesses character selection response packet, sets character option flags from packet bits 0-10, stores char ID, validates map restrictions.
0x00CAF730280CCharMode__OnGuildMemberLocationsParses guild member location packet (0x14C), stores coordinates in vector, updates minimap markers via guild ID.
0x00CAF890234CCharMode__OnCharSelectSubActionHandles character select screen sub-actions: sends account info packet 0x9ab, toggles shop/vending windows 0x10/0x119, or opens UI windows 0x11c/0x11e/0x158.
0x00CAF9B0334CCharMode__OnExpGainDisplayDisplays experience gain notifications with type-specific formatting and colors via UI message dialog.
0x00CAFB10348CCharMode__OnGuildNoticePacketProcesses ZC_GUILD_NOTICE packet; validates length, formats guild notice text, assigns to string for display.
0x00CAFD003606CCharMode__OnChatMessageProcesses incoming chat messages, handles friend detection, whisper routing, and updates chat logs with optional window management.
0x00CB0E00509CCharMode__OnServerCharListProcesses character server list packet, populates linked-list entries indexed by server type with ID and population data.
0x00CB1000494CCharMode__OnMapChangeProcesses map change packet: updates motion recorder state, sets map coordinates, loads RSW file, and logs connection info to PingLog.txt.
0x00CB19F0499CCharMode__OnCharRenameResultProcesses character rename result packet (0x82?), displays appropriate UI dialogs/messages based on result code (0-5), opens rename window on code 3.
0x00CB1D50812CCharMode__OnPartyMemberListProcesses party member list packet (type 0=offline, 1=online), parses member data, sorts online/offline lists, displays error messages via msgstringtable.
0x00CB2700567CCharMode__OnBuyingStoreListProcesses buying store list packet, populates item entries, updates UI windows (0xb1, 0xb2, 0xb3), sets active store flag
0x00CB3F102431CCharMode__OnNotifyErrorHandles incoming error/notification packets (type 0x00-0x73), maps error codes to message string IDs, displays UI dialogs with localized error messages.
0x00CB4C20463CCharMode__OnNpcSpawn_SimpleParses simple NPC spawn packet, extracts GID/class/coords/direction/speed/body state, initializes entity struct, adds to object manager.
0x00CB4DF0511CCharMode__OnNpcSpawn_MovingProcesses NPC spawn packet with movement; handles entity creation/removal and initiates pathfinding to destination.
0x00CB5800545CCharMode__OnNpcSpawn_WithEquipProcesses NPC spawn packet with equipment data, extracts 5 accessory slots and state byte, initializes item table.
0x00CB5B30528CCharMode__OnNpcSpawn_WithEquip_v2Parses NPC/player spawn packet with equipment data (v2 layout), extracts position/appearance/items, initializes entity creation.
0x00CB6280748CCharMode__OnMailboxOpenProcesses mailbox open packet; initializes mail list UI with headers, timestamps, item names, and sends notification event.
0x00CB6570746CCharMode__OnMailboxOpen_v2Processes mailbox packet (v2 layout), parses mail entries with timestamps, validates item IDs, updates quest list on success.
0x00CB68A0481CCharMode__OnScriptMessageProcesses incoming NPC script message packet, validates size, filters text, checks chat filter config 0x94, displays message with color 0xff9dff.
0x00CC11501167CCharMode__OnCharListFullParses character list packet (0x29-byte entries), initializes equipment, extracts stats/position, handles guild data
0x00D1F080603CCharMode__HandleCharServerErrorHandles character server error responses (codes 0-10), displays localized error messages via UI modal dialogs, and triggers character mode callbacks.
0x00D1F4E0121CCharMode__SendKeepAlivePacketSends packet 0x187 keep-alive every 12s when CCharMode is in states 7/8/0xB/0x13, includes g_accountId.
0x00D1F560390CCharMode__ResetCharDataClears CCharMode character data: deletes tree structure, zeroes status fields, and deallocates nested string vectors.
0x00D1F710416CCharMode__SetupMapConnectionInitializes map server connection with region-specific IP/port overrides for Thai (serviceType 1/5) and Indonesian (serviceType 6) servers based on hotkey state.
0x00D1FCE0103CCharMode__GetMaxCharSlotIndexScans character slots to find the maximum slot index value, returning 0xFFFFFFFF if no characters exist or max index found.
0x00D1FDC0422CCharMode__RemoveCharSlotRemoves a character slot from the character selection list by compacting the character array and decrementing the slot counter.
0x00D1FF70169CCharMode__ProcessAccountInfoProcesses character server account info packet: extracts slot counts, clears character data array (0x2E7C bytes at +0x4068), stores server IP/port with byte-order conversion.
0x00D20020119CCharMode__HandleAccountInfoParses account info packet (0x82), extracts character slots and connection data, forwards to ProcessAccountInfo handler.
0x00D20280230CCharMode__AddCharSlotAdds a character slot to the character selection list, copying 175-byte character data and updating slot counter and UI state.
0x00D2057061CCharMode__HandleCharRenameResultDisplays success message (0x7e1) in modal dialog when character rename succeeds (packet param+4 == 1).
0x00D205B061CCharMode__HandleCharRenameResult2Handles character rename success result by displaying modal dialog with message 0x7E1 when rename packet succeeds.
0x00D20A70177CCharMode__HandleCharCreateResultProcesses character creation result packet (0x76F success/0x770 failure), displays modal dialog with appropriate message, plays sound 199, sets state 7 on failure.
0x00D20B3083CCharMode__HandleBanInfoListParses ban info list from packet into global buffer, storing up to N 0x18-byte ban records.
0x00D20B90282CCharMode__HandleCharListPacketParses character list packet, extracts server IP/port, deserializes character data (175 bytes each), validates bounds, sets mode to 0x13.
0x00D20D8067CCharMode__SendKeepAliveSends 0x9A1 keep-alive packets N times (N = param_1+2 count) via CConnection to maintain session.
0x00D21490174CCharMode__HandleCharDeleteCancelResultHandles character deletion cancellation response: displays success (msg 0x762) or failure (msg 0x766) dialog, sets state 7 on failure.
0x00D21540264CCharMode__HandleCharDeleteResultProcesses character deletion result packet (cases 0-3), displays modal dialog with appropriate message, plays sound 199, sets state 7 on errors.
0x00D21660311CCharMode__HandleCharDeleteResult2Processes character deletion server response (packet 0x82), displays success/error dialogs, sets state to 7 on failure
0x00D217B0200CCharMode__HandleCharMoveResultProcesses character slot move server response (0x76D/0x76E messages); opens dialog and handles success/failure states.
0x00D21880442CCharMode__HandleMapStateListProcesses map state list packet (0x14-byte entries), collects entries with first field==0 into vector, sets state 0x1E on success or shows error 0x713 and state 7.
0x00D21A40186CCharMode__SetSelectedCharNameCopies character name from selected character data into output string via STL string assignment.
0x00D21B40121CCharMode__HandlePincodeStateResultDisplays pincode state result dialog (create/enter/change) based on packet byte, sets character mode state to 7.
0x00D21BC0223CCharMode__HandleDisconnectReasonDisconnects from char server and displays modal dialog with localized error message based on disconnect reason code (ban/full/expired/trade ban).
0x00D21D30133CCharMode__HandleCharSelectErrorDisplays character selection error dialog by mapping packet error code to localized message string, then sets mode state to 7.
0x00D21DF0252CCharMode__HandlePincodeErrorDisplays pincode error dialog (6 error codes mapped to messages 0x546-0x554), then sets client state based on connection status.
0x00D224C0114CCharMode__UpdateCharSlotDataUpdates character slot data in UI window manager by copying character info and formatting display name, sets mode state to 7.