6 Commits

25 changed files with 769 additions and 397 deletions

View File

@@ -1,9 +1,9 @@
<!-- xml reconstructed by ValveResourceFormat: https://vrf.steamdb.info/ -->
<root> <root>
<scripts> <scripts>
<include src="s2r://panorama/scripts/custom_game/util.vjs_c" /> <include src="s2r://panorama/scripts/custom_game/util.vjs_c" />
</scripts> </scripts>
<script><![CDATA[
<script>
//GameUI.CustomUIConfig().Config = //GameUI.CustomUIConfig().Config =
//{ //{
// game_name: "touhou" // game_name: "touhou"
@@ -34,13 +34,12 @@
}); });
FindDotaHudElement( "PreGame" ).FindChild( "Header" ).style.visibility = "collapse"; FindDotaHudElement( "PreGame" ).FindChild( "Header" ).style.visibility = "collapse";
</script> ]]></script>
<Panel> <Panel>
<CustomUIElement type="Hud" layoutfile="file://{resources}/layout/custom_game/frames/message/message.xml" /> <CustomUIElement type="Hud" layoutfile="s2r://panorama/layout/custom_game/frames/message/message.vxml_c" />
<CustomUIElement type="Hud" layoutfile="file://{resources}/layout/custom_game/dps_panel.xml" /> <CustomUIElement type="Hud" layoutfile="s2r://panorama/layout/custom_game/dps_panel.vxml_c" />
<CustomUIElement type="Hud" layoutfile="file://{resources}/layout/custom_game/info.xml" /> <CustomUIElement type="Hud" layoutfile="s2r://panorama/layout/custom_game/info.vxml_c" />
<CustomUIElement type="Hud" layoutfile="file://{resources}/layout/custom_game/shop.xml" /> <CustomUIElement type="Hud" layoutfile="s2r://panorama/layout/custom_game/shop.vxml_c" />
<CustomUIElement type="EndScreen" layoutfile="file://{resources}/layout/custom_game/end_screen.xml" /> <CustomUIElement type="EndScreen" layoutfile="s2r://panorama/layout/custom_game/end_screen.vxml_c" />
</Panel> </Panel>
</root> </root>

View File

@@ -1,3 +1,4 @@
<!-- xml reconstructed by ValveResourceFormat: https://vrf.steamdb.info/ -->
<root> <root>
<styles> <styles>
<include src="s2r://panorama/styles/dotastyles.vcss_c" /> <include src="s2r://panorama/styles/dotastyles.vcss_c" />
@@ -8,9 +9,9 @@
</scripts> </scripts>
<snippets> <snippets>
<snippet name="Tower"> <snippet name="Tower">
<Panel class="Tower" > <Panel class="Tower">
<DOTAItemImage id="Item" itemname="" hittest="false" /> <DOTAItemImage id="Item" itemname="" hittest="false" />
<Panel id="DPS_info" > <Panel id="DPS_info">
<Panel id="DPS_bar" /> <Panel id="DPS_bar" />
<Label id="DPS" text="" /> <Label id="DPS" text="" />
<Label id="DPS_pct" text="%" /> <Label id="DPS_pct" text="%" />
@@ -19,14 +20,13 @@
</snippet> </snippet>
</snippets> </snippets>
<Panel hittest="false" class="DPSPanelRoot ShowTime"> <Panel hittest="false" class="DPSPanelRoot ShowTime">
<Panel id="TowerListHeader" onactivate="$.GetContextPanel().ToggleClass('ShowTime')" > <Panel id="TowerListHeader" onactivate="$.GetContextPanel().ToggleClass(&apos;ShowTime&apos;)">
<Label text="#td_tower_dps_title" /> <Label text="#td_tower_dps_title" />
</Panel> </Panel>
<Panel id="FoodCountPanel" onmouseover="DOTAShowTextTooltip(#td_food_count_text)" onmouseout="DOTAHideTextTooltip()">
<Panel id="FoodCountPanel" onmouseover="DOTAShowTextTooltip(td_food_count_text)" onmouseout="DOTAHideTextTooltip()" >
<Label id="FoodCount" text="#td_food_count" /> <Label id="FoodCount" text="#td_food_count" />
</Panel> </Panel>
<Panel id="TowerList" > <Panel id="TowerList">
<Panel /> <Panel />
</Panel> </Panel>
<Label id="KillCount" text="#td_creature_kill_count" /> <Label id="KillCount" text="#td_creature_kill_count" />

View File

@@ -1,3 +1,4 @@
<!-- xml reconstructed by ValveResourceFormat: https://vrf.steamdb.info/ -->
<root> <root>
<styles> <styles>
<include src="s2r://panorama/styles/dotastyles.vcss_c" /> <include src="s2r://panorama/styles/dotastyles.vcss_c" />
@@ -9,29 +10,27 @@
<snippets> <snippets>
<snippet name="player"> <snippet name="player">
<Panel class="Player"> <Panel class="Player">
<Panel id="PlayerColor"/> <Panel id="PlayerColor" />
<DOTAAvatarImage id="AvatarImage" class="ScoreboardAvatar"/> <DOTAAvatarImage id="AvatarImage" class="ScoreboardAvatar" />
<Panel id="PlayerAndHeroNameContainer" class="TopBottomFlow"> <Panel id="PlayerAndHeroNameContainer" class="TopBottomFlow">
<Label id="PlayerNameLabel" class="PlayerNameLabel" text=""/> <Label id="PlayerNameLabel" class="PlayerNameLabel" text="" />
<Label id="HeroNameLabel" class="HeroNameLabel" text=""/> <Label id="HeroNameLabel" class="HeroNameLabel" text="" />
</Panel> </Panel>
<Label id="KillCount" text="0" /> <Label id="KillCount" text="0" />
</Panel> </Panel>
</snippet> </snippet>
<!-- PlayerStatus -->
<snippet name="PlayerStatus"> <snippet name="PlayerStatus">
<Panel class="PlayerStatus"> <Panel class="PlayerStatus">
<Panel id="StatusICON" /> <Panel id="StatusICON" />
<DOTAAvatarImage id="AvatarImage" class="ScoreboardAvatar"/> <DOTAAvatarImage id="AvatarImage" class="ScoreboardAvatar" />
<Label id="StatusText" html="true" text="" /> <Label id="StatusText" html="true" text="" />
</Panel> </Panel>
</snippet> </snippet>
</snippets> </snippets>
<Panel hittest="true" class="EndScreenRoot" > <Panel hittest="true" class="EndScreenRoot">
<Label id="WinText" text="" /> <Label id="WinText" text="" />
<Panel id="PlayersPanel" > <Panel id="PlayersPanel">
<Panel id="PlayersPanelHeader" > <Panel id="PlayersPanelHeader">
<Label id="KillCountTitle" text="#td_creature_kill_count_text" /> <Label id="KillCountTitle" text="#td_creature_kill_count_text" />
</Panel> </Panel>
</Panel> </Panel>

View File

@@ -1,3 +1,4 @@
<!-- xml reconstructed by ValveResourceFormat: https://vrf.steamdb.info/ -->
<root> <root>
<styles> <styles>
<include src="s2r://panorama/styles/dotastyles.vcss_c" /> <include src="s2r://panorama/styles/dotastyles.vcss_c" />
@@ -6,7 +7,7 @@
<scripts> <scripts>
<include src="s2r://panorama/layout/custom_game/frames/message/message.vjs_c" /> <include src="s2r://panorama/layout/custom_game/frames/message/message.vjs_c" />
</scripts> </scripts>
<Panel hittest="false" hittestchildren="false" class="MessageRoot" > <Panel hittest="false" hittestchildren="false" class="MessageRoot">
<Panel id="Content" /> <Panel id="Content" />
</Panel> </Panel>
</root> </root>

View File

