Pulled in latest version changes

This commit is contained in:
gamer147
2022-07-23 00:21:14 -04:00
parent b9a5a8fe23
commit ac428166b0
32 changed files with 313 additions and 58 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -138,7 +138,7 @@ function PutTowerToPoint(keys)
end
if SpawnSystem.IsUnLimited == false and IsBonusTower(itemName) and GetBonusTowerCount(caster) >= THTD_MAX_BONUS_TOWER then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="bonus_tower_limit", duration=5, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="#bonus_tower_limit", duration=5, params={count=1}, color="#0ff"} )
return
end
@@ -539,7 +539,7 @@ function OnTouhoutdExUp(keys)
local unitName = target:GetUnitName()
if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then
caster.is_team_mode = true
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="team_rank_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),reason="潜能已激活"}})
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="#team_rank_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),reason="潜能已激活"}})
end
end
target.thtd_power_level = 10
@@ -578,7 +578,7 @@ function OnTouhoutdExUp(keys)
local unitName = target:GetUnitName()
if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then
caster.is_team_mode = true
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="team_rank_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),reason="潜能已激活"}})
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="#team_rank_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),reason="潜能已激活"}})
end
end
target.thtd_power_level = target:FindModifierByName("modifier_fairy_count"):GetStackCount()
@@ -1211,7 +1211,7 @@ function SkipWave(keys)
SpawnSystem:RemoveBoss()
end
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="skip_wave_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),item_name=keys.ItemName,wave=SpawnSystem.ReachToWave}})
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="#skip_wave_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),item_name=keys.ItemName,wave=SpawnSystem.ReachToWave}})
EmitAnnouncerSound("Quest.Completed")
end
@@ -1311,10 +1311,10 @@ function OnCloseAI(keys)
if caster.thtd_close_ai ~= true then
caster.thtd_close_ai = true
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_close_ai", duration=5, params={}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_close_ai", duration=5, params={}, color="#0ff"} )
else
caster.thtd_close_ai = false
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_open_ai", duration=5, params={}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_open_ai", duration=5, params={}, color="#0ff"} )
-- 神子和幽幽子,是否开启大招
local unitName = caster:GetUnitName()
if unitName=="miko" then
@@ -1340,12 +1340,12 @@ function OnCastPointAI(keys)
local range = GetDistanceBetweenTwoVec2D(caster:GetOrigin(), targetPoint)
if range <= 100 then
caster.thtd_last_cast_point = nil
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_close_cast_on_fixed_point", duration=5, params={}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_close_cast_on_fixed_point", duration=5, params={}, color="#0ff"} )
elseif range > keys.ability:GetCastRange() then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="cast_range_out"})
else
caster.thtd_last_cast_point = targetPoint
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_open_cast_on_fixed_point", duration=5, params={}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_open_cast_on_fixed_point", duration=5, params={}, color="#0ff"} )
end
end

View File

@@ -79,14 +79,14 @@ function OnKeine02SpellStart(keys)
caster:SetModel("models/thd_hero/keine/keine2/keine2.vmdl")
caster:SetOriginalModel("models/thd_hero/keine/keine2/keine2.vmdl")
if caster.thtd_close_ai == true then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_shirasawa", duration=5, params={}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_shirasawa", duration=5, params={}, color="#0ff"} )
end
elseif caster.thtd_keine_change == THTD_KEINE_02_SHIRASAWA then
caster.thtd_keine_change = THTD_KEINE_02_HUMEN
caster:SetModel("models/thd_hero/keine/keine.vmdl")
caster:SetOriginalModel("models/thd_hero/keine/keine.vmdl")
if caster.thtd_close_ai == true then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_humen", duration=5, params={}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_humen", duration=5, params={}, color="#0ff"} )
end
end
end
@@ -274,13 +274,13 @@ function OnKeine04SpellStart(keys)
end
if caster.thtd_keine_04_change == THTD_KEINE_04_SWORD then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_04_jade", duration=5, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_04_jade", duration=5, params={count=1}, color="#0ff"} )
caster.thtd_keine_04_change = THTD_KEINE_04_JADE
elseif caster.thtd_keine_04_change == THTD_KEINE_04_JADE then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_04_mirror", duration=5, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_04_mirror", duration=5, params={count=1}, color="#0ff"} )
caster.thtd_keine_04_change = THTD_KEINE_04_MIRROR
elseif caster.thtd_keine_04_change == THTD_KEINE_04_MIRROR then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_04_sword", duration=5, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_04_sword", duration=5, params={count=1}, color="#0ff"} )
caster.thtd_keine_04_change = THTD_KEINE_04_SWORD
end
end

