mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-03-11 04:17:21 +08:00
Almost fully fix Chasing Shadows (#2202)
This commit is contained in:
parent
9dbeb2172d
commit
2788206934
@ -27,27 +27,6 @@ public class ExecNotifyGroupLua extends QuestExecHandler {
|
||||
}
|
||||
scene.runWhenFinished(
|
||||
() -> {
|
||||
val groupInstance = scriptManager.getGroupInstanceById(groupId);
|
||||
|
||||
if (groupInstance != null) {
|
||||
// workaround to make sure the triggers are still there todo find better way of trigger
|
||||
// handling
|
||||
scriptManager.refreshGroup(groupInstance);
|
||||
Grasscutter.getLogger()
|
||||
.trace(
|
||||
"group: {} \ncondition: {} \nparamStr {}",
|
||||
groupInstance.getLuaGroup(),
|
||||
condition,
|
||||
paramStr);
|
||||
} else {
|
||||
Grasscutter.getLogger()
|
||||
.debug(
|
||||
"notify, no group instance for:\n group: {} \ncondition: {} \nparamStr {}",
|
||||
groupId,
|
||||
condition,
|
||||
paramStr);
|
||||
}
|
||||
|
||||
val eventType =
|
||||
quest.getState() == QuestState.QUEST_STATE_FINISHED
|
||||
? EventType.EVENT_QUEST_FINISH
|
||||
|
@ -32,9 +32,9 @@ public class SceneRegion {
|
||||
public boolean contains(Position position) {
|
||||
switch (shape) {
|
||||
case ScriptRegionShape.CUBIC:
|
||||
return (Math.abs(pos.getX() - position.getX()) <= size.getX())
|
||||
&& (Math.abs(pos.getY() - position.getY()) <= size.getY())
|
||||
&& (Math.abs(pos.getZ() - position.getZ()) <= size.getZ());
|
||||
return (Math.abs(pos.getX() - position.getX()) <= size.getX() / 2f)
|
||||
&& (Math.abs(pos.getY() - position.getY()) <= size.getY() / 2f)
|
||||
&& (Math.abs(pos.getZ() - position.getZ()) <= size.getZ() / 2f);
|
||||
case ScriptRegionShape.SPHERE:
|
||||
var x = Math.pow(pos.getX() - position.getX(), 2);
|
||||
var y = Math.pow(pos.getY() - position.getY(), 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user