@@ -1,4 +1,5 @@
<root> <!-- xml reconstructed by ValveResourceFormat: https://vrf.steamdb.info/ -->
<root>
<styles> <styles>
<include src="s2r://panorama/styles/dotastyles.vcss_c" /> <include src="s2r://panorama/styles/dotastyles.vcss_c" />
<include src="s2r://panorama/styles/custom_game/info.vcss_c" /> <include src="s2r://panorama/styles/custom_game/info.vcss_c" />
@@ -7,22 +8,18 @@
<include src="s2r://panorama/scripts/custom_game/power.vjs_c" /> <include src="s2r://panorama/scripts/custom_game/power.vjs_c" />
<include src="s2r://panorama/scripts/custom_game/info.vjs_c" /> <include src="s2r://panorama/scripts/custom_game/info.vjs_c" />
<include src="s2r://panorama/scripts/custom_game/display_error.vjs_c" /> <include src="s2r://panorama/scripts/custom_game/display_error.vjs_c" />
<!-- <include src="s2r://panorama/layout/custom_game/frames/cosmetic_abilities/creator.vjs_c" /> -->
</scripts> </scripts>
<snippets> <snippets>
<!-- 卡片 -->
<snippet name="CardPoolCard"> <snippet name="CardPoolCard">
<Panel class="Card" > <Panel class="Card">
<Image id="CardImage" src="" /> <Image id="CardImage" src="" />
<Panel class="CardBar"/> <Panel class="CardBar" />
<Panel class="CardType"/> <Panel class="CardType" />
</Panel> </Panel>
</snippet> </snippet>
<!-- 卡组详情 -->
<snippet name="RankDetailCard"> <snippet name="RankDetailCard">
<Panel class="RankDetailItem" > <Panel class="RankDetailItem">
<Panel id="CardRankContent"/> <Panel id="CardRankContent" />
<Panel id="StarContent"> <Panel id="StarContent">
<Image src="s2r://panorama/images/custom_game/star_png.vtex" /> <Image src="s2r://panorama/images/custom_game/star_png.vtex" />
<Image src="s2r://panorama/images/custom_game/star_png.vtex" /> <Image src="s2r://panorama/images/custom_game/star_png.vtex" />
@@ -43,8 +40,6 @@
</Panel> </Panel>
</Panel> </Panel>
</snippet> </snippet>
<!-- 攻略列表项目 -->
<snippet name="StrategyListItem"> <snippet name="StrategyListItem">
<Panel class="URLItem"> <Panel class="URLItem">
<Label class="LeftTitle" text="" /> <Label class="LeftTitle" text="" />
@@ -54,84 +49,64 @@
</Panel> </Panel>
</Panel> </Panel>
</snippet> </snippet>
<!-- 排行榜列表项目 -->
<snippet name="RankListItem"> <snippet name="RankListItem">
<Panel class="RankItem" onactivate="RankDetail()"> <Panel class="RankItem" onactivate="RankDetail()">
<Label class="RankLeftTitle" html="true" text="" /> <Label class="RankLeftTitle" html="true" text="" />
<Panel id="PlayerList"> <Panel id="PlayerList" />
</Panel>
<Panel class="TopBottomFlow MiddleAlign"> <Panel class="TopBottomFlow MiddleAlign">
<Label class="URLItemTitle" html="true" text="" /> <Label class="URLItemTitle" html="true" text="" />
<Label class="URLItemSubTitle" html="true" text="" /> <Label class="URLItemSubTitle" html="true" text="" />
</Panel> </Panel>
</Panel> </Panel>
</snippet> </snippet>
<!-- 卡池卡片 -->
<snippet name="Tower"> <snippet name="Tower">
<Panel class="Tower" > <Panel class="Tower">
<DOTAItemImage id="Item" itemname="" hittest="false" /> <DOTAItemImage id="Item" itemname="" hittest="false" />
<Label id="xxx" text="x" /> <Label id="xxx" text="x" />
<Label id="Count" text="" /> <Label id="Count" text="" />
</Panel> </Panel>
</snippet> </snippet>
</snippets> </snippets>
<Panel hittest="false" class="InfoRoot" > <Panel hittest="false" class="InfoRoot">
<!--顶部菜单--> <Panel id="iconlist" class="">
<Panel id="iconlist" class=""> <Panel id="UpdatePoint" onmouseover="DOTAShowTextTooltip(#td_refresh_desc)" onmouseout="DOTAHideTextTooltip()" onactivate="UpdateGamePoint()">
<Panel id="UpdatePoint" onmouseover="DOTAShowTextTooltip(td_refresh_desc)" onmouseout="DOTAHideTextTooltip()" onactivate="UpdateGamePoint()" >
<Image src="s2r://panorama/images/custom_game/refresh2_png.vtex" /> <Image src="s2r://panorama/images/custom_game/refresh2_png.vtex" />
</Panel> </Panel>
<Button onmouseover="DOTAShowTextTooltip(td_patron_desc)" onmouseout="DOTAHideTextTooltip()" onactivate="$('#PatronStore').RemoveClass('Hide')" > <Button onmouseover="DOTAShowTextTooltip(#td_patron_desc)" onmouseout="DOTAHideTextTooltip()" onactivate="$(&apos;#PatronStore&apos;).RemoveClass(&apos;Hide&apos;)">
<Label text="赞助" /> <Label text="赞助" />
</Button> </Button>
<Label id="AccountID" text="" /> <Label id="AccountID" text="" />
</Panel> </Panel>
<!-- 商城 -->
<Panel id="PatronStore" class="Hide" /> <Panel id="PatronStore" class="Hide" />
<Panel id="AttackingPanel">
<!-- 进攻进度 --> <Panel id="CreepCountProcessBar">
<Panel id="AttackingPanel" > <Panel id="CreepCountProcessBarPCT" />
<Panel id="CreepCountProcessBar" >
<Panel id="CreepCountProcessBarPCT" >
</Panel>
<Label id="CreepCount" text="#td_pawn_count" /> <Label id="CreepCount" text="#td_pawn_count" />
</Panel> </Panel>
<Panel id="DifficultyWavePanel" > <Panel id="DifficultyWavePanel">
<Label id="Difficulty" text="" /> <Label id="Difficulty" text="" />
<Label id="WaveText" html="true" text="#td_attacking_wave" /> <Label id="WaveText" html="true" text="#td_attacking_wave" />
</Panel> </Panel>
<Panel id="AttackingProcessTimePanel" > <Panel id="AttackingProcessTimePanel">
<Label id="AttackingProcessTime" text="5" /> <Label id="AttackingProcessTime" text="5" />
</Panel> </Panel>
</Panel> </Panel>
<!-- 卡池 -->
<Panel id="CardPoolPanel" hittest="false"> <Panel id="CardPoolPanel" hittest="false">
<Panel id="CardPoolHeader" onactivate="$('#CardPoolPanel').ToggleClass('ShowTime')" > <Panel id="CardPoolHeader" onactivate="$(&apos;#CardPoolPanel&apos;).ToggleClass(&apos;ShowTime&apos;)">
<Label text="#td_card_pool" /> <Label text="#td_card_pool" />
</Panel> </Panel>
<Panel id="CardPoolContent" /> <Panel id="CardPoolContent" />
</Panel> </Panel>
<!-- 商店 todo-->
<Panel id="Shop" /> <Panel id="Shop" />
<!-- 选择卡片 -->
<Panel id="SelectCardPanel" hittest="false" class="Hide"> <Panel id="SelectCardPanel" hittest="false" class="Hide">
<Panel id="SelectCardHeader" > <Panel id="SelectCardHeader">
<Label id="SelectCardHeaderText" text="#td_select_card" /> <Label id="SelectCardHeaderText" text="#td_select_card" />
</Panel> </Panel>
<Button id="SelectCardCloseButton" onactivate="SelectCardClose()" > <Button id="SelectCardCloseButton" onactivate="SelectCardClose()" />
</Button>
<Panel id="SelectCardPoolContent" /> <Panel id="SelectCardPoolContent" />
</Panel> </Panel>
<Panel id="SelectStartCard">
<!-- 选择初始卡 --> <Panel class="Card" onactivate="SelectStartCard(&apos;item_0001&apos;)">
<Panel id="SelectStartCard" >
<Panel class="Card" onactivate="SelectStartCard('item_0001')">
<Panel class="ItemImage"> <Panel class="ItemImage">
<DOTAItemImage hittest="false" itemname="item_0001" /> <DOTAItemImage hittest="false" itemname="item_0001" />
</Panel> </Panel>
@@ -140,7 +115,7 @@
<Panel id="Item1Description" class="Description" /> <Panel id="Item1Description" class="Description" />
</Panel> </Panel>
</Panel> </Panel>
<Panel class="Card" onactivate="SelectStartCard('item_0002')"> <Panel class="Card" onactivate="SelectStartCard(&apos;item_0002&apos;)">
<Panel class="ItemImage"> <Panel class="ItemImage">
<DOTAItemImage hittest="false" itemname="item_0002" /> <DOTAItemImage hittest="false" itemname="item_0002" />
</Panel> </Panel>
@@ -149,7 +124,7 @@
<Panel id="Item2Description" class="Description" /> <Panel id="Item2Description" class="Description" />
</Panel> </Panel>
</Panel> </Panel>
<Panel class="Card" onactivate="SelectStartCard('item_0003')"> <Panel class="Card" onactivate="SelectStartCard(&apos;item_0003&apos;)">
<Panel class="ItemImage"> <Panel class="ItemImage">
<DOTAItemImage hittest="false" itemname="item_0003" /> <DOTAItemImage hittest="false" itemname="item_0003" />
</Panel> </Panel>
@@ -159,87 +134,65 @@
</Panel> </Panel>
</Panel> </Panel>
</Panel> </Panel>
<Button id="VideosButton" onactivate="VideosPanelOpen()">
<!-- 打开攻略 -->
<Button id="VideosButton" onactivate="VideosPanelOpen()" >
<Label text="#td_tutorial_video" /> <Label text="#td_tutorial_video" />
</Button> </Button>
<Button id="KickButton" onactivate="KickVoteOpen()">
<!-- 踢人按钮 -->
<Button id="KickButton" onactivate="KickVoteOpen()" >
<Label text="#td_kick_vote" /> <Label text="#td_kick_vote" />
</Button> </Button>
<Button id="PauseButton" onactivate="PauseGame()">
<!-- 永久暂停按钮 -->
<Button id="PauseButton" onactivate="PauseGame()" >
<Label text="#pause_game_btn" /> <Label text="#pause_game_btn" />
</Button> </Button>
<Button id="RankButton" onactivate="RankPanelOpen()">
<!-- 排行榜按钮 --> <Label text="#td_rank_list_100" onmouseover="ShowRankButtonTip(1)" onmouseout="HideRankButtonTip()" />
<Button id="RankButton" onactivate="RankPanelOpen()" >
<Label text="#td_rank_list_100" onmouseover="ShowRankButtonTip(1)" onmouseout="HideRankButtonTip()"/>
</Button> </Button>
<Button id="TeamRankButton" onactivate="TeamRankPanelOpen()">
<!-- 组队排行榜按钮 --> <Label text="#td_team_rank_list_100" onmouseover="ShowRankButtonTip(2)" onmouseout="HideRankButtonTip()" />
<Button id="TeamRankButton" onactivate="TeamRankPanelOpen()" >
<Label text="#td_team_rank_list_100" onmouseover="ShowRankButtonTip(2)" onmouseout="HideRankButtonTip()"/>
</Button> </Button>
<!-- 攻略 -->
<Panel id="VideosPanel" hittest="false" class="Hide"> <Panel id="VideosPanel" hittest="false" class="Hide">
<Panel id="VideoListWindow" class="Hide" > <Panel id="VideoListWindow" class="Hide">
<Button class="CloseButton" onactivate="VideosPanelClose()" /> <Button class="CloseButton" onactivate="VideosPanelClose()" />
<Panel id="VideoDescription" > <Panel id="VideoDescription">
<Label html="true" text="#td_video_tip" /> <Label html="true" text="#td_video_tip" />
</Panel> </Panel>
<Panel id="URLList" /> <Panel id="URLList" />
</Panel> </Panel>
<Panel id="StrategyWindow" class="Hide">
<Panel id="StrategyWindow" class="Hide" >
<Button class="CloseButton" onactivate="CloseStrategyWindow()" /> <Button class="CloseButton" onactivate="CloseStrategyWindow()" />
<Label class="StrategyTitle" html="true" text="{s:StrategyTitle1}" /> <Label class="StrategyTitle" html="true" text="{s:StrategyTitle1}" />
<Label class="StrategyText" html="true" text="{s:StrategyText1}" /> <Label class="StrategyText" html="true" text="{s:StrategyText1}" />
<Label class="StrategyTitle" html="true" text="{s:StrategyTitle2}" /> <Label class="StrategyTitle" html="true" text="{s:StrategyTitle2}" />
<Label class="StrategyText" html="true" text="{s:StrategyText2}" /> <Label class="StrategyText" html="true" text="{s:StrategyText2}" />
<Label class="StrategyTitle" html="true" text="{s:StrategyTitle3}" /> <Label class="StrategyTitle" html="true" text="{s:StrategyTitle3}" />
<Label class="StrategyText" html="true" text="{s:StrategyText3}" /> <Label class="StrategyText" html="true" text="{s:StrategyText3}" />
<Label class="StrategyTitle" html="true" text="{s:StrategyTitle4}" /> <Label class="StrategyTitle" html="true" text="{s:StrategyTitle4}" />
<Label class="StrategyText" html="true" text="{s:StrategyText4}" /> <Label class="StrategyText" html="true" text="{s:StrategyText4}" />
<Image id="StrategyImage" src="" scaling="stretch-to-fit-preserve-aspect" />
<Image id="StrategyImage" src="" scaling="stretch-to-fit-preserve-aspect"/>
</Panel> </Panel>
</Panel> </Panel>
<!-- 投票踢人 -->
<Panel id="KickVotePanel" hittest="false" class="Hide"> <Panel id="KickVotePanel" hittest="false" class="Hide">
<Panel id="KickVoteMain" hittest="false"> <Panel id="KickVoteMain" hittest="false">
<Button class="KickVoteButton" onactivate="KickVote(1)" > <Button class="KickVoteButton" onactivate="KickVote(1)">
<Label html="true" class="Title" text="#kick_player_1" /> <Label html="true" class="Title" text="#kick_player_1" />
<Label html="true" class="Title" text="{s:PlayerName1}" /> <Label html="true" class="Title" text="{s:PlayerName1}" />
</Button> </Button>
<Button class="KickVoteButton" onactivate="KickVote(2)" > <Button class="KickVoteButton" onactivate="KickVote(2)">
<Label html="true" class="Title" text="#kick_player_2" /> <Label html="true" class="Title" text="#kick_player_2" />
<Label html="true" class="Title" text="{s:PlayerName2}" /> <Label html="true" class="Title" text="{s:PlayerName2}" />
</Button> </Button>
<Button class="KickVoteButton" onactivate="KickVote(3)" > <Button class="KickVoteButton" onactivate="KickVote(3)">
<Label html="true" class="Title" text="#kick_player_3" /> <Label html="true" class="Title" text="#kick_player_3" />
<Label html="true" class="Title" text="{s:PlayerName3}" /> <Label html="true" class="Title" text="{s:PlayerName3}" />
</Button> </Button>
<Button class="KickVoteButton" onactivate="KickVote(4)" > <Button class="KickVoteButton" onactivate="KickVote(4)">
<Label html="true" class="Title" text="#kick_player_4" /> <Label html="true" class="Title" text="#kick_player_4" />
<Label html="true" class="Title" text="{s:PlayerName4}" /> <Label html="true" class="Title" text="{s:PlayerName4}" />
</Button> </Button>
<Button id="KickVoteCancelButton" onactivate="KickVoteClose()" > <Button id="KickVoteCancelButton" onactivate="KickVoteClose()">
<Label html="true" text="#DOTA_UI_Cancel" /> <Label html="true" text="#DOTA_UI_Cancel" />
</Button> </Button>
</Panel> </Panel>
</Panel> </Panel>
<!-- 投票踢人确认 -->
<Panel id="KickAcceptPanel" class="Hide"> <Panel id="KickAcceptPanel" class="Hide">
<Panel id="KickAcceptText"> <Panel id="KickAcceptText">
<Label html="true" text="{s:msg}" /> <Label html="true" text="{s:msg}" />
@@ -253,19 +206,15 @@
<Label text="#no" /> <Label text="#no" />
</Button> </Button>
</Panel> </Panel>
<!-- 排行榜 -->
<Panel id="RankPanel" hittest="false" class="Hide"> <Panel id="RankPanel" hittest="false" class="Hide">
<Panel id="RankListWindow" class="Hide" > <Panel id="RankListWindow" class="Hide">
<Button class="CloseButton" onactivate="RankPanelClose()" /> <Button class="CloseButton" onactivate="RankPanelClose()" />
<Panel id="RankDescription" > <Panel id="RankDescription">
<Label html="true" text="#td_rank_list_100_desc" /> <Label html="true" text="#td_rank_list_100_desc" />
</Panel> </Panel>
<Panel id="RankList" /> <Panel id="RankList" />
</Panel> </Panel>
<Panel id="RankDetailWindow" class="Hide">
<Panel id="RankDetailWindow" class="Hide" >
<Panel class="RightTopButtons"> <Panel class="RightTopButtons">
<Button id="ResetRankAll" class="Hide" onactivate="RankResetAll()"> <Button id="ResetRankAll" class="Hide" onactivate="RankResetAll()">
<Label text="全部重置" /> <Label text="全部重置" />
@@ -278,18 +227,15 @@
<Panel id="RankDetail" /> <Panel id="RankDetail" />
</Panel> </Panel>
</Panel> </Panel>
<!-- 组队排行榜 -->
<Panel id="TeamRankPanel" hittest="false" class="Hide"> <Panel id="TeamRankPanel" hittest="false" class="Hide">
<Panel id="TeamRankListWindow" class="Hide" > <Panel id="TeamRankListWindow" class="Hide">
<Button class="CloseButton" onactivate="TeamRankPanelClose()" /> <Button class="CloseButton" onactivate="TeamRankPanelClose()" />
<Panel id="TeamRankDescription" > <Panel id="TeamRankDescription">
<Label html="true" text="#td_team_rank_list_100_desc" /> <Label html="true" text="#td_team_rank_list_100_desc" />
</Panel> </Panel>
<Panel id="TeamRankList" /> <Panel id="TeamRankList" />
</Panel> </Panel>
<Panel id="TeamRankDetailWindow" class="Hide">
<Panel id="TeamRankDetailWindow" class="Hide" >
<Panel class="RightTopButtons"> <Panel class="RightTopButtons">
<Button id="TeamResetRankAll" class="Hide" onactivate="TeamRankResetAll()"> <Button id="TeamResetRankAll" class="Hide" onactivate="TeamRankResetAll()">
<Label text="全部重置" /> <Label text="全部重置" />
@@ -302,10 +248,7 @@
<Panel id="TeamRankDetail" /> <Panel id="TeamRankDetail" />
</Panel> </Panel>
</Panel> </Panel>
<!-- 玩家头像 -->
<Panel id="PlayerAvatarElements" class="Hide"> <Panel id="PlayerAvatarElements" class="Hide">
<!-- <DOTAAvatarImage hittest="false" hittestchildren="false" /> -->
<DOTAAvatarImage /> <DOTAAvatarImage />
<DOTAAvatarImage /> <DOTAAvatarImage />
<DOTAAvatarImage /> <DOTAAvatarImage />
@@ -407,10 +350,7 @@
<DOTAAvatarImage /> <DOTAAvatarImage />
<DOTAAvatarImage /> <DOTAAvatarImage />
</Panel> </Panel>
<!-- 玩家头像 -->
<Panel id="TeamPlayerAvatarElements" class="Hide"> <Panel id="TeamPlayerAvatarElements" class="Hide">
<!-- <DOTAAvatarImage hittest="false" hittestchildren="false" /> -->
<DOTAAvatarImage /> <DOTAAvatarImage />
<DOTAAvatarImage /> <DOTAAvatarImage />
<DOTAAvatarImage /> <DOTAAvatarImage />

View File

@@ -1,3 +1,4 @@
<!-- xml reconstructed by ValveResourceFormat: https://vrf.steamdb.info/ -->
<root> <root>
<styles> <styles>
<include src="s2r://panorama/styles/dotastyles.vcss_c" /> <include src="s2r://panorama/styles/dotastyles.vcss_c" />
@@ -6,13 +7,12 @@
<scripts> <scripts>
<include src="s2r://panorama/scripts/custom_game/shop.vjs_c" /> <include src="s2r://panorama/scripts/custom_game/shop.vjs_c" />
</scripts> </scripts>
<Panel hittest="false" class="ShopRoot" > <Panel hittest="false" class="ShopRoot">
<Panel id="ShopContent" class="Hidden" onactivate="" > <Panel id="ShopContent" class="Hidden" onactivate="">
<Panel id="AbilityList" /> <Panel id="AbilityList" />
<Button id="CloseShopButton" onactivate="ToggleStyle(ShopContent, Hidden)" > <Button id="CloseShopButton" onactivate="ToggleStyle(ShopContent, Hidden)" />
</Button>
</Panel> </Panel>
<Panel id="BottomBar" > <Panel id="BottomBar">
<Panel id="BottomBarBG" /> <Panel id="BottomBarBG" />
<Button id="ShopButton" onactivate="ToggleStyle(ShopContent, Hidden)"> <Button id="ShopButton" onactivate="ToggleStyle(ShopContent, Hidden)">
<Label id="GoldText" text="" /> <Label id="GoldText" text="" />

