neutral players no need check Strength Handicap, race and Player Strength , These data cannot be referenced
now , I simply dealt with race
function GetRace takes player p returns integer
local integer i = GetPlayerId(p)
if i < PLAYERAGGRESSIVE then
return player_race[i]
endif
return 0
endfunction
function GetRaceAggression takes unit target returns integer
if GetPlayerId(GetOwningPlayer(target)) < PLAYERAGGRESSIVE then
return race_aggression[Max((GetRace(GetOwningPlayer(target)) - 1) * tiernum + tier - 1,0)]
endif
return 0
endfunction
function SetChatVarsAttack takes unit u returns nothing
local player p = GetOwningPlayer(u)
if GetPlayerId(p) < PLAYERAGGRESSIVE then
call SetChatVar("TargetRace", race_name[player_race[GetPlayerId(p)]])
call SetChatVar("TargetColor", ColorText(GetPlayerColor(p)))
call SetChatVarR("TargetStrength", GetPlayerStrength(p))
endif
set p = null
endfunction
neutral players no need check
Strength Handicap
,race
andPlayer Strength
, These data cannot be referencednow , I simply dealt with race