// Token: 0x060004E8 RID: 1256 RVA: 0x00013B70 File Offset: 0x00011D70 public override GameObject DoSpawn(Vector3 position, Quaternion rotation, DirectorSpawnRequest directorSpawnRequest) { CharacterMaster characterMaster = new MasterSummon { masterPrefab = this.prefab, position = position, rotation = rotation, summonerBodyObject = directorSpawnRequest.summonerBodyObject, teamIndexOverride = directorSpawnRequest.teamIndexOverride, ignoreTeamMemberLimit = directorSpawnRequest.ignoreTeamMemberLimit, loadout = this._runtimeLoadout }.Perform(); if (characterMaster == null) { return(null); } return(characterMaster.gameObject); }
public CharacterMaster OpenSummonReturnMaster(Interactor activator) { if (!NetworkServer.active) { Debug.LogWarning("[Server] function 'RoR2.CharacterMaster RoR2.SummonMasterBehavior::OpenSummonReturnMaster(RoR2.Interactor)' called on client"); return(null); } float d = 0f; CharacterMaster characterMaster = new MasterSummon { masterPrefab = this.masterPrefab, position = base.transform.position + Vector3.up * d, rotation = base.transform.rotation, summonerBodyObject = ((activator != null) ? activator.gameObject : null), ignoreTeamMemberLimit = true }.Perform(); if (characterMaster) { GameObject bodyObject = characterMaster.GetBodyObject(); if (bodyObject) { ModelLocator component = bodyObject.GetComponent <ModelLocator>(); if (component && component.modelTransform) { TemporaryOverlay temporaryOverlay = component.modelTransform.gameObject.AddComponent <TemporaryOverlay>(); temporaryOverlay.duration = 0.5f; temporaryOverlay.animateShaderAlpha = true; temporaryOverlay.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); temporaryOverlay.destroyComponentOnEnd = true; temporaryOverlay.originalMaterial = Resources.Load <Material>("Materials/matSummonDrone"); temporaryOverlay.AddToCharacerModel(component.modelTransform.GetComponent <CharacterModel>()); } } } if (this.destroyAfterSummoning) { UnityEngine.Object.Destroy(base.gameObject); } return(characterMaster); }