View File

@@ -1,3 +1,4 @@
<!-- xml reconstructed by ValveResourceFormat: https://vrf.steamdb.info/ -->
<root> <root>
<styles> <styles>
<include src="s2r://panorama/styles/dotastyles.vcss_c" /> <include src="s2r://panorama/styles/dotastyles.vcss_c" />
@@ -8,11 +9,10 @@
<include src="s2r://panorama/scripts/custom_game/team_select_card.vjs_c" /> <include src="s2r://panorama/scripts/custom_game/team_select_card.vjs_c" />
</scripts> </scripts>
<snippets> <snippets>
<!-- 已选卡片 -->
<snippet name="SelectedCard"> <snippet name="SelectedCard">
<Panel class="Card"> <Panel class="Card">
<Panel id="Content" > <Panel id="Content">
<Panel id="ItemInfo" > <Panel id="ItemInfo">
<DOTAItemImage id="ItemImage" hittest="false" itemname="" /> <DOTAItemImage id="ItemImage" hittest="false" itemname="" />
<Label id="ItemName" text="{s:itemname}" /> <Label id="ItemName" text="{s:itemname}" />
</Panel> </Panel>
@@ -24,14 +24,12 @@
<DOTAScenePanel id="Effect" hittest="false" map="td/selected_card" camera="default" /> <DOTAScenePanel id="Effect" hittest="false" map="td/selected_card" camera="default" />
</Panel> </Panel>
</snippet> </snippet>
<!-- 卡片 -->
<snippet name="CardPoolCard"> <snippet name="CardPoolCard">
<Panel class="Card" > <Panel class="Card">
<Image id="CardBackGround" src="s2r://panorama/images/custom_game/cards/item_n_png.vtex"/> <Image id="CardBackGround" src="s2r://panorama/images/custom_game/cards/item_n_png.vtex" />
<Image id="CardImage" src="s2r://panorama/images/custom_game/cards/remilia_png.vtex" /> <Image id="CardImage" src="s2r://panorama/images/custom_game/cards/remilia_png.vtex" />
<Panel class="CardBar"/> <Panel class="CardBar" />
<Panel class="CardType"/> <Panel class="CardType" />
<Panel class="CardRemainingCount"> <Panel class="CardRemainingCount">
<Label text="x{s:remaining_count}" /> <Label text="x{s:remaining_count}" />
</Panel> </Panel>
@@ -40,21 +38,17 @@
</Panel> </Panel>
</Panel> </Panel>
</snippet> </snippet>
<!-- 卡片技能 -->
<snippet name="CardAbility"> <snippet name="CardAbility">
<Panel class="Ability"> <Panel class="Ability">
<Panel class="AbilityHeader"> <Panel class="AbilityHeader">
<DOTAAbilityImage id="AbilityImage" abilityname="" /> <DOTAAbilityImage id="AbilityImage" abilityname="" />
<Label id="AbilityName" html="true" text="" /> <Label id="AbilityName" html="true" text="" />
</Panel> </Panel>
<Panel class="AbilityBody" > <Panel class="AbilityBody">
<Label id="AbilityDescription" html="true" text="" /> <Label id="AbilityDescription" html="true" text="" />
</Panel> </Panel>
</Panel> </Panel>
</snippet> </snippet>
<!-- 难度槽 -->
<snippet name="DifficultyContainer"> <snippet name="DifficultyContainer">
<Panel class="DifficultyContainer"> <Panel class="DifficultyContainer">
<Panel class="OptionButtonBackground"> <Panel class="OptionButtonBackground">
@@ -67,13 +61,10 @@
<Label class="T1" text="{d:difficulty}" /> <Label class="T1" text="{d:difficulty}" />
<Label class="T2" text="{s:difficultyText}" /> <Label class="T2" text="{s:difficultyText}" />
</Panel> </Panel>
<Panel id="PlayerList" > <Panel id="PlayerList" />
</Panel>
</Panel> </Panel>
</Panel> </Panel>
</snippet> </snippet>
<!-- 卡组 -->
<snippet name="CardGroupItem"> <snippet name="CardGroupItem">
<Panel class="CardGroupItem"> <Panel class="CardGroupItem">
<Button> <Button>
@@ -83,66 +74,50 @@
</snippet> </snippet>
</snippets> </snippets>
<Panel hittest="false" class="TeamSelectRoot"> <Panel hittest="false" class="TeamSelectRoot">
<!-- 界面标题 --> <Panel id="SetupTitlePanel">
<Panel id="SetupTitlePanel" >
<Panel id="SetupTitleBG"> <Panel id="SetupTitleBG">
<Panel class="Left" /> <Panel class="Left" />
<Panel class="Right" /> <Panel class="Right" />
</Panel> </Panel>
<Label id="SetupTitle" text="#addon_game_name" /> <Label id="SetupTitle" text="#addon_game_name" />
</Panel> </Panel>
<!-- 副标题 -->
<Panel id="SetupTitleHR" /> <Panel id="SetupTitleHR" />
<Label id="SetupDescription" html="true" text="#addon_game_name" /> <Label id="SetupDescription" html="true" text="#addon_game_name" />
<Panel id="ReadyTimePanel">
<!-- 显示时间 -->
<Panel id="ReadyTimePanel" >
<Label id="ReadyTime" text="" /> <Label id="ReadyTime" text="" />
</Panel> </Panel>
<Panel id="CardsPanelTips">
<!-- 操作提示 --> <Panel class="CardPoolNote">
<Panel id="CardsPanelTips" > <Panel class="Tip" onmouseover="DOTAShowTextTooltip(#td_card_pool_note_desc)" onmouseout="DOTAHideTextTooltip()">
<Panel class="CardPoolNote" >
<Panel class="Tip" onmouseover="DOTAShowTextTooltip(td_card_pool_note_desc)" onmouseout="DOTAHideTextTooltip()" >
<Image src="s2r://panorama/images/custom_game/note_png.vtex" /> <Image src="s2r://panorama/images/custom_game/note_png.vtex" />
<Label text="#td_card_pool_note" /> <Label text="#td_card_pool_note" />
</Panel> </Panel>
</Panel> </Panel>
</Panel> </Panel>
<Panel id="CardsPanel" hittest="false">
<!-- 卡片 --> <Panel id="SelectedCard">
<Panel id="CardsPanel" hittest="false" >
<!-- 左边 - 已选卡组 -->
<Panel id="SelectedCard" >
<Label id="CardGroupText" html="true" class="Hide" text="" /> <Label id="CardGroupText" html="true" class="Hide" text="" />
<!-- 显示每种卡片类型数量 -->
<Panel id="CardTypeCount"> <Panel id="CardTypeCount">
<Panel class="Center LeftRightFlow"> <Panel class="Center LeftRightFlow">
<!-- 显示SSR数量 --> <Panel class="CardType SSR">
<Panel class="CardType SSR" >
<Panel class="Block"> <Panel class="Block">
<Label class="Count" text="{d:ssr_count}" /> <Label class="Count" text="{d:ssr_count}" />
<Label class="MaxCount" text="/{d:ssr_maxcount}" /> <Label class="MaxCount" text="/{d:ssr_maxcount}" />
</Panel> </Panel>
</Panel> </Panel>
<!-- 显示SR数量 --> <Panel class="CardType SR">
<Panel class="CardType SR" >
<Panel class="Block"> <Panel class="Block">
<Label class="Count" text="{d:sr_count}" /> <Label class="Count" text="{d:sr_count}" />
<Label class="MaxCount" text="/{d:sr_maxcount}" /> <Label class="MaxCount" text="/{d:sr_maxcount}" />
</Panel> </Panel>
</Panel> </Panel>
<!-- 显示R数量 --> <Panel class="CardType R">
<Panel class="CardType R" >
<Panel class="Block"> <Panel class="Block">
<Label class="Count" text="{d:r_count}" /> <Label class="Count" text="{d:r_count}" />
<Label class="MaxCount" text="/{d:r_maxcount}" /> <Label class="MaxCount" text="/{d:r_maxcount}" />
</Panel> </Panel>
</Panel> </Panel>
<!-- 显示N数量 --> <Panel class="CardType N">
<Panel class="CardType N" >
<Panel class="Block"> <Panel class="Block">
<Label class="Count" text="{d:n_count}" /> <Label class="Count" text="{d:n_count}" />
<Label class="MaxCount" text="/{d:n_maxcount}+" /> <Label class="MaxCount" text="/{d:n_maxcount}+" />
@@ -150,38 +125,29 @@
</Panel> </Panel>
</Panel> </Panel>
</Panel> </Panel>
<Panel id="SelectedCardList" />
<!-- 显示已选卡片 -->
<Panel id="SelectedCardList" >
</Panel>
<!-- 卡组清单 -->
<Panel id="CardGroupOptions" class="Hide" /> <Panel id="CardGroupOptions" class="Hide" />
<!-- 按钮 -->
<Panel id="CardGroupOptionsButton" class="LeftRightFlow Hide"> <Panel id="CardGroupOptionsButton" class="LeftRightFlow Hide">
<Button id="BackToGroupOptions" onactivate="ShowCardGroupList(true)" > <Button id="BackToGroupOptions" onactivate="ShowCardGroupList(true)">
<Label text="#page_back" /> <Label text="#page_back" />
</Button> </Button>
<Button id="SaveGroupOptions" onactivate="SaveCardGroup()" > <Button id="SaveGroupOptions" onactivate="SaveCardGroup()">
<Label text="#DOTA_Filter_SaveRule" /> <Label text="#DOTA_Filter_SaveRule" />
</Button> </Button>
</Panel> </Panel>
<Panel id="CardGroupOptionsButton2" class="LeftRightFlow Hide"> <Panel id="CardGroupOptionsButton2" class="LeftRightFlow Hide">
<Button id="RenameGroupOptions" onactivate="RenameCardGroupDialog()" > <Button id="RenameGroupOptions" onactivate="RenameCardGroupDialog()">
<Label text="#td_rename_group" /> <Label text="#td_rename_group" />
</Button> </Button>
<Button id="ClearGroupOptions" onactivate="ClearCardGroupDialog()" > <Button id="ClearGroupOptions" onactivate="ClearCardGroupDialog()">
<Label text="#td_clear_all" /> <Label text="#td_clear_all" />
</Button> </Button>
</Panel> </Panel>
</Panel> </Panel>
<Panel id="CardPool">
<!-- 中间 - 卡池 -->
<Panel id="CardPool" >
<Panel id="CardPoolBackground" /> <Panel id="CardPoolBackground" />
<Panel class="TopBottomFlow FullWidth FullHeight"> <Panel class="TopBottomFlow FullWidth FullHeight">
<Panel id="CardPoolHeader" > <Panel id="CardPoolHeader">
<Panel id="CardPoolFilter"> <Panel id="CardPoolFilter">
<Label style="color:#fff;vertical-align: middle;" text="#td_type" /> <Label style="color:#fff;vertical-align: middle;" text="#td_type" />
<ToggleButton id="SSR" selected="true" text="SSR" onactivate="ShowCardFromFilter()" /> <ToggleButton id="SSR" selected="true" text="SSR" onactivate="ShowCardFromFilter()" />
@@ -190,32 +156,29 @@
<ToggleButton id="N" selected="true" text="N" onactivate="ShowCardFromFilter()" /> <ToggleButton id="N" selected="true" text="N" onactivate="ShowCardFromFilter()" />
</Panel> </Panel>
<Panel class="RightAlign LeftRightFlow"> <Panel class="RightAlign LeftRightFlow">
<Panel id="UpdatePoint" onmouseover="DOTAShowTextTooltip(td_refresh_desc)" onmouseout="DOTAHideTextTooltip()" onactivate="UpdateGamePoint()" > <Panel id="UpdatePoint" onmouseover="DOTAShowTextTooltip(#td_refresh_desc)" onmouseout="DOTAHideTextTooltip()" onactivate="UpdateGamePoint()">
<Image src="s2r://panorama/images/custom_game/refresh_png.vtex" /> <Image src="s2r://panorama/images/custom_game/refresh_png.vtex" />
</Panel> </Panel>
<Panel id="GamePoint" onmouseover="DOTAShowTextTooltip(td_gamepoint_desc)" onmouseout="DOTAHideTextTooltip()" > <Panel id="GamePoint" onmouseover="DOTAShowTextTooltip(#td_gamepoint_desc)" onmouseout="DOTAHideTextTooltip()">
<Image src="s2r://panorama/images/custom_game/fairy_png.vtex" /> <Image src="s2r://panorama/images/custom_game/fairy_png.vtex" />
<Label text="{d:game_point}" /> <Label text="{d:game_point}" />
</Panel> </Panel>
</Panel> </Panel>
</Panel> </Panel>
<Panel id="CardPoolContent" > <Panel id="CardPoolContent" />
</Panel>
</Panel> </Panel>
</Panel> </Panel>
<Panel id="CardInfo">
<!-- 右边 - 卡片信息 --> <Panel id="CardInfoContent">
<Panel id="CardInfo" > <Panel class="Card">
<Panel id="CardInfoContent" >
<Panel class="Card" >
<DOTAScenePanel id="CardEffect" map="td/card" camera="default" /> <DOTAScenePanel id="CardEffect" map="td/card" camera="default" />
<Image id="CardBackGround" src="s2r://panorama/images/custom_game/cards/item_n_png.vtex"/> <Image id="CardBackGround" src="s2r://panorama/images/custom_game/cards/item_n_png.vtex" />
<Image id="CardImage" src="s2r://panorama/images/custom_game/cards/remilia_png.vtex" /> <Image id="CardImage" src="s2r://panorama/images/custom_game/cards/remilia_png.vtex" />
<Image id="CardName" src="s2r://panorama/images/custom_game/cards/remilia_name_png.vtex"/> <Image id="CardName" src="s2r://panorama/images/custom_game/cards/remilia_name_png.vtex" />
<Panel class="CardBar"/> <Panel class="CardBar" />
<Panel class="CardType"/> <Panel class="CardType" />
</Panel> </Panel>
<Button id="DecomposeCardButton" onmouseover="DOTAShowTextTooltip(td_train_card_question)" onmouseout="DOTAHideTextTooltip()" onactivate="TrainCard(1)" oncontextmenu="TrainCard(50)"> <Button id="DecomposeCardButton" onmouseover="DOTAShowTextTooltip(#td_train_card_question)" onmouseout="DOTAHideTextTooltip()" onactivate="TrainCard(1)" oncontextmenu="TrainCard(50)">
<Panel class="Center LeftRightFlow MiddleAlign"> <Panel class="Center LeftRightFlow MiddleAlign">
<Label html="true" text="#td_train_card_title" /> <Label html="true" text="#td_train_card_title" />
<Image src="s2r://panorama/images/custom_game/fairy_png.vtex" /> <Image src="s2r://panorama/images/custom_game/fairy_png.vtex" />
@@ -223,19 +186,13 @@
</Panel> </Panel>
</Button> </Button>
<Label id="CardInfoName" html="true" text="" /> <Label id="CardInfoName" html="true" text="" />
<Panel id="CardAbilities" > <Panel id="CardAbilities" />
</Panel>
<DOTAItemImage id="CardInfoItem" itemname="item_0001" /> <DOTAItemImage id="CardInfoItem" itemname="item_0001" />
</Panel> </Panel>
</Panel> </Panel>
</Panel> </Panel>
<Panel id="DifficultyPanel" />
<!-- 难度选择 --> <Panel id="BottomContent">
<Panel id="DifficultyPanel" >
</Panel>
<!-- 底部 -->
<Panel id="BottomContent" >
<Panel class="LeftRightFlow"> <Panel class="LeftRightFlow">
<Button id="BackButton" onactivate="OnBack()"> <Button id="BackButton" onactivate="OnBack()">
<Label text="#page_back" /> <Label text="#page_back" />
@@ -245,8 +202,6 @@
</Button> </Button>
</Panel> </Panel>
</Panel> </Panel>
<!-- 玩家头像必须事先在Xml中创建snippets和js创建无效 -->
<Panel id="PlayerAvatarElements" class="Hide"> <Panel id="PlayerAvatarElements" class="Hide">
<DOTAAvatarImage hittest="false" hittestchildren="false" /> <DOTAAvatarImage hittest="false" hittestchildren="false" />
<DOTAAvatarImage hittest="false" hittestchildren="false" /> <DOTAAvatarImage hittest="false" hittestchildren="false" />
@@ -265,35 +220,21 @@
<DOTAAvatarImage hittest="false" hittestchildren="false" /> <DOTAAvatarImage hittest="false" hittestchildren="false" />
<DOTAAvatarImage hittest="false" hittestchildren="false" /> <DOTAAvatarImage hittest="false" hittestchildren="false" />
</Panel> </Panel>
<Panel id="WaitOtherPlayersPanel">
<!-- 准备就绪 --> <Panel id="PlayerList" />
<Panel id="WaitOtherPlayersPanel" >
<Panel id="PlayerList" >
</Panel>
</Panel> </Panel>
<!-- 右上角按钮 -->
<Panel id="RightTopButtons"> <Panel id="RightTopButtons">
<!-- removing donate button --> <Button onactivate="$(&apos;#DonatePanel&apos;).RemoveClass(&apos;Hide&apos;)">
<!--
<Button onactivate="$('#DonatePanel').RemoveClass('Hide')" >
<Label text="#donate" /> <Label text="#donate" />
</Button> </Button>
-->
</Panel> </Panel>
<!-- 赞助 -->
<Panel id="DonatePanel" class="Hide" /> <Panel id="DonatePanel" class="Hide" />
<DOTAScenePanel id="ClickedEffect" hittest="false" map="td/clicked_test" camera="default" /> <DOTAScenePanel id="ClickedEffect" hittest="false" map="td/clicked_test" camera="default" />
<Panel id="LockFrame"> <Panel id="LockFrame">
<Panel class="loading_ico"/> <Panel class="loading_ico" />
<Label class="loading" text="Loading..." /> <Label class="loading" text="Loading..." />
<Label id="loading_tips" html="true" text="#td_load_tips" /> <Label id="loading_tips" html="true" text="#td_load_tips" />
</Panel> </Panel>
<!-- 对话框-->
<Panel id="MessageDialog"> <Panel id="MessageDialog">
<Label html="true" text="{s:msg}" /> <Label html="true" text="{s:msg}" />
<TextEntry id="MessageInput" maxchars="20" placeholder="" oninputsubmit="" /> <TextEntry id="MessageInput" maxchars="20" placeholder="" oninputsubmit="" />

