Difference between revisions of "ChatRoomList"

From SWGANH Wiki
Jump to: navigation, search
(Variable Descriptions)
(Variable Descriptions)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{PageHeader|Server Packet|CharRoomList (70DEB197)}}
 
+
 
{| border="0" width="90%" cellpadding=6
 
{| border="0" width="90%" cellpadding=6
 
|-
 
|-
Line 6: Line 5:
 
===Struct===
 
===Struct===
 
----
 
----
 
+
<pre>
{| class="wikitable"
+
SHORT: OperandCount
|-
+
INT: Opcode
|{{short}}|'''Operand_Count'''
+
INT: RoomListSize
|-
+
{
|{{int}}|'''Opcode'''
+
  INT: RoomID
|-
+
  INT: PrivateFlag
|{{int}}|'''Numberof_Chatrooms'''
+
  BYTE: ModeratedFlag
|-
+
  ASTRING: RoomPathName
|{{int}}|'''ChatRoom_ID'''
+
  ASTRING: Game
|-
+
  ASTRING: Server
|{{int}}|'''NumberOf_RoomNames'''
+
  ASTRING: Owner
|-
+
  ASTRING: Game
|{{byte}}|'''ChannelType?'''
+
  ASTRING: Server
|-
+
  ASTRING: Creator
|{{a_string}}|'''RoomName'''
+
  USTRING: RoomTitle
|-
+
  INT: ModeratorListSize
|{{a_string}}|'''Game'''
+
  {
|-
+
    ASTRING: Game
|{{a_string}}|'''Server'''
+
    ASTRING: Server
|-
+
    ASTRING: ModeratorName
|{{a_string}}|'''ChannelCreator'''
+
  }
|-
+
  INT: UserListSize
|{{a_string}}|'''Game'''
+
  {
|-
+
    ASTRING: Game
|{{a_string}}|'''Server'''
+
    ASTRING: Server
|-
+
    ASTRING: UserName
|{{a_string}}|'''ChannelCreator'''
+
  }
|-
+
}
|{{u_string}}|'''RoomTitle'''
+
</pre>
|-
+
|{{int}}|'''ModeratorCount'''
+
|-
+
|}
+
 
+
{| class="wikitable"
+
|-
+
|{{a_string}}|'''Game'''
+
|-
+
|{{a_string}}|'''Server'''
+
|-
+
|{{a_string}}|'''ModeratorName'''
+
|-
+
|}
+
 
+
{| class="wikitable"
+
|-
+
|{{int}}|'''UserCount'''
+
|-
+
|}
+
 
+
{| class="wikitable"
+
|-
+
|{{a_string}}|'''Game'''
+
|-
+
|{{a_string}}|'''Server'''
+
|-
+
|{{a_string}}|'''UserName'''
+
|-
+
|}
+
  
 
===Variable Descriptions===
 
===Variable Descriptions===
Line 75: Line 44:
 
----
 
----
  
* '''NumberOf_ChatRooms'''
+
* '''RoomListSize''':
:Add 1 to the count, for each chatroom listed in the packet
+
:A list of ChatRoom Objects, this is the count of rooms to display.
  
* '''chatroom_id'''
+
* '''RoomID''':
:Add each chatroom id, for the Number of Chatrooms
+
:The unique ID number assigned to identify this Room. Generated on room creation.
  
* '''NumberOf_RoomNames'''
+
* '''PrivateFlag''':
:Add 1 to the count,for each Roomname Listed in the packet
+
: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
  
* '''ChannelType'''
+
* '''ModeratedFlag''':
: (ByteFlag) Needs Looking into, thinking its for Moderated,private or Public
+
: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.
  
* '''RoomName'''
+
* '''RoomPathName''':
:Name of the room, Repeat For each room in above size
+
:The full ChatServer path and name for the room including the RoomName specified on creation.
 +
:Example: "SWG.TestCenter.Chat.tcpa"
  
* '''Game'''
+
* '''Game''':
:Add Size and NAme for each Name u add onto the First, Example SWG Add tony to the bottom will make SWG.tony
+
: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'''
+
* '''Server''':
:Server Name
+
:The name of the server (Galaxy) this player is on. Part of ChatAvatarId object.
  
* '''ChannelCreator '''
+
* '''Owner''':
:Same Rule Applys to Above
+
:The firstname of the player who current owns the chatroom. Must be only firstname and lowercase. Part of ChatAvatarId object.
  
* '''Roomtitle'''
+
* '''Creator''':
:Name of room title In Unicode
+
:The firstname of the player who originally created the chatroom. Must be only firstname and lowercase. Part of ChatAvatarId object.
  
* '''RoomModeratorNumber'''
+
* '''RoomTitle''':
:Add 1 to the list of moderators
+
: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.
  
* '''ChannelModerator'''
+
* '''ModeratorList''':
:Add Size and NAme for each Name u add onto the First, Example SWG Add tony to the bottom will make SWG.tony
+
: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.
  
* '''Users'''
+
* '''UserList''':
:Add size and name and +1 to the NumberOfUsers Int
+
: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.
 +
 
 +
* '''Additional Info''':
 +
:Use to initialize the list, and then to add to the list. (There is no need to repeat the data)
  
 
|valign=top|
 
|valign=top|
Line 119: Line 99:
 
||{{ServerPacket}}
 
||{{ServerPacket}}
 
|-
 
|-
||{{75%}}
+
||{{100%}}
 
|-
 
|-
 
|}
 
|}
 
 
|}
 
|}
  
----
 
  
==Sample Code==
 
----
 
 
<pre>
 
Insert Code Snippet Here...
 
</pre>
 
  
 
==Sample Packet==
 
==Sample Packet==
Line 138: Line 110:
 
<pre>
 
<pre>
 
02 00  
 
02 00  
97 B1 DE 70 // ChatRoomList
+
97 B1 DE 70 // ChatRoomList
01 00 00 00 // Numberof_Chatrooms
+
01 00 00 00 // Numberof_Chatrooms
5D 0A 72 02 // ChatRoom_ID
+
5D 0A 72 02 // ChatRoom_ID
01 00 00 00 // NumberOf_RoomNames
+
01 00 00 00 // NumberOf_RoomNames
00                             // byte flag
+
00         // byte flag
 
+
27 00                                 // string count
27 00  
+
53 57 47 2E 47 6F 72 61 74 68         // SWG.Gorath
53 57 47 2E 47 6F 72 61  
+
2E 67 72 6F 75 70 2E                  // .group.
74 68 2E 67 72 6F 75 70     // RoomName :  "SWG.Gorath.group.161418309221.GroupChat"
+
31 36 31 34 31 38 33 30 39 32 32 31 2E // 161418309221. 
2E 31 36 31 34 31 38 33    
+
47 72 6F 75 70 43 68 61 74             // GroupChat
30 39 32 32 31 2E 47 72  
+
03 00             // string count
6F 75 70 43 68 61 74  
+
53 57 47         // SWG
 
+
06 00           // string count
03 00  
+
47 6F 72 61 74 68 // Gorath
53 57 47                 // ChannelOwner :  "SWG"
+
06 00             // string count
 
+
73 79 73 74 65 6D // system
06 00
+
03 00             // string count
47 6F 72 61 74 68   // ChannelCreator : "Gorath"
+
53 57 47         // SWG
   
+
06 00             // string count
06 00  
+
47 6F 72 61 74 68 // Gorath  
73 79 73 74 65 6D               // RoomTitle : "system"
+
06 00             // string count
 
+
73 79 73 74 65 6D // system
03 00  
+
0C 00 00 00                                 // u-string count
53 57 47   // "SWG" ?
+
31 00 36 00 31 00 34 00 31 00 38 00 33 00 30 // 161418309221
 
+
06 00  
+
47 6F 72 61 74 68 // "Gorath" ?
+
 
+
06 00  
+
73 79 73 74 65 6D // "system" ?
+
 
+
0C 00 00 00  
+
31 00 36 00 31 00 34 00 31 00 38 00 33 00 30     // "161418309221"  ?
+
 
00 39 00 32 00 32 00 31 00  
 
00 39 00 32 00 32 00 31 00  
 
+
01 00 00 00 // moderator count
 
+
03 00             // string count
 
+
53 57 47         // SWG
 
+
06 00             // string count
01 00 00 00 // moderator count
+
47 6F 72 61 74 68 // Gorath  
 
+
06 00             // string count
 
+
73 79 73 74 65 6D // system
03 00
+
02 00 00 00   // user count
53 57 47 // "SWG"
+
03 00             // string count
 
+
53 57 47         // SWG
06 00  
+
06 00             // string count
47 6F 72 61 74 68 // "Gorath"
+
47 6F 72 61 74 68 // Gorath
 
+
08 00                   // string count
06 00  
+
70 61 74 72 69 7A 69 61 // patrizia
73 79 73 74 65 6D // "system"
+
03 00             // string count
 
+
53 57 47         // SWG
 
+
06 00             // string count
 
+
47 6F 72 61 74 68 // Gorath
 
+
06 00             // string count
02 00 00 00 // user count
+
73 79 73 74 65 6D // system
 
+
 
+
03 00
+
53 57 47 // "SWG"
+
 
+
06 00  
+
47 6F 72 61 74 68 // "Gorath"
+
 
+
08 00  
+
70 61 74 72 69 7A 69 61 // "patrizia"
+
 
+
 
+
 
+
03 00
+
53 57 47 // "SWG"
+
 
+
06 00  
+
47 6F 72 61 74 68 // "Gorath"
+
 
+
06 00  
+
73 79 73 74 65 6D // "system"
+
 
+
 
</pre>
 
</pre>
 
[[Category:Nogard]]
 
[[Category:Nogard]]

Latest revision as of 01:41, 11 May 2008

Server Packet - CharRoomList (70DEB197)

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:			OperandCount
INT:			Opcode
INT:			RoomListSize
{
  INT:			RoomID
  INT:			PrivateFlag
  BYTE:			ModeratedFlag
  ASTRING:		RoomPathName
  ASTRING:		Game
  ASTRING:		Server
  ASTRING:		Owner
  ASTRING:		Game
  ASTRING:		Server
  ASTRING:		Creator
  USTRING:		RoomTitle
  INT:			ModeratorListSize
  {
    ASTRING:		Game
    ASTRING:		Server
    ASTRING:		ModeratorName
  }
  INT:			UserListSize
  {
    ASTRING:		Game
    ASTRING:		Server
    ASTRING:		UserName
  }
}

Variable Descriptions


Opperand_Count = 2

Opcode = 70DEB197


  • RoomListSize:
A list of ChatRoom Objects, this is the count of rooms to display.
  • 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.
  • Additional Info:
Use to initialize the list, and then to add to the list. (There is no need to repeat the data)

Tags


S→C This packet originates on the server.

100% This packet has been completely reversed.


Sample Packet

02 00 
97 B1 DE 70 // ChatRoomList
01 00 00 00 // Numberof_Chatrooms
5D 0A 72 02 // ChatRoom_ID
01 00 00 00 // NumberOf_RoomNames
00          // byte flag
27 00                                  // string count
53 57 47 2E 47 6F 72 61 74 68          // SWG.Gorath
2E 67 72 6F 75 70 2E                   // .group.
31 36 31 34 31 38 33 30 39 32 32 31 2E // 161418309221.   	
47 72 6F 75 70 43 68 61 74             // GroupChat
03 00             // string count
53 57 47          // SWG
06 00	          // string count	
47 6F 72 61 74 68 // Gorath
06 00             // string count
73 79 73 74 65 6D // system
03 00             // string count
53 57 47          // SWG
06 00             // string count
47 6F 72 61 74 68 // Gorath 
06 00             // string count
73 79 73 74 65 6D // system
0C 00 00 00                                  // u-string count
31 00 36 00 31 00 34 00 31 00 38 00 33 00 30 // 161418309221
00 39 00 32 00 32 00 31 00 
01 00 00 00  // moderator count
03 00             // string count
53 57 47          // SWG
06 00             // string count
47 6F 72 61 74 68 // Gorath 
06 00             // string count
73 79 73 74 65 6D // system
02 00 00 00   // user count
03 00             // string count
53 57 47          // SWG
06 00             // string count
47 6F 72 61 74 68 // Gorath
08 00                   // string count
70 61 74 72 69 7A 69 61 // patrizia
03 00             // string count
53 57 47          // SWG
06 00             // string count
47 6F 72 61 74 68 // Gorath
06 00             // string count
73 79 73 74 65 6D // system