Automatically send NpcLogList with Quest onKill.

This commit is contained in:
MobiusDev
2018-05-30 21:05:25 +00:00
parent 592ce09803
commit aafd0051e8
265 changed files with 109 additions and 471 deletions

View File

@@ -171,7 +171,6 @@ public final class Q00453_NotStrongEnoughAlone extends Quest
checkProgress(st, 20, MONSTER3[0], MONSTER3[1], MONSTER3[2]);
}
}
sendNpcLogList(player);
}
@Override
@@ -380,7 +379,6 @@ public final class Q00453_NotStrongEnoughAlone extends Quest
{
final QuestState qs = getQuestState(activeChar, false);
final Set<NpcLogListHolder> npcLogList = new HashSet<>(3);
if (qs != null)
{
switch (qs.getCond())

View File

@@ -176,7 +176,6 @@ public class Q00462_StuffedAncientHeroes extends Quest
else
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
}
return super.onKill(npc, killer, isSummon);

View File

@@ -215,7 +215,6 @@ public final class Q00476_PlainMission extends Quest
{
st.setCond(2, true);
}
sendNpcLogList(killer);
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -159,10 +159,6 @@ public final class Q00481_ShadowHelper extends Quest
{
qs.setCond(2, true);
}
else
{
sendNpcLogList(killer);
}
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -175,11 +175,6 @@ public final class Q00490_DutyOfTheSurvivor extends Quest
{
st.setCond(2);
}
else
{
sendNpcLogList(player);
}
}
}
return super.onKill(npc, player, isSummon);
@@ -189,7 +184,7 @@ public final class Q00490_DutyOfTheSurvivor extends Quest
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs != null)
if ((qs != null) && qs.isCond(1))
{
final Set<NpcLogListHolder> npcLogList = new HashSet<>(2);
npcLogList.add(new NpcLogListHolder(EXTRACT, false, (int) getQuestItemsCount(player, EXTRACT)));

View File

@@ -158,10 +158,6 @@ public final class Q00493_KickingOutUnwelcomeGuests extends Quest
{
st.setCond(2, true);
}
else
{
sendNpcLogList(player);
}
}
}
@@ -176,7 +172,7 @@ public final class Q00493_KickingOutUnwelcomeGuests extends Quest
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
if (st != null)
if ((st != null) && st.isCond(1))
{
final Set<NpcLogListHolder> npcLogList = new HashSet<>(5);
npcLogList.add(new NpcLogListHolder(LUNATIC_CREATURE, false, st.getInt(Integer.toString(LUNATIC_CREATURE))));

View File

@@ -85,7 +85,6 @@ public final class Q10305_UnstoppableFutileEfforts extends Quest
if (killedCocoon < 5)
{
qs.setMemoStateEx(LARGE_COCOON, killedCocoon);
sendNpcLogList(player);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
@@ -152,7 +151,6 @@ public final class Q10305_UnstoppableFutileEfforts extends Quest
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance activeChar)
{
final QuestState qs = getQuestState(activeChar, false);
if ((qs != null) && qs.isCond(1))
{
final Set<NpcLogListHolder> npcLogList = new HashSet<>(1);

View File

@@ -242,7 +242,6 @@ public final class Q10333_DisappearedSakum extends Quest
{
qs.setCond(3, true);
}
sendNpcLogList(killer);
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -260,7 +260,6 @@ public final class Q10335_RequestToFindSakum extends Quest
{
st.setCond(3, true);
}
sendNpcLogList(killer);
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -271,7 +271,6 @@ public final class Q10337_SakumsImpact extends Quest
{
qs.setCond(3, true);
}
sendNpcLogList(killer);
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -181,7 +181,6 @@ public final class Q10339_FightingTheForgotten extends Quest
else
{
st.setMemoState(monsterCount);
sendNpcLogList(player);
}
}
return super.onKill(npc, player, isSummon);

View File

@@ -210,7 +210,6 @@ public final class Q10353_CertificationOfValue extends Quest
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isStarted() && qs.isCond(2))
{
final int killCount = qs.getInt(KILL_COUNT_VAR) + 1;
@@ -222,7 +221,6 @@ public final class Q10353_CertificationOfValue extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}

View File

@@ -187,7 +187,6 @@ public final class Q10358_DividedSakumPoslof extends Quest
{
st.setCond(2, true);
}
sendNpcLogList(killer);
}
else if (st.isCond(3))
{

View File

@@ -119,7 +119,6 @@ public final class Q10362_CertificationOfTheSeeker extends Quest
if (killedStalker <= 10)
{
qs.setMemoStateEx(STALKER, killedStalker);
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
@@ -129,7 +128,6 @@ public final class Q10362_CertificationOfTheSeeker extends Quest
if (killedCrawler <= 5)
{
qs.setMemoStateEx(CRAWLER, killedCrawler);
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
@@ -206,7 +204,6 @@ public final class Q10362_CertificationOfTheSeeker extends Quest
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance activeChar)
{
final QuestState qs = getQuestState(activeChar, false);
if ((qs != null) && qs.isCond(1))
{
final Set<NpcLogListHolder> npcLogList = new HashSet<>(2);

View File

@@ -185,7 +185,6 @@ public final class Q10368_RebellionOfMonsters extends Quest
{
qs.setCond(2, true);
}
sendNpcLogList(killer);
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -145,7 +145,6 @@ public class Q10389_TheVoiceOfAuthority extends Quest
else
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
}
return super.onKill(npc, killer, isSummon);

View File

@@ -181,7 +181,6 @@ public final class Q10394_MutualBenefit extends Quest
{
st.setCond(2, true);
}
sendNpcLogList(killer);
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -162,10 +162,6 @@ public final class Q10395_NotATraitor extends Quest
{
st.setCond(2, true);
}
else
{
sendNpcLogList(killer);
}
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -148,7 +148,6 @@ public final class Q10402_NowhereToTurn extends Quest
killCount++;
st.set("KILLED_COUNT", killCount);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
if (killCount == 40)

View File

@@ -140,7 +140,6 @@ public final class Q10406_BeforeDarknessBearsFruit extends Quest
killCount++;
st.set("KILLED_COUNT", killCount);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
if (killCount == 10)

View File

@@ -161,7 +161,6 @@ public final class Q10410_EmbryoInTheSwampOfScreams extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
@@ -179,7 +178,6 @@ public final class Q10410_EmbryoInTheSwampOfScreams extends Quest
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance activeChar)
{
final QuestState st = getQuestState(activeChar, false);
if ((st != null) && st.isCond(1))
{
final Set<NpcLogListHolder> npcLogList = new HashSet<>(1);

View File

@@ -190,7 +190,6 @@ public final class Q10413_EmbryoInTheForestOfTheDead extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
@@ -208,7 +207,6 @@ public final class Q10413_EmbryoInTheForestOfTheDead extends Quest
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance activeChar)
{
final QuestState st = getQuestState(activeChar, false);
if ((st != null) && st.isCond(1))
{
final Set<NpcLogListHolder> npcLogList = new HashSet<>(1);

View File

@@ -231,18 +231,15 @@ public class Q10440_TheSealOfPunishmentTheFields extends Quest
if ((count >= 50) && (qs.isMemoState(1)))
{
qs.setCond(2, true);
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else if ((count >= 50) && (qs.isMemoState(2)))
{
qs.setCond(3, true);
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}

View File

@@ -143,7 +143,6 @@ public final class Q10446_HitAndRun extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}

View File

@@ -171,7 +171,6 @@ public final class Q10743_StrangeFungus extends Quest
qs.set(EVOLVED_SPAWN_VAR, killCount);
}
qs.set(KILL_COUNT_VAR, qs.getInt(KILL_COUNT_VAR) + 1);
sendNpcLogList(killer);
break;
}
case EVOLVED_GROWLER:

View File

@@ -416,7 +416,6 @@ public final class Q10751_WindsOfFateEncounters extends Quest
if (killCount <= 5)
{
qs.set(KILL_COUNT_VAR, ++killCount);
sendNpcLogList(killer);
}
if ((killCount >= 5) && !L2World.getInstance().getVisibleObjects(npc, L2Npc.class, 1000).stream().anyMatch(n -> ((n.getId() == TELESHA) && (n.getSummoner() == killer))))

View File

@@ -634,7 +634,6 @@ public final class Q10753_WindsOfFateChoices extends Quest
giveItems(killer, CRYSTAL_EYE, 1);
qs.set(CRYSTAL_EYE_VAR, ++EyeCount);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
break;
}
@@ -645,7 +644,6 @@ public final class Q10753_WindsOfFateChoices extends Quest
giveItems(killer, BROKEN_STONE_OF_PURITY, 1);
qs.set(BROKEN_STONE_OF_PURITY_VAR, ++PurityCount);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
break;
}
@@ -656,7 +654,6 @@ public final class Q10753_WindsOfFateChoices extends Quest
giveItems(killer, MIRACLE_DRUG_OF_ENCHANTMENT, 1);
qs.set(EMPTY_REGEANT_FLASK_VAR, ++FlaskCount);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
break;
}

