Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
44d8a648
Commit
44d8a648
authored
Jul 24, 2022
by
akatatsu27
Browse files
call deregisterRegion appropriately
parent
29bdb7f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/scripts/SceneScriptManager.java
View file @
44d8a648
...
@@ -328,9 +328,11 @@ public class SceneScriptManager {
...
@@ -328,9 +328,11 @@ public class SceneScriptManager {
if
(
trigger
.
event
==
EventType
.
EVENT_ENTER_REGION
)
{
if
(
trigger
.
event
==
EventType
.
EVENT_ENTER_REGION
)
{
EntityRegion
region
=
this
.
regions
.
values
().
stream
().
filter
(
p
->
p
.
getConfigId
()
==
params
.
param1
).
toList
().
get
(
0
);
EntityRegion
region
=
this
.
regions
.
values
().
stream
().
filter
(
p
->
p
.
getConfigId
()
==
params
.
param1
).
toList
().
get
(
0
);
getScene
().
getPlayers
().
forEach
(
p
->
p
.
onEnterRegion
(
region
.
getMetaRegion
()));
getScene
().
getPlayers
().
forEach
(
p
->
p
.
onEnterRegion
(
region
.
getMetaRegion
()));
deregisterRegion
(
region
.
getMetaRegion
());
}
else
if
(
trigger
.
event
==
EventType
.
EVENT_LEAVE_REGION
)
{
}
else
if
(
trigger
.
event
==
EventType
.
EVENT_LEAVE_REGION
)
{
EntityRegion
region
=
this
.
regions
.
values
().
stream
().
filter
(
p
->
p
.
getConfigId
()
==
params
.
param1
).
toList
().
get
(
0
);
EntityRegion
region
=
this
.
regions
.
values
().
stream
().
filter
(
p
->
p
.
getConfigId
()
==
params
.
param1
).
toList
().
get
(
0
);
getScene
().
getPlayers
().
forEach
(
p
->
p
.
onLeaveRegion
(
region
.
getMetaRegion
()));
getScene
().
getPlayers
().
forEach
(
p
->
p
.
onLeaveRegion
(
region
.
getMetaRegion
()));
deregisterRegion
(
region
.
getMetaRegion
());
}
}
deregisterTrigger
(
trigger
);
deregisterTrigger
(
trigger
);
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment