[Network] Update module for patch 3.4
This commit is contained in:
parent
6bad4d6401
commit
0a979b69a2
3 changed files with 9 additions and 15 deletions
|
@ -417,5 +417,6 @@ stds["VT1"] = {
|
||||||
stds["VT2"] = {
|
stds["VT2"] = {
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"IngameViewLayoutLogic", "HeroWindowIngameView",
|
"IngameViewLayoutLogic", "HeroWindowIngameView",
|
||||||
|
"PEER_ID_TO_CHANNEL", "CHANNEL_TO_PEER_ID", "Irc",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,11 +21,9 @@ local function send_system_message(peer_id, message)
|
||||||
RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, message, LOCALIZATION_PARAM, IS_SYSTEM_MESSAGE, POP_CHAT,
|
RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, message, LOCALIZATION_PARAM, IS_SYSTEM_MESSAGE, POP_CHAT,
|
||||||
IS_DEV)
|
IS_DEV)
|
||||||
else
|
else
|
||||||
local major_version, minor_version = VersionSettings.version:match("^(%d+)%.(%d+)")
|
RPC.rpc_chat_message(PEER_ID_TO_CHANNEL[peer_id], CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message,
|
||||||
if major_version == 3 and minor_version < 4 then
|
LOCALIZATION_PARAMETERS, LOCALIZE, LOCALIZE_PARAMETERS, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV,
|
||||||
RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, LOCALIZATION_PARAMETERS,
|
Irc.PARTY_MSG)
|
||||||
LOCALIZE, LOCALIZE_PARAMETERS, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -33,12 +31,9 @@ local function add_system_message_to_chat(chat_manager, message)
|
||||||
if VT1 then
|
if VT1 then
|
||||||
chat_manager:_add_message_to_list(CHANNEL_ID, MESSAGE_SENDER, message, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
chat_manager:_add_message_to_list(CHANNEL_ID, MESSAGE_SENDER, message, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
||||||
else
|
else
|
||||||
local major_version, minor_version = VersionSettings.version:match("^(%d+)%.(%d+)")
|
|
||||||
if major_version == 3 and minor_version < 4 then
|
|
||||||
chat_manager:_add_message_to_list(CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, IS_SYSTEM_MESSAGE, POP_CHAT,
|
chat_manager:_add_message_to_list(CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, IS_SYSTEM_MESSAGE, POP_CHAT,
|
||||||
IS_DEV)
|
IS_DEV)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- #####################################################################################################################
|
-- #####################################################################################################################
|
||||||
|
|
|
@ -137,11 +137,8 @@ local function rpc_chat_message(member, channel_id, message_sender, message, loc
|
||||||
RPC.rpc_chat_message(member, channel_id, message_sender, message, localization_param,
|
RPC.rpc_chat_message(member, channel_id, message_sender, message, localization_param,
|
||||||
is_system_message, pop_chat, is_dev)
|
is_system_message, pop_chat, is_dev)
|
||||||
else
|
else
|
||||||
local major_version, minor_version = VersionSettings.version:match("^(%d+)%.(%d+)")
|
RPC.rpc_chat_message(PEER_ID_TO_CHANNEL[member], channel_id, message_sender, 0, message, {localization_param},
|
||||||
if major_version == 3 and minor_version < 4 then
|
false, false, is_system_message, pop_chat, is_dev, 0)
|
||||||
RPC.rpc_chat_message(member, channel_id, message_sender, 0, message, {localization_param}, false, false,
|
|
||||||
is_system_message, pop_chat, is_dev)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -247,6 +244,7 @@ vmf:hook("ChatManager", "rpc_chat_message",
|
||||||
if channel_id == VERMINTIDE_CHANNEL_ID then
|
if channel_id == VERMINTIDE_CHANNEL_ID then
|
||||||
func(self, sender, channel_id, message_sender, arg1, arg2, arg3, ...)
|
func(self, sender, channel_id, message_sender, arg1, arg2, arg3, ...)
|
||||||
else
|
else
|
||||||
|
sender = CHANNEL_TO_PEER_ID[sender]
|
||||||
|
|
||||||
if not _network_module_is_initialized then
|
if not _network_module_is_initialized then
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue