mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
parent
7c15214c87
commit
07b68397f3
@ -864,7 +864,8 @@ public class DGamePlayer extends DInstancePlayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getDGroup() != null && dGroup.getLives() != -1) {
|
if (getDGroup() != null && dGroup.getLives() != -1) {
|
||||||
dGroup.setLives(dGroup.getLives() - dPlayerDeathEvent.getLostLives());
|
int newLives = dGroup.getLives() - dPlayerDeathEvent.getLostLives();
|
||||||
|
dGroup.setLives(newLives < 0 ? 0 : newLives);// If the group already has 0 lives, don't remove any
|
||||||
gameWorld.sendMessage(DMessage.GROUP_DEATH.getMessage(getName(), dGroup.getName(), String.valueOf(dGroup.getLives())));
|
gameWorld.sendMessage(DMessage.GROUP_DEATH.getMessage(getName(), dGroup.getName(), String.valueOf(dGroup.getLives())));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user