Replaced GetActorRef() shortcuts

This commit is contained in:
Eddoursul 2023-12-08 03:57:30 +01:00
parent 6f1abd6630
commit ba655e1df5
26 changed files with 40 additions and 40 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -108,7 +108,7 @@ Function CheerAudience() ; When a song ends normally, time for the audience to c
EndFunction EndFunction
Function OnSongEnd() ; When a song ends normally or is interrupted. Called from the scenes. Function OnSongEnd() ; When a song ends normally or is interrupted. Called from the scenes.
Actor akBard = SingingBard.GetActorRef() ; If akBard is None in OnSongEnd, most likely it's the player just left the cell and the quest is stopping Actor akBard = SingingBard.GetActorReference() ; If akBard is None in OnSongEnd, most likely it's the player just left the cell and the quest is stopping
Bool bLongDelay = False Bool bLongDelay = False
If akBard If akBard
akBard.PlayIdle(IdleStop) akBard.PlayIdle(IdleStop)
@ -154,7 +154,7 @@ Function PlayRequestedSong(Scene requestedSongScene)
EndFunction EndFunction
Event OnUpdate() Event OnUpdate()
Actor akBard = SingingBard.GetActorRef() Actor akBard = SingingBard.GetActorReference()
If akBard == None If akBard == None
Stop() Stop()
Return Return
@ -255,7 +255,7 @@ Function PickRandomSongFromSongList()
EndFunction EndFunction
Actor Function GetSingingBardActor() Actor Function GetSingingBardActor()
Return SingingBard.GetActorRef() Return SingingBard.GetActorReference()
EndFunction EndFunction
Bool Function IsQuestAudienceLocation() Bool Function IsQuestAudienceLocation()

View File

@ -8,7 +8,7 @@ Faction Property DGIntimidateFaction Auto
;-- Functions --------------------------------------- ;-- Functions ---------------------------------------
Event OnUpdate() Event OnUpdate()
actor pActor = self.GetActorRef() actor pActor = self.GetActorReference()
if pActor.IsInCombat() == 0 && pActor.IsBleedingOut() == 0 && GetOwningQuest().GetStage() <= 15 ;&& GetOwningQuest().GetStage() < 15 if pActor.IsInCombat() == 0 && pActor.IsBleedingOut() == 0 && GetOwningQuest().GetStage() <= 15 ;&& GetOwningQuest().GetStage() < 15
GetOwningQuest().SetStage(200) GetOwningQuest().SetStage(200)
endIf endIf
@ -30,7 +30,7 @@ Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
EndEvent EndEvent
Event OnHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) Event OnHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
actor pActor = self.GetActorRef() actor pActor = self.GetActorReference()
actor pPlayer = game.GetPlayer() actor pPlayer = game.GetPlayer()
if akAggressor == pPlayer if akAggressor == pPlayer
if akProjectile || (akWeapon && akWeapon != UnarmedWeapon) if akProjectile || (akWeapon && akWeapon != UnarmedWeapon)

View File

@ -25,7 +25,7 @@ Event OnEnterBleedout()
EndEvent EndEvent
Event OnLocationChange(Location akOldLoc, Location akNewLoc) Event OnLocationChange(Location akOldLoc, Location akNewLoc)
if GetPlayer().IsInLocation(Opponent.GetActorRef().GetCurrentLocation()) == False if GetPlayer().IsInLocation(Opponent.GetActorReference().GetCurrentLocation()) == False
; Debug.Trace(self + "Player has left opponent's location, shutting down") ; Debug.Trace(self + "Player has left opponent's location, shutting down")
GetOwningQuest().SetStage(200) GetOwningQuest().SetStage(200)
endIf endIf

View File