View File

@@ -24,7 +24,7 @@ function OnMinoriko02StarChange(keys)
end
if hero.thtd_minoriko_02_change >= keys.max_count then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="minoriko_max_change", duration=5, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#minoriko_max_change", duration=5, params={count=1}, color="#0ff"} )
return
end
hero.thtd_minoriko_02_change = hero.thtd_minoriko_02_change + 1

View File

@@ -254,13 +254,13 @@ function OnPatchouli02SpellStart(keys)
if caster.thtd_patchouli_02_type == PATCHOULI_01_AGNI_SHINE then
caster.thtd_patchouli_02_type = PATCHOULI_01_BURY_IN_LAKE
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_patchouli_bury_in_lake", duration=1, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_patchouli_bury_in_lake", duration=1, params={count=1}, color="#0ff"} )
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_BURY_IN_LAKE then
caster.thtd_patchouli_02_type = PATCHOULI_01_MERCURY_POISON
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_patchouli_mercury_poison", duration=1, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_patchouli_mercury_poison", duration=1, params={count=1}, color="#0ff"} )
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_MERCURY_POISON then
caster.thtd_patchouli_02_type = PATCHOULI_01_AGNI_SHINE
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_patchouli_agni_shine", duration=1, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_patchouli_agni_shine", duration=1, params={count=1}, color="#0ff"} )
end
end

View File

