mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-23 07:49:51 +08:00
f00c54cb95
* Apply fix `21dec2fe` * Apply fix `89d01d5f` * Apply fix `d900f154` this one was already implemented; updated to use call from previous commit * Ability changing commit TODO: change info to debug * Remove use of deprecated methods/fields * Temp commit v2 (Adding LoseHP and some fixes) * Oopsie * Probably fix monster battle * Fix issue with reflecting into fields * Fix some things * Fix ability names for 3.6 resources * Improve logging --------- Co-authored-by: StartForKiller <jesussanz2003@gmail.com>
23 lines
785 B
Java
23 lines
785 B
Java
package emu.grasscutter.server.packet.send;
|
|
|
|
import emu.grasscutter.game.entity.EntityGadget;
|
|
import emu.grasscutter.net.packet.BasePacket;
|
|
import emu.grasscutter.net.packet.PacketOpcodes;
|
|
import emu.grasscutter.net.proto.GadgetStateNotifyOuterClass.GadgetStateNotify;
|
|
|
|
public class PacketGadgetStateNotify extends BasePacket {
|
|
|
|
public PacketGadgetStateNotify(EntityGadget gadget, int newState) {
|
|
super(PacketOpcodes.GadgetStateNotify);
|
|
|
|
GadgetStateNotify proto =
|
|
GadgetStateNotify.newBuilder()
|
|
.setGadgetEntityId(gadget.getId())
|
|
.setGadgetState(newState)
|
|
.setIsEnableInteract(gadget.isInteractEnabled())
|
|
.build();
|
|
|
|
this.setData(proto);
|
|
}
|
|
}
|