继续
This commit is contained in:
@@ -8,22 +8,22 @@ namespace Continentis.MainGame.Character
|
||||
{
|
||||
public partial class CombatBuffSubmodule : SubmoduleBase<CharacterBase>
|
||||
{
|
||||
public List<CombatBuffBase> buffList;
|
||||
public List<CharacterCombatBuffBase> buffList;
|
||||
|
||||
public CombatBuffSubmodule(CharacterBase character) : base(character)
|
||||
{
|
||||
buffList = new List<CombatBuffBase>();
|
||||
buffList = new List<CharacterCombatBuffBase>();
|
||||
}
|
||||
}
|
||||
|
||||
public partial class CombatBuffSubmodule
|
||||
{
|
||||
public T GetBuff<T>() where T : CombatBuffBase
|
||||
public T GetBuff<T>() where T : CharacterCombatBuffBase
|
||||
{
|
||||
return (T)buffList.Find(x => x.GetType() == typeof(T));
|
||||
}
|
||||
|
||||
public bool HasBuff<T>() where T : CombatBuffBase
|
||||
public bool HasBuff<T>() where T : CharacterCombatBuffBase
|
||||
{
|
||||
return buffList.Exists(x => x.GetType() == typeof(T));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user