mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
verbose-repository debugging of non-DC server msgs
This commit is contained in:
parent
8b32c56bd6
commit
58800c72a0
@ -82,6 +82,9 @@ class ClientRepositoryBase(ConnectionRepository):
|
|||||||
else:
|
else:
|
||||||
return self.doId2do, self.cache
|
return self.doId2do, self.cache
|
||||||
|
|
||||||
|
def _getMsgName(self, msgId):
|
||||||
|
return makeList(MsgId2Names.get(msgId, 'UNKNOWN MESSAGE: %s' % msgId))[0]
|
||||||
|
|
||||||
def sendDisconnect(self):
|
def sendDisconnect(self):
|
||||||
if self.isConnected():
|
if self.isConnected():
|
||||||
# Tell the game server that we're going:
|
# Tell the game server that we're going:
|
||||||
|
@ -1,101 +1,96 @@
|
|||||||
"""MsgTypes module: contains distributed object message types"""
|
"""MsgTypes module: contains distributed object message types"""
|
||||||
|
|
||||||
|
from direct.showbase.PythonUtil import invertDictLossless
|
||||||
|
|
||||||
|
MsgName2Id = {
|
||||||
# 2 new params: passwd, char bool 0/1 1 = new account
|
# 2 new params: passwd, char bool 0/1 1 = new account
|
||||||
# 2 new return values: 129 = not found, 12 = bad passwd,
|
# 2 new return values: 129 = not found, 12 = bad passwd,
|
||||||
CLIENT_LOGIN = 1
|
'CLIENT_LOGIN': 1,
|
||||||
CLIENT_LOGIN_RESP = 2
|
'CLIENT_LOGIN_RESP': 2,
|
||||||
CLIENT_GET_AVATARS = 3
|
'CLIENT_GET_AVATARS': 3,
|
||||||
# Sent by the server when it is dropping the connection deliberately.
|
# Sent by the server when it is dropping the connection deliberately.
|
||||||
CLIENT_GO_GET_LOST = 4
|
'CLIENT_GO_GET_LOST': 4,
|
||||||
CLIENT_GET_AVATARS_RESP = 5
|
'CLIENT_GET_AVATARS_RESP': 5,
|
||||||
CLIENT_CREATE_AVATAR = 6
|
'CLIENT_CREATE_AVATAR': 6,
|
||||||
CLIENT_CREATE_AVATAR_RESP = 7
|
'CLIENT_CREATE_AVATAR_RESP': 7,
|
||||||
#Roger wants to remove this CLIENT_GET_SHARD_LIST = 8
|
'CLIENT_GET_FRIEND_LIST': 10,
|
||||||
#Roger wants to remove this CLIENT_GET_SHARD_LIST_RESP = 9
|
'CLIENT_GET_FRIEND_LIST_RESP': 11,
|
||||||
CLIENT_GET_FRIEND_LIST = 10
|
'CLIENT_GET_AVATAR_DETAILS': 14,
|
||||||
CLIENT_GET_FRIEND_LIST_RESP = 11
|
'CLIENT_GET_AVATAR_DETAILS_RESP': 15,
|
||||||
#Roger wants to remove this CLIENT_GET_FRIEND_DETAILS = 12
|
'CLIENT_LOGIN_2': 16,
|
||||||
#Roger wants to remove this CLIENT_GET_FRIEND_DETAILS_RESP = 13
|
'CLIENT_LOGIN_2_RESP': 17,
|
||||||
CLIENT_GET_AVATAR_DETAILS = 14
|
|
||||||
CLIENT_GET_AVATAR_DETAILS_RESP = 15
|
|
||||||
CLIENT_LOGIN_2 = 16
|
|
||||||
CLIENT_LOGIN_2_RESP = 17
|
|
||||||
|
|
||||||
CLIENT_OBJECT_UPDATE_FIELD = 24
|
'CLIENT_OBJECT_UPDATE_FIELD': 24,
|
||||||
CLIENT_OBJECT_UPDATE_FIELD_RESP = 24
|
'CLIENT_OBJECT_UPDATE_FIELD_RESP': 24,
|
||||||
CLIENT_OBJECT_DISABLE = 25
|
'CLIENT_OBJECT_DISABLE': 25,
|
||||||
CLIENT_OBJECT_DISABLE_RESP = 25
|
'CLIENT_OBJECT_DISABLE_RESP': 25,
|
||||||
CLIENT_OBJECT_DISABLE_OWNER = 26
|
'CLIENT_OBJECT_DISABLE_OWNER': 26,
|
||||||
CLIENT_OBJECT_DISABLE_OWNER_RESP = 26
|
'CLIENT_OBJECT_DISABLE_OWNER_RESP': 26,
|
||||||
CLIENT_OBJECT_DELETE = 27
|
'CLIENT_OBJECT_DELETE': 27,
|
||||||
CLIENT_OBJECT_DELETE_RESP = 27
|
'CLIENT_OBJECT_DELETE_RESP': 27,
|
||||||
CLIENT_SET_ZONE_CMU = 29
|
'CLIENT_SET_ZONE_CMU': 29,
|
||||||
CLIENT_REMOVE_ZONE = 30
|
'CLIENT_REMOVE_ZONE': 30,
|
||||||
CLIENT_SET_AVATAR = 32
|
'CLIENT_SET_AVATAR': 32,
|
||||||
CLIENT_CREATE_OBJECT_REQUIRED = 34
|
'CLIENT_CREATE_OBJECT_REQUIRED': 34,
|
||||||
CLIENT_CREATE_OBJECT_REQUIRED_RESP = 34
|
'CLIENT_CREATE_OBJECT_REQUIRED_RESP': 34,
|
||||||
CLIENT_CREATE_OBJECT_REQUIRED_OTHER = 35
|
'CLIENT_CREATE_OBJECT_REQUIRED_OTHER': 35,
|
||||||
CLIENT_CREATE_OBJECT_REQUIRED_OTHER_RESP = 35
|
'CLIENT_CREATE_OBJECT_REQUIRED_OTHER_RESP': 35,
|
||||||
CLIENT_CREATE_OBJECT_REQUIRED_OTHER_OWNER = 36
|
'CLIENT_CREATE_OBJECT_REQUIRED_OTHER_OWNER': 36,
|
||||||
CLIENT_CREATE_OBJECT_REQUIRED_OTHER_OWNER_RESP = 36
|
'CLIENT_CREATE_OBJECT_REQUIRED_OTHER_OWNER_RESP':36,
|
||||||
|
|
||||||
CLIENT_REQUEST_GENERATES = 36
|
'CLIENT_REQUEST_GENERATES': 36,
|
||||||
|
|
||||||
CLIENT_DISCONNECT = 37
|
'CLIENT_DISCONNECT': 37,
|
||||||
|
|
||||||
#Roger wants to remove this CLIENT_CHANGE_IP_ADDRESS_RESP = 45
|
'CLIENT_GET_STATE_RESP': 47,
|
||||||
#Roger wants to remove this CLIENT_GET_STATE = 46
|
'CLIENT_DONE_INTEREST_RESP': 48,
|
||||||
CLIENT_GET_STATE_RESP = 47
|
|
||||||
CLIENT_DONE_INTEREST_RESP = 48
|
|
||||||
|
|
||||||
CLIENT_DELETE_AVATAR = 49
|
'CLIENT_DELETE_AVATAR': 49,
|
||||||
|
|
||||||
# I think this is 5 to look like a CLIENT_GET_AVATARS_RESP
|
'CLIENT_DELETE_AVATAR_RESP': 5,
|
||||||
# which is really what the server sends us when we delete an avatar
|
|
||||||
CLIENT_DELETE_AVATAR_RESP = 5
|
|
||||||
|
|
||||||
CLIENT_HEARTBEAT = 52
|
'CLIENT_HEARTBEAT': 52,
|
||||||
CLIENT_FRIEND_ONLINE = 53
|
'CLIENT_FRIEND_ONLINE': 53,
|
||||||
CLIENT_FRIEND_OFFLINE = 54
|
'CLIENT_FRIEND_OFFLINE': 54,
|
||||||
CLIENT_REMOVE_FRIEND = 56
|
'CLIENT_REMOVE_FRIEND': 56,
|
||||||
|
|
||||||
#Roger wants to remove this CLIENT_SERVER_UP = 57
|
'CLIENT_CHANGE_PASSWORD': 65,
|
||||||
#Roger wants to remove this CLIENT_SERVER_DOWN = 58
|
|
||||||
|
|
||||||
CLIENT_CHANGE_PASSWORD = 65
|
'CLIENT_SET_NAME_PATTERN': 67,
|
||||||
|
'CLIENT_SET_NAME_PATTERN_ANSWER': 68,
|
||||||
|
|
||||||
CLIENT_SET_NAME_PATTERN = 67
|
'CLIENT_SET_WISHNAME': 70,
|
||||||
CLIENT_SET_NAME_PATTERN_ANSWER = 68
|
'CLIENT_SET_WISHNAME_RESP': 71,
|
||||||
|
'CLIENT_SET_WISHNAME_CLEAR': 72,
|
||||||
|
'CLIENT_SET_SECURITY': 73,
|
||||||
|
|
||||||
CLIENT_SET_WISHNAME = 70
|
'CLIENT_SET_DOID_RANGE': 74,
|
||||||
CLIENT_SET_WISHNAME_RESP = 71
|
|
||||||
CLIENT_SET_WISHNAME_CLEAR = 72
|
|
||||||
CLIENT_SET_SECURITY = 73
|
|
||||||
|
|
||||||
CLIENT_SET_DOID_RANGE = 74
|
'CLIENT_GET_AVATARS_RESP2': 75,
|
||||||
|
'CLIENT_CREATE_AVATAR2': 76,
|
||||||
|
'CLIENT_SYSTEM_MESSAGE': 78,
|
||||||
|
'CLIENT_SET_AVTYPE': 80,
|
||||||
|
|
||||||
CLIENT_GET_AVATARS_RESP2 = 75
|
'CLIENT_GET_PET_DETAILS': 81,
|
||||||
CLIENT_CREATE_AVATAR2 = 76
|
'CLIENT_GET_PET_DETAILS_RESP': 82,
|
||||||
CLIENT_SYSTEM_MESSAGE = 78
|
|
||||||
CLIENT_SET_AVTYPE = 80
|
|
||||||
|
|
||||||
CLIENT_GET_PET_DETAILS = 81
|
'CLIENT_ADD_INTEREST': 97,
|
||||||
CLIENT_GET_PET_DETAILS_RESP = 82
|
'CLIENT_REMOVE_INTEREST': 99,
|
||||||
|
'CLIENT_OBJECT_LOCATION': 102,
|
||||||
|
|
||||||
# (Proposed new message): CLIENT_SET_WORLD_POS = 83
|
'CLIENT_LOGIN_3': 111,
|
||||||
CLIENT_ADD_INTEREST = 97
|
'CLIENT_LOGIN_3_RESP': 110,
|
||||||
# This is no longer supported. Alter just calls ADD_INTEREST
|
|
||||||
# CLIENT_ALTER_INTEREST = 98
|
|
||||||
CLIENT_REMOVE_INTEREST = 99
|
|
||||||
#Roger wants to remove this CLIENT_QUERY_ONE_FIELD = 101
|
|
||||||
CLIENT_OBJECT_LOCATION = 102
|
|
||||||
#Roger wants to remove this CLIENT_QUERY_ONE_FIELD_RESP = 103
|
|
||||||
|
|
||||||
CLIENT_LOGIN_3 = 111
|
'CLIENT_GET_FRIEND_LIST_EXTENDED': 115,
|
||||||
CLIENT_LOGIN_3_RESP = 110
|
'CLIENT_GET_FRIEND_LIST_EXTENDED_RESP': 116,
|
||||||
|
}
|
||||||
|
|
||||||
CLIENT_GET_FRIEND_LIST_EXTENDED = 115
|
# create id->name table for debugging
|
||||||
CLIENT_GET_FRIEND_LIST_EXTENDED_RESP = 116
|
MsgId2Names = invertDictLossless(MsgName2Id)
|
||||||
|
|
||||||
|
# put msg names in module scope, assigned to msg value
|
||||||
|
for name, value in MsgName2Id.items():
|
||||||
|
exec '%s = %s' % (name, value)
|
||||||
|
|
||||||
# These messages are ignored when the client is headed to the quiet zone
|
# These messages are ignored when the client is headed to the quiet zone
|
||||||
QUIET_ZONE_IGNORED_LIST = [
|
QUIET_ZONE_IGNORED_LIST = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user