@@ -704,7 +704,7 @@ function OnSpellStartReimuPet01(keys)
end
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="change_to_pet_model", duration=5, params={key = caster.pet_model}, color="#ff0"} )
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="#change_to_pet_model", duration=5, params={key = caster.pet_model}, color="#ff0"} )
end
end
@@ -746,7 +746,7 @@ function OnSpellStartReimuPet02(keys)
end
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="change_to_pet_effect", duration=5, params={key = caster.effect_name}, color="#ff0"} )
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="#change_to_pet_effect", duration=5, params={key = caster.effect_name}, color="#ff0"} )
end
end
@@ -824,7 +824,7 @@ function OnSpellStartReimuPet04(keys)
end
end
caster:EmitSound(reimu_pet_sound[RandomInt(1, #reimu_pet_sound)])
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "show_message", {msg="key_made_tip", duration=3, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "show_message", {msg="#key_made_tip", duration=3, params={}, color="#ff0"})
ParticleManager:DestroyParticleSystem(hero.thtd_emoji_effect,true)
hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero)

View File

@@ -950,7 +950,7 @@ function CTHTDGameMode:OnGameRulesStateChange(keys)
for i=0, PlayerResource:GetPlayerCount()-1 do
if PlayerResource:GetTeam(i) == DOTA_TEAM_GOODGUYS then
if GameRules.PlayerData[i].ban == 1 then
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(i), "display_chat_msg", {msg="game_ban_tip", params={player_name=PlayerResource:GetPlayerName(i),reason=GameRules.PlayerData[i].reason}})
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(i), "display_chat_msg", {msg="#game_ban_tip", params={player_name=PlayerResource:GetPlayerName(i),reason=GameRules.PlayerData[i].reason}})
for _,hero in pairs(GameRules.HeroList) do
if hero.thtd_player_id == i then
SpawnSystem:GameOver(hero)
@@ -958,7 +958,7 @@ function CTHTDGameMode:OnGameRulesStateChange(keys)
end
end
elseif GameRules.PlayerData[i].vip == 1 then
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(i), "show_message", {msg="game_start_vip_tip", duration=60, params={name=PlayerResource:GetPlayerName(i),endtime=GameRules.PlayerData[i].end_time}, color="#ff0"})
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(i), "show_message", {msg="#game_start_vip_tip", duration=60, params={name=PlayerResource:GetPlayerName(i),endtime=GameRules.PlayerData[i].end_time}, color="#ff0"})
end
GameRules.HeroList[i]:RemoveModifierByName("modifier_rainbow_tail")
end
@@ -985,7 +985,6 @@ function CTHTDGameMode:GameStateCustomGameSetup()
CreateHeroForPlayer(heroNames[RandomInt(1, #heroNames)], player):RemoveSelf()
end
end
print("Heros setup")
-- 玩家信息定义按playerid的steamid、dota2帐户、玩家名称、英雄index信息、黑白名单及宠物信息
GameRules.PlayerData = { }
@@ -1418,7 +1417,7 @@ function CTHTDGameMode:OnPlayerSay(keys)
if string.sub(text,1,6) == "-color" then
local colorValue = string.sub(text, 8, 11)
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="item_locked_tip", duration=10, params={}, color=colorValue})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#item_locked_tip", duration=10, params={}, color=colorValue})
return
end
@@ -1428,7 +1427,7 @@ function CTHTDGameMode:OnPlayerSay(keys)
end
if string.sub(text,1,5) == "-date" then
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(keys.playerid), "display_chat_msg", {msg="open_day_tip", params={server_time=GetRealDateTime(),start_time=GameRules.GameData.server_time,open_day_list=GameRules.GameData.open_day_list}})
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(keys.playerid), "display_chat_msg", {msg="#open_day_tip", params={server_time=GetRealDateTime(),start_time=GameRules.GameData.server_time,open_day_list=GameRules.GameData.open_day_list}})
return
end
@@ -1779,7 +1778,7 @@ function CTHTDGameMode:ItemAddedToInventory( keys )
if itemName == "item_3150" or itemName == "item_3151" or itemName == "item_3152" then
if hero.is_team_mode ~= true then
hero.is_team_mode = true
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="team_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID()),reason="使用了传说武器"}})
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="#team_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID()),reason="使用了传说武器"}})
end
end
end

View File