View File

@@ -141,13 +141,11 @@ public final class Q10757_QuietingTheStorm extends Quest
if (vortexCount < 5)
{
qs.set(VORTEX_COUNT_VAR, ++vortexCount);
sendNpcLogList(killer);
}
}
else if (windimaCount != 1)
{
qs.set(WINDIMA_COUNT_VAR, ++windimaCount);
sendNpcLogList(killer);
}
if ((vortexCount >= 5) && (windimaCount >= 1))

View File

@@ -146,10 +146,6 @@ public class Q10761_AnOrcInLove extends Quest
{
qs.setCond(2, true);
}
else
{
sendNpcLogList(killer);
}
}
}
return super.onKill(npc, killer, isSummon);

View File

@@ -157,10 +157,6 @@ public final class Q10780_AWeakenedBarrier extends Quest
{
qs.setCond(2, true);
}
else
{
sendNpcLogList(killer);
}
}
}
return super.onKill(npc, killer, isSummon);

View File

@@ -159,7 +159,6 @@ public final class Q10786_ResidentProblemSolver extends Quest
else
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
}
return super.onKill(npc, killer, isSummon);

View File

@@ -156,7 +156,6 @@ public final class Q10793_SaveTheSouls extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}

View File

@@ -203,7 +203,6 @@ public final class Q10794_InvestigateTheForest extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}

