Add the god statue's blood return display and stamina system (#520)

* Fix announcement display

* Approaching StatuesOfTheSeven will restore all health of the current team

* Added god statue's blood return display and stamina system

* fix error

fix error

* fix file
This commit is contained in:
BaiSugar
2022-05-05 02:45:20 +08:00
committed by GitHub
Unverified
parent aa06583a45
commit 2074933e96
5 changed files with 154 additions and 14 deletions
@@ -1,11 +1,14 @@
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.avatar.Avatar;
import emu.grasscutter.game.entity.GameEntity;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.props.FightProperty;
import emu.grasscutter.game.props.LifeState;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.AvatarLifeStateChangeNotifyOuterClass.AvatarLifeStateChangeNotify;
import emu.grasscutter.net.proto.PlayerDieTypeOuterClass.PlayerDieType;
public class PacketAvatarLifeStateChangeNotify extends BasePacket {
@@ -19,4 +22,15 @@ public class PacketAvatarLifeStateChangeNotify extends BasePacket {
this.setData(proto);
}
public PacketAvatarLifeStateChangeNotify(Avatar avatar,int attackerId,LifeState lifeState) {
super(PacketOpcodes.AvatarLifeStateChangeNotify);
AvatarLifeStateChangeNotify proto = AvatarLifeStateChangeNotify.newBuilder()
.setAvatarGuid(avatar.getGuid())
.setLifeState(lifeState.getValue())
.setMoveReliableSeq(attackerId)
.build();
this.setData(proto);
}
}