constant native GetPlayerHandicapReviveTime takes player whichPlayer returns real
constant native GetPlayerHandicapDamage takes player whichPlayer returns real
constant native SetPlayerHandicapReviveTime takes player whichPlayer, real handicap returns nothing
constant native SetPlayerHandicapDamage takes player whichPlayer, real handicap returns nothing
function CameraSetupApplyForPlayerSmooth takes boolean doPan, camerasetup whichSetup, player whichPlayer, real forcedDuration, real easeInDuration, real easeOutDuration, real smoothFactor returns nothing
if (GetLocalPlayer() == whichPlayer) then
// Use only local code (no net traffic) within this block to avoid desyncs.
call BlzCameraSetupApplyForceDurationSmooth(whichSetup, doPan, forcedDuration, easeInDuration, easeOutDuration, smoothFactor)
endif
endfunction
function GetLastCreatedMinimapIcon takes nothing returns minimapicon
return bj_lastCreatedMinimapIcon
endfunction
function CreateMinimapIconOnUnitBJ takes unit whichUnit, integer red, integer green, integer blue, string pingPath, fogstate fogVisibility returns minimapicon
set bj_lastCreatedMinimapIcon = CreateMinimapIconOnUnit(whichUnit, red, green, blue, pingPath, fogVisibility)
return bj_lastCreatedMinimapIcon
endfunction
function CreateMinimapIconAtLocBJ takes location where, integer red, integer green, integer blue, string pingPath, fogstate fogVisibility returns minimapicon
set bj_lastCreatedMinimapIcon = CreateMinimapIconAtLoc(where, red, green, blue, pingPath, fogVisibility)
return bj_lastCreatedMinimapIcon
endfunction
function CreateMinimapIconBJ takes real x, real y, integer red, integer green, integer blue, string pingPath, fogstate fogVisibility returns minimapicon
set bj_lastCreatedMinimapIcon = CreateMinimapIcon(x, y, red, green, blue, pingPath, fogVisibility)
return bj_lastCreatedMinimapIcon
endfunction
function CampaignMinimapIconUnitBJ takes unit whichUnit, integer style returns nothing
local integer red
local integer green
local integer blue
local string path
if ( style == bj_CAMPPINGSTYLE_PRIMARY ) then
// green
set red = 255
set green = 0
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestObjectivePrimary" )
elseif ( style == bj_CAMPPINGSTYLE_BONUS ) then
// yellow
set red = 255
set green = 255
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestObjectiveBonus" )
elseif ( style == bj_CAMPPINGSTYLE_TURNIN ) then
// yellow
set red = 255
set green = 255
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestTurnIn" )
elseif ( style == bj_CAMPPINGSTYLE_BOSS ) then
// red
set red = 255
set green = 0
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestBoss" )
elseif ( style == bj_CAMPPINGSTYLE_CONTROL_ALLY ) then
// green
set red = 0
set green = 255
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestControlPoint" )
elseif ( style == bj_CAMPPINGSTYLE_CONTROL_NEUTRAL ) then
// white
set red = 255
set green = 255
set blue = 255
set path = SkinManagerGetLocalPath( "MinimapQuestControlPoint" )
elseif ( style == bj_CAMPPINGSTYLE_CONTROL_ENEMY ) then
// red
set red = 255
set green = 0
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestControlPoint" )
endif
call CreateMinimapIconOnUnitBJ( whichUnit, red, green, blue, path, FOG_OF_WAR_MASKED )
call SetMinimapIconOrphanDestroy( bj_lastCreatedMinimapIcon, true )
endfunction
function CampaignMinimapIconLocBJ takes location where, integer style returns nothing
local integer red
local integer green
local integer blue
local string path
if ( style == bj_CAMPPINGSTYLE_PRIMARY ) then
// green (different from the unit version)
set red = 0
set green = 255
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestObjectivePrimary" )
elseif ( style == bj_CAMPPINGSTYLE_BONUS ) then
// yellow
set red = 255
set green = 255
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestObjectiveBonus" )
elseif ( style == bj_CAMPPINGSTYLE_TURNIN ) then
// yellow
set red = 255
set green = 255
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestTurnIn" )
elseif ( style == bj_CAMPPINGSTYLE_BOSS ) then
// red
set red = 255
set green = 0
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestBoss" )
elseif ( style == bj_CAMPPINGSTYLE_CONTROL_ALLY ) then
// green
set red = 0
set green = 255
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestControlPoint" )
elseif ( style == bj_CAMPPINGSTYLE_CONTROL_NEUTRAL ) then
// white
set red = 255
set green = 255
set blue = 255
set path = SkinManagerGetLocalPath( "MinimapQuestControlPoint" )
elseif ( style == bj_CAMPPINGSTYLE_CONTROL_ENEMY ) then
// red
set red = 255
set green = 0
set blue = 0
set path = SkinManagerGetLocalPath( "MinimapQuestControlPoint" )
endif
call CreateMinimapIconAtLocBJ( where, red, green, blue, path, FOG_OF_WAR_MASKED )
endfunction
Command Button Effect Utility Functions
function CreateCommandButtonEffectBJ takes integer abilityId, string order returns commandbuttoneffect
set bj_lastCreatedCommandButtonEffect = CreateCommandButtonEffect(abilityId, order)
return bj_lastCreatedCommandButtonEffect
endfunction
function CreateTrainCommandButtonEffectBJ takes integer unitId returns commandbuttoneffect
set bj_lastCreatedCommandButtonEffect = CreateCommandButtonEffect('Aque', UnitId2String(unitId))
return bj_lastCreatedCommandButtonEffect
endfunction
function CreateUpgradeCommandButtonEffectBJ takes integer techId returns commandbuttoneffect
set bj_lastCreatedCommandButtonEffect = CreateUpgradeCommandButtonEffect(techId)
return bj_lastCreatedCommandButtonEffect
endfunction
function CreateLearnCommandButtonEffectBJ takes integer abilityId returns commandbuttoneffect
set bj_lastCreatedCommandButtonEffect = CreateLearnCommandButtonEffect(abilityId)
return bj_lastCreatedCommandButtonEffect
endfunction
function CreateBuildCommandButtonEffectBJ takes integer unitId returns commandbuttoneffect
local race r = GetPlayerRace(GetLocalPlayer())
local integer abilityId
if (r == RACE_HUMAN) then
set abilityId = 'AHbu'
elseif (r == RACE_ORC) then
set abilityId = 'AObu'
elseif (r == RACE_UNDEAD) then
set abilityId = 'AUbu'
elseif (r == RACE_NIGHTELF) then
set abilityId = 'AEbu'
else
set abilityId = 'ANbu'
endif
set bj_lastCreatedCommandButtonEffect = CreateCommandButtonEffect(abilityId, UnitId2String(unitId))
return bj_lastCreatedCommandButtonEffect
endfunction
function GetLastCreatedCommandButtonEffectBJ takes nothing returns commandbuttoneffect
return bj_lastCreatedCommandButtonEffect
endfunction
Hero and Item Utility Functions
function SetPlayerHandicapDamageBJ takes player whichPlayer, real handicapPercent returns nothing
call SetPlayerHandicapDamage(whichPlayer, handicapPercent * 0.01)
endfunction
function GetPlayerHandicapDamageBJ takes player whichPlayer returns real
return GetPlayerHandicapDamage(whichPlayer) * 100
endfunction
function SetPlayerHandicapReviveTimeBJ takes player whichPlayer, real handicapPercent returns nothing
call SetPlayerHandicapReviveTime(whichPlayer, handicapPercent * 0.01)
endfunction
function GetPlayerHandicapReviveTimeBJ takes player whichPlayer returns real
return GetPlayerHandicapReviveTime(whichPlayer) * 100
endfunction
Cinematic Transmission Utility Functions
Было:
function SetCinematicSceneBJ takes sound soundHandle, integer portraitUnitId, playercolor color, string speakerTitle, string text, real sceneDuration, real voiceoverDuration returns nothing
set bj_cineSceneLastSound = soundHandle
call PlaySoundBJ(soundHandle)
call SetCinematicScene(portraitUnitId, color, speakerTitle, text, sceneDuration, voiceoverDuration)
endfunction
Стало:
function SetCinematicSceneBJ takes sound soundHandle, integer portraitUnitId, playercolor color, string speakerTitle, string text, real sceneDuration, real voiceoverDuration returns nothing
set bj_cineSceneLastSound = soundHandle
call SetCinematicScene(portraitUnitId, color, speakerTitle, text, sceneDuration, voiceoverDuration)
call PlaySoundBJ(soundHandle)
endfunction
Было:
function TransmissionFromUnitWithNameBJ takes force toForce, unit whichUnit, string unitName, sound soundHandle, string message, integer timeType, real timeVal, boolean wait returns nothing
call TryInitCinematicBehaviorBJ()
// Ensure that the time value is non-negative.
set timeVal = RMaxBJ(timeVal, 0)
set bj_lastTransmissionDuration = GetTransmissionDuration(soundHandle, timeType, timeVal)
set bj_lastPlayedSound = soundHandle
if (IsPlayerInForce(GetLocalPlayer(), toForce)) then
// Use only local code (no net traffic) within this block to avoid desyncs.
if (whichUnit == null) then
// If the unit reference is invalid, send the transmission from the center of the map with no portrait.
call DoTransmissionBasicsXYBJ(0, PLAYER_COLOR_RED, 0, 0, soundHandle, unitName, message, bj_lastTransmissionDuration)
else
call DoTransmissionBasicsXYBJ(GetUnitTypeId(whichUnit), GetPlayerColor(GetOwningPlayer(whichUnit)), GetUnitX(whichUnit), GetUnitY(whichUnit), soundHandle, unitName, message, bj_lastTransmissionDuration)
if (not IsUnitHidden(whichUnit)) then
call UnitAddIndicator(whichUnit, bj_TRANSMISSION_IND_RED, bj_TRANSMISSION_IND_BLUE, bj_TRANSMISSION_IND_GREEN, bj_TRANSMISSION_IND_ALPHA)
endif
endif
endif
if wait and (bj_lastTransmissionDuration > 0) then
// call TriggerSleepAction(bj_lastTransmissionDuration)
call WaitTransmissionDuration(soundHandle, timeType, timeVal)
endif
endfunction
Стало:
function TransmissionFromUnitWithNameBJ takes force toForce, unit whichUnit, string unitName, sound soundHandle, string message, integer timeType, real timeVal, boolean wait returns nothing
call TryInitCinematicBehaviorBJ()
call AttachSoundToUnit(soundHandle, whichUnit)
// Ensure that the time value is non-negative.
set timeVal = RMaxBJ(timeVal, 0)
set bj_lastTransmissionDuration = GetTransmissionDuration(soundHandle, timeType, timeVal)
set bj_lastPlayedSound = soundHandle
if (IsPlayerInForce(GetLocalPlayer(), toForce)) then
// Use only local code (no net traffic) within this block to avoid desyncs.
if (whichUnit == null) then
// If the unit reference is invalid, send the transmission from the center of the map with no portrait.
call DoTransmissionBasicsXYBJ(0, PLAYER_COLOR_RED, 0, 0, soundHandle, unitName, message, bj_lastTransmissionDuration)
else
call DoTransmissionBasicsXYBJ(GetUnitTypeId(whichUnit), GetPlayerColor(GetOwningPlayer(whichUnit)), GetUnitX(whichUnit), GetUnitY(whichUnit), soundHandle, unitName, message, bj_lastTransmissionDuration)
if (not IsUnitHidden(whichUnit)) then
call UnitAddIndicator(whichUnit, bj_TRANSMISSION_IND_RED, bj_TRANSMISSION_IND_BLUE, bj_TRANSMISSION_IND_GREEN, bj_TRANSMISSION_IND_ALPHA)
endif
endif
endif
if wait and (bj_lastTransmissionDuration > 0) then
// call TriggerSleepAction(bj_lastTransmissionDuration)
call WaitTransmissionDuration(soundHandle, timeType, timeVal)
endif
endfunction
function PlayDialogueFromSpeaker takes force toForce, unit speaker, sound soundHandle, integer timeType, real timeVal, boolean wait returns nothing
call TryInitCinematicBehaviorBJ()
call AttachSoundToUnit(soundHandle, speaker)
// Ensure that the time value is non-negative.
set timeVal = RMaxBJ(timeVal, 0)
set bj_lastTransmissionDuration = GetTransmissionDuration(soundHandle, timeType, timeVal)
set bj_lastPlayedSound = soundHandle
if (IsPlayerInForce(GetLocalPlayer(), toForce)) then
call PlaySoundBJ(soundHandle)
endif
if wait and (bj_lastTransmissionDuration > 0) then
// call TriggerSleepAction(bj_lastTransmissionDuration)
call WaitTransmissionDuration(soundHandle, timeType, timeVal)
endif
endfunction
function PlayDialogueFromSpeakerEx takes force toForce, unit speaker, integer speakerType, sound soundHandle, integer timeType, real timeVal, boolean wait returns boolean
//Make sure that the runtime unit type and the parameter are the same,
//otherwise the offline animations will not match and will fail
if GetUnitTypeId(speaker) != speakerType then
debug call BJDebugMsg(("Attempted to play FacialAnimation with the wrong speaker UnitType - Param: " + I2S(speakerType) + " Runtime: " + I2S(GetUnitTypeId(speaker))))
//return false
endif
call TryInitCinematicBehaviorBJ()
call AttachSoundToUnit(soundHandle, speaker)
// Ensure that the time value is non-negative.
set timeVal = RMaxBJ(timeVal, 0)
set bj_lastTransmissionDuration = GetTransmissionDuration(soundHandle, timeType, timeVal)
set bj_lastPlayedSound = soundHandle
if (IsPlayerInForce(GetLocalPlayer(), toForce)) then
call SetCinematicSceneBJ(soundHandle, speakerType, GetPlayerColor(GetLocalPlayer()), GetLocalizedString(GetDialogueSpeakerNameKey(soundHandle)), GetLocalizedString(GetDialogueTextKey(soundHandle)), bj_lastTransmissionDuration + bj_TRANSMISSION_PORT_HANGTIME, bj_lastTransmissionDuration)
endif
if wait and (bj_lastTransmissionDuration > 0) then
// call TriggerSleepAction(bj_lastTransmissionDuration)
call WaitTransmissionDuration(soundHandle, timeType, timeVal)
endif
return true
endfunction
function PlayDialogueFromSpeakerType takes force toForce, player fromPlayer, integer speakerType, location loc, sound soundHandle, integer timeType, real timeVal, boolean wait returns boolean
call TryInitCinematicBehaviorBJ()
// Ensure that the time value is non-negative.
set timeVal = RMaxBJ(timeVal, 0)
set bj_lastTransmissionDuration = GetTransmissionDuration(soundHandle, timeType, timeVal)
set bj_lastPlayedSound = soundHandle
if (IsPlayerInForce(GetLocalPlayer(), toForce)) then
call SetCinematicSceneBJ(soundHandle, speakerType, GetPlayerColor(fromPlayer), GetLocalizedString(GetDialogueSpeakerNameKey(soundHandle)), GetLocalizedString(GetDialogueTextKey(soundHandle)), bj_lastTransmissionDuration + bj_TRANSMISSION_PORT_HANGTIME, bj_lastTransmissionDuration)
if(speakerType != 0) then
call PingMinimap(GetLocationX(loc), GetLocationY(loc), bj_TRANSMISSION_PING_TIME)
endif
endif
if wait and (bj_lastTransmissionDuration > 0) then
// call TriggerSleepAction(bj_lastTransmissionDuration)
call WaitTransmissionDuration(soundHandle, timeType, timeVal)
endif
return true
endfunction
function PlayDialogueFromSpeakerTypeEx takes force toForce, player fromPlayer, integer speakerType, location loc, sound soundHandle, integer timeType, real timeVal, boolean wait returns boolean
return PlayDialogueFromSpeakerType(toForce, fromPlayer, speakerType, loc, soundHandle, timeType, timeVal, wait)
endfunction
Было:
function MeleeGetAllyKeyStructureCount takes player whichPlayer returns integer
local integer playerIndex
local player indexPlayer
local integer keyStructs
// Count the number of buildings controlled by all not-yet-defeated co-allies.
set keyStructs = 0
set playerIndex = 0
loop
set indexPlayer = Player(playerIndex)
if (PlayersAreCoAllied(whichPlayer, indexPlayer)) then
set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "townhall", true, true)
set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "greathall", true, true)
set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "treeoflife", true, true)
set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "necropolis", true, true)
endif
set playerIndex = playerIndex + 1
exitwhen playerIndex == bj_MAX_PLAYERS
endloop
return keyStructs
endfunction
Стало:
function MeleeGetAllyKeyStructureCount takes player whichPlayer returns integer
local integer playerIndex
local player indexPlayer
local integer keyStructs
// Count the number of buildings controlled by all not-yet-defeated co-allies.
set keyStructs = 0
set playerIndex = 0
loop
set indexPlayer = Player(playerIndex)
if (PlayersAreCoAllied(whichPlayer, indexPlayer)) then
set keyStructs = BlzGetPlayerTownHallCount(indexPlayer)
endif
set playerIndex = playerIndex + 1
exitwhen playerIndex == bj_MAX_PLAYERS
endloop
return keyStructs
endfunction
» WarCraft 3 / Релиз Warcraft 3: Reforged
» WarCraft 3 / Бета версия Warcraft III Reforged 1.32
(По путям и описанию видно)
» WarCraft 3 / Бета версия Warcraft III Reforged 1.32
https://www.xgm.guru/files/100/236226/comments/434287/btnsamuro....
Ред. AntNo
» WarCraft 3 / Бета версия Warcraft III Reforged 1.32
https://www.xgm.guru/files/100/236226/comments/434260/blizzard.j