View File

@@ -153,7 +153,6 @@ public class Q10799_StrangeThingsAfootInTheValley extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}

View File

@@ -155,7 +155,6 @@ public class Q10800_ReconnaissanceAtDragonValley extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}

View File

@@ -186,7 +186,6 @@ public final class Q10815_StepUp extends Quest
else
{
qs.set("chat", chatCount);
sendNpcLogList(player);
if (Config.WORLD_CHAT_INTERVAL.getSeconds() > 0)
{
REUSE.put(player.getObjectId(), now.plus(Config.WORLD_CHAT_INTERVAL));
@@ -200,13 +199,10 @@ public final class Q10815_StepUp extends Quest
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance activeChar)
{
final QuestState qs = getQuestState(activeChar, false);
if (qs != null)
if ((qs != null) && qs.isCond(1))
{
final Set<NpcLogListHolder> npcLogList = new HashSet<>(1);
if (qs.isCond(1))
{
npcLogList.add(new NpcLogListHolder(NpcStringId.WORLD_CHAT, qs.getInt("chat")));
}
npcLogList.add(new NpcLogListHolder(NpcStringId.WORLD_CHAT, qs.getInt("chat")));
return npcLogList;
}
return super.getNpcLogList(activeChar);

View File

@@ -156,7 +156,6 @@ public final class Q10838_TheReasonForNotBeingAbleToGetOut extends Quest
{
giveItems(killer, DARK_ATELIA_NATURALIZER, 1);
}
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}

View File

@@ -150,7 +150,6 @@ public final class Q10839_BlackbirdsNameValue extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}

View File

@@ -151,7 +151,6 @@ public final class Q10840_TimeToRecover extends Quest
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}