@@ -20,7 +20,7 @@ namespace YongAnFrame.Roles
20
20
public abstract class CustomRolePlus : CustomRole
21
21
{
22
22
public override bool IgnoreSpawnSystem { get ; set ; } = false ;
23
- public virtual Role . Properties . SpawnProperties SpawnAttributes { get ; set ; } = new Role . Properties . SpawnProperties ( ) ;
23
+ public new virtual Role . Properties . SpawnProperties SpawnProperties { get ; set ; } = new Role . Properties . SpawnProperties ( ) ;
24
24
public bool IStaetSpawn { get ; set ; } = true ;
25
25
public Dictionary < FramePlayer , CustomRolePlusProperties > BaseData { get ; } = [ ] ;
26
26
public virtual MoreProperties MoreAttributes { get ; set ; } = new MoreProperties ( ) ;
@@ -94,10 +94,10 @@ public virtual void AddRole(FramePlayer fPlayer)
94
94
fPlayer . ExPlayer . EnableEffect ( Exiled . API . Enums . EffectType . MovementBoost ) ;
95
95
fPlayer . ExPlayer . ChangeEffectIntensity ( Exiled . API . Enums . EffectType . MovementBoost , ( byte ) ( ( MoreAttributes . BaseMovementSpeedMultiplier - 1f ) * 100 ) ) ;
96
96
}
97
- if ( ! string . IsNullOrEmpty ( SpawnAttributes . Info ) ) Cassie . MessageTranslated ( $ "" /*ADMINISTER TEAM DESIGNATED {CASSIEDeathName} HASENTERED*/ , SpawnAttributes . Info , true , true , true ) ;
98
- if ( ! string . IsNullOrEmpty ( SpawnAttributes . MusicFileName ) )
97
+ if ( ! string . IsNullOrEmpty ( SpawnProperties . Info ) ) Cassie . MessageTranslated ( $ "" /*ADMINISTER TEAM DESIGNATED {CASSIEDeathName} HASENTERED*/ , SpawnProperties . Info , true , true , true ) ;
98
+ if ( ! string . IsNullOrEmpty ( SpawnProperties . MusicFileName ) )
99
99
{
100
- MusicManager . Instance . Play ( SpawnAttributes . MusicFileName , $ "{ Name } ", new MusicManager . TrackEvent ( ) ) ;
100
+ MusicManager . Instance . Play ( SpawnProperties . MusicFileName , $ "{ Name } ", new MusicManager . TrackEvent ( ) ) ;
101
101
}
102
102
fPlayer . UpdateShowInfoList ( ) ;
103
103
}
@@ -139,7 +139,7 @@ public virtual bool TrySpawn(FramePlayer fPlayer, bool chanceRef = false)
139
139
{
140
140
limitCount = 0 ;
141
141
}
142
- if ( spawnCount < SpawnAttributes . MaxCount && Server . PlayerCount >= SpawnAttributes . MinPlayer && SpawnChanceNum <= SpawnAttributes . Chance && SpawnProperties . Limit > limitCount && fPlayer . CustomRolePlus == null )
142
+ if ( spawnCount < SpawnProperties . MaxCount && Server . PlayerCount >= SpawnProperties . MinPlayer && SpawnChanceNum <= SpawnProperties . Chance && SpawnProperties . Limit > limitCount && fPlayer . CustomRolePlus == null )
143
143
{
144
144
limitCount ++ ;
145
145
spawnCount ++ ;
@@ -164,7 +164,7 @@ private void OnRestartingRound()
164
164
165
165
//private void OnRoundStarted()
166
166
//{
167
- // if (IStaetSpawn && SpawnAttributes .RefreshTeam == RefreshTeamType.Start)
167
+ // if (IStaetSpawn && SpawnProperties .RefreshTeam == RefreshTeamType.Start)
168
168
// {
169
169
// TrySpawn(NoCustomRole.FindAll((p) => OldRole == RoleTypeId.None && Role == p.ExPlayer.Role.Type || p.ExPlayer.Role.Type == OldRole));
170
170
// }
@@ -176,14 +176,14 @@ private void OnSpawning(SpawningEventArgs args)
176
176
FramePlayer fPlayer = args . Player . ToFPlayer ( ) ;
177
177
if ( IStaetSpawn && ( OldRole != RoleTypeId . None && args . Player . Role . Type == OldRole ) || ( OldRole == RoleTypeId . None && args . Player . Role . Type == Role ) )
178
178
{
179
- switch ( SpawnAttributes . RefreshTeam )
179
+ switch ( SpawnProperties . RefreshTeam )
180
180
{
181
181
case RefreshTeamType . Start :
182
182
TrySpawn ( fPlayer ) ;
183
183
break ;
184
184
case RefreshTeamType . MTF :
185
185
case RefreshTeamType . CI :
186
- if ( SpawnAttributes . RefreshTeam != RefreshTeamType . Start && RespawnTeamPlayer . Contains ( fPlayer ) && SpawnAttributes . StartWave <= RespawnWave )
186
+ if ( SpawnProperties . RefreshTeam != RefreshTeamType . Start && RespawnTeamPlayer . Contains ( fPlayer ) && SpawnProperties . StartWave <= RespawnWave )
187
187
{
188
188
TrySpawn ( fPlayer ) ;
189
189
}
0 commit comments