Skip to content

Commit

Permalink
zzzz
Browse files Browse the repository at this point in the history
  • Loading branch information
YongAn404 committed Aug 28, 2024
1 parent d48549f commit f01a61c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions Roles/CustomRolePlus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace YongAnFrame.Roles
public abstract class CustomRolePlus : CustomRole
{
public override bool IgnoreSpawnSystem { get; set; } = false;
public virtual Role.Properties.SpawnProperties SpawnAttributes { get; set; } = new Role.Properties.SpawnProperties();
public new virtual Role.Properties.SpawnProperties SpawnProperties { get; set; } = new Role.Properties.SpawnProperties();
public bool IStaetSpawn { get; set; } = true;
public Dictionary<FramePlayer, CustomRolePlusProperties> BaseData { get; } = [];
public virtual MoreProperties MoreAttributes { get; set; } = new MoreProperties();
Expand Down Expand Up @@ -94,10 +94,10 @@ public virtual void AddRole(FramePlayer fPlayer)
fPlayer.ExPlayer.EnableEffect(Exiled.API.Enums.EffectType.MovementBoost);
fPlayer.ExPlayer.ChangeEffectIntensity(Exiled.API.Enums.EffectType.MovementBoost, (byte)((MoreAttributes.BaseMovementSpeedMultiplier - 1f) * 100));
}
if (!string.IsNullOrEmpty(SpawnAttributes.Info)) Cassie.MessageTranslated($""/*ADMINISTER TEAM DESIGNATED {CASSIEDeathName} HASENTERED*/, SpawnAttributes.Info, true, true, true);
if (!string.IsNullOrEmpty(SpawnAttributes.MusicFileName))
if (!string.IsNullOrEmpty(SpawnProperties.Info)) Cassie.MessageTranslated($""/*ADMINISTER TEAM DESIGNATED {CASSIEDeathName} HASENTERED*/, SpawnProperties.Info, true, true, true);
if (!string.IsNullOrEmpty(SpawnProperties.MusicFileName))
{
MusicManager.Instance.Play(SpawnAttributes.MusicFileName, $"{Name}", new MusicManager.TrackEvent());
MusicManager.Instance.Play(SpawnProperties.MusicFileName, $"{Name}", new MusicManager.TrackEvent());
}
fPlayer.UpdateShowInfoList();
}
Expand Down Expand Up @@ -139,7 +139,7 @@ public virtual bool TrySpawn(FramePlayer fPlayer, bool chanceRef = false)
{
limitCount = 0;
}
if (spawnCount < SpawnAttributes.MaxCount && Server.PlayerCount >= SpawnAttributes.MinPlayer && SpawnChanceNum <= SpawnAttributes.Chance && SpawnProperties.Limit > limitCount && fPlayer.CustomRolePlus == null)
if (spawnCount < SpawnProperties.MaxCount && Server.PlayerCount >= SpawnProperties.MinPlayer && SpawnChanceNum <= SpawnProperties.Chance && SpawnProperties.Limit > limitCount && fPlayer.CustomRolePlus == null)
{
limitCount++;
spawnCount++;
Expand All @@ -164,7 +164,7 @@ private void OnRestartingRound()

//private void OnRoundStarted()
//{
// if (IStaetSpawn && SpawnAttributes.RefreshTeam == RefreshTeamType.Start)
// if (IStaetSpawn && SpawnProperties.RefreshTeam == RefreshTeamType.Start)
// {
// TrySpawn(NoCustomRole.FindAll((p) => OldRole == RoleTypeId.None && Role == p.ExPlayer.Role.Type || p.ExPlayer.Role.Type == OldRole));
// }
Expand All @@ -176,14 +176,14 @@ private void OnSpawning(SpawningEventArgs args)
FramePlayer fPlayer = args.Player.ToFPlayer();
if (IStaetSpawn && (OldRole != RoleTypeId.None && args.Player.Role.Type == OldRole) || (OldRole == RoleTypeId.None && args.Player.Role.Type == Role))
{
switch (SpawnAttributes.RefreshTeam)
switch (SpawnProperties.RefreshTeam)
{
case RefreshTeamType.Start:
TrySpawn(fPlayer);
break;
case RefreshTeamType.MTF:
case RefreshTeamType.CI:
if (SpawnAttributes.RefreshTeam != RefreshTeamType.Start && RespawnTeamPlayer.Contains(fPlayer) && SpawnAttributes.StartWave <= RespawnWave)
if (SpawnProperties.RefreshTeam != RefreshTeamType.Start && RespawnTeamPlayer.Contains(fPlayer) && SpawnProperties.StartWave <= RespawnWave)
{
TrySpawn(fPlayer);
}
Expand Down
2 changes: 1 addition & 1 deletion Roles/Interfaces/ISkill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ namespace YongAnFrame.Roles.Interfaces
{
public interface ISkill
{
SkillProperties[] SkillsAttributes { get; }
SkillProperties[] SkillProperties { get; }
}
}
8 changes: 4 additions & 4 deletions Roles/SkillManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private ISkillBurialEnd SkillBurialEnd
return null;
}
}
public SkillProperties[] SkillsAttributes { get => skill.SkillsAttributes; }
public SkillProperties[] SkillProperties { get => skill.SkillProperties; }

public int SkillsEffectSwitchId { get; set; }
/// <summary>
Expand All @@ -65,7 +65,7 @@ public SkillManager(FramePlayer fPlayer, ISkill skill)
{
this.fPlayer = fPlayer;
this.skill = skill;
coroutineHandle = new CoroutineHandle[SkillsAttributes.Length];
coroutineHandle = new CoroutineHandle[SkillProperties.Length];
}


Expand All @@ -80,8 +80,8 @@ public void Run(int id)
coroutineHandle = null;
}

ActiveRemainingTime = SkillsAttributes[id].ActiveMaxTime;
BurialRemainingTime = SkillsAttributes[id].BurialMaxTime;
ActiveRemainingTime = SkillProperties[id].ActiveMaxTime;
BurialRemainingTime = SkillProperties[id].BurialMaxTime;

coroutineHandle[id] = Timing.RunCoroutine(Timer(id));
}
Expand Down

0 comments on commit f01a61c

Please sign in to comment.