@ -15,7 +15,7 @@ Event OnUpdateGameTime()
EndEvent EndEvent
Function SetupFinalScene() Function SetupFinalScene()
Actor akElfride = Alias_Elfride.GetActorRef() Actor akElfride = Alias_Elfride.GetActorReference()
If akElfride.IsDisabled() ; For backward compatibility If akElfride.IsDisabled() ; For backward compatibility
PutElfrideToCage() PutElfrideToCage()
_00E_QuestFunctions.WaitForReferenceToLoad(akElfride) _00E_QuestFunctions.WaitForReferenceToLoad(akElfride)
@ -25,15 +25,15 @@ Function SetupFinalScene()
_00E_NQ10_ElfriedeCageRef.SetOpen(True) _00E_NQ10_ElfriedeCageRef.SetOpen(True)
_00E_ElfriedeMoohMarker.Play(akElfride) _00E_ElfriedeMoohMarker.Play(akElfride)
Actor akEshra = Alias_Eshra.GetActorRef() Actor akEshra = Alias_Eshra.GetActorReference()
akEshra.MoveTo(EshraPortRef) akEshra.MoveTo(EshraPortRef)
Debug.SendAnimationEvent(akEshra, "IdleForceDefaultState") Debug.SendAnimationEvent(akEshra, "IdleForceDefaultState")
EndFunction EndFunction
Function FinishQuest() Function FinishQuest()
; Start end travel for Eshra ; Start end travel for Eshra
Actor akEshra = Alias_Eshra.GetActorRef() Actor akEshra = Alias_Eshra.GetActorReference()
_00E_QuestFunctions.DistanceFailsafeMoveTo(Alias_Elfride.GetActorRef(), akEshra, 256.0) _00E_QuestFunctions.DistanceFailsafeMoveTo(Alias_Elfride.GetActorReference(), akEshra, 256.0)
akEshra.SetActorValue("Variable01", 1.0) akEshra.SetActorValue("Variable01", 1.0)
RegisterForSingleUpdateGameTime(1.0) RegisterForSingleUpdateGameTime(1.0)
@ -45,7 +45,7 @@ Function FinishQuest()
EndFunction EndFunction
Function PutElfrideToCage() Function PutElfrideToCage()
Actor akElfride = Alias_Elfride.GetActorRef() Actor akElfride = Alias_Elfride.GetActorReference()
akElfride.SetFactionRank(NoFeedingIdleFaction, 0) akElfride.SetFactionRank(NoFeedingIdleFaction, 0)
akElfride.MoveToMyEditorLocation() ; Just in case akElfride.MoveToMyEditorLocation() ; Just in case
akElfride.Enable() akElfride.Enable()
@ -58,10 +58,10 @@ EndFunction
Function FinishEndTravel() Function FinishEndTravel()
UnregisterForUpdateGameTime() UnregisterForUpdateGameTime()
Actor akEshra = Alias_Eshra.GetActorRef() Actor akEshra = Alias_Eshra.GetActorReference()
akEshra.SetActorValue("Variable01", 0.0) akEshra.SetActorValue("Variable01", 0.0)
akEshra.EvaluatePackage() akEshra.EvaluatePackage()
Actor akElfride = Alias_Elfride.GetActorRef() Actor akElfride = Alias_Elfride.GetActorReference()
akElfride.RemoveFromFaction(NoFeedingIdleFaction) akElfride.RemoveFromFaction(NoFeedingIdleFaction)
EndFunction EndFunction

View File

@ -40,7 +40,7 @@ Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
If akTarget == PlayerRef || akTarget.IsPlayerTeammate() || akTarget.HasKeyword(_00E_PlayerSummonedCreature) || akTarget.GetFactionReaction(PlayerRef) == 2 || akTarget.HasEffectKeyword(BlameSpellKeyword) If akTarget == PlayerRef || akTarget.IsPlayerTeammate() || akTarget.HasKeyword(_00E_PlayerSummonedCreature) || akTarget.GetFactionReaction(PlayerRef) == 2 || akTarget.HasEffectKeyword(BlameSpellKeyword)
finished = True finished = True
GetActorRef().GetActorBase().SetEssential(False) GetActorReference().GetActorBase().SetEssential(False)
EndIf EndIf
EndIf EndIf
EndEvent EndEvent

View File

@ -195,7 +195,7 @@ Bool Function IsBadApparitionLocation(Location loc)
EndFunction EndFunction
Actor Function GetApparitionRef() Actor Function GetApparitionRef()
Return NewApparitionAlias.GetActorRef() Return NewApparitionAlias.GetActorReference()
EndFunction EndFunction
Actor Function GetApparitionFailsafeRef() Actor Function GetApparitionFailsafeRef()
@ -206,7 +206,7 @@ Actor Function GetApparitionFailsafeRef()
EndFunction EndFunction
Bool Function IsApparitionSpawned() Bool Function IsApparitionSpawned()
If NewApparitionAlias.GetActorRef() If NewApparitionAlias.GetActorReference()
Return (CurrentSummonState != SUMMON_STATE_UNSUMMONING) ; It exists and is not being unsummoned Return (CurrentSummonState != SUMMON_STATE_UNSUMMONING) ; It exists and is not being unsummoned
Else Else
Return (CurrentSummonState == SUMMON_STATE_SUMMONING) ; It's not there yet but spawning Return (CurrentSummonState == SUMMON_STATE_SUMMONING) ; It's not there yet but spawning

View File

@ -52,7 +52,7 @@ EndFunction
Function FollowerWait() Function FollowerWait()
actor FollowerActor = pFollowerAlias.GetActorRef() as Actor actor FollowerActor = pFollowerAlias.GetActorReference() as Actor
FollowerActor.SetActorValue("WaitingForPlayer", 1) FollowerActor.SetActorValue("WaitingForPlayer", 1)
;SetObjectiveDisplayed(10, abforce = true) ;SetObjectiveDisplayed(10, abforce = true)
;follower will wait 3 days ;follower will wait 3 days
@ -62,7 +62,7 @@ EndFunction
Function AnimalWait() Function AnimalWait()
actor AnimalActor = pAnimalAlias.GetActorRef() as Actor actor AnimalActor = pAnimalAlias.GetActorReference() as Actor
AnimalActor.SetActorValue("WaitingForPlayer", 1) AnimalActor.SetActorValue("WaitingForPlayer", 1)
;SetObjectiveDisplayed(20, abforce = true) ;SetObjectiveDisplayed(20, abforce = true)
;follower will wait 3 days ;follower will wait 3 days
@ -72,7 +72,7 @@ EndFunction
Function FollowerFollow() Function FollowerFollow()
actor FollowerActor = pFollowerAlias.GetActorRef() as Actor actor FollowerActor = pFollowerAlias.GetActorReference() as Actor
FollowerActor.SetActorValue("WaitingForPlayer", 0) FollowerActor.SetActorValue("WaitingForPlayer", 0)
SetObjectiveDisplayed(10, abdisplayed = false) SetObjectiveDisplayed(10, abdisplayed = false)
@ -80,7 +80,7 @@ EndFunction
Function AnimalFollow() Function AnimalFollow()
actor AnimalActor = pAnimalAlias.GetActorRef() as Actor actor AnimalActor = pAnimalAlias.GetActorReference() as Actor
AnimalActor.SetActorValue("WaitingForPlayer", 0) AnimalActor.SetActorValue("WaitingForPlayer", 0)
SetObjectiveDisplayed(20, abdisplayed = false) SetObjectiveDisplayed(20, abdisplayed = false)
@ -88,7 +88,7 @@ EndFunction
Function DismissFollower(Int iMessage = 0, Int iSayLine = 1) Function DismissFollower(Int iMessage = 0, Int iSayLine = 1)
If pFollowerAlias && pFollowerAlias.GetActorRef().IsDead() == False If pFollowerAlias && pFollowerAlias.GetActorReference().IsDead() == False
If iMessage == 0 If iMessage == 0
FollowerDismissMessage.Show() FollowerDismissMessage.Show()
ElseIf iMessage == 1 ElseIf iMessage == 1
@ -105,7 +105,7 @@ Function DismissFollower(Int iMessage = 0, Int iSayLine = 1)
;failsafe ;failsafe
FollowerDismissMessage.Show() FollowerDismissMessage.Show()
EndIf EndIf
actor DismissedFollowerActor = pFollowerAlias.GetActorRef() as Actor actor DismissedFollowerActor = pFollowerAlias.GetActorReference() as Actor
DismissedFollowerActor.StopCombatAlarm() DismissedFollowerActor.StopCombatAlarm()
DismissedFollowerActor.AddToFaction(pDismissedFollower) DismissedFollowerActor.AddToFaction(pDismissedFollower)
DismissedFollowerActor.SetPlayerTeammate(false) DismissedFollowerActor.SetPlayerTeammate(false)
@ -139,8 +139,8 @@ EndFunction
Function DismissAnimal() Function DismissAnimal()
If pAnimalAlias && pAnimalAlias.GetActorRef().IsDead() == False If pAnimalAlias && pAnimalAlias.GetActorReference().IsDead() == False
actor DismissedAnimalActor = pAnimalAlias.GetActorRef() as Actor actor DismissedAnimalActor = pAnimalAlias.GetActorReference() as Actor
DismissedAnimalActor.SetActorValue("Variable04", 0) DismissedAnimalActor.SetActorValue("Variable04", 0)
;DismissedAnimalActor.AllowPCDialogue(False) ;DismissedAnimalActor.AllowPCDialogue(False)
pPlayerAnimalCount.SetValue(0) pPlayerAnimalCount.SetValue(0)

