Sync with L2JServer Jan 30th 2015.

This commit is contained in:
mobius
2015-01-31 03:47:34 +00:00
parent acf0c17ba4
commit e7005fbedd
148 changed files with 1922 additions and 1672 deletions

View File

@@ -204,12 +204,10 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader
event.getMentor().sendPacket(new ExMentorList(event.getMentor()));
// Add the mentee skill
event.getMentee().addSkill(MENTEE_MENTOR_SUMMON.getSkill(), true);
handleMenteeSkills(event.getMentee());
// Add the mentor skills
event.getMentor().addSkill(MENTOR_KNIGHTS_HARMONY.getSkill(), true);
event.getMentor().addSkill(MENTOR_WIZARDS_HARMONY.getSkill(), true);
event.getMentor().addSkill(MENTOR_WARRIORS_HARMONY.getSkill(), true);
// Give mentor's buffs only if he didn't had them.
handleMentorSkills(event.getMentor());
// Send mail with the headphone
sendMail(event.getMentee(), MENTEE_ADDED_TITLE, MENTEE_ADDED_BODY, MENTEE_HEADPHONE, 1);
@@ -249,6 +247,9 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader
sk.getSkill().applyEffects(player, player);
}
// Add the mentee skill
handleMenteeSkills(player);
mentor.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_MENTEE_S1_HAS_CONNECTED).addCharName(player));
mentor.sendPacket(new ExMentorList(mentor.getPlayerInstance()));
}
@@ -313,6 +314,9 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader
}
}
// Give mentor's buffs only if he didn't had them.
handleMentorSkills(player);
player.sendPacket(new ExMentorList(player));
}
else
@@ -332,12 +336,21 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader
{
final L2PcInstance player = event.getActiveChar();
if (player.isMentor())
{
// Give mentor's buffs only if he didn't had them.
handleMentorSkills(player);
return;
}
// Not a mentee
if (!player.isMentee())
{
return;
}
handleMenteeSkills(player);
if (player.isInCategory(CategoryType.AWAKEN_GROUP))
{
handleGraduateMentee(player);
@@ -377,10 +390,21 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader
public void onMenteeLeft(OnPlayerMenteeLeft event)
{
final L2PcInstance player = event.getMentee();
final L2PcInstance mentor = event.getMentor().getPlayerInstance();
// Remove the mentee skills
player.removeSkill(MENTEE_MENTOR_SUMMON.getSkill(), true);
// If player does not have any mentees anymore remove mentor skills.
if ((mentor != null) && (MentorManager.getInstance().getMentees(mentor.getObjectId()) == null))
{
mentor.removeSkill(MENTOR_KNIGHTS_HARMONY.getSkill(), true);
mentor.removeSkill(MENTOR_WIZARDS_HARMONY.getSkill(), true);
mentor.removeSkill(MENTOR_WARRIORS_HARMONY.getSkill(), true);
// Clear the mentee
mentor.sendPacket(new ExMentorList(mentor));
}
// Clear mentee status
player.sendPacket(new ExMentorList(player));
}
@@ -414,6 +438,28 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader
event.getMentor().sendPacket(new ExMentorList(mentor));
}
private void handleMenteeSkills(L2PcInstance player)
{
// Give mentee's buffs only if he didn't had them.
if (player.getKnownSkill(MENTEE_MENTOR_SUMMON.getSkillId()) == null)
{
// Add the mentee skills
player.addSkill(MENTEE_MENTOR_SUMMON.getSkill(), false);
}
}
private void handleMentorSkills(L2PcInstance player)
{
// Give mentor's buffs only if he didn't had them.
if (player.getKnownSkill(MENTOR_KNIGHTS_HARMONY.getSkillId()) == null)
{
// Add the mentor skills
player.addSkill(MENTOR_KNIGHTS_HARMONY.getSkill(), false);
player.addSkill(MENTOR_WIZARDS_HARMONY.getSkill(), false);
player.addSkill(MENTOR_WARRIORS_HARMONY.getSkill(), false);
}
}
private void handleGraduateMentee(L2PcInstance player)
{
MentorManager.getInstance().cancelMentoringBuffs(player);

View File

@@ -1,8 +1,6 @@
<html><body>Priest Bastian:<br>
Elmore has always respected the military arts. Even the Temple of Einhasad here in Goddard reflects that martial heritage.<br>
Of course, this doesn't mean we advocate violence. But we acknowledge that sometimes military might is necessary to protect the peace. That is what history teaches us.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_SkillList">Learn skills.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HealerTrainer SkillTransfer">Ask about Skill Transfer.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link common/skill_enchant_help.htm">Ask about Skill Enchanting.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HealerTrainer SkillTransfer">"So I heard something about skill linking. Can you tell me about it?"</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,9 +1,9 @@
<html><body>Priest Cerenas:<br>
O foreign traveler, may Einhasad's light guide and protect you!<br>
This village's temple is also our Warriors Guild, as you can see. That is because we value the martial arts just as much as we do faith and piety.<br>
But take care how you use the sword -- it can cut the user as easily as it cuts an enemy...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_SkillList">Learn skills.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HealerTrainer SkillTransfer">Ask about Skill Transfer.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link common/skill_enchant_help.htm">Ask about Skill Enchanting.</Button>
Traveler from foreign lands, I pray that the peace of the lake and the protection of the light always be with you. <br>
As you can see, this town's temple is also the Warriors Guild. Martial arts are as important as piety here.<br>
But force is a double-edged sword. Though necessary for survival, it can turn on you; remember, violence does not discriminate.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HealerTrainer SkillTransfer">"So I heard something about skill linking. Can you tell me about it?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_chat 0">"Actually, I want to go to the Hidden Space."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_chat 0">"Can I have another Noblesse Tiara, by the way?"</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,8 +1,6 @@
<html><body>Magister Kamilen:<br>
No matter what people say about this place, it can't change the truth. Elmore is a defeated land, and Goddard Territory is a land of refugees.<br>
Once the people here accept this truth, they will become a much more powerful force.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_SkillList">Learn skills.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HealerTrainer SkillTransfer">Ask about Skill Transfer.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link common/skill_enchant_help.htm">Ask about Skill Enchanting.</Button>
No matter what people say about this place, the truth is plain to see: Elmore is a defeated land, and Goddard is fast becoming a land of refugees.<br>
Once the people here accept the truth, they'll become a much more powerful force.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HealerTrainer SkillTransfer">"So I heard something about skill linking. Can you tell me about it?"</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>