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
eb2b2392
Commit
eb2b2392
authored
May 09, 2022
by
Akka
Committed by
Melledy
May 09, 2022
Browse files
Fix #719
parent
6197ab21
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/scripts/service/ScriptMonsterSpawnService.java
View file @
eb2b2392
...
@@ -28,11 +28,11 @@ public class ScriptMonsterSpawnService {
...
@@ -28,11 +28,11 @@ public class ScriptMonsterSpawnService {
onMonsterCreatedListener
.
add
(
consumer
);
onMonsterCreatedListener
.
add
(
consumer
);
}
}
public
void
addMonsterDeadListener
(
Consumer
<
EntityMonster
>
consumer
){
public
void
addMonsterDeadListener
(
Consumer
<
EntityMonster
>
consumer
){
onMonster
Create
dListener
.
add
(
consumer
);
onMonster
Dea
dListener
.
add
(
consumer
);
}
}
public
void
onMonsterDead
(
EntityMonster
entityMonster
){
public
void
onMonsterDead
(
EntityMonster
entityMonster
){
onMonster
Create
dListener
.
stream
().
forEach
(
l
->
l
.
accept
(
entityMonster
));
onMonster
Dea
dListener
.
forEach
(
l
->
l
.
accept
(
entityMonster
));
}
}
public
void
spawnMonster
(
int
groupId
,
SceneMonster
monster
)
{
public
void
spawnMonster
(
int
groupId
,
SceneMonster
monster
)
{
if
(
monster
==
null
){
if
(
monster
==
null
){
...
...
src/main/java/emu/grasscutter/scripts/service/ScriptMonsterTideService.java
View file @
eb2b2392
...
@@ -66,9 +66,9 @@ public class ScriptMonsterTideService {
...
@@ -66,9 +66,9 @@ public class ScriptMonsterTideService {
if
(
this
.
monsterTideCount
.
get
()
>
0
){
if
(
this
.
monsterTideCount
.
get
()
>
0
){
// add more
// add more
this
.
sceneScriptManager
.
getScriptMonsterSpawnService
().
spawnMonster
(
this
.
currentGroup
.
id
,
getNextMonster
());
this
.
sceneScriptManager
.
getScriptMonsterSpawnService
().
spawnMonster
(
this
.
currentGroup
.
id
,
getNextMonster
());
}
else
if
(
this
.
monsterAlive
.
get
()
==
0
){
}
// spawn the last turn of monsters
// spawn the last turn of monsters
// fix the 5-2
this
.
sceneScriptManager
.
callEvent
(
EventType
.
EVENT_MONSTER_TIDE_DIE
,
new
ScriptArgs
(
this
.
monsterKillCount
.
get
()));
this
.
sceneScriptManager
.
callEvent
(
EventType
.
EVENT_MONSTER_TIDE_DIE
,
new
ScriptArgs
(
this
.
monsterKillCount
.
get
()));
}
}
}
}
}
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