mirror of
https://github.com/Anime-Game-Servers/Grasscutter-Quests.git
synced 2024-11-23 04:29:42 +00:00
[Fix] Add the actuall cfg id to client send EVENT_AVATAR_NEAR_PLATFORM events (thx @scooterboo )
This commit is contained in:
parent
78bb2510a7
commit
ac8c6848c9
@ -5,6 +5,7 @@ import emu.grasscutter.net.packet.Opcodes;
|
||||
import emu.grasscutter.net.packet.PacketHandler;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.ClientScriptEventNotifyOuterClass.ClientScriptEventNotify;
|
||||
import emu.grasscutter.scripts.constants.EventType;
|
||||
import emu.grasscutter.scripts.data.ScriptArgs;
|
||||
import emu.grasscutter.server.game.GameSession;
|
||||
import lombok.val;
|
||||
@ -28,6 +29,12 @@ public class HandlerClientScriptEventNotify extends PacketHandler {
|
||||
case 2 -> args.setParam3(data.getParamList(i));
|
||||
}
|
||||
}
|
||||
if(data.getEventType() == EventType.EVENT_AVATAR_NEAR_PLATFORM){
|
||||
val entity = scriptManager.getScene().getEntityById(data.getSourceEntityId());
|
||||
if(entity != null){
|
||||
args.setParam1(entity.getConfigId());
|
||||
}
|
||||
}
|
||||
|
||||
scriptManager.callEvent(args);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user