View File

@ -67,8 +67,8 @@ _00E_NQ06_Functions kmyQuest = __temp as _00E_NQ06_Functions
;END AUTOCAST ;END AUTOCAST
;BEGIN CODE ;BEGIN CODE
SetObjectiveCompleted(30) SetObjectiveCompleted(30)
Alias_Bonni.GetActorRef().SetFactionRank(PlayerHorseFaction, 1) Alias_Bonni.GetActorReference().SetFactionRank(PlayerHorseFaction, 1)
Alias_Bonni.GetActorRef().SetFactionOwner(PlayerFaction) Alias_Bonni.GetActorReference().SetFactionOwner(PlayerFaction)
kmyQuest.SetMuleName() kmyQuest.SetMuleName()
kmyQuest.AddHorseFlute() kmyQuest.AddHorseFlute()
If _00E_AchievementsEnabled.GetValueInt() == 1 If _00E_AchievementsEnabled.GetValueInt() == 1

View File

@ -32,7 +32,7 @@ While BardDialogue.IsStopped() == False && iTimeoutCounter < 60
EndWhile EndWhile
; Start BardDialogue again (with the new bard) ; Start BardDialogue again (with the new bard)
Actor akBard = alias_Bard.GetActorRef() Actor akBard = alias_Bard.GetActorReference()
If akBard If akBard
BardDialogue.Start() BardDialogue.Start()
(BardDialogue as _00E_BardDialogueFunctions).Setup(akBard, lastSongScene) (BardDialogue as _00E_BardDialogueFunctions).Setup(akBard, lastSongScene)

View File