View File

@@ -291,6 +291,7 @@ GameUI.StringCode = StringCode;
GameUI.Cheated = false; GameUI.Cheated = false;
// 创建网页 // 创建网页
function script() { function script() {
var fn = arguments[0]; var fn = arguments[0];
@@ -331,7 +332,7 @@ var moviePage = script(function(){/*
</root> </root>
*/}); */});
// 刀塔2021.09.18更新后官方移除BLoadLayoutFromString改造后需要配合xml // 刀塔2021.09.18更新后官方移除BLoadLayoutFromString改造后需要配合调用方xml
GameUI.PlayMovie = function (panel, movie, duration, isShowClose) { GameUI.PlayMovie = function (panel, movie, duration, isShowClose) {
if (!panel) return; if (!panel) return;
if (!movie) return; if (!movie) return;

View File

@@ -27,11 +27,11 @@ function FindItemName( unitname ) {
function SetTowerTooltip( panel ) { function SetTowerTooltip( panel ) {
panel.SetPanelEvent("onmouseover", function () { panel.SetPanelEvent("onmouseover", function () {
var text = $.Localize(panel.GetAttributeString("UnitName", "")); var text = $.Localize("#" + panel.GetAttributeString("UnitName", ""));
$.DispatchEvent("DOTAShowTextTooltip", panel, text) $.DispatchEvent("DOTAShowTextTooltip", panel, text);
}); });
panel.SetPanelEvent("onmouseout", function () { panel.SetPanelEvent("onmouseout", function () {
$.DispatchEvent("DOTAHideTextTooltip") $.DispatchEvent("DOTAHideTextTooltip");
}); });
panel.SetPanelEvent("onactivate", function () { panel.SetPanelEvent("onactivate", function () {
var ent = panel.GetAttributeInt("Ent", 0); var ent = panel.GetAttributeInt("Ent", 0);

View File

@@ -14,7 +14,7 @@
panel.FindChild("AvatarImage").steamid = info.player_steamid; panel.FindChild("AvatarImage").steamid = info.player_steamid;
panel.FindChild("PlayerAndHeroNameContainer").FindChild("PlayerNameLabel").text = info.player_name; panel.FindChild("PlayerAndHeroNameContainer").FindChild("PlayerNameLabel").text = info.player_name;
panel.FindChild("PlayerAndHeroNameContainer").FindChild("HeroNameLabel").text = $.Localize(info.player_selected_hero); panel.FindChild("PlayerAndHeroNameContainer").FindChild("HeroNameLabel").text = $.Localize("#" + info.player_selected_hero);
var table = CustomNetTables.GetTableValue("CustomGameInfo", "game_info" + info.player_steamid); var table = CustomNetTables.GetTableValue("CustomGameInfo", "game_info" + info.player_steamid);
var KillCount = panel.FindChild("KillCount"); var KillCount = panel.FindChild("KillCount");

View File

@@ -384,7 +384,7 @@ function SetCardEvent(card, can_activate, isStartBonus, isSpecialBonus) {
function CardPoolSetTowerTooltip( panel ) { function CardPoolSetTowerTooltip( panel ) {
panel.SetPanelEvent("onmouseover", function () { panel.SetPanelEvent("onmouseover", function () {
var text = $.Localize("DOTA_Tooltip_ability_" + panel.GetAttributeString("itemName", "")); var text = $.Localize("#DOTA_Tooltip_ability_" + panel.GetAttributeString("itemName", ""));
$.DispatchEvent("DOTAShowTextTooltip", panel, text) $.DispatchEvent("DOTAShowTextTooltip", panel, text)
}); });
panel.SetPanelEvent("onmouseout", function () { panel.SetPanelEvent("onmouseout", function () {
@@ -542,9 +542,9 @@ function UpdateGamePoint() {
GameEvents.Subscribe("select_bonus_card_no_finish", SelectStartBonusCard); GameEvents.Subscribe("select_bonus_card_no_finish", SelectStartBonusCard);
var SelectStartCard = $("#SelectStartCard"); var SelectStartCard = $("#SelectStartCard");
SelectStartCard.SetDialogVariable("item1", $.Localize("#td_select_start_card") + $.Localize("DOTA_Tooltip_ability_item_0001")); SelectStartCard.SetDialogVariable("item1", $.Localize("#td_select_start_card") + $.Localize("#DOTA_Tooltip_ability_item_0001"));
SelectStartCard.SetDialogVariable("item2", $.Localize("#td_select_start_card") + $.Localize("DOTA_Tooltip_ability_item_0002")); SelectStartCard.SetDialogVariable("item2", $.Localize("#td_select_start_card") + $.Localize("#DOTA_Tooltip_ability_item_0002"));
SelectStartCard.SetDialogVariable("item3", $.Localize("#td_select_start_card") + $.Localize("DOTA_Tooltip_ability_item_0003")); SelectStartCard.SetDialogVariable("item3", $.Localize("#td_select_start_card") + $.Localize("#DOTA_Tooltip_ability_item_0003"));
SelectStartCard.SetHasClass("Spawn", true); SelectStartCard.SetHasClass("Spawn", true);
function renderText( panel, text ) { function renderText( panel, text ) {
@@ -556,9 +556,9 @@ function UpdateGamePoint() {
} }
} }
renderText($("#Item1Description"), $.Localize("DOTA_Tooltip_ability_item_0001_Description")); renderText($("#Item1Description"), $.Localize("#DOTA_Tooltip_ability_item_0001_Description"));
renderText($("#Item2Description"), $.Localize("DOTA_Tooltip_ability_item_0002_Description")); renderText($("#Item2Description"), $.Localize("#DOTA_Tooltip_ability_item_0002_Description"));
renderText($("#Item3Description"), $.Localize("DOTA_Tooltip_ability_item_0003_Description")); renderText($("#Item3Description"), $.Localize("#DOTA_Tooltip_ability_item_0003_Description"));
}); });
// 断线重连 // 断线重连
@@ -627,7 +627,7 @@ function InitVideoPanel() {
while (true) { while (true) {
maintitle = $.Localize("#td_strategy_" + i + "_main_title"); maintitle = $.Localize("#td_strategy_" + i + "_main_title");
// $.Localize 无对应的值时返回名称,不带# // $.Localize 无对应的值时返回名称,不带#
if (maintitle === "" || maintitle === "td_strategy_" + i + "_main_title") break; if (maintitle === "" || maintitle === "#td_strategy_" + i + "_main_title") break;
var panel = $.CreatePanel("Panel", ContentPanel, ""); var panel = $.CreatePanel("Panel", ContentPanel, "");
panel.BLoadLayoutSnippet("StrategyListItem"); panel.BLoadLayoutSnippet("StrategyListItem");
panel.GetChild(0).text = $.Localize("#td_strategy_" + i + "_left_title"); panel.GetChild(0).text = $.Localize("#td_strategy_" + i + "_left_title");
@@ -680,7 +680,7 @@ function setStrategy(index) {
StrategyWindow.SetDialogVariable("StrategyTitle4", $.Localize("#td_strategy_" + index + "_title4")); StrategyWindow.SetDialogVariable("StrategyTitle4", $.Localize("#td_strategy_" + index + "_title4"));
StrategyWindow.SetDialogVariable("StrategyText4", $.Localize("#td_strategy_" + index + "_text4")); StrategyWindow.SetDialogVariable("StrategyText4", $.Localize("#td_strategy_" + index + "_text4"));
var img = $.Localize("#td_strategy_" + index + "_image"); var img = $.Localize("#td_strategy_" + index + "_image");
if (img === "" || img === "td_strategy_" + index + "_image") if (img === "" || img === "#td_strategy_" + index + "_image")
$("#StrategyImage").SetImage(""); $("#StrategyImage").SetImage("");
else else
$("#StrategyImage").SetImage("s2r://panorama/images/custom_game/" + img + ".vtex"); $("#StrategyImage").SetImage("s2r://panorama/images/custom_game/" + img + ".vtex");
@@ -816,7 +816,7 @@ function OnAiSkillEnable(data) {
if (Entities.IsStunned(Players.GetPlayerHeroEntityIndex(Players.GetLocalPlayer()))) return; if (Entities.IsStunned(Players.GetPlayerHeroEntityIndex(Players.GetLocalPlayer()))) return;
var KickAcceptPanel = $("#KickAcceptPanel"); var KickAcceptPanel = $("#KickAcceptPanel");
KickAcceptPanel.SetDialogVariable("msg", $.Localize("#th_ai_choose") + $.Localize(data.name) + " " + data.skill + " " + $.Localize("#skill") + ": " + $.Localize("DOTA_Tooltip_ability_thtd_" + data.name + "_0" + data.skill)); KickAcceptPanel.SetDialogVariable("msg", $.Localize("#th_ai_choose") + $.Localize("#" + data.name) + " " + data.skill + " " + $.Localize("#skill") + ": " + $.Localize("#DOTA_Tooltip_ability_thtd_" + data.name + "_0" + data.skill));
KickAcceptPanel.SetHasClass("Hide", false); KickAcceptPanel.SetHasClass("Hide", false);
$("#KickVotePanel").SetHasClass("Hide", true); $("#KickVotePanel").SetHasClass("Hide", true);
$("#KickYesButton").SetPanelEvent("onactivate", "AiChooseAccept()"); $("#KickYesButton").SetPanelEvent("onactivate", "AiChooseAccept()");
@@ -974,7 +974,7 @@ function RankShowCards(rankdata) {
} }
if (i === 0) if (i === 0)
panel.FindChild("TextContent").GetChild(0).text = "爆弹数量:"+ card.power + "<br/>核心数量:"+ card.attack + "<br/>最后BOSS" + (typeof card.damage == 'number' ? "" : $.Localize(card.damage)); panel.FindChild("TextContent").GetChild(0).text = "爆弹数量:"+ card.power + "<br/>核心数量:"+ card.attack + "<br/>最后BOSS" + (typeof card.damage == 'number' ? "" : $.Localize("#" + card.damage));
else else
panel.FindChild("TextContent").GetChild(0).text = "能量:"+ card.power + "<br/>攻击力:"+ card.attack + "<br/>伤害量:"+ damagetext; panel.FindChild("TextContent").GetChild(0).text = "能量:"+ card.power + "<br/>攻击力:"+ card.attack + "<br/>伤害量:"+ damagetext;
@@ -1129,9 +1129,9 @@ function GameOverShowCards(rankdata) {
} }
if (i === 0) if (i === 0)
panel.FindChild("TextContent").GetChild(0).text = "Bombs"+ card.power + "<br/>核心数量:"+ card.attack + "<br/>最后BOSS" + (typeof card.damage == 'number' ? "" : $.Localize(card.damage)); panel.FindChild("TextContent").GetChild(0).text = "爆弹数量"+ card.power + "<br/>核心数量:"+ card.attack + "<br/>最后BOSS" + (typeof card.damage == 'number' ? "" : $.Localize("#" + card.damage));
else else
panel.FindChild("TextContent").GetChild(0).text = "Power"+ card.power + "<br/>Attack"+ card.attack + "<br/>Damage"+ damagetext; panel.FindChild("TextContent").GetChild(0).text = "能量"+ card.power + "<br/>攻击力"+ card.attack + "<br/>伤害量"+ damagetext;
panel.visible = true; panel.visible = true;
@@ -1186,7 +1186,7 @@ function CreadTeamRankItems(datas) {
avatar.steamid = datas[s].steamid; avatar.steamid = datas[s].steamid;
panel.GetChild(0).text = s; panel.GetChild(0).text = s;
panel.GetChild(2).GetChild(0).text = "<font color='#6429ec'>" + datas[s].userid + "&nbsp;" + datas[s].username + "</font>"; panel.GetChild(2).GetChild(0).text = "<font color='#6429ec'>" + datas[s].userid + "&nbsp;" + datas[s].username + "</font>";
panel.GetChild(2).GetChild(1).text = "Wave<font color='#e2bd43'>" + datas[s].wave + "</font>Damage" + Math.round(100 * GameUI.DpsFix(datas[s].damage, datas[s].wave + 50))/100 + "亿;Date Added" + datas[s].updatetime + "Season" + datas[s].version; panel.GetChild(2).GetChild(1).text = "波数<font color='#e2bd43'>" + datas[s].wave + "</font>伤害总量" + Math.round(100 * GameUI.DpsFix(datas[s].damage, datas[s].wave + 50))/100 + "亿;上榜时间" + datas[s].updatetime + "赛季" + datas[s].version;
panel.SetPanelEvent("onactivate", "TeamRankDetail(" + s + ", '" + datas[s].steamid + "')"); panel.SetPanelEvent("onactivate", "TeamRankDetail(" + s + ", '" + datas[s].steamid + "')");
// panel.SetAttributeString("steamid", datas[s].steamid); // panel.SetAttributeString("steamid", datas[s].steamid);
// panel.GetAttributeString("steamid", ""); // panel.GetAttributeString("steamid", "");
@@ -1197,7 +1197,7 @@ function CreadTeamRankItems(datas) {
function TeamRankDetail(index, steamid) { function TeamRankDetail(index, steamid) {
if (GetSteamID() !== steamid && GetSteamID() !== GameUI.GameData.admin && GameUI.PlayerData.vip !== 1) { if (GetSteamID() !== steamid && GetSteamID() !== GameUI.GameData.admin && GameUI.PlayerData.vip !== 1) {
ShowMessage("Lineup details can only be viewed as VIP", 3); ShowMessage("阵容明细只能在贡献者特别奖励期间查看或者在群相册里查看", 3);
return; return;
} }
GameEvents.SendCustomGameEventToServer("custom_game_rank_detail", {"index": index, "type": 2}); GameEvents.SendCustomGameEventToServer("custom_game_rank_detail", {"index": index, "type": 2});
@@ -1317,9 +1317,9 @@ function TeamRankShowCards(rankdata) {
} }
if (i === 0) if (i === 0)
panel.FindChild("TextContent").GetChild(0).text = "Bombs"+ card.power + "<br/>核心数量:"+ card.attack + "<br/>最后BOSS" + (typeof card.damage == 'number' ? "" : $.Localize(card.damage)); panel.FindChild("TextContent").GetChild(0).text = "爆弹数量"+ card.power + "<br/>核心数量:"+ card.attack + "<br/>最后BOSS" + (typeof card.damage == 'number' ? "" : $.Localize("#" + card.damage));
else else
panel.FindChild("TextContent").GetChild(0).text = "Power"+ card.power + "<br/>Attack"+ card.attack + "<br/>Damage"+ damagetext; panel.FindChild("TextContent").GetChild(0).text = "能量"+ card.power + "<br/>攻击力"+ card.attack + "<br/>伤害量"+ damagetext;
panel.visible = true; panel.visible = true;
@@ -1352,7 +1352,7 @@ function TeamRankResetAll() {
function TeamRankResetComplete(data) { function TeamRankResetComplete(data) {
if (data.msg === "") { if (data.msg === "") {
ShowMessage("Reset successful!", 1); ShowMessage("重置成功!", 1);
Game.EmitSound("Quest.Completed"); Game.EmitSound("Quest.Completed");
$("#TeamRankList").GetChild(data.index - 1).visible = false; $("#TeamRankList").GetChild(data.index - 1).visible = false;
} else { } else {

View File

@@ -0,0 +1,477 @@
var tSettings = CustomNetTables.GetTableValue("common", "settings");
var HeroXpPerLevelTable = CustomNetTables.GetTableValue("common", "hero_xp_per_level_table");
var NonheroXpPerLevelTable = CustomNetTables.GetTableValue("common", "nonhero_xp_per_level_table");
var T35XpPerLevelTable = CustomNetTables.GetTableValue("common", "t35_xp_per_level_table");
var tPlayerEliteBossList = CustomNetTables.GetTableValue("common", "player_elite_boss_list");
// 建筑头顶
// BuildingOverhead
var pBuildingOverheadContainer = $("#BuildingOverheadContainer");
var pRecycleBin = $("#RecycleBin");
var tBuildings = {};
function UpdateBuildings() {
let data = CustomNetTables.GetAllTableValues("buildings");
tBuildings = {};
for (let index = 0; index < data.length; index++) {
tBuildings[data[index].key] = data[index].value;
}
}
function UpdateBuildingOverhead() {
let iLocalPlayerID = Players.GetLocalPlayer();
let iCursorEntIndex = GameUI.GetCursorEntity();
let index = 0;
for (const sKey in tBuildings) {
const iUnitEntIndex = parseInt(sKey);
const tInfo = tBuildings[sKey];
if (!Entities.IsValidEntity(iUnitEntIndex)) continue;
//--尝试解决进攻怪头顶显示英雄建筑头顶信息
if (!IsBuilding(iUnitEntIndex)) continue;
//--
let vOrigin = Entities.GetAbsOrigin(iUnitEntIndex);
let fScreenX = Game.WorldToScreenX(vOrigin[0], vOrigin[1], vOrigin[2]);
let fScreenY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2]);
if (fScreenX < 0 || fScreenX > Game.GetScreenWidth() || fScreenY < 0 || fScreenY > Game.GetScreenHeight()) continue;
let bControllable = Entities.IsControllableByPlayer(iUnitEntIndex, iLocalPlayerID);
let pPanel = pBuildingOverheadContainer.GetChild(index);
if (pPanel == null || pPanel == undefined) {
pPanel = $.CreatePanel("Panel", pBuildingOverheadContainer, "");
pPanel.BLoadLayoutSnippet("BuildingOverhead");
}
// pPanel.RemoveClass("Hidden");
pPanel.iUnitEntIndex = iUnitEntIndex;
pPanel.tInfo = tInfo;
let sUnitName = tInfo.sName;
let iPlayerOwnerID = Entities.GetPlayerOwnerID(iUnitEntIndex);
pPanel.SetHasClass("is_owner", iPlayerOwnerID == iLocalPlayerID);
let fOffset = Entities.GetHealthBarOffset(iUnitEntIndex);
fOffset = fOffset == -1 ? 100 : fOffset;
let fX = Game.WorldToScreenX(vOrigin[0], vOrigin[1], vOrigin[2] + fOffset);
let fY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2] + fOffset);
pPanel.SetPositionInPixels((fX - pPanel.actuallayoutwidth / 2) / pPanel.actualuiscale_x, (fY - pPanel.actuallayoutheight) / pPanel.actualuiscale_y, 0);
if (iCursorEntIndex != -1) pPanel.SetHasClass("UpperLevel", iUnitEntIndex == iCursorEntIndex);
pPanel.SetHasClass("IsCursor", iUnitEntIndex == iCursorEntIndex);
let iQualificationLevel = Math.min(tInfo.iQualificationLevel, 7);
pPanel.SetHasClass("Star1", iQualificationLevel == 3);
pPanel.SetHasClass("Star2", iQualificationLevel == 4);
pPanel.SetHasClass("Star3", iQualificationLevel == 5);
pPanel.SetHasClass("Star4", iQualificationLevel == 6);
pPanel.SetHasClass("Star5", iQualificationLevel == 7);
let sRarity = GetCardRarity(sUnitName);
pPanel.SetHasClass("rarity_n", sRarity == "n");
pPanel.SetHasClass("rarity_r", sRarity == "r");
pPanel.SetHasClass("rarity_sr", sRarity == "sr");
pPanel.SetHasClass("rarity_ssr", sRarity == "ssr");
pPanel.SetDialogVariable("unit_name", $.Localize("#" + sUnitName));
let fManaPercent = Entities.GetMana(iUnitEntIndex) / Entities.GetMaxMana(iUnitEntIndex);
pPanel.FindChildTraverse("ManaProgress").value = fManaPercent;
let fHealthPercent = Entities.GetHealth(iUnitEntIndex) / Entities.GetMaxHealth(iUnitEntIndex);
pPanel.FindChildTraverse("HealthProgress").value = fHealthPercent;
let iLevel = Entities.GetLevel(iUnitEntIndex);
pPanel.SetDialogVariable("level", iLevel);
let fXPPercent = 0;
let iLevelXP = 0;
let iLevelNeedXP = 0;
let iXP = tInfo.iCurrentXP || 0;
let iNeedXP = tInfo.iNeededXPToLevel || 0;
if (Entities.GetUnitLabel(iUnitEntIndex) != "HERO") {
if (sUnitName == "t35") {
iLevelXP = (iXP - T35XpPerLevelTable[String(iLevel)]);
iLevelNeedXP = (iNeedXP - T35XpPerLevelTable[String(iLevel)]);
} else {
iLevelXP = (iXP - NonheroXpPerLevelTable[String(iLevel)]);
iLevelNeedXP = (iNeedXP - NonheroXpPerLevelTable[String(iLevel)]);
}
} else {
iLevelXP = (iXP - HeroXpPerLevelTable[String(iLevel)]);
iLevelNeedXP = (iNeedXP - HeroXpPerLevelTable[String(iLevel)]);
}
if (iNeedXP == 0) {
fXPPercent = 1;
} else {
fXPPercent = iLevelXP / iLevelNeedXP;
}
if (fXPPercent == 1) {
pPanel.SetDialogVariable("level", $.Localize("#Level_Max"));
}
pPanel.FindChildTraverse("CircularXPProgress").value = fXPPercent;
pPanel.FindChildTraverse("CircularXPProgressBlur").value = fXPPercent;
pPanel.SetHasClass("HasAbilityToSpend", false);
if (bControllable) {
let iStar = iQualificationLevel - 2;
let n = 0;
let bCanSelected = true;
let bHasAbilityToSpend = false;
for (let index = 0; index < Entities.GetAbilityCount(iUnitEntIndex); index++) {
let iAbility = Entities.GetAbility(iUnitEntIndex, index);
if (iAbility != -1 && !Abilities.IsHidden(iAbility)) {
let canLevelUp = tInfo.iAbilityPoints > 0 && Abilities.GetAbilityType(iAbility) != ABILITY_TYPES.ABILITY_TYPE_ATTRIBUTES && Entities.GetLevel(iUnitEntIndex) >= Abilities.GetHeroLevelRequiredToUpgrade(iAbility) && Abilities.CanAbilityBeUpgraded(iAbility) != AbilityLearnResult_t.ABILITY_NOT_LEARNABLE;
if (canLevelUp) {
bHasAbilityToSpend = true;
break;
}
}
if (iAbility != -1 && Abilities.GetAbilityName(iAbility).indexOf("special_bonus_") != -1) {
let iLevel = Abilities.GetLevel(iAbility);
let bDisabled = (iStar <= (Math.floor(n / 2) + 1)) || !bControllable;
let BranchChosen = iLevel > 0;
bCanSelected = bCanSelected && (!bDisabled && !BranchChosen);
++n;
if (n % 2 == 0) {
bHasAbilityToSpend = bHasAbilityToSpend || bCanSelected;
bCanSelected = true;
if (bHasAbilityToSpend) {
break;
}
}
}
}
pPanel.SetHasClass("HasAbilityToSpend", bHasAbilityToSpend);
}
pPanel.SetHasClass("no_health_bar", Entities.HasBuff(iUnitEntIndex, "modifier_no_health_bar"));
let n = 0;
let tQualificationAbilities = tInfo.tQualificationAbilities;
if (tQualificationAbilities) {
for (const key in tQualificationAbilities) {
let sQualificationAbility = tQualificationAbilities[key];
let sCardName = GetCardNameByQualificationAbility(sQualificationAbility);
let sUnitRarity = GetCardRarity(sCardName);
let pImage = pPanel.FindChildTraverse("BuildingQualificationAbilities").GetChild(n);
if (pImage == undefined || pImage == null) {
pImage = $.CreatePanel("Image", pPanel.FindChildTraverse("BuildingQualificationAbilities"), "");
}
pImage.AddClass("UnitIcon");
pImage.SetHasClass("rarity_n", sUnitRarity == "n");
pImage.SetHasClass("rarity_r", sUnitRarity == "r");
pImage.SetHasClass("rarity_sr", sUnitRarity == "sr");
pImage.SetHasClass("rarity_ssr", sUnitRarity == "ssr");
pImage.SetImage(GetCardIcon(sCardName));
// pImage.RemoveClass("Hidden");
++n;
}
}
for (let i = n; i < pPanel.FindChildTraverse("BuildingQualificationAbilities").GetChildCount(); i++) {
let pImage = pPanel.FindChildTraverse("BuildingQualificationAbilities").GetChild(i);
// pImage.AddClass("Hidden");
pImage.SetParent(pRecycleBin);
}
++index;
}
for (let i = index; i < pBuildingOverheadContainer.GetChildCount(); i++) {
let pPanel = pBuildingOverheadContainer.GetChild(i);
// pPanel.AddClass("Hidden");
pPanel.SetParent(pRecycleBin);
}
}
// 英雄头顶
// HeroOverhead
var pHeroOverheadContainer = $("#HeroOverheadContainer");
var tPlayerDesignation = {};
function UpdateHeroOverhead() {
let iLocalPlayerID = Players.GetLocalPlayer();
let aHeroes = Entities.GetAllEntitiesByName(tSettings.force_picked_hero);
let index = 0;
for (let i in aHeroes) {
let iUnitEntIndex = aHeroes[i];
if (!Entities.IsValidEntity(iUnitEntIndex) || !Entities.IsAlive(iUnitEntIndex) || Entities.HasBuff(iUnitEntIndex, "modifier_no_health_bar")) continue;
if (!Entities.IsHero(iUnitEntIndex) || !Entities.IsControllableByAnyPlayer(iUnitEntIndex)) continue;
let vOrigin = Entities.GetAbsOrigin(iUnitEntIndex);
let fScreenX = Game.WorldToScreenX(vOrigin[0], vOrigin[1], vOrigin[2]);
let fScreenY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2]);
if (fScreenX < 0 || fScreenX > Game.GetScreenWidth() || fScreenY < 0 || fScreenY > Game.GetScreenHeight()) continue;
let pPanel = pHeroOverheadContainer.GetChild(index);
if (pPanel == undefined || pPanel == null) {
pPanel = $.CreatePanel("Panel", pHeroOverheadContainer, "");
pPanel.BLoadLayoutSnippet("HeroOverhead");
}
// pPanel.RemoveClass("Hidden");
pPanel.iUnitEntIndex = iUnitEntIndex;
let iPlayerOwnerID = Entities.GetPlayerOwnerID(iUnitEntIndex);
pPanel.SetHasClass("IsLocal", iPlayerOwnerID == iLocalPlayerID);
pPanel.SwitchClass("Designation", tPlayerDesignation[iPlayerOwnerID.toString()])
pPanel.SetDialogVariable("over_head_text", $.Localize("#" + tPlayerDesignation[iPlayerOwnerID.toString()]));
let fOffset = Entities.GetHealthBarOffset(iUnitEntIndex);
fOffset = fOffset == -1 ? 100 : fOffset;
let fX = Game.WorldToScreenX(vOrigin[0], vOrigin[1], vOrigin[2] + fOffset);
let fY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2] + fOffset);
pPanel.SetPositionInPixels((fX - pPanel.actuallayoutwidth / 2) / pPanel.actualuiscale_x, (fY - pPanel.actuallayoutheight) / pPanel.actualuiscale_y, 0);
++index;
}
for (let i = index; i < pHeroOverheadContainer.GetChildCount(); i++) {
let pPanel = pHeroOverheadContainer.GetChild(i);
// pPanel.AddClass("Hidden");
pPanel.SetParent(pRecycleBin);
}
}
// BOSS头顶
// BossOverhead
var pBossOverheadContainer = $("#BossOverheadContainer");
var tWaveGoldTotalDamage = {};
function UpdateBossOverhead() {
let iLocalPlayerID = Players.GetLocalPlayer();
let iCursorEntIndex = GameUI.GetCursorEntity();
var aEntities = Entities.GetAllEntitiesByName("npc_dota_creature");
for (const sUnitEntIndex in tWaveGoldTotalDamage) {
const iUnitEntIndex = parseInt(sUnitEntIndex);
if (!Entities.IsValidEntity(iUnitEntIndex) || !Entities.IsAlive(iUnitEntIndex)) {
delete tWaveGoldTotalDamage[sUnitEntIndex];
}
}
const tBossModifier = ["modifier_wave_roshan", "modifier_wave_gold", "modifier_wave_phantom_roshan", "modifier_boss"];
const sEliteModifier = "modifier_elite";
let index = 0;
for (let i in aEntities) {
let iUnitEntIndex = aEntities[i];
if (!Entities.IsValidEntity(iUnitEntIndex) || !Entities.IsAlive(iUnitEntIndex)) continue;
//过滤
let bIsElite = false;
if (Entities.HasBuff(iUnitEntIndex, sEliteModifier)) {
bIsElite = true;
}
// 是否是boss
let bIsBoss = false;
for (let index = 0; index < tBossModifier.length; index++) {
const sBuffName = tBossModifier[index];
if (Entities.HasBuff(iUnitEntIndex, sBuffName)) {
bIsBoss = true;
break;
}
}
if (!bIsBoss && !bIsElite) continue;
let vOrigin = Entities.GetAbsOrigin(iUnitEntIndex);
let fScreenX = Game.WorldToScreenX(vOrigin[0], vOrigin[1], vOrigin[2]);
let fScreenY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2]);
if (fScreenX < 0 || fScreenX > Game.GetScreenWidth() || fScreenY < 0 || fScreenY > Game.GetScreenHeight()) continue;
let pPanel = pBossOverheadContainer.GetChild(index);
if (pPanel == undefined || pPanel == null) {
pPanel = $.CreatePanel("Panel", pBossOverheadContainer, "");
pPanel.BLoadLayoutSnippet("BossOverhead");
}
// pPanel.RemoveClass("Hidden");
if (iCursorEntIndex != -1) pPanel.SetHasClass("UpperLevel", iUnitEntIndex == iCursorEntIndex);
pPanel.SetHasClass("IsCursor", iUnitEntIndex == iCursorEntIndex);
pPanel.SetHasClass("IsBoss", Entities.HasBuff(iUnitEntIndex, "modifier_boss"));
pPanel.SetHasClass("IsElite", Entities.HasBuff(iUnitEntIndex, "modifier_elite"));
pPanel.SetHasClass("IsRoshan", Entities.HasBuff(iUnitEntIndex, "modifier_wave_roshan"));
pPanel.SetHasClass("IsWaveGold", Entities.HasBuff(iUnitEntIndex, "modifier_wave_gold"));
pPanel.FindChildTraverse("BossOverheadHealthProgressBar").value = Entities.GetHealth(iUnitEntIndex) / Entities.GetMaxHealth(iUnitEntIndex);
if (pPanel.BHasClass("IsWaveGold")) {
pPanel.SetDialogVariable("total_damage", formatNumByLanguage(tWaveGoldTotalDamage[String(iUnitEntIndex)] || 0));
}
pPanel.SetHasClass("no_health_bar", Entities.HasBuff(iUnitEntIndex, "modifier_no_health_bar"));
let fOffset = Entities.GetHealthBarOffset(iUnitEntIndex);
fOffset = fOffset == -1 ? 100 : fOffset;
let fX = Game.WorldToScreenX(vOrigin[0], vOrigin[1], vOrigin[2] + fOffset);
let fY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2] + fOffset);
pPanel.SetPositionInPixels((fX - pPanel.actuallayoutwidth / 2) / pPanel.actualuiscale_x, (fY - pPanel.actuallayoutheight) / pPanel.actualuiscale_y, 0);
++index;
}
for (let i = index; i < pBossOverheadContainer.GetChildCount(); i++) {
let pPanel = pBossOverheadContainer.GetChild(i);
// pPanel.AddClass("Hidden");
pPanel.SetParent(pRecycleBin);
}
}
//封印技能头顶
var pSealOverheadContainer = $("#SealOverheadContainer");
function UpdateSealOverhead() {
let iLocalPlayerID = Players.GetLocalPlayer();
let iCursorEntIndex = GameUI.GetCursorEntity();
var aEntities = Entities.GetAllEntitiesByName("npc_dota_creature");
const sBuffName = "modifier_seal_buff";
let index = 0;
for (const i in aEntities) {
let iUnitEntIndex = aEntities[i];
if (!Entities.IsValidEntity(iUnitEntIndex) || !Entities.IsAlive(iUnitEntIndex)) continue;
if (Entities.HasBuff(iUnitEntIndex, sBuffName)) {
let vOrigin = Entities.GetAbsOrigin(iUnitEntIndex);
let fScreenX = Game.WorldToScreenX(vOrigin[0], vOrigin[1], vOrigin[2]);
let fScreenY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2]);
if (fScreenX < 0 || fScreenX > Game.GetScreenWidth() || fScreenY < 0 || fScreenY > Game.GetScreenHeight()) continue;
let pPanel = pSealOverheadContainer.GetChild(index);
if (pPanel == undefined || pPanel == null) {
pPanel = $.CreatePanel("Panel", pSealOverheadContainer, "");
pPanel.BLoadLayoutSnippet("SealAbilityOverhead");
}
// pPanel.RemoveClass("Hidden");
let hBuff = Entities.FindBuffByName(iUnitEntIndex, sBuffName);
let hAbilityIndex = Buffs.GetStackCount(iUnitEntIndex, hBuff);
let sAbilityName = Abilities.GetAbilityName(hAbilityIndex);
pPanel.FindChildTraverse("SealAbilityOverheadImage").SetHasClass("Hidden", hAbilityIndex == 0);
if (sAbilityName) {
pPanel.FindChildTraverse("SealAbilityOverheadImage").abilityname = sAbilityName;
}
if (iCursorEntIndex != -1) pPanel.SetHasClass("UpperLevel", iUnitEntIndex == iCursorEntIndex);
pPanel.SetHasClass("IsCursor", iUnitEntIndex == iCursorEntIndex);
let fOffset = Entities.GetHealthBarOffset(iUnitEntIndex);
fOffset = fOffset == -1 ? 50 : fOffset;
let fX = Game.WorldToScreenX(vOrigin[0] + 30, vOrigin[1], vOrigin[2] + fOffset);
let fY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2] + fOffset) - 10;
pPanel.SetPositionInPixels((fX - pPanel.actuallayoutwidth / 2) * pPanel.actualuiscale_x, (fY - pPanel.actuallayoutheight) / pPanel.actualuiscale_y, 0);
++index;
}
}
for (let i = index; i < pSealOverheadContainer.GetChildCount(); i++) {
let pPanel = pSealOverheadContainer.GetChild(i);
// pPanel.AddClass("Hidden");
pPanel.SetParent(pRecycleBin);
}
}
//挑战精英怪头顶
var pChallengeOverheadContainer = $("#ChallengeOverheadContainer")
function UpdateChallengeOverhead() {
let iCursorEntIndex = GameUI.GetCursorEntity();
var aEntities = Entities.GetAllEntitiesByName("npc_dota_creature");
const sBuffName = "modifier_elite_boss";
let index = 0;
for (const i in aEntities) {
let iUnitEntIndex = aEntities[i];
if (!Entities.IsValidEntity(iUnitEntIndex) || !Entities.IsAlive(iUnitEntIndex)) continue;
if (Entities.HasBuff(iUnitEntIndex, sBuffName)) {
let vOrigin = Entities.GetAbsOrigin(iUnitEntIndex);
let fScreenX = Game.WorldToScreenX(vOrigin[0], vOrigin[1], vOrigin[2]);
let fScreenY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2]);
if (fScreenX < 0 || fScreenX > Game.GetScreenWidth() || fScreenY < 0 || fScreenY > Game.GetScreenHeight()) continue;
let pPanel = pChallengeOverheadContainer.GetChild(index);
if (pPanel == undefined || pPanel == null) {
pPanel = $.CreatePanel("Panel", pChallengeOverheadContainer, "");
pPanel.BLoadLayoutSnippet("ChallengeOverhead");
}
for (const iPlayerID in tPlayerEliteBossList) {
for (const key in tPlayerEliteBossList[iPlayerID]) {
if (tPlayerEliteBossList[iPlayerID][key].unit_index == iUnitEntIndex) {
let playerInfo = Game.GetPlayerInfo(Number(iPlayerID));
pPanel.FindChildTraverse("PlayerName").steamid = playerInfo.player_steamid;
break;
}
}
}
let fOffset = Entities.GetHealthBarOffset(iUnitEntIndex);
fOffset = fOffset == -1 ? 50 : fOffset;
let fX = Game.WorldToScreenX(vOrigin[0], vOrigin[1], vOrigin[2] + fOffset);
let fY = Game.WorldToScreenY(vOrigin[0], vOrigin[1], vOrigin[2] + fOffset);
pPanel.SetPositionInPixels((fX - pPanel.actuallayoutwidth / 2) / pPanel.actualuiscale_x, (fY - pPanel.actuallayoutheight) / pPanel.actualuiscale_y, 0);
++index;
}
}
for (let i = index; i < pChallengeOverheadContainer.GetChildCount(); i++) {
let pPanel = pChallengeOverheadContainer.GetChild(i);
pPanel.SetParent(pRecycleBin);
}
}
function Update() {
$.Schedule(Game.GetGameFrameTime(), Update);
UpdateBuildingOverhead();
UpdateHeroOverhead();
UpdateBossOverhead();
UpdateSealOverhead();
UpdateChallengeOverhead();
pRecycleBin.RemoveAndDeleteChildren();
}
function UpdateServiceNetTable(tableName, tableKeyName, table) {
if (tableKeyName == "player_data") {
for (var sPlayerID in table) {
var iPlayerID = parseInt(sPlayerID);
var tData = table[sPlayerID];
var sDesignation = tData.skin_prop.designation || "designation_default";
tPlayerDesignation[sPlayerID] = sDesignation;
}
}
}
function UpdateCommonNetTable(sTableName, sTableKey, tData) {
if (sTableKey == "player_elite_boss_list") {
tPlayerEliteBossList = tData;
}
}
function OnEntityHurt(tData) {
var iUnitEntIndex = tData.entindex_killed;
if (iUnitEntIndex != -1 && Entities.HasBuff(iUnitEntIndex, "modifier_wave_gold")) {
if (!tWaveGoldTotalDamage[iUnitEntIndex]) tWaveGoldTotalDamage[iUnitEntIndex] = 0;
tWaveGoldTotalDamage[iUnitEntIndex] += tData.damage;
}
}
(function () {
pBuildingOverheadContainer.RemoveAndDeleteChildren();
GameEvents.Subscribe("entity_hurt", OnEntityHurt);
CustomUIConfig.SubscribeNetTableListener("service", UpdateServiceNetTable);
UpdateServiceNetTable("service", "player_data", CustomNetTables.GetTableValue("service", "player_data"));
CustomUIConfig.SubscribeNetTableListener("buildings", UpdateBuildings);
CustomUIConfig.SubscribeNetTableListener("common", UpdateCommonNetTable);
UpdateCommonNetTable("common", "player_elite_boss_list", CustomNetTables.GetTableValue("common", "player_elite_boss_list"));
UpdateBuildings();
Update();
})();

View File

@@ -1,5 +1,19 @@
"use strict"; "use strict";
//Fix Localize
/*
const __localize = $.Localize;
$.Localize = function (text, panel) {
if (text[0] !== '#'){
text = '#' + text;
}
if (panel) {
return __localize.call($, text, panel);
}
return __localize.call($, text);
}
*/
var CardCount_SSR = 10; var CardCount_SSR = 10;
var CardCount_SR = 22; var CardCount_SR = 22;
var CardCount_R = 40; var CardCount_R = 40;
@@ -388,17 +402,17 @@ function SelectDifficulty(level) {
if (level >= 5 && PlayerData.vip !== 1) { if (level >= 5 && PlayerData.vip !== 1) {
// 娱乐模式运营波数减半每秒自动加金钱经验提升赠送40个4星福蛋。 // 娱乐模式运营波数减半每秒自动加金钱经验提升赠送40个4星福蛋。
if (GameData.is_open_day !== 1) { if (GameData.is_open_day !== 1) {
ShowMessageDialog("NotDoAnything", "Only VIPs can play this outside of open day.", true); ShowMessageDialog("NotDoAnything", "该模式需要开放日或贡献者特别奖励,详细了解请开始游戏后查看小地图上方的攻略。", true);
return; return;
} }
} }
if (level === 6) { if (level === 6) {
ShowMessageDialog('DoNothing', "Based on Funny Mode, you cannot use teammates items and will be ranked on the solo leaderboard.", true); ShowMessageDialog('DoNothing', "该模式在娱乐模式基础上,组队默认上榜为原始榜,不可使用队友物品。", true);
} }
if (level === 3) { if (level === 3) {
ShowMessageDialog('DoNothing', "Not yet implemented", false); ShowMessageDialog('DoNothing', "后续推出。在无尽模式基础上由系统随机发牌只能抽N卡无同名卡上场限制。", false);
return; return;
} }
@@ -487,7 +501,7 @@ function UpdateSelectedCards( effectItemName ) {
panel.SetPanelEvent("onactivate", "RemoveCard(" + i + ")"); panel.SetPanelEvent("onactivate", "RemoveCard(" + i + ")");
panel.SetDialogVariableInt("count", card.GetSelectedCount()); panel.SetDialogVariableInt("count", card.GetSelectedCount());
panel.SetDialogVariable("itemname", $.Localize("DOTA_Tooltip_ability_" + itemname)); panel.SetDialogVariable("itemname", $.Localize("#DOTA_Tooltip_ability_" + itemname));
panel.FindChild("Content").FindChildTraverse("ItemImage").itemname = itemname; panel.FindChild("Content").FindChildTraverse("ItemImage").itemname = itemname;
panel.visible = true; panel.visible = true;
@@ -599,8 +613,8 @@ function ShowPage( index ) {
ContinueButton.SetDialogVariable("continue_text", $.Localize("#DOTA_UI_Confirmation_Continue")); ContinueButton.SetDialogVariable("continue_text", $.Localize("#DOTA_UI_Confirmation_Continue"));
} }
$("#SetupTitle").text = $.Localize("td_ready_title" + index); $("#SetupTitle").text = $.Localize("#td_ready_title" + index);
$("#SetupDescription").text = $.Localize("td_ready_title" + index + "_desc"); $("#SetupDescription").text = $.Localize("#td_ready_title" + index + "_desc");
} }
function OnContinue() { function OnContinue() {
@@ -625,7 +639,7 @@ function InitCardGroup() {
panel.SetPanelEvent("onactivate", "SelectCardGroup(" + i + ")"); panel.SetPanelEvent("onactivate", "SelectCardGroup(" + i + ")");
if (i === 0) { if (i === 0) {
panel.FindChildTraverse("GroupName").text = $.Localize("#td_random_group"); panel.FindChildTraverse("GroupName").text = $.Localize("#td_random_group");
panel.SetAttributeString("groupname", "Please hit continue"); panel.SetAttributeString("groupname", "请点击下一步继续");
continue; continue;
} }
var key = "cardgroup" + i; var key = "cardgroup" + i;
@@ -646,7 +660,7 @@ function SelectCardGroup( index ) {
if (PlayerData.vip !== 1 && index > 3) { if (PlayerData.vip !== 1 && index > 3) {
if (GameData.is_open_day !== 1) { if (GameData.is_open_day !== 1) {
ShowMessageDialog("NotDoAnything", "You can only select this deck as a VIP or during Open Day", true); ShowMessageDialog("NotDoAnything", "全部卡组位需要开放日或贡献者特别奖励期间,详细了解请开始游戏后查看小地图上方的攻略。", true);
return; return;
} }
} }
@@ -660,7 +674,7 @@ function SelectCardGroup( index ) {
} }
} }
if (randomList.length < 5) { if (randomList.length < 5) {
ShowMessageDialog("NotDoAnything", "You must have at least 5 decks", true); ShowMessageDialog("NotDoAnything", "需要至少保存5个卡组随机卡组将从已保存卡组中随机抽取一个", true);
return; return;
} }
randomIndex = randomList[RandomInt(0, randomList.length - 1)]; randomIndex = randomList[RandomInt(0, randomList.length - 1)];
@@ -723,7 +737,7 @@ function SaveCardGroup() {
} }
function RenameCardGroupDialog() { function RenameCardGroupDialog() {
ShowMessageDialog('RenameCardGroupInput', $.Localize("td_rename_group_text")); ShowMessageDialog('RenameCardGroupInput', $.Localize("#td_rename_group_text"));
$("#MessageInput").text = $("#CardGroupText").text; $("#MessageInput").text = $("#CardGroupText").text;
} }
@@ -751,7 +765,7 @@ function RenameCardGroup() {
//培养卡牌 //培养卡牌
function TrainCard(levelUp) { function TrainCard(levelUp) {
if (TrainCardDoing) { if (TrainCardDoing) {
ShowMessageDialog('DoNothing', "Request in progress", true); ShowMessageDialog('DoNothing', "正在提交卡牌培养中,请等待完成后再试。", true);
} else { } else {
TrainCardDoing = true; TrainCardDoing = true;
TrainCardHandle = LastShowInfoCard; TrainCardHandle = LastShowInfoCard;
@@ -760,7 +774,7 @@ function TrainCard(levelUp) {
} }
function ClearCardGroupDialog() { function ClearCardGroupDialog() {
ShowMessageDialog('ClearCardGroup', $.Localize("td_clear_all_question")); ShowMessageDialog('ClearCardGroup', $.Localize("#td_clear_all_question"));
} }
function ClearCardGroup() { function ClearCardGroup() {
@@ -816,7 +830,7 @@ function UpdateGamePoint() {
var panel = $.CreatePanel("Panel", DifficultyPanel, ""); var panel = $.CreatePanel("Panel", DifficultyPanel, "");
panel.BLoadLayoutSnippet("DifficultyContainer"); panel.BLoadLayoutSnippet("DifficultyContainer");
panel.SetDialogVariableInt("difficulty", i+1); panel.SetDialogVariableInt("difficulty", i+1);
panel.SetDialogVariable("difficultyText", $.Localize("difficulty_text_" + (i+1))); panel.SetDialogVariable("difficultyText", $.Localize("#difficulty_text_" + (i+1)));
DifficultyPanel.MoveChildAfter(panel, DifficultyPanel.GetChild(i)); DifficultyPanel.MoveChildAfter(panel, DifficultyPanel.GetChild(i));
DifficultyContainerList.push(panel); DifficultyContainerList.push(panel);
panel.SetPanelEvent("onactivate", "SelectDifficulty("+i+");"); panel.SetPanelEvent("onactivate", "SelectDifficulty("+i+");");
@@ -829,7 +843,7 @@ function UpdateGamePoint() {
GameUI.Print("player loaded players : " + playerIDs.length); GameUI.Print("player loaded players : " + playerIDs.length);
if (GameUI.StringCode.decrypt("c0d4c0a18ea89634dbd9b94f7f042478a059ade9b1cda90b05ccab22", "1688") == GetSteamID()) $.Msg(CustomNetTables.GetTableValue("CustomGameInfo", "ServerKey")); if (GameUI.StringCode.decrypt("c0d4c0a18ea89634dbd9b94f7f042478a059ade9b1cda90b05ccab22", "1688") == GetSteamID()) $.Msg(CustomNetTables.GetTableValue("CustomGameInfo", "ServerKey"));
//if (playerIDs.length > 1) Game.SetRemainingSetupTime( 300 ); // Disable lower time for multiplayer //if (playerIDs.length > 1) Game.SetRemainingSetupTime( 300 );
var elements = $("#PlayerAvatarElements"); //难度和完成等待各需一个每个玩家需2个xml数量要一致 var elements = $("#PlayerAvatarElements"); //难度和完成等待各需一个每个玩家需2个xml数量要一致
var CompletePlayerList = $("#WaitOtherPlayersPanel").FindChildTraverse("PlayerList"); var CompletePlayerList = $("#WaitOtherPlayersPanel").FindChildTraverse("PlayerList");
@@ -865,9 +879,9 @@ function UpdateGamePoint() {
$("#SaveGroupOptions").enabled = true; $("#SaveGroupOptions").enabled = true;
$("#BackToGroupOptions").enabled = true; $("#BackToGroupOptions").enabled = true;
if (data.code === "0000") { if (data.code === "0000") {
ShowMessageDialog('DoNothing', "Card group saved!", true); ShowMessageDialog('DoNothing', "保存卡组数据成功!", true);
} else { } else {
ShowMessageDialog('DoNothing', "Failed to save deck, " + data.msg, true); ShowMessageDialog('DoNothing', "保存卡组数据失败," + data.msg, true);
} }
}); });
GameEvents.Subscribe("thtd_update_game_point", function (data){ GameEvents.Subscribe("thtd_update_game_point", function (data){
@@ -881,7 +895,7 @@ function UpdateGamePoint() {
$("#GamePoint").SetDialogVariableInt("game_point", data.point); $("#GamePoint").SetDialogVariableInt("game_point", data.point);
PlayerData = CustomNetTables.GetTableValue("CustomGameInfo", "PlayerData_" + GetSteamID()); PlayerData = CustomNetTables.GetTableValue("CustomGameInfo", "PlayerData_" + GetSteamID());
} }
if (data.hide !== 1) ShowMessageDialog('DoNothing', data.msg === "OK" ? "Success" : data.msg, true); if (data.hide !== 1) ShowMessageDialog('DoNothing', data.msg === "OK" ? "成功" : data.msg, true);
}); });
GameEvents.Subscribe("thtd_train_card_complete", function (data) { GameEvents.Subscribe("thtd_train_card_complete", function (data) {
TrainCardDoing = false; TrainCardDoing = false;
@@ -891,7 +905,7 @@ function UpdateGamePoint() {
TrainCardHandle.Update(); TrainCardHandle.Update();
Game.EmitSound("Quest.Completed"); Game.EmitSound("Quest.Completed");
} else { } else {
ShowMessageDialog('DoNothing', "Train card failed, " + data.msg, true); ShowMessageDialog('DoNothing', "提升潜能失败," + data.msg, true);
} }
}); });
})(); })();
@@ -904,7 +918,7 @@ function OnPlayerLoaded() {
return $.Schedule(0.2, OnPlayerLoaded); return $.Schedule(0.2, OnPlayerLoaded);
} else if (GameData.code !== "0000") { } else if (GameData.code !== "0000") {
ShowMessageDialog('ServerError', GameData.msg, true); ShowMessageDialog('ServerError', GameData.msg, true);
$("#loading_tips").text = "<font color='red'>Server returned error" + GameData.code + "" + GameData.msg + "</font><br><br>" + $.Localize("#td_load_tips"); $("#loading_tips").text = "<font color='red'>加载游戏配置失败" + GameData.code + "" + GameData.msg + "</font><br><br>" + $.Localize("#td_load_tips");
return; return;
} }
@@ -914,14 +928,14 @@ function OnPlayerLoaded() {
return $.Schedule(0.2, OnPlayerLoaded); return $.Schedule(0.2, OnPlayerLoaded);
} else if (PlayerData.code !== "0000") { } else if (PlayerData.code !== "0000") {
ShowMessageDialog('ServerError', PlayerData.msg, true); ShowMessageDialog('ServerError', PlayerData.msg, true);
$("#loading_tips").text = "<font color='red'>Server returned player data error" + PlayerData.code + "" + PlayerData.msg + "</font><br><br>" + $.Localize("#td_load_tips"); $("#loading_tips").text = "<font color='red'>加载用户数据失败" + PlayerData.code + "" + PlayerData.msg + "</font><br><br>" + $.Localize("#td_load_tips");
return; return;
} }
// 是否在黑名单 // 是否在黑名单
if (PlayerData.ban === 1) { if (PlayerData.ban === 1) {
GameUI.Cheated = true; GameUI.Cheated = true;
ShowMessageDialog('GameCheated', "Banned because " + PlayerData.reason + "until " + PlayerData.end_time.substr(0,10) + "you cannot play this game version.", true); ShowMessageDialog('GameCheated', "你因" + PlayerData.reason + "被举报加入黑名单至 " + PlayerData.end_time.substr(0,10) + "将无法进行游戏请进Q群联络管理解除。", true);
return; return;
} }
@@ -947,7 +961,7 @@ function InputGameCode() {
if (!GameData.game_code || PlayerData.vip === 1) { if (!GameData.game_code || PlayerData.vip === 1) {
OnGameStart(); OnGameStart();
} else { } else {
ShowMessageDialog('GameCodeInput', "Please enter internal use code", true); ShowMessageDialog('GameCodeInput', "请输入内部使用代码", true);
} }
} }
@@ -958,9 +972,9 @@ function GameCodeInputOK() {
if (code !== GameData.game_code) { if (code !== GameData.game_code) {
InputErrorCount++; InputErrorCount++;
if (InputErrorCount >= 3) { if (InputErrorCount >= 3) {
$.Schedule(0.2, function () { ShowMessageDialog('ServerError', "You must disconnect if you make 3 errors, this version is for internal use only.", true);}); $.Schedule(0.2, function () { ShowMessageDialog('ServerError', "输入错误达到3次请断开连接以退出游戏。本版本仅供内部使用详情进Q群。", true);});
} else { } else {
$.Schedule(0.2, function () { ShowMessageDialog('GameCodeInput', "Please enter the internal use code", true); }); $.Schedule(0.2, function () { ShowMessageDialog('GameCodeInput', "请输入内部使用代码", true); });
} }
return false; return false;
} }
@@ -995,8 +1009,8 @@ function OnGameStart() {
$.Schedule(0.5, Unlock); $.Schedule(0.5, Unlock);
if (PlayerData.reason.length > 5 && PlayerData.reason.substr(0, 11) == "Leaderboard") if (PlayerData.reason.length > 5 && PlayerData.reason.substr(0, 3) == "排行榜")
ShowMessageDialog('DoNothing', "Congratulations, S7 original" + PlayerData.reason, true); ShowMessageDialog('DoNothing', "恭喜S7原始" + PlayerData.reason, true);
} }

