ChatOnCreateRoom

From SWGANH Wiki
Revision as of 21:48, 6 April 2008 by Snow (Talk | contribs) (Variable Descriptions)

Jump to: navigation, search

Server Packet - ChatOnCreateRoom (35D7CC9F)

SWGANH Wiki is a repository of Star Wars Galaxies Developer information. This site is only meant to be used by SWGANH Developer team.

Struct


SHORT Op Count
INT Opcode
INT ErrorCode
INT ChatRoom ID
INT Private Flag
BYTE Moderated Flag
A_STRING Room Full Address
A_STRING Game
A_STRING Galaxy
A_STRING Creator
A_STRING Game
A_STRING Galaxy
A_STRING Owner
U_STRING Room Name
INT Moderator List Size
A_STRING Game
A_STRING Galaxy
A_STRING Moderator Name
INT User List Size
A_STRING Game
A_STRING Galaxy
A_STRING User Name
INT Request ID

Variable Descriptions


Op Count = 4

Opcode = 0x35D7CC9F


  • ErrorCode:

A integer containing a code for the error that occured. Used to determine what error message to display. 0: [RoomName] You have created the channel. 6: Cannot create the channel named '[RoomPathName]'becase the name is invalid. 18: NO MESSAGE Default: Channel '[RoomPathName]' creation failed for an unknown reason.

RoomID: The unique ID number assigned to identify this Room. Generated on room creation.

PrivateFlag: An INTEGER flag used to mark the room as private or public. Private rooms require invitation from owner or moderators to enter. 00000001 = Private 00000000 = Public

ModeratedFlag: A BYTE flag used to mark the room as being moderated. 01 = Moderated 00 = Open Note: Moderated Rooms means that no one BUT moderators can talk. Its more like a "Muted" Room. You can still have moderators in an OPEN room. So avoid this confusion.

RoomPathName: The full ChatServer path and name for the room including the RoomName specified on creation. Example: "SWG.TestCenter.Chat.tcpa"

Game: The name of the game ("SWG") this player is on. Part of ChatAvatarId: 3 ASTRINGs representing the player on the ChatServer. "Game.Server.name"

name is the lowercase of the first name for the player.

Server: The name of the server (Galaxy) this player is on. Part of ChatAvatarId object.

Owner: The firstname of the player who current owns the chatroom. Must be only firstname and lowercase. Part of ChatAvatarId object.

Creator: The firstname of the player who originally created the chatroom. Must be only firstname and lowercase. Part of ChatAvatarId object.

RoomTitle: The unicode string containing the Title of the chatroom to display. Note: This is the more descriptive text displayed and not the name used in the RoomPathName of the ChatServer.

ModeratorList: A list containing ChatAvatarId's of the moderators for this room. Note: This list does NOT get used to display the information. So it is better to send a blank (NULL/0) list and use the QueryRoom construct, since it actually gets displayed. This will save TONS of bandwidth.

UserList: A list containing ChatAvatarId's of the users current in the room. Note: This list does NOT get used to display the information. So it is better to send a blank (NULL/0) list and use the QueryRoom construct, since it actually gets displayed. This will save TONS of bandwidth.

RequestID: For every request made, the client attaches an ID number to identify it. It is unique for each request type (opcode) and incremented for each request. Similar to Update Counters used in Objects. For every response that had a request with a RequestID, the same RequestID must be sent back. It is used to identify key information regarding the response, such as what the full RoomPathName was and it is used in error message generation. Also can be used to eliminate duplicate requests.


Tags


S→C This packet originates on the server.

100% This packet has been completely reversed.


Sample Packet

 04 00
 9F CC D7 35                     // ChatOnCreateRoom
 00 00 00 00                     // unknown
 A8 14 81 02                     // Chatroom ID 
 01 00 00 00                     // might be part of the chatroom id
 01                              // unknown
 1D 00                           // String count(29)
 53 57 47 2E 4B 61 75 72 69 
 2E 64 61 6E 74 6F 6F 69 6E 65 
 2E 43 68 61 74 2E 74 65 73 74   // 'SWG.Kauri.dantooine.Chat.test'

 03 00                           // String count(3)
 53 57 47                        // 'SWG' 
 05 00                           // String count(5)
 4B 61 75 72 69                  // 'Kauri'
 08 00                           // String count(8)
 73 69 77 72 6F 74 69 61         // 'siwrotia' Creator

 03 00                           // String count(3)
 53 57 47                        // 'SWG'
 05 00                           // String count(5)
 4B 61 75 72 69                  // 'Kauri' 
 08 00                           // String count(8)
 73 69 77 72 6F 74 69 61         // 'siwrotia' Creator
 04 00 00 00                     // String count(4)
 74 00 65 00 73 00 74 00         // 'test' Room name

 01 00 00 00                     // Number of Moderators
 03 00                           // String count(3)
 53 57 47                        // 'SWG' Game tye
 05 00                           // String count(5)
 4B 61 75 72 69                  // 'Kauri' Server name
 08 00                           // String count(8)
 73 69 77 72 6F 74 69 61         // 'siwrotia' Mod names

 01 00 00 00                     // Number of users in Chat
 03 00                           // String count(3)
 53 57 47                        // 'SWG'
 05 00                           // String count(5)
 4B 61 75 72 69                  // 'Kauri'
 08 00                           // String count(8)
 73 69 77 72 6F 74 69 61         // 'siwrotia'
 01 00 00 00                     // uknown