Skip to content
Snippets Groups Projects
Commit e1dd6936 authored by Zoey76's avatar Zoey76
Browse files

BETA: Datapack part for [L6583].

Patch by: Zealar
Reviewed by: Zoey76
parent faca6d7d
No related branches found
No related tags found
No related merge requests found
...@@ -511,6 +511,7 @@ ...@@ -511,6 +511,7 @@
<admin command="admin_reset_skills" accessLevel="7" /> <admin command="admin_reset_skills" accessLevel="7" />
<admin command="admin_give_all_skills" accessLevel="7" /> <admin command="admin_give_all_skills" accessLevel="7" />
<admin command="admin_give_all_skills_fs" accessLevel="7" /> <admin command="admin_give_all_skills_fs" accessLevel="7" />
<admin command="admin_give_clan_skills" accessLevel="7" />
<admin command="admin_give_all_clan_skills" accessLevel="7" /> <admin command="admin_give_all_clan_skills" accessLevel="7" />
<admin command="admin_remove_all_skills" accessLevel="7" /> <admin command="admin_remove_all_skills" accessLevel="7" />
<admin command="admin_add_clan_skill" accessLevel="7" /> <admin command="admin_add_clan_skill" accessLevel="7" />
......
<html><body> <html><body>
<table width=260><tr> <table width=260><tr>
<td width=40><button value="Main" action="bypass -h admin_admin" width=40 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> <td width=40><button value="Main" action="bypass -h admin_admin" width=40 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180><center>Character Editor</center></td> <td width=180><center>Player/Clan Skills Editor</center></td>
<td width=40><button value="Back" action="bypass -h admin_character_info %name%" width=40 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> <td width=40><button value="Back" action="bypass -h admin_character_info %name%" width=40 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr></table> </tr></table>
<br><br> <br><br>
<center>Editing <font color="LEVEL">%name%</font></center> <center>Editing <font color="LEVEL">%name%</font>
<br>
<table width=270>
<tr>
<td width=50>Class:</td>
<td width=160><font color="LEVEL">%class%</font></td>
<td width=20>Lv:</td>
<td width=40><font color="LEVEL">%level%</font></td>
</tr>
</table>
<br>
============ Player ============
<br> <br>
<table width=270><tr><td width=20>Lv:</td><td width=40>%level%</td><td width=50>Class:</td><td width=160>%class%</td></tr></table>
<br>Note: Don't forget that modifying players skills can ruin the game...
<br><center>
<table width=270> <table width=270>
<tr> <tr>
<td><button value="Add skills" action="bypass -h admin_skill_list" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> <td><button value="Add skills" action="bypass -h admin_skill_list" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
...@@ -26,7 +34,13 @@ ...@@ -26,7 +34,13 @@
<tr> <tr>
<td><button value="Give All Skills FS" action="bypass -h admin_give_all_skills_fs" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> <td><button value="Give All Skills FS" action="bypass -h admin_give_all_skills_fs" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr> </tr>
</table>
<br>
============ Clan ============
<br>
<table width=270>
<tr> <tr>
<td><button value="Give Clan Skills" action="bypass -h admin_give_clan_skills" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Give All Clan Skills" action="bypass -h admin_give_all_clan_skills" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> <td><button value="Give All Clan Skills" action="bypass -h admin_give_all_clan_skills" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr> </tr>
</table></center></body></html> </table></center></body></html>
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
package handlers.admincommandhandlers; package handlers.admincommandhandlers;
import java.util.List; import java.util.Map;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
...@@ -75,6 +75,7 @@ public class AdminSkill implements IAdminCommandHandler ...@@ -75,6 +75,7 @@ public class AdminSkill implements IAdminCommandHandler
"admin_reset_skills", "admin_reset_skills",
"admin_give_all_skills", "admin_give_all_skills",
"admin_give_all_skills_fs", "admin_give_all_skills_fs",
"admin_give_clan_skills",
"admin_give_all_clan_skills", "admin_give_all_clan_skills",
"admin_remove_all_skills", "admin_remove_all_skills",
"admin_add_clan_skill", "admin_add_clan_skill",
...@@ -157,9 +158,13 @@ public class AdminSkill implements IAdminCommandHandler ...@@ -157,9 +158,13 @@ public class AdminSkill implements IAdminCommandHandler
{ {
adminGiveAllSkills(activeChar, true); adminGiveAllSkills(activeChar, true);
} }
else if (command.equals("admin_give_clan_skills"))
{
adminGiveClanSkills(activeChar, false);
}
else if (command.equals("admin_give_all_clan_skills")) else if (command.equals("admin_give_all_clan_skills"))
{ {
adminGiveAllClanSkills(activeChar); adminGiveClanSkills(activeChar, true);
} }
else if (command.equals("admin_remove_all_skills")) else if (command.equals("admin_remove_all_skills"))
{ {
...@@ -227,8 +232,9 @@ public class AdminSkill implements IAdminCommandHandler ...@@ -227,8 +232,9 @@ public class AdminSkill implements IAdminCommandHandler
* This function will give all the skills that the target's clan can learn at it's level.<br> * This function will give all the skills that the target's clan can learn at it's level.<br>
* If the target is not the clan leader, a system message will be sent to the Game Master. * If the target is not the clan leader, a system message will be sent to the Game Master.
* @param activeChar the active char, probably a Game Master. * @param activeChar the active char, probably a Game Master.
* @param includeSquad if Squad skills is included
*/ */
private void adminGiveAllClanSkills(L2PcInstance activeChar) private void adminGiveClanSkills(L2PcInstance activeChar, boolean includeSquad)
{ {
final L2Object target = activeChar.getTarget(); final L2Object target = activeChar.getTarget();
if ((target == null) || !target.isPlayer()) if ((target == null) || !target.isPlayer())
...@@ -239,6 +245,7 @@ public class AdminSkill implements IAdminCommandHandler ...@@ -239,6 +245,7 @@ public class AdminSkill implements IAdminCommandHandler
final L2PcInstance player = target.getActingPlayer(); final L2PcInstance player = target.getActingPlayer();
final L2Clan clan = player.getClan(); final L2Clan clan = player.getClan();
if (clan == null) if (clan == null)
{ {
activeChar.sendPacket(SystemMessageId.TARGET_MUST_BE_IN_CLAN); activeChar.sendPacket(SystemMessageId.TARGET_MUST_BE_IN_CLAN);
...@@ -247,16 +254,15 @@ public class AdminSkill implements IAdminCommandHandler ...@@ -247,16 +254,15 @@ public class AdminSkill implements IAdminCommandHandler
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.TARGET_MUST_BE_IN_CLAN); final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_IS_NOT_A_CLAN_LEADER);
sm.addPcName(player); sm.addString(player.getName());
activeChar.sendPacket(sm); activeChar.sendPacket(sm);
} }
final List<L2SkillLearn> skills = SkillTreesData.getInstance().getAvailablePledgeSkills(clan); final Map<Integer, L2SkillLearn> skills = SkillTreesData.getInstance().getMaxPledgeSkills(clan, includeSquad);
SkillData st = SkillData.getInstance(); for (L2SkillLearn s : skills.values())
for (L2SkillLearn s : skills)
{ {
clan.addNewSkill(st.getSkill(s.getSkillId(), s.getSkillLevel())); clan.addNewSkill(SkillData.getInstance().getSkill(s.getSkillId(), s.getSkillLevel()));
} }
// Notify target and active char // Notify target and active char
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment