|
发表于 2008-12-26 19:02:02
|
显示全部楼层
[jass]function AllowVictoryDefeat takes playergameresult gameResult returns boolean
if (gameResult == PLAYER_GAME_RESULT_VICTORY) then//如果gameResult是胜利
return not IsNoVictoryCheat()//这个取得什么
endif
if (gameResult == PLAYER_GAME_RESULT_DEFEAT) then//如果gameResult是失败
return not IsNoDefeatCheat()//这个取得什么
endif
if (gameResult == PLAYER_GAME_RESULT_NEUTRAL) then//如果gameResult是结果不确定
return (not IsNoVictoryCheat()) and (not IsNoDefeatCheat())
endif
return true
endfunction
//===========================================================================
function CustomVictoryBJ takes player whichPlayer, boolean showDialog, boolean showScores returns nothing
if AllowVictoryDefeat( PLAYER_GAME_RESULT_VICTORY ) then
call RemovePlayer( whichPlayer, PLAYER_GAME_RESULT_VICTORY )//删除玩家-按 玩家结果-胜利
if not bj_isSinglePlayer then//如果不是单人游戏
call DisplayTimedTextFromPlayer(whichPlayer, 0, 0, 60, GetLocalizedString( "PLAYER_VICTORIOUS" ) )//对玩家说胜利
endif
// UI only needs to be displayed to users.
if (GetPlayerController(whichPlayer) == MAP_CONTROL_USER) then//判断是否 用户
set bj_changeLevelShowScores = showScores//判断是否显示记分屏幕
if showDialog then//是否显示胜利对话框
call CustomVictoryDialogBJ( whichPlayer )
else
call CustomVictorySkipBJ( whichPlayer )
endif
endif
endif
endfunction[/jass]
但关键是我看Dota的代码,没看到以胜利的参数调用RemovePlayer的
记得dota是用这个bj |
|