@@ -97,7 +97,7 @@ CustomEvent.on('custom_game_kick_vote', function(data)
if hero.is_game_over == true then return end
if playerVote.kicked_player ~= - 1 and (math.floor(GameRules:GetGameTime()) - playerVote.vote_time) < 60 then
CustomGameEventManager:Send_ServerToPlayer(player, "show_message", {msg="player_in_vote", duration=10, params={count=playerVote.kicked_player+1}, color="#ff0"})
CustomGameEventManager:Send_ServerToPlayer(player, "show_message", {msg="#player_in_vote", duration=10, params={count=playerVote.kicked_player+1}, color="#ff0"})
return
end
@@ -139,7 +139,7 @@ CustomEvent.on('custom_game_kick_accept', function(data)
playerVote.kicked_player = -1
playerVote.kicked_line = - 1
playerVote.agree_players = {}
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="player_vote_no_pass", duration=10, params={count=data.PlayerID+1}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#player_vote_no_pass", duration=10, params={count=data.PlayerID+1}, color="#ff0"})
end
end)
@@ -147,7 +147,7 @@ function KickPlayer()
for index,hero in pairs(GameRules.HeroList) do
if hero ~= nil and hero.is_game_over ~= true and hero.thtd_player_id == playerVote.kicked_player then
SpawnSystem:GameOver(hero)
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="player_vote_pass", duration=10, params={count=playerVote.kicked_player+1}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#player_vote_pass", duration=10, params={count=playerVote.kicked_player+1}, color="#ff0"})
break
end
end
@@ -384,7 +384,7 @@ end)
CustomEvent.on('custom_game_command', function(data)
if data["cmd"] == "wave" then
SpawnSystem.ReachToWave = data["param"]
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="reach_to_wave", duration=20, params={count=data["param"]}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#reach_to_wave", duration=20, params={count=data["param"]}, color="#ff0"})
return
end

View File

@@ -10,9 +10,9 @@ end
SERVER_KEY = GetDedicatedServerKeyV2("mydota")
REQUEST_TIME_OUT = 30
REQUEST_TIME_OUT = 20
Service.Config = table.loadkv("scripts/npc/config.txt")
Service.Config = table.loadkv("scripts/npc/Config.txt")
-- 游戏配置项
GameRules.GameData = {
@@ -712,7 +712,7 @@ end
local data = json.decode(sBody)
if data then
if data.code == "0000" then
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "show_message", {msg="pet_cumstom_saved", duration=15, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "show_message", {msg="#pet_cumstom_saved", duration=15, params={}, color="#ff0"})
else
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "thtd_server_msg", {code = data.code, msg = data.msg})
end
@@ -762,7 +762,7 @@ end
hero:AddItem(item)
end
end
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "show_message", {msg="key_made_tip", duration=3, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "show_message", {msg="#key_made_tip", duration=3, params={}, color="#ff0"})
ParticleManager:DestroyParticleSystem(hero.thtd_emoji_effect,true)
hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero)
ParticleManager:SetParticleControlEnt(hero.thtd_emoji_effect , 0, hero, PATTACH_OVERHEAD_FOLLOW, "attach_hitloc", Vector(0,0,0), true) --灵梦用 attach_emoji

View File

