diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-01.htm b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-01.htm
new file mode 100644
index 0000000000..a66a647f43
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-01.htm
@@ -0,0 +1,5 @@
+
Nagel:
+Do you hear that?
+I've heard noises every since I came to this damned place. It's not just me, either. Others have heard it, and it freaks us all out.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-02.htm b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-02.htm
new file mode 100644
index 0000000000..b230813bda
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-02.htm
@@ -0,0 +1,6 @@
+Nagel:
+Crying, that's what.
+I can hear the cries of the people who've died here... the cries of the soldiers who were sacrificed to defend heir families and friends...
+Please - stop their suffering.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-03.htm b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-03.htm
new file mode 100644
index 0000000000..ba315f24aa
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-03.htm
@@ -0,0 +1,5 @@
+Nagel:
+Thank you!
+Listen, you'll find the corpses beyond the cracked gap. You must show sorrow before five corpses, and show them that we grieve for them.
+(To show your grief, select a corpse, and open your Action Window(Alt+C), then click Sorrow.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-04.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-04.html
new file mode 100644
index 0000000000..da6429f839
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-04.html
@@ -0,0 +1,3 @@
+Nagel:
+You can find the corpses beyond the cracked gap.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-05.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-05.html
new file mode 100644
index 0000000000..33b594d438
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-05.html
@@ -0,0 +1,7 @@
+Nagel:
+Thank you!
+The pain will hopefully start to subside now... hopefully.
+Listen, I have one more favor to ask. The other rangers all knew I was suffering the most, and were all looking out for me, Celin especially.
+Could you tell Celin what's happened? I'd appreciate it...
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-06.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-06.html
new file mode 100644
index 0000000000..b31e7a0a28
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-06.html
@@ -0,0 +1,4 @@
+Nagel:
+Thank you!
+Celin is in Exploration Zone 3. Thank you again!
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-01.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-01.html
new file mode 100644
index 0000000000..efe44a767b
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-01.html
@@ -0,0 +1,4 @@
+Celin:
+Did you hear crying on your way here? I think the noises have died down, but mayby I'm finally getting used to them...
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-02.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-02.html
new file mode 100644
index 0000000000..dfc37674e4
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-02.html
@@ -0,0 +1,6 @@
+Celin:
+You have? Oh... oh thank you!
+Maybe now we can finally get some rest, and actually get some work done around here! The noises were so upsetting...
+Please, tell me how Nagel is? We all found it tough, but he dealt with everything much worse than the rest of us.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-03.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-03.html
new file mode 100644
index 0000000000..e511e323b3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-03.html
@@ -0,0 +1,4 @@
+Celin:
+Good! I'm glad to hear that.
+He hadn't slept or eaten in days, you know. Carry on the way you've been going and you'll be a great ranger.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/Q10363_RequestOfTheSeeker.java b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/Q10363_RequestOfTheSeeker.java
new file mode 100644
index 0000000000..2c8ac1d8b9
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/Q10363_RequestOfTheSeeker.java
@@ -0,0 +1,214 @@
+/*
+ * Copyright (C) 2004-2015 L2J Server
+ *
+ * This file is part of L2J Server.
+ *
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q10363_RequestOfTheSeeker;
+
+import quests.Q10362_CertificationOfTheSeeker.Q10362_CertificationOfTheSeeker;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.holders.ItemHolder;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+import com.l2jserver.gameserver.network.NpcStringId;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+
+/**
+ * Request of the Seeker (10363)
+ * @author spider
+ */
+public class Q10363_RequestOfTheSeeker extends Quest
+{
+ // NPCs
+ private static final int NAGEL = 33450;
+ private static final int CELIN = 33451;
+ private static final int[] CORPSES =
+ {
+ 32961,
+ 32962,
+ 32963,
+ 32964
+ };
+ // Rewards
+ private static final int ADENA_REWARD = 48000;
+ private static final int EXP_REWARD = 72000;
+ private static final int SP_REWARD = 16;
+ private static final ItemHolder HEALING_POTIONS = new ItemHolder(1060, 100);
+ private static final ItemHolder WOODEN_HELMET = new ItemHolder(43, 1);
+ // Others
+ private static final int SORROW_ID = 13;
+ private static final int MIN_LEVEL = 12;
+ private static final int MAX_LEVEL = 20;
+
+ public Q10363_RequestOfTheSeeker()
+ {
+ super(10363, Q10363_RequestOfTheSeeker.class.getSimpleName(), "Request of the Seeker");
+ addStartNpc(NAGEL);
+ addTalkId(NAGEL, CELIN);
+ addSocialActionSeeId(CORPSES);
+ addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.htm");
+ addCondCompletedQuest(Q10362_CertificationOfTheSeeker.class.getSimpleName(), "no_prequest.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "33450-02.htm":
+ {
+ htmltext = event;
+ break;
+ }
+ case "33450-03.htm": // start quest
+ {
+ qs.startQuest();
+ htmltext = event;
+ break;
+ }
+ case "33450-06.html":
+ {
+ if (qs.getCond() == 6)
+ {
+ qs.setCond(7);
+ htmltext = event;
+ }
+ break;
+ }
+ case "33451-02.html":
+ {
+ htmltext = event;
+ break;
+ }
+ case "33451-03.html":
+ {
+ if (qs.isCond(7))
+ {
+ giveAdena(player, ADENA_REWARD, true);
+ addExpAndSp(player, EXP_REWARD, SP_REWARD);
+ giveItems(player, WOODEN_HELMET);
+ giveItems(player, HEALING_POTIONS);
+ qs.exitQuest(false, true);
+ htmltext = event;
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = null;
+ switch (qs.getState())
+ {
+ case State.CREATED:
+ {
+ htmltext = npc.getId() == NAGEL ? "33450-01.htm" : getNoQuestMsg(player);
+ break;
+ }
+ case State.STARTED:
+ {
+ switch (qs.getCond())
+ {
+ case 1:
+ {
+ htmltext = npc.getId() == NAGEL ? "33450-04.html" : getNoQuestMsg(player);
+ break;
+ }
+ case 6:
+ {
+ htmltext = npc.getId() == NAGEL ? "33450-05.html" : getNoQuestMsg(player);
+ break;
+ }
+ case 7:
+ {
+ htmltext = npc.getId() == NAGEL ? "33450-06.html" : "33451-01.html";
+ break;
+ }
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onSocialActionSee(L2Npc npc, L2PcInstance caster, int actionId)
+ {
+
+ final QuestState qs = getQuestState(caster, false);
+ if ((qs != null) && (qs.getCond() >= 1) && (qs.getCond() < 6) && (actionId == SORROW_ID) && (caster.getTarget().getObjectId() == npc.getObjectId()))
+ {
+ switch (qs.getCond())
+ {
+ case 1:
+ {
+ showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_ONE_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000);
+ qs.setCond(2);
+ npc.deleteMe();
+ break;
+ }
+ case 2:
+ {
+ showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_SECOND_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000);
+ qs.setCond(3);
+ npc.deleteMe();
+ break;
+ }
+ case 3:
+ {
+ showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_THIRD_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000);
+ qs.setCond(4);
+ npc.deleteMe();
+ break;
+ }
+ case 4:
+ {
+ showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_FOURTH_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000);
+ qs.setCond(5);
+ npc.deleteMe();
+ break;
+ }
+ case 5:
+ {
+ showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_FIFTH_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000);
+ qs.setCond(6);
+ npc.deleteMe();
+ break;
+ }
+ }
+ }
+ return super.onSocialActionSee(npc, caster, actionId);
+ }
+}
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_level.htm b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_level.htm
new file mode 100644
index 0000000000..4a2589974c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_level.htm
@@ -0,0 +1,3 @@
+You don't meet level requirements
+(Quest available from level 10 to level 20)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_prequest.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_prequest.html
new file mode 100644
index 0000000000..3343f3b538
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_prequest.html
@@ -0,0 +1,2 @@
+To begin this quest, you need to complete Roles of the Seeker quest first.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
index f0cf72c187..fe41c518b7 100644
--- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
+++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
@@ -206,6 +206,7 @@ import quests.Q10358_DividedSakumPoslof.Q10358_DividedSakumPoslof;
import quests.Q10359_SakumsTrace.Q10359_SakumsTrace;
import quests.Q10361_RolesOfTheSeeker.Q10361_RolesOfTheSeeker;
import quests.Q10362_CertificationOfTheSeeker.Q10362_CertificationOfTheSeeker;
+import quests.Q10363_RequestOfTheSeeker.Q10363_RequestOfTheSeeker;
import quests.Q10365_SeekerEscort.Q10365_SeekerEscort;
import quests.Q10368_RebellionOfMonsters.Q10368_RebellionOfMonsters;
import quests.Q10390_KekropusLetter.Q10390_KekropusLetter;
@@ -432,6 +433,7 @@ public class QuestMasterHandler
Q10359_SakumsTrace.class,
Q10361_RolesOfTheSeeker.class,
Q10362_CertificationOfTheSeeker.class,
+ Q10363_RequestOfTheSeeker.class,
Q10365_SeekerEscort.class,
Q10368_RebellionOfMonsters.class,
Q10390_KekropusLetter.class,
diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java b/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java
index 0caebc305a..2ecb481037 100644
--- a/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java
+++ b/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java
@@ -523,8 +523,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
/**
* Remove the L2Character from the world when the decay task is launched.
- * Caution : This method DOESN'T REMOVE the object from _allObjects of L2World
- * Caution : This method DOESN'T SEND Server->Client packets to players
+ * Caution : This method DOESN'T REMOVE the object from _allObjects of L2World Caution : This method DOESN'T SEND Server->Client packets to players
*/
public void onDecay()
{
@@ -3583,13 +3582,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
* A L2Character owns a table of Calculators called _calculators.
* Each Calculator (a calculator per state) own a table of Func object.
* A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).
- * Caution : This method is ONLY for L2PcInstance
- * Example of use:
- *
- *
Equip an item from inventory
- *
Learn a new passive skill
- *
Use an active skill
- *
+ * Caution : This method is ONLY for L2PcInstance Example of use:
Equip an item from inventory
Learn a new passive skill
Use an active skill
* @param functions The list of Func objects to add to the Calculator corresponding to the state affected
*/
public final void addStatFuncs(List functions)
@@ -3679,12 +3672,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
* A L2Character owns a table of Calculators called _calculators.
* Each Calculator (a calculator per state) own a table of Func object.
* A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).
- * Caution : This method is ONLY for L2PcInstance
- * Example of use:
- *
- *
Unequip an item from inventory
- *
Stop an active skill
- *
+ * Caution : This method is ONLY for L2PcInstance Example of use:
Unequip an item from inventory
Stop an active skill
* @param functions The list of Func objects to add to the Calculator corresponding to the state affected
*/
public final void removeStatFuncs(AbstractFunction[] functions)
@@ -4137,8 +4125,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
* That's why, client send regularly a Client->Server ValidatePosition packet to eventually correct the gap on the server.
* But, it's always the server position that is used in range calculation. At the end of the estimated movement time,
* the L2Character position is automatically set to the destination position even if the movement is not finished.
- * Caution: The current Z position is obtained FROM THE CLIENT by the Client->Server ValidatePosition Packet.
- * But x and y positions must be calculated to avoid that players try to modify their movement speed.
+ * Caution: The current Z position is obtained FROM THE CLIENT by the Client->Server ValidatePosition Packet. But x and y positions must be calculated to avoid that players try to modify their movement speed.
* @return True if the movement is finished
*/
public boolean updatePosition()
@@ -4220,7 +4207,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
double delta = (dx * dx) + (dy * dy);
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
- && !isFloating)
+ && !isFloating)
{
delta = Math.sqrt(delta);
}
@@ -4429,11 +4416,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
*
Add the L2Character to movingObjects of the GameTimeController
*
Create a task to notify the AI that L2Character arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
- * Example of use:
- *
- *
AI : onIntentionMoveTo(Location), onIntentionPickUp(L2Object), onIntentionInteract(L2Object)
- *
FollowTask
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation. Example of use:
AI : onIntentionMoveTo(Location), onIntentionPickUp(L2Object), onIntentionInteract(L2Object)
FollowTask
*
* @param x The X position of the destination
* @param y The Y position of the destination
@@ -4540,7 +4523,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
m.disregardingGeodata = false;
if (!isFlying() // flying chars not checked - even canSeeTarget doesn't work yet
- && (!isInsideZone(ZoneId.WATER) || isInsideZone(ZoneId.SIEGE))) // swimming also not checked unless in siege zone - but distance is limited
+ && (!isInsideZone(ZoneId.WATER) || isInsideZone(ZoneId.SIEGE))) // swimming also not checked unless in siege zone - but distance is limited
{
final boolean isInVehicle = isPlayer() && (getActingPlayer().getVehicle() != null);
if (isInVehicle)
@@ -4558,7 +4541,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Movement checks:
// when PATHFINDING > 0, for all characters except mobs returning home (could be changed later to teleport if pathfinding fails)
if (((Config.PATHFINDING > 0) && (!(isAttackable() && ((L2Attackable) this).isReturningToSpawnPoint()))) //
- || (isPlayer() && !(isInVehicle && (distance > 1500))))
+ || (isPlayer() && !(isInVehicle && (distance > 1500))))
{
if (isOnGeodataPath())
{
@@ -4862,7 +4845,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
/**
- * Overridden in :
L2PcInstance
+ * Overridden in :
+ *
L2PcInstance
* @return True if arrows are available.
*/
protected boolean checkAndEquipArrows()
@@ -4871,7 +4855,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
/**
- * Overridden in :
L2PcInstance
+ * Overridden in :
+ *
L2PcInstance
* @return True if bolts are available.
*/
protected boolean checkAndEquipBolts()
@@ -4881,7 +4866,9 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
/**
* Add Exp and Sp to the L2Character.
- * Overridden in :
L2PcInstance
L2PetInstance
+ * Overridden in :
+ *
L2PcInstance
+ *
L2PetInstance
* @param addToExp
* @param addToSp
*/
@@ -4891,25 +4878,29 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
/**
- * Overridden in :
L2PcInstance
+ * Overridden in :
+ *
L2PcInstance
* @return the active weapon instance (always equiped in the right hand).
*/
public abstract L2ItemInstance getActiveWeaponInstance();
/**
- * Overridden in :
L2PcInstance
+ * Overridden in :
+ *
L2PcInstance
* @return the active weapon item (always equiped in the right hand).
*/
public abstract L2Weapon getActiveWeaponItem();
/**
- * Overridden in :
L2PcInstance
+ * Overridden in :
+ *
L2PcInstance
* @return the secondary weapon instance (always equiped in the left hand).
*/
public abstract L2ItemInstance getSecondaryWeaponInstance();
/**
- * Overridden in :
L2PcInstance
+ * Overridden in :
+ *
L2PcInstance
* @return the secondary {@link L2Item} item (always equiped in the left hand).
*/
public abstract L2Item getSecondaryWeaponItem();
@@ -5161,7 +5152,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
/**
* Reduce the arrow number of the L2Character.
- * Overridden in :
L2PcInstance
+ * Overridden in :
+ *
L2PcInstance
* @param bolts
*/
protected void reduceArrowCount(boolean bolts)
@@ -5523,7 +5515,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
switch (skill.getTargetType())
{
- // only AURA-type skills can be cast without target
+ // only AURA-type skills can be cast without target
case AURA:
case FRONT_AURA:
case BEHIND_AURA:
@@ -5564,7 +5556,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Healing party members should ignore LOS.
if (((skill.getTargetType() != L2TargetType.PARTY) || !skill.hasEffectType(L2EffectType.HEAL)) //
- && !GeoData.getInstance().canSeeTarget(this, target))
+ && !GeoData.getInstance().canSeeTarget(this, target))
{
skipLOS++;
continue;
@@ -5849,7 +5841,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Quest event ON_SPELL_FNISHED
protected void notifyQuestEventSkillFinished(Skill skill, L2Object target)
{
-
+
}
/**
@@ -6599,7 +6591,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
*/
public void sendDamageMessage(L2Character target, int damage, boolean mcrit, boolean pcrit, boolean miss)
{
-
+
}
public byte getAttackElement()
@@ -6658,15 +6650,16 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
return;
}
+
Collection objs = getKnownList().getKnownObjects().values();
for (L2Object npc : objs)
{
if ((npc != null) && npc.isNpc())
{
final L2Npc npcMob = (L2Npc) npc;
- if ((npcMob.isInsideRadius(this, 150, true, true))) // 150 radius?
+ if (npcMob.isInsideRadius(this, 150, true, true)) // 150 radius?
{
- EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee(getActingPlayer(), id), npcMob);
+ EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee(npcMob, getActingPlayer(), id), npcMob);
}
}
}
diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java b/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
index c306f64573..cad0d72c57 100644
--- a/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
+++ b/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
@@ -198,6 +198,7 @@ import com.l2jserver.gameserver.model.entity.L2Event;
import com.l2jserver.gameserver.model.entity.Siege;
import com.l2jserver.gameserver.model.entity.TvTEvent;
import com.l2jserver.gameserver.model.events.EventDispatcher;
+import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcSocialActionSee;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerEquipItem;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerFameChanged;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerHennaRemove;
@@ -4201,7 +4202,8 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Send packet StatusUpdate with current HP,MP and CP to the L2PcInstance and only current HP, MP and Level to all other L2PcInstance of the Party. Actions :
Send the Server->Client packet StatusUpdate with current HP, MP and CP to this L2PcInstance
+ * Send packet StatusUpdate with current HP,MP and CP to the L2PcInstance and only current HP, MP and Level to all other L2PcInstance of the Party. Actions :
+ *
Send the Server->Client packet StatusUpdate with current HP, MP and CP to this L2PcInstance
*
Send the Server->Client packet PartySmallWindowUpdate with current HP, MP and Level to all other L2PcInstance of the Party
Caution : This method DOESN'T SEND current HP and MP to all L2PcInstance of the _statusListener
*/
@Override
@@ -4265,8 +4267,10 @@ public final class L2PcInstance extends L2Playable
/**
* Send a Server->Client packet UserInfo to this L2PcInstance and CharInfo to all L2PcInstance in its _KnownPlayers. Concept : Others L2PcInstance in the detection area of the L2PcInstance are identified in _knownPlayers. In order to inform other players of this
- * L2PcInstance state modifications, server just need to go through _knownPlayers to send Server->Client Packet Actions :
Send a Server->Client packet UserInfo to this L2PcInstance (Public and Private Data)
Send a Server->Client packet CharInfo to all L2PcInstance in
- * _KnownPlayers of the L2PcInstance (Public data only)
Caution : DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as MaxHP, STR, DEX...
+ * L2PcInstance state modifications, server just need to go through _knownPlayers to send Server->Client Packet Actions :
+ *
Send a Server->Client packet UserInfo to this L2PcInstance (Public and Private Data)
+ *
Send a Server->Client packet CharInfo to all L2PcInstance in _KnownPlayers of the L2PcInstance (Public data only)
+ * Caution : DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as MaxHP, STR, DEX...
*/
public final void broadcastUserInfo()
{
@@ -4299,6 +4303,23 @@ public final class L2PcInstance extends L2Playable
broadcastPacket(new NicknameChanged(this));
}
+ public final void broadcastPacket(SocialAction sa)
+ {
+ Collection objs = getKnownList().getKnownObjects().values();
+ for (L2Object npc : objs)
+ {
+ if ((npc != null) && npc.isNpc())
+ {
+ final L2Npc npcMob = (L2Npc) npc;
+ if (npcMob.isInsideRadius(this, 100, true, true)) // 150 radius?
+ {
+ EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee(npcMob, getActingPlayer(), sa.getId()), npcMob);
+ }
+ }
+ }
+ broadcastPacket((L2GameServerPacket) sa);
+ }
+
@Override
public final void broadcastPacket(L2GameServerPacket mov)
{
@@ -4448,8 +4469,10 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Manage Interact Task with another L2PcInstance. Actions :
If the private store is a STORE_PRIVATE_SELL, send a Server->Client PrivateBuyListSell packet to the L2PcInstance
If the private store is a STORE_PRIVATE_BUY, send a Server->Client PrivateBuyListBuy packet
- * to the L2PcInstance
If the private store is a STORE_PRIVATE_MANUFACTURE, send a Server->Client RecipeShopSellList packet to the L2PcInstance
+ * Manage Interact Task with another L2PcInstance. Actions :
+ *
If the private store is a STORE_PRIVATE_SELL, send a Server->Client PrivateBuyListSell packet to the L2PcInstance
+ *
If the private store is a STORE_PRIVATE_BUY, send a Server->Client PrivateBuyListBuy packet to the L2PcInstance
+ *
If the private store is a STORE_PRIVATE_MANUFACTURE, send a Server->Client RecipeShopSellList packet to the L2PcInstance
* @param target The L2Character targeted
*/
public void doInteract(L2Character target)
@@ -4523,9 +4546,13 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Manage Pickup Task. Actions :
Send a Server->Client packet StopMove to this L2PcInstance
Remove the L2ItemInstance from the world and send server->client GetItem packets
Send a System Message to the L2PcInstance : YOU_PICKED_UP_S1_ADENA or
- * YOU_PICKED_UP_S1_S2
Add the Item to the L2PcInstance inventory
Send a Server->Client packet InventoryUpdate to this L2PcInstance with NewItem (use a new slot) or ModifiedItem (increase amount)
Send a Server->Client packet StatusUpdate to this L2PcInstance with
- * current weight
Caution : If a Party is in progress, distribute Items between party members
+ * Manage Pickup Task. Actions :
+ *
Send a Server->Client packet StopMove to this L2PcInstance
+ *
Remove the L2ItemInstance from the world and send server->client GetItem packets
+ *
Send a System Message to the L2PcInstance : YOU_PICKED_UP_S1_ADENA or YOU_PICKED_UP_S1_S2
+ *
Add the Item to the L2PcInstance inventory
+ *
Send a Server->Client packet InventoryUpdate to this L2PcInstance with NewItem (use a new slot) or ModifiedItem (increase amount)
+ *
Send a Server->Client packet StatusUpdate to this L2PcInstance with current weight
Caution : If a Party is in progress, distribute Items between party members
* @param object The L2ItemInstance to pick up
*/
@Override
@@ -5244,8 +5271,12 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Kill the L2Character, Apply Death Penalty, Manage gain/loss Karma and Item Drop. Actions :
Reduce the Experience of the L2PcInstance in function of the calculated Death Penalty
If necessary, unsummon the Pet of the killed L2PcInstance
Manage Karma gain for
- * attacker and Karam loss for the killed L2PcInstance
If the killed L2PcInstance has Karma, manage Drop Item
Kill the L2PcInstance
+ * Kill the L2Character, Apply Death Penalty, Manage gain/loss Karma and Item Drop. Actions :
+ *
Reduce the Experience of the L2PcInstance in function of the calculated Death Penalty
+ *
If necessary, unsummon the Pet of the killed L2PcInstance
+ *
Manage Karma gain for attacker and Karam loss for the killed L2PcInstance
+ *
If the killed L2PcInstance has Karma, manage Drop Item
+ *
Kill the L2PcInstance
* @param killer
*/
@Override
@@ -5736,7 +5767,11 @@ public final class L2PcInstance extends L2Playable
/**
* Reduce the Experience (and level if necessary) of the L2PcInstance in function of the calculated Death Penalty.
- * Actions :
Calculate the Experience loss
Set the value of _expBeforeDeath
Set the new Experience value of the L2PcInstance and Decrease its level if necessary
Send a Server->Client StatusUpdate packet with its new Experience
+ * Actions :
+ *
Calculate the Experience loss
+ *
Set the value of _expBeforeDeath
+ *
Set the new Experience value of the L2PcInstance and Decrease its level if necessary
+ *
Send a Server->Client StatusUpdate packet with its new Experience
* @param killer
* @param atWar
*/
@@ -5811,7 +5846,9 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Stop the HP/MP/CP Regeneration task. Actions :
*/
public void stopAllTimers()
{
@@ -6173,7 +6210,10 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Set the Private Store type of the L2PcInstance. Values :
0 : STORE_PRIVATE_NONE
1 : STORE_PRIVATE_SELL
2 : sellmanage
+ * Set the Private Store type of the L2PcInstance. Values :
+ *
0 : STORE_PRIVATE_NONE
+ *
1 : STORE_PRIVATE_SELL
+ *
2 : sellmanage
*
3 : STORE_PRIVATE_BUY
*
4 : buymanage
*
5 : STORE_PRIVATE_MANUFACTURE
@@ -6190,7 +6230,10 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Values :
0 : STORE_PRIVATE_NONE
1 : STORE_PRIVATE_SELL
2 : sellmanage
+ * Values :
+ *
0 : STORE_PRIVATE_NONE
+ *
1 : STORE_PRIVATE_SELL
+ *
2 : sellmanage
*
3 : STORE_PRIVATE_BUY
*
4 : buymanage
*
5 : STORE_PRIVATE_MANUFACTURE
@@ -7001,8 +7044,11 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Retrieve a L2PcInstance from the characters table of the database and add it in _allObjects of the L2world. Actions :
Retrieve the L2PcInstance from the characters table of the database
Add the L2PcInstance object in _allObjects
Set the x,y,z position of
- * the L2PcInstance and make it invisible
Update the overloaded status of the L2PcInstance
+ * Retrieve a L2PcInstance from the characters table of the database and add it in _allObjects of the L2world. Actions :
+ *
Retrieve the L2PcInstance from the characters table of the database
+ *
Add the L2PcInstance object in _allObjects
+ *
Set the x,y,z position of the L2PcInstance and make it invisible
+ *
Update the overloaded status of the L2PcInstance
* @param objectId Identifier of the object to initialized
* @return The L2PcInstance loaded from the database
*/
@@ -7872,8 +7918,10 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Add a skill to the L2PcInstance _skills and its Func objects to the calculator set of the L2PcInstance and save update in the character_skills table of the database. Concept : All skills own by a L2PcInstance are identified in _skills Actions :
Replace
- * oldSkill by newSkill or Add the newSkill
If an old skill has been replaced, remove all its Func objects of L2Character calculator set
Add Func objects of newSkill to the calculator set of the L2Character
+ * Add a skill to the L2PcInstance _skills and its Func objects to the calculator set of the L2PcInstance and save update in the character_skills table of the database. Concept : All skills own by a L2PcInstance are identified in _skills Actions :
+ *
Replace oldSkill by newSkill or Add the newSkill
+ *
If an old skill has been replaced, remove all its Func objects of L2Character calculator set
+ *
Add Func objects of newSkill to the calculator set of the L2Character
* @param newSkill The L2Skill to add to the L2Character
* @param store
* @return The L2Skill replaced or null if just added a new L2Skill
@@ -7904,8 +7952,10 @@ public final class L2PcInstance extends L2Playable
}
/**
- * Remove a skill from the L2Character and its Func objects from calculator set of the L2Character and save update in the character_skills table of the database. Concept : All skills own by a L2Character are identified in _skills Actions :
Remove the
- * skill from the L2Character _skills
Remove all its Func objects from the L2Character calculator set
Overridden in :
L2PcInstance : Save update in the character_skills table of the database
+ * Remove a skill from the L2Character and its Func objects from calculator set of the L2Character and save update in the character_skills table of the database. Concept : All skills own by a L2Character are identified in _skills Actions :
+ *
Remove the skill from the L2Character _skills
+ *
Remove all its Func objects from the L2Character calculator set
Overridden in :
+ *
L2PcInstance : Save update in the character_skills table of the database
* @param skill The L2Skill to remove from the L2Character
* @return The L2Skill removed
*/
@@ -8839,7 +8889,7 @@ public final class L2PcInstance extends L2Playable
switch (sklTargetType)
{
- // Target the player if skill type is AURA, PARTY, CLAN or SELF
+ // Target the player if skill type is AURA, PARTY, CLAN or SELF
case AURA:
case FRONT_AURA:
case BEHIND_AURA:
@@ -9583,7 +9633,7 @@ public final class L2PcInstance extends L2Playable
}
if ((magic && (item.getItem().getDefaultAction() == ActionType.SPIRITSHOT)) //
- || (physical && (item.getItem().getDefaultAction() == ActionType.SOULSHOT)))
+ || (physical && (item.getItem().getDefaultAction() == ActionType.SOULSHOT)))
{
handler.useItem(this, item, false);
}
diff --git a/trunk/java/com/l2jserver/gameserver/model/events/impl/character/npc/OnNpcSocialActionSee.java b/trunk/java/com/l2jserver/gameserver/model/events/impl/character/npc/OnNpcSocialActionSee.java
index 90215b6d65..fac91df06f 100644
--- a/trunk/java/com/l2jserver/gameserver/model/events/impl/character/npc/OnNpcSocialActionSee.java
+++ b/trunk/java/com/l2jserver/gameserver/model/events/impl/character/npc/OnNpcSocialActionSee.java
@@ -18,6 +18,7 @@
*/
package com.l2jserver.gameserver.model.events.impl.character.npc;
+import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
@@ -29,9 +30,11 @@ public class OnNpcSocialActionSee implements IBaseEvent
{
private final L2PcInstance _caster;
private final int _actionId;
+ private final L2Npc _npc;
- public OnNpcSocialActionSee(L2PcInstance caster, int actionId)
+ public OnNpcSocialActionSee(L2Npc npc, L2PcInstance caster, int actionId)
{
+ _npc = npc;
_caster = caster;
_actionId = actionId;
}
@@ -46,6 +49,11 @@ public class OnNpcSocialActionSee implements IBaseEvent
return _actionId;
}
+ public L2Npc getNpc()
+ {
+ return _npc;
+ }
+
@Override
public EventType getType()
{
diff --git a/trunk/java/com/l2jserver/gameserver/model/quest/Quest.java b/trunk/java/com/l2jserver/gameserver/model/quest/Quest.java
index f9141b6de5..1603baa98f 100644
--- a/trunk/java/com/l2jserver/gameserver/model/quest/Quest.java
+++ b/trunk/java/com/l2jserver/gameserver/model/quest/Quest.java
@@ -761,15 +761,16 @@ public class Quest extends AbstractScript implements IIdentifiable
}
/**
+ * @param npc
* @param caster
* @param actionId
*/
- public final void notifySocialActionSee(L2PcInstance caster, int actionId)
+ public final void notifySocialActionSee(L2Npc npc, L2PcInstance caster, int actionId)
{
String res = null;
try
{
- res = onSocialActionSee(caster, actionId);
+ res = onSocialActionSee(npc, caster, actionId);
}
catch (Exception e)
{
@@ -1226,11 +1227,12 @@ public class Quest extends AbstractScript implements IIdentifiable
}
/**
- * @param caster the player who used the social action
- * @param actionId the actual action id that was used
+ * @param npc the NPC that saw the social action.
+ * @param caster the player who used the social action.
+ * @param actionId the actual action id that was used.
* @return
*/
- public String onSocialActionSee(L2PcInstance caster, int actionId)
+ public String onSocialActionSee(L2Npc npc, L2PcInstance caster, int actionId)
{
return null;
}
@@ -2057,7 +2059,7 @@ public class Quest extends AbstractScript implements IIdentifiable
*/
public void addSocialActionSeeId(int... npcIds)
{
- setNpcSocialActionSeeId(event -> notifySocialActionSee(event.getCaster(), event.getActionId()), npcIds);
+ setNpcSocialActionSeeId(event -> notifySocialActionSee(event.getNpc(), event.getCaster(), event.getActionId()), npcIds);
}
/**
diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/SocialAction.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/SocialAction.java
index 646884200e..63a96c3059 100644
--- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/SocialAction.java
+++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/SocialAction.java
@@ -43,4 +43,9 @@ public class SocialAction extends L2GameServerPacket
writeD(_actionId);
writeD(0x00); // TODO: Find me!
}
+
+ public int getId()
+ {
+ return _actionId;
+ }
}