mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add new SelfBuff buff category
This commit is contained in:
parent
d3f4b854fc
commit
601056ecbd
@ -476,6 +476,7 @@ pub enum BuffCategory {
|
||||
FromActiveAura(Uid, AuraKey),
|
||||
RemoveOnAttack,
|
||||
RemoveOnLoadoutChange,
|
||||
SelfBuff,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
|
@ -86,9 +86,7 @@ impl CharacterBehavior for Data {
|
||||
output_events.emit_server(ServerEvent::Buff {
|
||||
entity: data.entity,
|
||||
buff_change: BuffChange::RemoveByCategory {
|
||||
// TODO: Consider renaming [BuffCategory::RemoveOnLoadoutChange] to
|
||||
// something more generic?
|
||||
all_required: vec![BuffCategory::RemoveOnLoadoutChange],
|
||||
all_required: vec![BuffCategory::SelfBuff],
|
||||
any_required: vec![],
|
||||
none_required: vec![],
|
||||
},
|
||||
@ -107,9 +105,9 @@ impl CharacterBehavior for Data {
|
||||
.ability
|
||||
.map_or(false, |a| a.ability.is_from_tool())
|
||||
{
|
||||
vec![BuffCategory::RemoveOnLoadoutChange]
|
||||
vec![BuffCategory::RemoveOnLoadoutChange, BuffCategory::SelfBuff]
|
||||
} else {
|
||||
Vec::new()
|
||||
vec![BuffCategory::SelfBuff]
|
||||
};
|
||||
// Creates buff
|
||||
let buff = Buff::new(
|
||||
|
Loading…
Reference in New Issue
Block a user