@ -56,8 +56,8 @@ DGIntimidateQuestScript kmyQuest = __temp as DGIntimidateQuestScript
;BEGIN CODE ;BEGIN CODE
; Stage 10: Start ; Stage 10: Start
; fill the alias if this is CR04 and don't end quest if player fights dirty ; fill the alias if this is CR04 and don't end quest if player fights dirty
Actor OpponentREF = Alias_Opponent.GetActorRef() Actor OpponentREF = Alias_Opponent.GetActorReference()
Actor FriendREF = Alias_OpponentFriend.GetActorRef() Actor FriendREF = Alias_OpponentFriend.GetActorReference()
(Alias_Player as _00E_DGIntimidatePlayerScript).Setup() (Alias_Player as _00E_DGIntimidatePlayerScript).Setup()
@ -97,7 +97,7 @@ DGIntimidateQuestScript kmyQuest = __temp as DGIntimidateQuestScript
;END AUTOCAST ;END AUTOCAST
;BEGIN CODE ;BEGIN CODE
; Stage 20: forcegreet is done (never happens in Enderal) ; Stage 20: forcegreet is done (never happens in Enderal)
Alias_Opponent.GetActorRef().EvaluatePackage() Alias_Opponent.GetActorReference().EvaluatePackage()
;END CODE ;END CODE
EndFunction EndFunction
;END FRAGMENT ;END FRAGMENT
@ -110,8 +110,8 @@ DGIntimidateQuestScript kmyQuest = __temp as DGIntimidateQuestScript
;END AUTOCAST ;END AUTOCAST
;BEGIN CODE ;BEGIN CODE
; Stage 200: End quest (1st phase) ; Stage 200: End quest (1st phase)
Actor OpponentREF = Alias_Opponent.GetActorRef() Actor OpponentREF = Alias_Opponent.GetActorReference()
Actor OpponentFriendREF = Alias_OpponentFriend.GetActorRef() Actor OpponentFriendREF = Alias_OpponentFriend.GetActorReference()
Actor PlayerREF = Game.GetPlayer() Actor PlayerREF = Game.GetPlayer()
OpponentREF.AllowBleedoutDialogue(False) OpponentREF.AllowBleedoutDialogue(False)
@ -149,7 +149,7 @@ EndFunction
Function Fragment_9() Function Fragment_9()
;BEGIN CODE ;BEGIN CODE
; Stage 15: opponent is down, cue victory dialogue (victory dialogue does not happen in Enderal) ; Stage 15: opponent is down, cue victory dialogue (victory dialogue does not happen in Enderal)
Actor myOpponent = Alias_Opponent.GetActorRef() Actor myOpponent = Alias_Opponent.GetActorReference()
myOpponent.AllowBleedoutDialogue(True) myOpponent.AllowBleedoutDialogue(True)
Game.IncrementStat( "Brawls Won" ) Game.IncrementStat( "Brawls Won" )
;END CODE ;END CODE
@ -175,9 +175,9 @@ Function Fragment_14()
Game.GetPlayer().StopCombatAlarm() Game.GetPlayer().StopCombatAlarm()
;make sure player's hired hands don't aggro ;make sure player's hired hands don't aggro
Alias_Opponent.GetActorRef().StopCombatAlarm() Alias_Opponent.GetActorReference().StopCombatAlarm()
If Alias_OpponentFriend.GetActorRef() != None If Alias_OpponentFriend.GetActorReference() != None
Alias_OpponentFriend.GetActorRef().StopCombatAlarm() Alias_OpponentFriend.GetActorReference().StopCombatAlarm()
EndIf EndIf
;END CODE ;END CODE
EndFunction EndFunction

View File

@ -23,7 +23,7 @@ EndFunction
;BEGIN FRAGMENT Fragment_2 ;BEGIN FRAGMENT Fragment_2
Function Fragment_2() Function Fragment_2()
;BEGIN CODE ;BEGIN CODE
Preacher.GetActorRef().PlayIdle(IdleStop_Loose) Preacher.GetActorReference().PlayIdle(IdleStop_Loose)
;END CODE ;END CODE
EndFunction EndFunction
;END FRAGMENT ;END FRAGMENT

View File

@ -5,7 +5,7 @@ Scriptname SF_MQ11c_SC7_RyneusRaiseSphe_00090BCA Extends Scene Hidden
;BEGIN FRAGMENT Fragment_4 ;BEGIN FRAGMENT Fragment_4
Function Fragment_4() Function Fragment_4()
;BEGIN CODE ;BEGIN CODE
Alias_Ryneus.GetActorRef().SetLookAt(Alias_Sphere.GetRef()) Alias_Ryneus.GetActorReference().SetLookAt(Alias_Sphere.GetRef())
;END CODE ;END CODE
EndFunction EndFunction
;END FRAGMENT ;END FRAGMENT

View File

@ -6,8 +6,8 @@ Scriptname TIF__0012787D Extends TopicInfo Hidden
Function Fragment_0(ObjectReference akSpeakerRef) Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE ;BEGIN CODE
PlayerHorseNew.GetActorRef().SetFactionRank(PlayerHorseFaction, 1) PlayerHorseNew.GetActorReference().SetFactionRank(PlayerHorseFaction, 1)
PlayerHorseNew.GetActorRef().SetFactionOwner(PlayerFaction) PlayerHorseNew.GetActorReference().SetFactionOwner(PlayerFaction)
game.IncrementStat( "Horses Owned" ) game.IncrementStat( "Horses Owned" )
Game.GetPlayer().RemoveItem(Gold001, 600) Game.GetPlayer().RemoveItem(Gold001, 600)
NQ06.SetHorseName() NQ06.SetHorseName()