Simulated talk should not exist when event runs.

This commit is contained in:
MobiusDevelopment
2020-11-13 22:30:56 +00:00
parent bd0ee06ab5
commit f6302f520d
17 changed files with 221 additions and 51 deletions

View File

@ -567,6 +567,11 @@ public class Quest extends AbstractScript implements IIdentifiable
String res = null;
try
{
// Simulated talk should not exist when event runs.
if (player != null)
{
player.setSimulatedTalking(false);
}
res = onAdvEvent(event, npc, player);
}
catch (Exception e)
@ -606,10 +611,15 @@ public class Quest extends AbstractScript implements IIdentifiable
try
{
// Simulated talk should not exist when killing.
final QuestState qs = getQuestState(killer, false);
if (qs != null)
if (killer != null)
{
qs.setSimulated(false);
killer.setSimulatedTalking(false);
final QuestState qs = getQuestState(killer, false);
if (qs != null)
{
qs.setSimulated(false);
}
}
res = onKill(npc, killer, isSummon);