mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added healing healthsource logic to shockwave system.
This commit is contained in:
parent
6a1acd47a1
commit
99aba78422
@ -1,4 +1,4 @@
|
||||
Item(
|
||||
ItemDef(
|
||||
name: "Stone Golem's Fist",
|
||||
description: "Was attached to a mighty stone golem.",
|
||||
kind: Tool(
|
||||
|
@ -74,7 +74,7 @@ impl LoadoutBuilder {
|
||||
Body::Golem(golem) => match golem.species {
|
||||
golem::Species::StoneGolem => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.weapons.bossweapon.stone_golems_fist",
|
||||
"common.items.npc_weapons.npcweapon.stone_golems_fist",
|
||||
));
|
||||
},
|
||||
},
|
||||
|
@ -203,7 +203,7 @@ impl<'a> System<'a> for Sys {
|
||||
damage.modify_damage(block, loadout);
|
||||
}
|
||||
|
||||
if damage.healthchange != 0.0 {
|
||||
if damage.healthchange < 0.0 {
|
||||
server_emitter.emit(ServerEvent::Damage {
|
||||
uid: *uid_b,
|
||||
change: HealthChange {
|
||||
@ -213,6 +213,16 @@ impl<'a> System<'a> for Sys {
|
||||
},
|
||||
},
|
||||
});
|
||||
} else if damage.healthchange > 0.0 {
|
||||
server_emitter.emit(ServerEvent::Damage {
|
||||
uid: *uid_b,
|
||||
change: HealthChange {
|
||||
amount: damage.healthchange as i32,
|
||||
cause: HealthSource::Healing {
|
||||
by: Some(shockwave.owner.unwrap_or(*uid)),
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
if shockwave.knockback != 0.0 && damage.healthchange != 0.0 {
|
||||
if shockwave.knockback < 0.0 {
|
||||
|
Loading…
Reference in New Issue
Block a user