Blossom Implement (#1606)

* Blossom!

* rename

* delete SpawnBlossomEntry.java

* use MAP

* use List

* use LIST

* use List

* useCondensedResin

* useCondensedResin

* fix build

* enhance

* fix bug

* REMOVE BOSS

* fix condensed resin

* fix condensed resin

* use POSITIVE_INFINITY

* use RewardPreviewData

* fix build

* fix resources

* add BLOSSOM_MONSTER_FIGHTING_VOLUME

* edit monster score

* edit monster score

* fix bug

* fix bug

* improve logic

* fix monsters level

* Deleted comment blocks

* nitpick

* Fix compilation problems

* nitpick

* Refactor + nitpick

* Clean up overall diff to develop

* Clean up other usage of condensed resin

* Clean up overall diff to develop

* Lombokify Scene.java

* Missed an odd getter name

* Unhardcode reward previews

* EDIT NAME

* remove leyline 1

* remove leyline 2

* Update BlossomManager.java

Co-authored-by: AnimeGitB <AnimeGitB@bigblueball.in>
This commit is contained in:
赵怡然
2022-08-21 14:19:59 +08:00
committed by GitHub
parent 957296fa2d
commit abd1e7569e
21 changed files with 670 additions and 261 deletions

View File

@@ -13,20 +13,20 @@ import emu.grasscutter.server.packet.send.PacketSelectWorktopOptionRsp;
@Opcodes(PacketOpcodes.SelectWorktopOptionReq)
public class HandlerSelectWorktopOptionReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
SelectWorktopOptionReq req = SelectWorktopOptionReq.parseFrom(payload);
try {
GameEntity entity = session.getPlayer().getScene().getEntityById(req.getGadgetEntityId());
if (entity == null || !(entity instanceof EntityGadget)) {
if (!(entity instanceof EntityGadget)) {
return;
}
session.getPlayer().getScene().selectWorktopOptionWith(req);
session.getPlayer().getScene().getScriptManager().callEvent(
EventType.EVENT_SELECT_OPTION,
EventType.EVENT_SELECT_OPTION,
new ScriptArgs(entity.getConfigId(), req.getOptionId())
);
} finally {

View File

@@ -0,0 +1,13 @@
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.BlossomBriefInfoNotifyOuterClass;
import emu.grasscutter.net.proto.BlossomBriefInfoOuterClass;
public class PacketBlossomBriefInfoNotify extends BasePacket {
public PacketBlossomBriefInfoNotify(Iterable<BlossomBriefInfoOuterClass.BlossomBriefInfo> blossoms) {
super(PacketOpcodes.BlossomBriefInfoNotify);
this.setData(BlossomBriefInfoNotifyOuterClass.BlossomBriefInfoNotify.newBuilder().addAllBriefInfoList(blossoms));
}
}