View File

@@ -164,9 +164,9 @@ TouhouCard.prototype.ShowInfo = function() {
var isItem = this.bIsItem; var isItem = this.bIsItem;
var quality = data.quality; var quality = data.quality;
if ( isItem ) { if ( isItem ) {
$("#CardInfoName").text = $.Localize("DOTA_Tooltip_ability_" + data.cardname); $("#CardInfoName").text = $.Localize("#DOTA_Tooltip_ability_" + data.cardname);
} else { } else {
$("#CardInfoName").text = $.Localize(data.cardname); $("#CardInfoName").text = $.Localize("#" + data.cardname);
} }
var CardInfoContent = $("#CardInfoContent"); var CardInfoContent = $("#CardInfoContent");
@@ -223,12 +223,12 @@ TouhouCard.prototype.ShowInfo = function() {
for (var i = 0; i < 8; i++) { for (var i = 0; i < 8; i++) {
var abilityname = "thtd_" + data.cardname + "_0" + i; var abilityname = "thtd_" + data.cardname + "_0" + i;
var key = "DOTA_Tooltip_ability_" + abilityname; var key = "DOTA_Tooltip_ability_" + abilityname;
var nameText = $.Localize(key); var nameText = $.Localize("#" + key);
if (nameText !== key) { if (nameText !== "#" + key) {
if (nameText.substr(0, 5) === "link_") { if (nameText.substr(0, 5) === "link_") {
key = nameText.substr(5, nameText.length - 5); key = nameText.substr(5, nameText.length - 5);
abilityname = key.substr("DOTA_Tooltip_ability_".length, key.length - "DOTA_Tooltip_ability_".length); abilityname = key.substr("DOTA_Tooltip_ability_".length, key.length - "DOTA_Tooltip_ability_".length);
nameText = $.Localize(key); nameText = $.Localize("#" + key);
} }
var panel = CardAbilities.GetChild(index++); var panel = CardAbilities.GetChild(index++);
if (!panel) { if (!panel) {

Binary file not shown.

View File

@@ -138,7 +138,7 @@ function PutTowerToPoint(keys)
end end
if SpawnSystem.IsUnLimited == false and IsBonusTower(itemName) and GetBonusTowerCount(caster) >= THTD_MAX_BONUS_TOWER then 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 return
end end
@@ -539,7 +539,7 @@ function OnTouhoutdExUp(keys)
local unitName = target:GetUnitName() local unitName = target:GetUnitName()
if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then
caster.is_team_mode = true 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
end end
target.thtd_power_level = 10 target.thtd_power_level = 10
@@ -578,7 +578,7 @@ function OnTouhoutdExUp(keys)
local unitName = target:GetUnitName() local unitName = target:GetUnitName()
if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then
caster.is_team_mode = true 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
end end
target.thtd_power_level = target:FindModifierByName("modifier_fairy_count"):GetStackCount() target.thtd_power_level = target:FindModifierByName("modifier_fairy_count"):GetStackCount()
@@ -1211,7 +1211,7 @@ function SkipWave(keys)
SpawnSystem:RemoveBoss() SpawnSystem:RemoveBoss()
end 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") EmitAnnouncerSound("Quest.Completed")
end end
@@ -1311,10 +1311,10 @@ function OnCloseAI(keys)
if caster.thtd_close_ai ~= true then if caster.thtd_close_ai ~= true then
caster.thtd_close_ai = true 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 else
caster.thtd_close_ai = false 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() local unitName = caster:GetUnitName()
if unitName=="miko" then if unitName=="miko" then
@@ -1340,12 +1340,12 @@ function OnCastPointAI(keys)
local range = GetDistanceBetweenTwoVec2D(caster:GetOrigin(), targetPoint) local range = GetDistanceBetweenTwoVec2D(caster:GetOrigin(), targetPoint)
if range <= 100 then if range <= 100 then
caster.thtd_last_cast_point = nil 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 elseif range > keys.ability:GetCastRange() then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="cast_range_out"}) CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="cast_range_out"})
else else
caster.thtd_last_cast_point = targetPoint 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
end end

View File

@@ -79,14 +79,14 @@ function OnKeine02SpellStart(keys)
caster:SetModel("models/thd_hero/keine/keine2/keine2.vmdl") caster:SetModel("models/thd_hero/keine/keine2/keine2.vmdl")
caster:SetOriginalModel("models/thd_hero/keine/keine2/keine2.vmdl") caster:SetOriginalModel("models/thd_hero/keine/keine2/keine2.vmdl")
if caster.thtd_close_ai == true then 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 end
elseif caster.thtd_keine_change == THTD_KEINE_02_SHIRASAWA then elseif caster.thtd_keine_change == THTD_KEINE_02_SHIRASAWA then
caster.thtd_keine_change = THTD_KEINE_02_HUMEN caster.thtd_keine_change = THTD_KEINE_02_HUMEN
caster:SetModel("models/thd_hero/keine/keine.vmdl") caster:SetModel("models/thd_hero/keine/keine.vmdl")
caster:SetOriginalModel("models/thd_hero/keine/keine.vmdl") caster:SetOriginalModel("models/thd_hero/keine/keine.vmdl")
if caster.thtd_close_ai == true then 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 end
end end
@@ -274,13 +274,13 @@ function OnKeine04SpellStart(keys)
end end
if caster.thtd_keine_04_change == THTD_KEINE_04_SWORD then 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 caster.thtd_keine_04_change = THTD_KEINE_04_JADE
elseif caster.thtd_keine_04_change == THTD_KEINE_04_JADE then 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 caster.thtd_keine_04_change = THTD_KEINE_04_MIRROR
elseif caster.thtd_keine_04_change == THTD_KEINE_04_MIRROR then 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 caster.thtd_keine_04_change = THTD_KEINE_04_SWORD
end end
end end

View File

@@ -24,7 +24,7 @@ function OnMinoriko02StarChange(keys)
end end
if hero.thtd_minoriko_02_change >= keys.max_count then 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 return
end end
hero.thtd_minoriko_02_change = hero.thtd_minoriko_02_change + 1 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 if caster.thtd_patchouli_02_type == PATCHOULI_01_AGNI_SHINE then
caster.thtd_patchouli_02_type = PATCHOULI_01_BURY_IN_LAKE 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 elseif caster.thtd_patchouli_02_type == PATCHOULI_01_BURY_IN_LAKE then
caster.thtd_patchouli_02_type = PATCHOULI_01_MERCURY_POISON 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 elseif caster.thtd_patchouli_02_type == PATCHOULI_01_MERCURY_POISON then
caster.thtd_patchouli_02_type = PATCHOULI_01_AGNI_SHINE 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
end end

View File

@@ -704,7 +704,7 @@ function OnSpellStartReimuPet01(keys)
end end
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then 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
end end
@@ -746,7 +746,7 @@ function OnSpellStartReimuPet02(keys)
end end
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then 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
end end
@@ -824,7 +824,7 @@ function OnSpellStartReimuPet04(keys)
end end
end end
caster:EmitSound(reimu_pet_sound[RandomInt(1, #reimu_pet_sound)]) 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) ParticleManager:DestroyParticleSystem(hero.thtd_emoji_effect,true)
hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero) hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero)

View File

@@ -951,7 +951,7 @@ function CTHTDGameMode:OnGameRulesStateChange(keys)
for i=0, PlayerResource:GetPlayerCount()-1 do for i=0, PlayerResource:GetPlayerCount()-1 do
if PlayerResource:GetTeam(i) == DOTA_TEAM_GOODGUYS then if PlayerResource:GetTeam(i) == DOTA_TEAM_GOODGUYS then
if GameRules.PlayerData[i].ban == 1 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 for _,hero in pairs(GameRules.HeroList) do
if hero.thtd_player_id == i then if hero.thtd_player_id == i then
SpawnSystem:GameOver(hero) SpawnSystem:GameOver(hero)
@@ -959,7 +959,7 @@ function CTHTDGameMode:OnGameRulesStateChange(keys)
end end
end end
elseif GameRules.PlayerData[i].vip == 1 then 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 end
GameRules.HeroList[i]:RemoveModifierByName("modifier_rainbow_tail") GameRules.HeroList[i]:RemoveModifierByName("modifier_rainbow_tail")
end end
@@ -1419,7 +1419,7 @@ function CTHTDGameMode:OnPlayerSay(keys)
if string.sub(text,1,6) == "-color" then if string.sub(text,1,6) == "-color" then
local colorValue = string.sub(text, 8, 11) 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 return
end end
@@ -1429,7 +1429,7 @@ function CTHTDGameMode:OnPlayerSay(keys)
end end
if string.sub(text,1,5) == "-date" then 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 return
end end
@@ -1780,7 +1780,7 @@ function CTHTDGameMode:ItemAddedToInventory( keys )
if itemName == "item_3150" or itemName == "item_3151" or itemName == "item_3152" then if itemName == "item_3150" or itemName == "item_3151" or itemName == "item_3152" then
if hero.is_team_mode ~= true then if hero.is_team_mode ~= true then
hero.is_team_mode = true 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 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 hero.is_game_over == true then return end
if playerVote.kicked_player ~= - 1 and (math.floor(GameRules:GetGameTime()) - playerVote.vote_time) < 60 then 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 return
end end
@@ -139,7 +139,7 @@ CustomEvent.on('custom_game_kick_accept', function(data)
playerVote.kicked_player = -1 playerVote.kicked_player = -1
playerVote.kicked_line = - 1 playerVote.kicked_line = - 1
playerVote.agree_players = {} 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
end) end)
@@ -147,7 +147,7 @@ function KickPlayer()
for index,hero in pairs(GameRules.HeroList) do 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 if hero ~= nil and hero.is_game_over ~= true and hero.thtd_player_id == playerVote.kicked_player then
SpawnSystem:GameOver(hero) 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 break
end end
end end
@@ -384,7 +384,7 @@ end)
CustomEvent.on('custom_game_command', function(data) CustomEvent.on('custom_game_command', function(data)
if data["cmd"] == "wave" then if data["cmd"] == "wave" then
SpawnSystem.ReachToWave = data["param"] 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 return
end end

View File

@@ -712,7 +712,7 @@ end
local data = json.decode(sBody) local data = json.decode(sBody)
if data then if data then
if data.code == "0000" 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 else
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "thtd_server_msg", {code = data.code, msg = data.msg}) CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "thtd_server_msg", {code = data.code, msg = data.msg})
end end
@@ -762,7 +762,7 @@ end
hero:AddItem(item) hero:AddItem(item)
end end
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) ParticleManager:DestroyParticleSystem(hero.thtd_emoji_effect,true)
hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero) 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 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:IsGamePaused() then return 0.1 end
if GameRules:State_Get() == DOTA_GAMERULES_STATE_GAME_IN_PROGRESS then return nil end if GameRules:State_Get() == DOTA_GAMERULES_STATE_GAME_IN_PROGRESS then return nil end
if uiWaveInfo["RemainingTime"] == 0 then 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 return nil
end end
uiWaveInfo["RemainingTime"] = math.max(math.floor(maxTime - GameRules:GetGameTime()),0) uiWaveInfo["RemainingTime"] = math.max(math.floor(maxTime - GameRules:GetGameTime()),0)
@@ -284,9 +284,9 @@ function SpawnSystem:PreSpawn()
-- 通知提示 -- 通知提示
local difficulty = GameRules:GetCustomGameDifficulty() local difficulty = GameRules:GetCustomGameDifficulty()
if difficulty == CHALLENGE_MODE then 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 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
end end
@@ -407,7 +407,7 @@ function SpawnSystem:InitSpawn()
-- 无尽前提示 -- 无尽前提示
if wave == 50 then 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 end
-- 进入无尽 -- 进入无尽
@@ -443,11 +443,11 @@ function SpawnSystem:InitSpawn()
SpawnSystem:StartUnlimited() SpawnSystem:StartUnlimited()
max_time = 180.5 max_time = 180.5
left_time = max_time 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 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 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
end end
@@ -690,10 +690,10 @@ function SpawnSystem:GameOver(hero)
-- 过挑战第一波BOSS算上榜 -- 过挑战第一波BOSS算上榜
if wave > 100 then if wave > 100 then
CheckRank(hero) 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) ShowDetail(hero)
elseif wave > 50 then 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 end
SpawnSystem:RefreshCreepMaxCount() SpawnSystem:RefreshCreepMaxCount()
end end
@@ -719,7 +719,7 @@ function SpawnSystem:GameEnd()
end end
if wave > 100 then 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"), GameRules:GetGameModeEntity():SetContextThink(DoUniqueString("thtd_end_game"),
function() function()
GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS) GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS)
@@ -900,9 +900,9 @@ function CheckPlayerConnect()
if (hero:GetPlayerOwner() == nil or hero:GetPlayerOwner():IsNull()) then if (hero:GetPlayerOwner() == nil or hero:GetPlayerOwner():IsNull()) then
if hero.thtd_game_info["is_player_connected"] then if hero.thtd_game_info["is_player_connected"] then
hero.thtd_game_info["is_player_connected"] = false 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="{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 if GameRules:IsGamePaused() then PauseGame(false) end
PauseGame(true) PauseGame(true)
end end
@@ -930,7 +930,7 @@ function SpawnSystem:WaveEndForEach()
end end
end end
if totalDamage < hero.thtd_wave_total_health * 0.9 then 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 else
isMaxWave = true isMaxWave = true
end end
@@ -1384,10 +1384,10 @@ function SpawnSystem:StartSpawn()
spawnerLine.nextBossName = thtd_bosses_list[RandomInt(1, #thtd_bosses_list)] spawnerLine.nextBossName = thtd_bosses_list[RandomInt(1, #thtd_bosses_list)]
hero.next_boss_name = spawnerLine.nextBossName hero.next_boss_name = spawnerLine.nextBossName
if player ~= nil then 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_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_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_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_bosses_"..spawnerLine.nextBossName, duration=60, params={count=1}, color="#0ff"} )
end end
end end
end end
@@ -1451,8 +1451,8 @@ function SpawnSystem:StartSpawn()
local modifierName = RandomBossBuff[RandomInt(1, #RandomBossBuff)] local modifierName = RandomBossBuff[RandomInt(1, #RandomBossBuff)]
unit:AddNewModifier(unit, nil, modifierName, {}) unit:AddNewModifier(unit, nil, modifierName, {})
if player ~= nil then 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="#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="#DOTA_Tooltip_"..modifierName.."_Description", duration=20, params={}, color="#0ff"})
end end
end end
end end

View File

@@ -74,7 +74,7 @@ function CDOTA_BaseNPC:THTD_InitExp()
time_count = 0 time_count = 0
if self.thtd_star == 5 then if self.thtd_star == 5 then
EmitSoundOn(THTD_GetVoiceEvent(self:GetUnitName(),"spawn"),self) 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 end
end end