[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"] = {
|
||||
read_globals = {
|
||||
"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,
|
||||
IS_DEV)
|
||||
else
|
||||
local major_version, minor_version = VersionSettings.version:match("^(%d+)%.(%d+)")
|
||||
if major_version == 3 and minor_version < 4 then
|
||||
RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, LOCALIZATION_PARAMETERS,
|
||||
LOCALIZE, LOCALIZE_PARAMETERS, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
||||
end
|
||||
RPC.rpc_chat_message(PEER_ID_TO_CHANNEL[peer_id], CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message,
|
||||
LOCALIZATION_PARAMETERS, LOCALIZE, LOCALIZE_PARAMETERS, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV,
|
||||
Irc.PARTY_MSG)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -33,13 +31,10 @@ local function add_system_message_to_chat(chat_manager, message)
|
|||
if VT1 then
|
||||
chat_manager:_add_message_to_list(CHANNEL_ID, MESSAGE_SENDER, message, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
||||
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,
|
||||
IS_DEV)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- #####################################################################################################################
|
||||
-- ##### VMFMod ########################################################################################################
|
||||
|
|
|
@ -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,
|
||||
is_system_message, pop_chat, is_dev)
|
||||
else
|
||||
local major_version, minor_version = VersionSettings.version:match("^(%d+)%.(%d+)")
|
||||
if major_version == 3 and minor_version < 4 then
|
||||
RPC.rpc_chat_message(member, channel_id, message_sender, 0, message, {localization_param}, false, false,
|
||||
is_system_message, pop_chat, is_dev)
|
||||
end
|
||||
RPC.rpc_chat_message(PEER_ID_TO_CHANNEL[member], channel_id, message_sender, 0, message, {localization_param},
|
||||
false, false, is_system_message, pop_chat, is_dev, 0)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -247,6 +244,7 @@ vmf:hook("ChatManager", "rpc_chat_message",
|
|||
if channel_id == VERMINTIDE_CHANNEL_ID then
|
||||
func(self, sender, channel_id, message_sender, arg1, arg2, arg3, ...)
|
||||
else
|
||||
sender = CHANNEL_TO_PEER_ID[sender]
|
||||
|
||||
if not _network_module_is_initialized then
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue