601 B
601 B
Chat System
Chat system gốc của Perfect World gồm các bước:
Network Protocol ↓ GameSession ↓ GameUIMan ↓ CECPateText ↓ Render
Components
ChatMessage
network protocol chứa:
channel roleid msg emotion
GameSession::OnPrtcChatMessage
nhận packet từ network.
GameUIMan::AddChatMessage
thêm message vào UI.
CECPateText
parse text thành các item:
TEXT EMOTION ITEM LINK
Emotion System
Emotion được encode trong text:
format:
emotionSet:index
Example:
1:5
Rendering
CECPateText chia text thành item list.
Item gồm:
type index color position