@@ -263,7 +263,7 @@ function SpawnSystem:PreSpawn()
if GameRules:IsGamePaused() then return 0.1 end
if GameRules:State_Get() == DOTA_GAMERULES_STATE_GAME_IN_PROGRESS then return nil end
if uiWaveInfo["RemainingTime"] == 0 then
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="item_locked_tip", duration=60, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#item_locked_tip", duration=60, params={}, color="#ff0"})
return nil
end
uiWaveInfo["RemainingTime"] = math.max(math.floor(maxTime - GameRules:GetGameTime()),0)
@@ -284,9 +284,9 @@ function SpawnSystem:PreSpawn()
-- 通知提示
local difficulty = GameRules:GetCustomGameDifficulty()
if difficulty == CHALLENGE_MODE then
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="challenge_game_on", duration=25, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#challenge_game_on", duration=25, params={}, color="#ff0"})
elseif difficulty >= FUNNY_MODE then
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="funny_game_on", duration=25, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#funny_game_on", duration=25, params={}, color="#ff0"})
end
end
@@ -407,7 +407,7 @@ function SpawnSystem:InitSpawn()
-- 无尽前提示
if wave == 50 then
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="spawn_unlimited", duration=133, params={count=50}, color="#0ff"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#spawn_unlimited", duration=133, params={count=50}, color="#0ff"})
end
-- 进入无尽
@@ -443,11 +443,11 @@ function SpawnSystem:InitSpawn()
SpawnSystem:StartUnlimited()
max_time = 180.5
left_time = max_time
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="start_unlimited", duration=180, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#start_unlimited", duration=180, params={}, color="#ff0"})
if difficulty == CHALLENGE_MODE then
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="challenge_game_on", duration=180, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#challenge_game_on", duration=180, params={}, color="#ff0"})
elseif difficulty >= FUNNY_MODE then
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="funny_game_on", duration=180, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#funny_game_on", duration=180, params={}, color="#ff0"})
end
end
@@ -690,10 +690,10 @@ function SpawnSystem:GameOver(hero)
-- 过挑战第一波BOSS算上榜
if wave > 100 then
CheckRank(hero)
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="power_game_end_info", duration=60, params={wave=hero.thtd_game_info["max_wave"],name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#power_game_end_info", duration=60, params={wave=hero.thtd_game_info["max_wave"],name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#ff0"})
ShowDetail(hero)
elseif wave > 50 then
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="normal_game_end_info", duration=30, params={wave=wave-51,name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#f00"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#normal_game_end_info", duration=30, params={wave=wave-51,name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#f00"})
end
SpawnSystem:RefreshCreepMaxCount()
end
@@ -719,7 +719,7 @@ function SpawnSystem:GameEnd()
end
if wave > 100 then
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="game_will_end", duration=60, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#game_will_end", duration=60, params={}, color="#ff0"})
GameRules:GetGameModeEntity():SetContextThink(DoUniqueString("thtd_end_game"),
function()
GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS)
@@ -900,9 +900,9 @@ function CheckPlayerConnect()
if (hero:GetPlayerOwner() == nil or hero:GetPlayerOwner():IsNull()) then
if hero.thtd_game_info["is_player_connected"] then
hero.thtd_game_info["is_player_connected"] = false
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="player_disconnect", duration=15, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#player_disconnect", duration=15, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="{d:count}", duration=15, params={count=hero.thtd_player_id+1}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="pause_game", duration=15, params={}, color="#ff0"})
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#pause_game", duration=15, params={}, color="#ff0"})
if GameRules:IsGamePaused() then PauseGame(false) end
PauseGame(true)
end
@@ -930,7 +930,7 @@ function SpawnSystem:WaveEndForEach()
end
end
if totalDamage < hero.thtd_wave_total_health * 0.9 then
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="damage_less_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID())}})
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="#damage_less_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID())}})
else
isMaxWave = true
end
@@ -1384,10 +1384,10 @@ function SpawnSystem:StartSpawn()
spawnerLine.nextBossName = thtd_bosses_list[RandomInt(1, #thtd_bosses_list)]
hero.next_boss_name = spawnerLine.nextBossName
if player ~= nil then
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bonus_nazrin", duration=60, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bonus_minoriko_limit", duration=60, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bonus_lily", duration=60, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bosses_"..spawnerLine.nextBossName, duration=60, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bonus_nazrin", duration=60, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bonus_minoriko_limit", duration=60, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bonus_lily", duration=60, params={count=1}, color="#0ff"} )
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bosses_"..spawnerLine.nextBossName, duration=60, params={count=1}, color="#0ff"} )
end
end
end
@@ -1451,8 +1451,8 @@ function SpawnSystem:StartSpawn()
local modifierName = RandomBossBuff[RandomInt(1, #RandomBossBuff)]
unit:AddNewModifier(unit, nil, modifierName, {})
if player ~= nil then
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="random_boss_has_buff", duration=20, params={}, color="#0ff"})
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="DOTA_Tooltip_"..modifierName.."_Description", duration=20, params={}, color="#0ff"})
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#random_boss_has_buff", duration=20, params={}, color="#0ff"})
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#DOTA_Tooltip_"..modifierName.."_Description", duration=20, params={}, color="#0ff"})
end
end
end

View File

@@ -72,7 +72,7 @@ function CDOTA_BaseNPC:THTD_InitExp()
time_count = 0
if self.thtd_star == 5 then
EmitSoundOn(THTD_GetVoiceEvent(self:GetUnitName(),"spawn"),self)
CustomGameEventManager:Send_ServerToPlayer(self:GetPlayerOwner() , "show_message", {msg=self:GetUnitName().."_up_to_5_star", duration=30, params={}, color="#ff0"} )
CustomGameEventManager:Send_ServerToPlayer(self:GetPlayerOwner() , "show_message", {msg= "#"..self:GetUnitName().."_up_to_5_star", duration=30, params={}, color="#ff0"} )
end
end
end

View File

@@ -350,7 +350,6 @@ end
if str == nil or type(str) ~= "string" then
return
end
print(str)
-- loadstring在lua5.2中已经被弃用了
-- return loadstring("return " .. str)()
return load("return " .. str)()