// Token: 0x06001425 RID: 5157 RVA: 0x00056208 File Offset: 0x00054408 private void SetupIndicator() { if (this.indicator) { return; } if (this.body) { CharacterMaster master = this.body.master; bool flag = master && master.isBoss; GameObject gameObject = null; if (master && this.teamIndex == TeamIndex.Player) { gameObject = Resources.Load <GameObject>(this.body.isPlayerControlled ? "Prefabs/PositionIndicators/PlayerPositionIndicator" : "Prefabs/PositionIndicators/NPCPositionIndicator"); } else if (flag) { gameObject = Resources.Load <GameObject>("Prefabs/PositionIndicators/BossPositionIndicator"); } if (this.indicator) { UnityEngine.Object.Destroy(this.indicator); this.indicator = null; } if (gameObject) { this.indicator = UnityEngine.Object.Instantiate <GameObject>(gameObject, base.transform); this.indicator.GetComponent <PositionIndicator>().targetTransform = this.body.coreTransform; Nameplate component = this.indicator.GetComponent <Nameplate>(); if (component) { component.SetBody(this.body); } } } }
// Token: 0x0600162E RID: 5678 RVA: 0x0006A288 File Offset: 0x00068488 private void SetupIndicator() { if (this.indicator) { return; } CharacterBody component = base.GetComponent <CharacterBody>(); if (component) { TeamComponent component2 = component.GetComponent <TeamComponent>(); if (component2) { CharacterMaster master = component.master; bool flag = master && master.isBoss; GameObject gameObject = null; if (master && component2.teamIndex == TeamIndex.Player) { bool flag2 = false; PlayerCharacterMasterController component3 = master.GetComponent <PlayerCharacterMasterController>(); if (component3) { flag2 = true; GameObject networkUserObject = component3.networkUserObject; if (networkUserObject) { NetworkIdentity component4 = networkUserObject.GetComponent <NetworkIdentity>(); if (component4) { bool isLocalPlayer = component4.isLocalPlayer; } } } Vector3 position = component.transform.position; component.GetComponent <Collider>(); if (flag2) { gameObject = Resources.Load <GameObject>("Prefabs/PositionIndicators/PlayerPositionIndicator"); } else { gameObject = Resources.Load <GameObject>("Prefabs/PositionIndicators/NPCPositionIndicator"); } this.indicator = UnityEngine.Object.Instantiate <GameObject>(gameObject, position, Quaternion.identity, component.transform); } else if (flag) { gameObject = Resources.Load <GameObject>("Prefabs/PositionIndicators/BossPositionIndicator"); } if (this.indicator) { UnityEngine.Object.Destroy(this.indicator); this.indicator = null; } if (gameObject) { this.indicator = UnityEngine.Object.Instantiate <GameObject>(gameObject, base.transform); this.indicator.GetComponent <PositionIndicator>().targetTransform = component.coreTransform; Nameplate component5 = this.indicator.GetComponent <Nameplate>(); if (component5) { component5.SetBody(component); } } } } }