mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-05-12 06:56:02 +08:00
* add drops for animals wild pig,fishes,foxes,birds * append fox * Deforestation Support implement drop woods when attacking tree * Deforestation support (remove prints) implement drop woods when attacking tree * Deforestation support (remove prints) implement drop woods when attacking tree * add AutoRecycleHashMap Map's KEY is automatic expire if key long time no use (query or modify from HashMap) * use AutoRecycleHashMap in case of memory leak * fix bug * remove prints * static AutoRecycleHashMap * fix problems * Delete AutoRecycleHashMap.java * remove log * fix build * improve * remove unnecessary information Co-authored-by: Albedo <105265570+arub3do@users.noreply.github.com> Co-authored-by: Albedo <105265570+arub3do@users.noreply.github.com>
21 lines
756 B
Java
21 lines
756 B
Java
package emu.grasscutter.server.packet.recv;
|
|
|
|
import java.math.BigInteger;
|
|
|
|
import emu.grasscutter.net.packet.Opcodes;
|
|
import emu.grasscutter.net.packet.PacketHandler;
|
|
import emu.grasscutter.net.packet.PacketOpcodes;
|
|
import emu.grasscutter.net.proto.HitTreeNotifyOuterClass.HitTreeNotify;
|
|
import emu.grasscutter.server.game.GameSession;
|
|
|
|
/**
|
|
* Implement Deforestation Function
|
|
*/
|
|
@Opcodes(PacketOpcodes.HitTreeNotify)
|
|
public class HandlerHitTreeNotify extends PacketHandler {
|
|
@Override
|
|
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
|
HitTreeNotify hit = HitTreeNotify.parseFrom(payload);
|
|
session.getPlayer().getDeforestationManager().onDeforestationInvoke(hit);
|
|
}
|
|
} |