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
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
If akBard
akBard.PlayIdle(IdleStop)
@ -154,7 +154,7 @@ Function PlayRequestedSong(Scene requestedSongScene)
EndFunction
Event OnUpdate()
Actor akBard = SingingBard.GetActorRef()
Actor akBard = SingingBard.GetActorReference()
If akBard == None
Stop()
Return
@ -255,7 +255,7 @@ Function PickRandomSongFromSongList()
EndFunction
Actor Function GetSingingBardActor()
Return SingingBard.GetActorRef()
Return SingingBard.GetActorReference()
EndFunction
Bool Function IsQuestAudienceLocation()

View File

@ -8,7 +8,7 @@ Faction Property DGIntimidateFaction Auto
;-- Functions ---------------------------------------
Event OnUpdate()
actor pActor = self.GetActorRef()
actor pActor = self.GetActorReference()
if pActor.IsInCombat() == 0 && pActor.IsBleedingOut() == 0 && GetOwningQuest().GetStage() <= 15 ;&& GetOwningQuest().GetStage() < 15
GetOwningQuest().SetStage(200)
endIf
@ -30,7 +30,7 @@ Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
EndEvent
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()
if akAggressor == pPlayer
if akProjectile || (akWeapon && akWeapon != UnarmedWeapon)

View File

@ -25,7 +25,7 @@ Event OnEnterBleedout()
EndEvent
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")
GetOwningQuest().SetStage(200)
endIf

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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