protected override void ServerInitializeCharacterFirstTime(ServerInitializeData data) { base.ServerInitializeCharacterFirstTime(data); var character = data.GameObject; var publicState = data.PublicState; publicState.IsMale = true; publicState.FaceStyle = SharedCharacterFaceStylesProvider .GetForGender(publicState.IsMale) .GenerateRandomFace(); ServerPlayerSpawnManager.ServerAddTorchItemIfNoItems(character); if (!Api.IsEditor) { return; } // the game is run as Editor // auto pwn in editor mode GetProtoEntity <ConsoleAdminPwn>().Execute(player: character); // add all the skills GetProtoEntity <ConsoleSkillsSetAll>().Execute(player: character); // add all the technologies GetProtoEntity <ConsoleTechAddAll>().Execute(player: character); // add all the quests (and complete them) GetProtoEntity <ConsoleQuestCompleteAll>().Execute(player: character); }
protected override void ServerInitializeCharacterFirstTime(ServerInitializeData data) { base.ServerInitializeCharacterFirstTime(data); var character = data.GameObject; var publicState = data.PublicState; if (!Api.IsEditor) { NewbieProtectionSystem.ServerRegisterNewbie(character); publicState.IsMale = 1 == RandomHelper.Next(0, maxValueExclusive: 2); // male/female ratio: 50/50 publicState.FaceStyle = SharedCharacterFaceStylesProvider .GetForGender(publicState.IsMale) .GenerateRandomFace(); } else // if Editor { publicState.IsMale = true; publicState.FaceStyle = SharedCharacterFaceStylesProvider .GetForGender(publicState.IsMale) .GetDefaultFaceInEditor(); } ServerPlayerSpawnManager.ServerAddTorchItemIfNoItems(character); if (!Api.IsEditor) { return; } // the game is run as Editor // auto pwn in editor mode ConsoleCommandsSystem.SharedGetCommand <ConsoleAdminPwn>().Execute(player: character); // add all the skills ConsoleCommandsSystem.SharedGetCommand <ConsoleSkillsSetAll>().Execute(player: character); // add all the technologies ConsoleCommandsSystem.SharedGetCommand <ConsoleTechAddAll>().Execute(player: character); this.ServerRebuildFinalCacheIfNeeded(data.PrivateState, publicState); // add all the quests (and complete them) ConsoleCommandsSystem.SharedGetCommand <ConsoleQuestCompleteAll>().Execute(player: character); }