Addition of ranking skill bonuses.

This commit is contained in:
MobiusDevelopment 2020-01-01 23:19:34 +00:00
parent 0150feee05
commit e85db6c835
4 changed files with 738 additions and 50 deletions

View File

@ -0,0 +1,152 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 <http://www.gnu.org/licenses/>.
*/
package ai.others;
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
import org.l2jmobius.gameserver.instancemanager.RankManager;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
import org.l2jmobius.gameserver.model.skills.Skill;
import ai.AbstractNpcAI;
/**
* @author Mobius
*/
public class RankingSkillBonuses extends AbstractNpcAI
{
// Skills
private static final Skill SERVER_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(32874, 1);
private static final Skill SERVER_LEVEL_RANKING_2ND_CLASS = SkillData.getInstance().getSkill(32875, 1);
private static final Skill SERVER_LEVEL_RANKING_3RD_CLASS = SkillData.getInstance().getSkill(32876, 1);
private static final Skill HUMAN_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(32877, 1);
private static final Skill ELF_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(32878, 1);
private static final Skill DARK_ELF_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(32879, 1);
private static final Skill ORC_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(32880, 1);
private static final Skill DWARF_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(32881, 1);
private static final Skill KAMAEL_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(32882, 1);
private static final Skill ERTHEIA_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(32883, 1);
private static final Skill SERVER_RANKING_BENEFIT_1 = SkillData.getInstance().getSkill(32884, 1);
private static final Skill SERVER_RANKING_BENEFIT_2 = SkillData.getInstance().getSkill(32885, 1);
private static final Skill SERVER_RANKING_BENEFIT_3 = SkillData.getInstance().getSkill(32886, 1);
private static final Skill RACE_RANKING_BENEFIT = SkillData.getInstance().getSkill(32887, 1);
@RegisterEvent(EventType.ON_PLAYER_LOGIN)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void onPlayerLogin(OnPlayerLogin event)
{
final PlayerInstance player = event.getPlayer();
if (player == null)
{
return;
}
// Remove existing effects and skills.
player.getEffectList().stopSkillEffects(true, SERVER_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, SERVER_LEVEL_RANKING_2ND_CLASS);
player.getEffectList().stopSkillEffects(true, SERVER_LEVEL_RANKING_3RD_CLASS);
player.getEffectList().stopSkillEffects(true, HUMAN_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, ELF_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, DARK_ELF_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, ORC_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, DWARF_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, KAMAEL_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, ERTHEIA_LEVEL_RANKING_1ST_CLASS);
player.removeSkill(SERVER_RANKING_BENEFIT_1);
player.removeSkill(SERVER_RANKING_BENEFIT_2);
player.removeSkill(SERVER_RANKING_BENEFIT_3);
player.removeSkill(RACE_RANKING_BENEFIT);
// Add global rank skills.
int rank = RankManager.getInstance().getPlayerGlobalRank(player);
if (rank > 0)
{
if (rank <= 10)
{
SERVER_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
player.addSkill(SERVER_RANKING_BENEFIT_1, false);
player.addSkill(SERVER_RANKING_BENEFIT_2, false);
player.addSkill(SERVER_RANKING_BENEFIT_3, false);
}
else if (rank <= 50)
{
SERVER_LEVEL_RANKING_2ND_CLASS.applyEffects(player, player);
player.addSkill(SERVER_RANKING_BENEFIT_2, false);
player.addSkill(SERVER_RANKING_BENEFIT_3, false);
}
else if (rank <= 100)
{
SERVER_LEVEL_RANKING_3RD_CLASS.applyEffects(player, player);
player.addSkill(SERVER_RANKING_BENEFIT_3, false);
}
}
// Apply race rank effects.
final int raceRank = RankManager.getInstance().getPlayerRaceRank(player);
if ((raceRank > 0) && (raceRank <= 10))
{
switch (player.getRace())
{
case HUMAN:
{
HUMAN_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case ELF:
{
ELF_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case DARK_ELF:
{
DARK_ELF_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case ORC:
{
ORC_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case DWARF:
{
DWARF_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case KAMAEL:
{
KAMAEL_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case ERTHEIA:
{
ERTHEIA_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
}
player.addSkill(RACE_RANKING_BENEFIT, false);
}
}
public static void main(String[] args)
{
new RankingSkillBonuses();
}
}

View File

@ -1114,59 +1114,360 @@
<skill id="32877" toLevel="1" name="Human Level Ranking 1st Class">
<!-- Benefits for ranks 1-10 amongst Humans. P. Atk. / M. Atk. / P. Def. / M. Def. / Max HP / Max MP +1% -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>3</isMagic> <!-- Dance Skill -->
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
<effects>
<effect name="MaxHp">
<amount>1</amount>
<mode>PER</mode>
</effect>
<effect name="MaxMp">
<amount>1</amount>
<mode>PER</mode>
</effect>
<effect name="PAtk">
<amount>1</amount>
<mode>PER</mode>
</effect>
<effect name="MAtk">
<amount>1</amount>
<mode>PER</mode>
</effect>
<effect name="PsysicalDefence">
<amount>1</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence">
<amount>1</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="32878" toLevel="1" name="Elf Level Ranking 1st Class">
<!-- Benefits for ranks 1-10 amongst Elves. Speed while not in combat +8, Damage received -1% -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>3</isMagic> <!-- Dance Skill -->
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
<effects>
<effect name="Speed">
<amount>20</amount>
<mode>DIFF</mode>
</effect>
<effect name="PvePhysicalAttackDefenceBonus">
<amount>-1</amount>
<mode>PER</mode>
</effect>
<effect name="PvePhysicalSkillDefenceBonus">
<amount>-1</amount>
<mode>PER</mode>
</effect>
<effect name="PvpMagicalSkillDefenceBonus">
<amount>-1</amount>
<mode>PER</mode>
</effect>
<effect name="PvpPhysicalAttackDefenceBonus">
<amount>-1</amount>
<mode>PER</mode>
</effect>
<effect name="PvpPhysicalSkillDefenceBonus">
<amount>-1</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="32879" toLevel="1" name="Dark Elf Level Ranking 1st Class">
<skill id="32879" toLevel="1" name="Dark Elf Level Ranking 1st Class">
<!-- Benefits for ranks 1-10 amongst Dark Elves. CHA +1, STR/DEX/CON/INT/WIT/MEN +2 at night -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>3</isMagic> <!-- Dance Skill -->
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
<effects>
<effect name="StatUp">
<amount>2</amount>
<stat>CON</stat>
</effect>
<effect name="StatUp">
<amount>2</amount>
<stat>MEN</stat>
</effect>
<effect name="StatUp">
<amount>2</amount>
<stat>STR</stat>
</effect>
<effect name="StatUp">
<amount>2</amount>
<stat>INT</stat>
</effect>
<effect name="StatUp">
<amount>2</amount>
<stat>WIT</stat>
</effect>
<effect name="StatUp">
<amount>2</amount>
<stat>DEX</stat>
</effect>
<effect name="StatUp">
<amount>1</amount>
<stat>CHA</stat>
</effect>
</effects>
</skill>
<skill id="32880" toLevel="1" name="Orc Level Ranking 1st Class">
<!-- Benefits for ranks 1-10 amongst Orcs. P. Atk. / Max HP +2% -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>3</isMagic> <!-- Dance Skill -->
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
<effects>
<effect name="MaxHp">
<amount>2</amount>
<mode>PER</mode>
</effect>
<effect name="PAtk">
<amount>2</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="32881" toLevel="1" name="Dwarf Level Ranking 1st Class">
<!-- Benefits for ranks 1-10 amongst Dwarves. Weapon/Armor Enchant Rate +1%, Max HP / P. Def. / M. Def. +2% -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>3</isMagic> <!-- Dance Skill -->
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
<effects>
<effect name="MaxHp">
<amount>2</amount>
<mode>PER</mode>
</effect>
<effect name="PhysicalDefence">
<amount>2</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence">
<amount>2</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="32882" toLevel="1" name="Kamael Level Ranking 1st Class">
<!-- Benefits for ranks 1-10 amongst Kamaels. PvP Damage +2% -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>3</isMagic> <!-- Dance Skill -->
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
<effects>
<effect name="PvePhysicalAttackDamageBonus">
<amount>2</amount>
<mode>PER</mode>
</effect>
<effect name="PvePhysicalSkillDamageBonus">
<amount>2</amount>
<mode>PER</mode>
</effect>
<effect name="PvpPhysicalAttackDamageBonus">
<amount>2</amount>
<mode>PER</mode>
</effect>
<effect name="PvpPhysicalSkillDamageBonus">
<amount>2</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="32883" toLevel="1" name="Ertheia Level Ranking 1st Class">
<!-- Benefits for ranks 1-10 amongst Ertheias. P./M. Skill Power +1%, Skill Cooldown - 1% -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>3</isMagic> <!-- Dance Skill -->
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
<effects>
<effect name="MagicalSkillPower">
<amount>1</amount>
<mode>PER</mode>
</effect>
<effect name="PhysicalSkillPower">
<amount>1</amount>
<mode>PER</mode>
</effect>
<effect name="Reuse">
<amount>1</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="32884" toLevel="1" name="Server Ranking Benefit 1">
<!-- All Stats +1, Recovery Potion / Elixir Effect +500 -->
<icon>icon.UI_server_ranking_1</icon>
<operateType>P</operateType>
<effects>
<effect name="StatUp">
<amount>1</amount>
<stat>CON</stat>
</effect>
<effect name="StatUp">
<amount>1</amount>
<stat>MEN</stat>
</effect>
<effect name="StatUp">
<amount>1</amount>
<stat>STR</stat>
</effect>
<effect name="StatUp">
<amount>1</amount>
<stat>INT</stat>
</effect>
<effect name="StatUp">
<amount>1</amount>
<stat>WIT</stat>
</effect>
<effect name="StatUp">
<amount>1</amount>
<stat>DEX</stat>
</effect>
<effect name="StatUp">
<amount>1</amount>
<stat>LUC</stat>
</effect>
<effect name="StatUp">
<amount>1</amount>
<stat>CHA</stat>
</effect>
<effect name="HealEffect">
<amount>+500</amount>
<mode>DIFF</mode>
</effect>
</effects>
</skill>
<skill id="32885" toLevel="1" name="Server Ranking Benefit 2">
<!-- Normal Attack/M. Critical Rate Limit +50, Speed Limit +20 -->
<icon>icon.UI_server_ranking_2</icon>
<operateType>P</operateType>
<effects>
<effect name="CriticalRate">
<amount>50</amount>
<mode>DIFF</mode>
</effect>
<effect name="MagicCriticalRate">
<amount>50</amount>
<mode>DIFF</mode>
</effect>
<effect name="Speed">
<amount>20</amount>
<mode>DIFF</mode>
</effect>
</effects>
</skill>
<skill id="32886" toLevel="1" name="Server Ranking Benefit 3">
<!-- Max HP Limit +30000, Max HP +15000 -->
<icon>icon.UI_server_ranking_3</icon>
<operateType>P</operateType>
<effects>
<effect name="MaxHp">
<amount>15000</amount>
<mode>DIFF</mode>
</effect>
</effects>
</skill>
<skill id="32887" toLevel="1" name="Race Ranking Benefit">
<!-- Humans: P. Atk. / M. Atk. / P. Def. / M. Def. / Max HP / Max MP +1% Elves: Speed when not in combat +8, Damage received -1% Dark Elves: CHA +1, STR/DEX/CON/INT/WIT/MEN +2 at night Orcs: P. Atk. / Max HP +2% Dwarves: Weapon/Armor Enchant Rate +1%, Max HP / P. Def. / M. Def. +2% Kamaels: PvP Damage +2% Ertheias: P./M. Skill Power +1%, Skill Cooldown - 1% -->

View File

@ -0,0 +1,145 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 <http://www.gnu.org/licenses/>.
*/
package ai.others;
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
import org.l2jmobius.gameserver.instancemanager.RankManager;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
import org.l2jmobius.gameserver.model.skills.Skill;
import ai.AbstractNpcAI;
/**
* @author Mobius
*/
public class RankingSkillBonuses extends AbstractNpcAI
{
// Skills
private static final Skill SERVER_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(60003, 1);
private static final Skill SERVER_LEVEL_RANKING_2ND_CLASS = SkillData.getInstance().getSkill(60004, 1);
private static final Skill SERVER_LEVEL_RANKING_3RD_CLASS = SkillData.getInstance().getSkill(60005, 1);
private static final Skill HUMAN_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(60006, 1);
private static final Skill ELF_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(60007, 1);
private static final Skill DARK_ELF_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(60008, 1);
private static final Skill ORC_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(60009, 1);
private static final Skill DWARF_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(60010, 1);
private static final Skill KAMAEL_LEVEL_RANKING_1ST_CLASS = SkillData.getInstance().getSkill(60011, 1);
private static final Skill SERVER_RANKING_BENEFIT_1 = SkillData.getInstance().getSkill(60012, 1);
private static final Skill SERVER_RANKING_BENEFIT_2 = SkillData.getInstance().getSkill(60013, 1);
private static final Skill SERVER_RANKING_BENEFIT_3 = SkillData.getInstance().getSkill(60014, 1);
private static final Skill RACE_RANKING_BENEFIT = SkillData.getInstance().getSkill(60015, 1);
@RegisterEvent(EventType.ON_PLAYER_LOGIN)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void onPlayerLogin(OnPlayerLogin event)
{
final PlayerInstance player = event.getPlayer();
if (player == null)
{
return;
}
// Remove existing effects and skills.
player.getEffectList().stopSkillEffects(true, SERVER_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, SERVER_LEVEL_RANKING_2ND_CLASS);
player.getEffectList().stopSkillEffects(true, SERVER_LEVEL_RANKING_3RD_CLASS);
player.getEffectList().stopSkillEffects(true, HUMAN_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, ELF_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, DARK_ELF_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, ORC_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, DWARF_LEVEL_RANKING_1ST_CLASS);
player.getEffectList().stopSkillEffects(true, KAMAEL_LEVEL_RANKING_1ST_CLASS);
player.removeSkill(SERVER_RANKING_BENEFIT_1);
player.removeSkill(SERVER_RANKING_BENEFIT_2);
player.removeSkill(SERVER_RANKING_BENEFIT_3);
player.removeSkill(RACE_RANKING_BENEFIT);
// Add global rank skills.
int rank = RankManager.getInstance().getPlayerGlobalRank(player);
if (rank > 0)
{
if (rank <= 10)
{
SERVER_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
player.addSkill(SERVER_RANKING_BENEFIT_1, false);
player.addSkill(SERVER_RANKING_BENEFIT_2, false);
player.addSkill(SERVER_RANKING_BENEFIT_3, false);
}
else if (rank <= 50)
{
SERVER_LEVEL_RANKING_2ND_CLASS.applyEffects(player, player);
player.addSkill(SERVER_RANKING_BENEFIT_2, false);
player.addSkill(SERVER_RANKING_BENEFIT_3, false);
}
else if (rank <= 100)
{
SERVER_LEVEL_RANKING_3RD_CLASS.applyEffects(player, player);
player.addSkill(SERVER_RANKING_BENEFIT_3, false);
}
}
// Apply race rank effects.
final int raceRank = RankManager.getInstance().getPlayerRaceRank(player);
if ((raceRank > 0) && (raceRank <= 10))
{
switch (player.getRace())
{
case HUMAN:
{
HUMAN_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case ELF:
{
ELF_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case DARK_ELF:
{
DARK_ELF_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case ORC:
{
ORC_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case DWARF:
{
DWARF_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
case KAMAEL:
{
KAMAEL_LEVEL_RANKING_1ST_CLASS.applyEffects(player, player);
break;
}
}
player.addSkill(RACE_RANKING_BENEFIT, false);
}
}
public static void main(String[] args)
{
new RankingSkillBonuses();
}
}

View File

@ -15,76 +15,166 @@
<effectPoint>-100</effectPoint>
</skill>
<skill id="60003" toLevel="1" name="1st Place in the List of Ranks for Level on the Server">
<!-- Bonus for the 1st place in the list of ranks for level on the server.\nAll basic characteristics +1, HP Recovery Potions' Effect +50, Weight Limit +100,000, P. Evasion +20. -->
<!-- Bonus for the 1st place in the list of ranks for level on the server. All basic characteristics +1, HP Recovery Potions' Effect +50, Weight Limit +100,000, P. Evasion +20. -->
<icon>icon.server_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<effectPoint>1</effectPoint>
<isMagic>3</isMagic> <!-- Dance Skill -->
</skill>
<skill id="60004" toLevel="1" name="2nd Place in the List of Ranks for Level on the Server">
<!-- Bonus for 2nd-30th places in the list of ranks for level on the server.\nCON/ MEN/ DEX/ WIT/ +1, Weight Limit +10,000. -->
<!-- Bonus for 2nd-30th places in the list of ranks for level on the server. CON/ MEN/ DEX/ WIT/ +1, Weight Limit +10,000. -->
<icon>icon.server_ranking_2</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<effectPoint>1</effectPoint>
<isMagic>3</isMagic> <!-- Dance Skill -->
</skill>
<skill id="60005" toLevel="1" name="3rd Place in the List of Ranks for Level on the Server">
<!-- Bonus for 31-100th places in the list of ranks for level on the server.\nCON/ MEN/ +1, Weight Limit +5,000. -->
<!-- Bonus for 31-100th places in the list of ranks for level on the server. CON/ MEN/ +1, Weight Limit +5,000. -->
<icon>icon.server_ranking_3</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<effectPoint>1</effectPoint>
<isMagic>3</isMagic> <!-- Dance Skill -->
</skill>
<skill id="60006" toLevel="1" name="Human Level Ranking 1st Class">
<!-- Bonus for 1st place in the list of ranks for level among humans.\nP./ M. Critical Damage +300. -->
<!-- Bonus for 1st place in the list of ranks for level among humans. P./ M. Critical Damage +300. -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<effectPoint>1</effectPoint>
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
</skill>
<skill id="60007" toLevel="1" name="Elf Level Ranking 1st Class">
<!-- Bonus for 1st place in the list of ranks for level among elves.\nP./ M. Atk. +300. -->
<!-- Bonus for 1st place in the list of ranks for level among elves. P./ M. Atk. +300. -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<effectPoint>1</effectPoint>
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
</skill>
<skill id="60008" toLevel="1" name="Dark Elf Level Ranking 1st Class">
<!-- Bonus for 1st place in the list of ranks for level among dark elves.\nAtk. Spd./ Casting Spd. +200. -->
<!-- Bonus for 1st place in the list of ranks for level among dark elves. Atk. Spd./ Casting Spd. +200. -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<effectPoint>1</effectPoint>
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
</skill>
<skill id="60009" toLevel="1" name="Orc Level Ranking 1st Class">
<!-- Bonus for 1st place in the list of ranks for level among orcs.\nP./ M. Critical Rate +20. -->
<!-- Bonus for 1st place in the list of ranks for level among orcs. P./ M. Critical Rate +20. -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<effectPoint>1</effectPoint>
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
</skill>
<skill id="60010" toLevel="1" name="Dwarf Level Ranking 1st Class">
<!-- Bonus for 1st place in the list of ranks for level among dwarves. \nEnchant success rate is increased. -->
<!-- Bonus for 1st place in the list of ranks for level among dwarves. Enchant success rate is increased. -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<effectPoint>1</effectPoint>
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
</skill>
<skill id="60011" toLevel="1" name="Kamael Level Ranking 1st Class">
<!-- Bonus for 1st place in the list of ranks for level among Kamael.\nP./ M. Accuracy, P./ M. Evasion +5. -->
<!-- Bonus for 1st place in the list of ranks for level among Kamael. P./ M. Accuracy, P./ M. Evasion +5. -->
<icon>icon.race_ranking_1</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<effectPoint>1</effectPoint>
<operateType>A2</operateType>
<effectPoint>100</effectPoint>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>-2</magicLvl>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>-1</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<affectRange>1000</affectRange>
<affectLimit>50-50</affectLimit>
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>PLEDGE</affectScope>
<affectObject>FRIEND</affectObject>
</skill>
<skill id="60012" toLevel="1" name="Bonuses for 1st Rank on the Server">
<!-- CON/ MEN +1, Weight Limit +5,000. -->
<icon>icon.UI_server_ranking_1</icon>
<operateType>P</operateType>
<effects>
<effect name="StatUp">
<amount>1</amount>
<stat>CON</stat>
</effect>
<effect name="StatUp">
<amount>1</amount>
<stat>MEN</stat>
</effect>
</effects>
</skill>
<skill id="60013" toLevel="1" name="Bonuses for 2nd Rank on the Server">
<!-- DEX/ WIT +1, Weight Limit +5000. -->
<icon>icon.UI_server_ranking_2</icon>
<operateType>P</operateType>
</skill>
<skill id="60014" toLevel="1" name="Bonuses for 3rd Rank on the Server">
@ -93,7 +183,7 @@
<operateType>P</operateType>
</skill>
<skill id="60015" toLevel="1" name="Bonus for Rank Among Races">
<!-- Humans: P./ M. Critical Damage is increased.\nElves: P./ M. Atk. is increased.\nDark Elves: Atk./ Casting Spd. is increased.\nOrc: P./ M. Critical Rate is increased.\nDwarves: Enchant success rate is increased.\nKamael: P./ M. Accuracy, P./ M. Evasion is increased. -->
<!-- Humans: P./ M. Critical Damage is increased. Elves: P./ M. Atk. is increased. Dark Elves: Atk./ Casting Spd. is increased. Orc: P./ M. Critical Rate is increased. Dwarves: Enchant success rate is increased. Kamael: P./ M. Accuracy, P./ M. Evasion is increased. -->
<icon>icon.UI_race_ranking_1</icon>
<operateType>P</operateType>
</skill>