mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-25 20:56:28 +00:00
Format code [skip actions]
This commit is contained in:
parent
f065b2b16f
commit
0005fcf96f
@ -59,8 +59,9 @@ public final class GadgetGatherObject extends GadgetContent {
|
|||||||
GameItem item = new GameItem(itemData, 1);
|
GameItem item = new GameItem(itemData, 1);
|
||||||
player.getInventory().addItem(item, ActionReason.Gather);
|
player.getInventory().addItem(item, ActionReason.Gather);
|
||||||
|
|
||||||
var ScriptArgs = new ScriptArgs(getGadget().getGroupId(), EventType.EVENT_GATHER, getGadget().getConfigId());
|
var ScriptArgs =
|
||||||
if(getGadget().getMetaGadget() != null){
|
new ScriptArgs(getGadget().getGroupId(), EventType.EVENT_GATHER, getGadget().getConfigId());
|
||||||
|
if (getGadget().getMetaGadget() != null) {
|
||||||
ScriptArgs.setEventSource(getGadget().getMetaGadget().config_id);
|
ScriptArgs.setEventSource(getGadget().getMetaGadget().config_id);
|
||||||
}
|
}
|
||||||
getGadget().getScene().getScriptManager().callEvent(ScriptArgs);
|
getGadget().getScene().getScriptManager().callEvent(ScriptArgs);
|
||||||
|
@ -36,16 +36,18 @@ public class GadgetObject extends GadgetContent {
|
|||||||
GameItem item = new GameItem(itemData, 1);
|
GameItem item = new GameItem(itemData, 1);
|
||||||
player.getInventory().addItem(item, ActionReason.Gather);
|
player.getInventory().addItem(item, ActionReason.Gather);
|
||||||
|
|
||||||
var ScriptArgs = new ScriptArgs(getGadget().getGroupId(), EventType.EVENT_GATHER, getGadget().getConfigId());
|
var ScriptArgs =
|
||||||
if(getGadget().getMetaGadget() != null){
|
new ScriptArgs(getGadget().getGroupId(), EventType.EVENT_GATHER, getGadget().getConfigId());
|
||||||
|
if (getGadget().getMetaGadget() != null) {
|
||||||
ScriptArgs.setEventSource(getGadget().getMetaGadget().config_id);
|
ScriptArgs.setEventSource(getGadget().getMetaGadget().config_id);
|
||||||
}
|
}
|
||||||
getGadget().getScene().getScriptManager().callEvent(ScriptArgs);
|
getGadget().getScene().getScriptManager().callEvent(ScriptArgs);
|
||||||
|
|
||||||
getGadget()
|
getGadget()
|
||||||
.getScene()
|
.getScene()
|
||||||
.broadcastPacket(
|
.broadcastPacket(
|
||||||
new PacketGadgetInteractRsp(getGadget(), InteractTypeOuterClass.InteractType.INTERACT_TYPE_GATHER));
|
new PacketGadgetInteractRsp(
|
||||||
|
getGadget(), InteractTypeOuterClass.InteractType.INTERACT_TYPE_GATHER));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +221,8 @@ public class SceneScriptManager {
|
|||||||
if (suiteData == null) {
|
if (suiteData == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Grasscutter.getLogger().error("Group {} suite {} nvm, I found it. This is BAD", group.id, suiteIndex);
|
Grasscutter.getLogger()
|
||||||
|
.error("Group {} suite {} nvm, I found it. This is BAD", group.id, suiteIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
int prevSuiteIndex = groupInstance.getActiveSuiteId();
|
int prevSuiteIndex = groupInstance.getActiveSuiteId();
|
||||||
|
Loading…
Reference in New Issue
Block a user