Addition of Hunt Pass system.
Contributed by Serenitty.
This commit is contained in:
parent
56d3de98d4
commit
14de2b4f05
13
L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/sql/game/huntpass.sql
vendored
Normal file
13
L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/sql/game/huntpass.sql
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
DROP TABLE IF EXISTS `huntpass`;
|
||||
CREATE TABLE IF NOT EXISTS `huntpass` (
|
||||
`account_name` VARCHAR(45) NOT NULL DEFAULT '',
|
||||
`current_step` INT NOT NULL DEFAULT 0,
|
||||
`points` INT NOT NULL DEFAULT 0,
|
||||
`reward_step` INT NOT NULL DEFAULT 0,
|
||||
`is_paytowin` BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
`premium_reward_step` INT NOT NULL DEFAULT 0,
|
||||
`sayha_points_available` INT NOT NULL DEFAULT 0,
|
||||
`sayha_points_used` INT NOT NULL DEFAULT 0,
|
||||
`unclaimed_reward` BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
PRIMARY KEY (`account_name`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
16
L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/config/HuntPass.ini
vendored
Normal file
16
L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/config/HuntPass.ini
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
# --------------------------------------------------------------------------
|
||||
# HuntPass Settings
|
||||
# --------------------------------------------------------------------------
|
||||
EnabledHuntPass = False
|
||||
|
||||
# Period to end.
|
||||
# Retail 1 month.
|
||||
DayOfMonth = 16
|
||||
|
||||
# Pass Premium Cost.
|
||||
# Retail is 3600 L-Coin.
|
||||
PremiumCost = 4000
|
||||
|
||||
# Please take caution when changing anything.
|
||||
# Required Points per Window or step.
|
||||
PointsForstep = 3000
|
311
L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/HuntPass.xml
vendored
Normal file
311
L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/HuntPass.xml
vendored
Normal file
@ -0,0 +1,311 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/HuntPass.xsd">
|
||||
<!-- Page 1 -->
|
||||
<item id="72286" count="200" premiumId="91757" premiumCount="2"/> <!-- Sayha Points / Magic Lamp Charging Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94732" premiumCount="4" /> <!-- Sayha Points / Agathion Coupon -->
|
||||
<!-- Page 2 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94210" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Weapon -->
|
||||
<!-- Page 3 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94212" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Armor -->
|
||||
<!-- Page 4 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="93122" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 shield Sigil -->
|
||||
<!-- Page 5 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93449" premiumCount="1" /> <!-- Sayha Points / A grade Armor Coupon -->
|
||||
<!-- Page 6 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="90479" premiumCount="1" /> <!-- Sayha Points / Shiny Jewerly box -->
|
||||
<!-- Page 7 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94424" premiumCount="1" /> <!-- Sayha Points / LifeStone accesories -->
|
||||
<!-- Page 8 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94732" premiumCount="4" /> <!-- Sayha Points / Agathion Coupon -->
|
||||
<!-- Page 9 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94210" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Weapon -->
|
||||
<!-- Page 10 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93449" premiumCount="1" /> <!-- Sayha Points / A grade Armor Coupon -->
|
||||
<!-- Page 11 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94212" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Armor -->
|
||||
<!-- Page 12 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="93122" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 shield Sigil -->
|
||||
<!-- Page 13 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="90479" premiumCount="4" /> <!-- Sayha Points / Shiny Jewerly box -->
|
||||
<!-- Page 14 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94424" premiumCount="1" /> <!-- Sayha Points / LifeStone accesories -->
|
||||
<!-- Page 15 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93449" premiumCount="1" /> <!-- Sayha Points / A grade Armor Coupon -->
|
||||
<!-- Page 16 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94732" premiumCount="4" /> <!-- Sayha Points / Agathion Coupon -->
|
||||
<!-- Page 17 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94210" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Weapon -->
|
||||
<!-- Page 18 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94212" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Armor -->
|
||||
<!-- Page 19 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="93122" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 shield Sigil -->
|
||||
<!-- Page 20 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93449" premiumCount="1" /> <!-- Sayha Points / A grade Armor Coupon -->
|
||||
<!-- Page 21 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="90479" premiumCount="4" /> <!-- Sayha Points / Shiny Jewerly box -->
|
||||
<!-- Page 22 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94424" premiumCount="1" /> <!-- Sayha Points / LifeStone accesories -->
|
||||
<!-- Page 23 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94732" premiumCount="4" /> <!-- Sayha Points / Agathion Coupon -->
|
||||
<!-- Page 24 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94210" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Weapon -->
|
||||
<!-- Page 25 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93448" premiumCount="1" /> <!-- Sayha Points / A grade Weapon Coupon -->
|
||||
<!-- Page 26 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94212" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Armor -->
|
||||
<!-- Page 27 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="93122" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 shield Sigil -->
|
||||
<!-- Page 28 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="1" premiumId="95716" premiumCount="1" /> <!-- Great Hunter Reward / +3 Cloack Of Protection -->
|
||||
</list>
|
@ -189,6 +189,7 @@ public class EffectMasterHandler
|
||||
EffectHandler.getInstance().registerHandler("HpLimit", HpLimit::new);
|
||||
EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new);
|
||||
EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new);
|
||||
EffectHandler.getInstance().registerHandler("HuntPassPoints", HuntPassPoints::new);
|
||||
EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new);
|
||||
EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new);
|
||||
EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new);
|
||||
|
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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 handlers.effecthandlers;
|
||||
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassPoints extends AbstractEffect
|
||||
{
|
||||
private final int _amount;
|
||||
|
||||
public HuntPassPoints(StatSet params)
|
||||
{
|
||||
_amount = params.getInt("amount");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstant()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void instant(Creature effector, Creature effected, Skill skill, Item item)
|
||||
{
|
||||
if (effected == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Player player = effected.getActingPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final HuntPass huntpass = player.getHuntPass();
|
||||
if (huntpass != null)
|
||||
{
|
||||
huntpass.addPassPoint(_amount);
|
||||
}
|
||||
}
|
||||
}
|
@ -312,6 +312,7 @@
|
||||
<set name="default_action" val="NONE" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="material" val="LIQUID" />
|
||||
<set name="is_stackable" val="true" />
|
||||
</item>
|
||||
<item id="72287" name="Game Assistant's Exchange" type="EtcItem">
|
||||
<set name="icon" val="BranchIcon.icon.g_pass_advance_type_multisell_00" />
|
||||
|
@ -160,6 +160,7 @@ Hp: Increases current HP by a static value.
|
||||
HpLimit: Increase a character's max hp limit (l2jmobius)
|
||||
HpRegen: HP Regeneration stat.
|
||||
HpToOwner: DOT effect that absorbs HP over time.
|
||||
HuntPassPoints: Modify HuntPass points. (l2jmobius)
|
||||
IgnoreDeath: Become undying. Hp cannot decrease below 1.
|
||||
ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius)
|
||||
ImmobileDamageResist: Resist damage while immobile. (l2jmobius)
|
||||
|
20
L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/xsd/HuntPass.xsd
vendored
Normal file
20
L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/xsd/HuntPass.xsd
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="list">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="item" maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute type="xs:int" name="id" use="required"/>
|
||||
<xs:attribute type="xs:int" name="count" use="required"/>
|
||||
<xs:attribute type="xs:int" name="premiumId" use="optional"/>
|
||||
<xs:attribute type="xs:int" name="premiumCount" use="optional"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@ -99,6 +99,7 @@ public class Config
|
||||
private static final String GENERAL_CONFIG_FILE = "./config/General.ini";
|
||||
private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini";
|
||||
private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini";
|
||||
private static final String HUNT_PASS_CONFIG_FILE = "./config/HuntPass.ini";
|
||||
private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini";
|
||||
private static final String NPC_CONFIG_FILE = "./config/NPC.ini";
|
||||
private static final String PVP_CONFIG_FILE = "./config/PVP.ini";
|
||||
@ -904,6 +905,12 @@ public class Config
|
||||
public static int RANDOM_CRAFT_CREATE_FEE;
|
||||
public static boolean DROP_RANDOM_CRAFT_MATERIALS;
|
||||
|
||||
// HuntPass
|
||||
public static boolean ENABLE_HUNT_PASS;
|
||||
public static int HUNT_PASS_PERIOD;
|
||||
public static int HUNT_PASS_PREMIUM_COST;
|
||||
public static int HUNT_PASS_POINTS_FOR_STEP;
|
||||
|
||||
// GrandBoss Settings
|
||||
|
||||
// Antharas
|
||||
@ -2501,6 +2508,13 @@ public class Config
|
||||
ZAKEN_SPAWN_INTERVAL = grandBossConfig.getInt("IntervalOfZakenSpawn", 168);
|
||||
ZAKEN_SPAWN_RANDOM = grandBossConfig.getInt("RandomOfZakenSpawn", 48);
|
||||
|
||||
// Load HuntPass (if exists)
|
||||
final PropertiesParser huntPassConfig = new PropertiesParser(HUNT_PASS_CONFIG_FILE);
|
||||
ENABLE_HUNT_PASS = huntPassConfig.getBoolean("EnabledHuntPass", true);
|
||||
HUNT_PASS_PREMIUM_COST = huntPassConfig.getInt("PremiumCost", 3600);
|
||||
HUNT_PASS_POINTS_FOR_STEP = huntPassConfig.getInt("PointsForstep", 2400);
|
||||
HUNT_PASS_PERIOD = huntPassConfig.getInt("DayOfMonth", 1);
|
||||
|
||||
// Gracia Seeds
|
||||
final PropertiesParser graciaSeedsConfig = new PropertiesParser(GRACIASEEDS_CONFIG_FILE);
|
||||
SOD_TIAT_KILL_COUNT = graciaSeedsConfig.getInt("TiatKillCountForNextState", 10);
|
||||
|
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.data.xml;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.IXmlReader;
|
||||
import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(HuntPassData.class.getName());
|
||||
private final List<ItemHolder> _rewards = new ArrayList<>();
|
||||
private final List<ItemHolder> _premiumRewards = new ArrayList<>();
|
||||
private int _rewardCount = 0;
|
||||
private final int _premiumRewardCount = 0;
|
||||
|
||||
protected HuntPassData()
|
||||
{
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
if (Config.ENABLE_HUNT_PASS)
|
||||
{
|
||||
_rewards.clear();
|
||||
parseDatapackFile("data/HuntPass.xml");
|
||||
_rewardCount = _rewards.size();
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _rewardCount + " HuntPass rewards.");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Disabled.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc, File f)
|
||||
{
|
||||
forEach(doc, "list", listNode -> forEach(listNode, "item", rewardNode ->
|
||||
{
|
||||
final StatSet set = new StatSet(parseAttributes(rewardNode));
|
||||
final int itemId = set.getInt("id");
|
||||
final int itemCount = set.getInt("count");
|
||||
final int premiumitemId = set.getInt("premiumId");
|
||||
final int premiumitemCount = set.getInt("premiumCount");
|
||||
if (ItemTable.getInstance().getTemplate(itemId) == null)
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Item with id " + itemId + " does not exist.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_rewards.add(new ItemHolder(itemId, itemCount));
|
||||
_premiumRewards.add(new ItemHolder(premiumitemId, premiumitemCount));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public List<ItemHolder> getRewards()
|
||||
{
|
||||
return _rewards;
|
||||
}
|
||||
|
||||
public int getRewardsCount()
|
||||
{
|
||||
return _rewardCount;
|
||||
}
|
||||
|
||||
public List<ItemHolder> getPremiumRewards()
|
||||
{
|
||||
return _premiumRewards;
|
||||
}
|
||||
|
||||
public int getPremiumRewardsCount()
|
||||
{
|
||||
return _premiumRewardCount;
|
||||
}
|
||||
|
||||
public static HuntPassData getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final HuntPassData INSTANCE = new HuntPassData();
|
||||
}
|
||||
}
|
@ -0,0 +1,334 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.model;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Calendar;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.threads.ThreadPool;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSimpleInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPass
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(HuntPass.class.getName());
|
||||
private static final String INSERT_SEASONPASS = "REPLACE INTO huntpass (`account_name`, `current_step`, `points`, `reward_step`, `is_paytowin`, `premium_reward_step`, `sayha_points_available`, `sayha_points_used`, `unclaimed_reward`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
private static final String RESTORE_SEASONPASS = "SELECT * FROM huntpass WHERE account_name=?";
|
||||
|
||||
private final Player _user;
|
||||
private int _availableSayhaTime;
|
||||
private int _points;
|
||||
private boolean _isPremium = false;
|
||||
private boolean _rewardAlert = false;
|
||||
|
||||
private int _rewardStep;
|
||||
private int _currentStep;
|
||||
private int _premiumRewardStep;
|
||||
|
||||
private boolean _toggleSayha = false;
|
||||
private ScheduledFuture<?> _sayhasSustentionTask = null;
|
||||
private int _toggleStartTime = 0;
|
||||
private int _usedSayhaTime;
|
||||
|
||||
private static int _dayEnd = 0;
|
||||
|
||||
public HuntPass(Player user)
|
||||
{
|
||||
_user = user;
|
||||
restoreHuntPass();
|
||||
huntPassDayEnd();
|
||||
store();
|
||||
}
|
||||
|
||||
public void restoreHuntPass()
|
||||
{
|
||||
final Calendar calendar = Calendar.getInstance();
|
||||
if ((calendar.get(Calendar.DAY_OF_MONTH) == Config.HUNT_PASS_PERIOD) && (calendar.get(Calendar.HOUR_OF_DAY) == 6) && (calendar.get(Calendar.MINUTE) == 30))
|
||||
{
|
||||
deleteHuntPass();
|
||||
}
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(RESTORE_SEASONPASS))
|
||||
{
|
||||
statement.setString(1, getAccountName());
|
||||
try (ResultSet rset = statement.executeQuery())
|
||||
{
|
||||
if (rset.next())
|
||||
{
|
||||
setPoints(rset.getInt("points"));
|
||||
setCurrentStep(rset.getInt("current_step"));
|
||||
setRewardStep(rset.getInt("reward_step"));
|
||||
setPremium(rset.getBoolean("is_paytowin"));
|
||||
setPremiumRewardStep(rset.getInt("premium_reward_step"));
|
||||
setAvailableSayhaTime(rset.getInt("sayha_points_available"));
|
||||
setUsedSayhaTime(rset.getInt("sayha_points_used"));
|
||||
setRewardAlert(rset.getBoolean("unclaimed_reward"));
|
||||
}
|
||||
rset.close();
|
||||
statement.close();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, "Could not restore Season Pass for playerId: " + _user.getAccountName());
|
||||
}
|
||||
}
|
||||
|
||||
public String getAccountName()
|
||||
{
|
||||
return _user.getAccountName();
|
||||
}
|
||||
|
||||
public void store()
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(INSERT_SEASONPASS))
|
||||
{
|
||||
statement.setString(1, getAccountName());
|
||||
statement.setInt(2, getCurrentStep());
|
||||
statement.setInt(3, getPoints());
|
||||
statement.setInt(4, getRewardStep());
|
||||
statement.setBoolean(5, isPremium());
|
||||
statement.setInt(6, getPremiumRewardStep());
|
||||
statement.setInt(7, getAvailableSayhaTime());
|
||||
statement.setInt(8, getUsedSayhaTime());
|
||||
statement.setBoolean(9, rewardAlert());
|
||||
statement.execute();
|
||||
statement.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, "Could not store Season-Pass data for Account " + _user.getAccountName() + ": ", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteHuntPass()
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
PreparedStatement statement = con.prepareStatement("UPDATE huntpass SET current_step = ?, reward_step = ?, premium_reward_step = ?, sayha_points_available = ?, sayha_points_used = ? ");
|
||||
statement.execute();
|
||||
statement.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "HuntPass : Can't clear steps: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
public int getHuntPassDayEnd()
|
||||
{
|
||||
return _dayEnd;
|
||||
}
|
||||
|
||||
public void huntPassDayEnd()
|
||||
{
|
||||
final Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
calendar.set(Calendar.DAY_OF_MONTH, Config.HUNT_PASS_PERIOD);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 6);
|
||||
calendar.set(Calendar.MINUTE, 30);
|
||||
if (calendar.getTimeInMillis() < System.currentTimeMillis())
|
||||
{
|
||||
calendar.add(Calendar.MONTH, 1);
|
||||
}
|
||||
|
||||
_dayEnd = (int) (calendar.getTimeInMillis() / 1000);
|
||||
}
|
||||
|
||||
public boolean toggleSayha()
|
||||
{
|
||||
return _toggleSayha;
|
||||
}
|
||||
|
||||
public int getPoints()
|
||||
{
|
||||
return _points;
|
||||
}
|
||||
|
||||
public void addPassPoint(double point) // TODO: point is unused.
|
||||
{
|
||||
if (Config.ENABLE_HUNT_PASS)
|
||||
{
|
||||
final int seasonPasspoint = 1;
|
||||
int calculate = seasonPasspoint + getPoints();
|
||||
if ((getPoints() == Config.HUNT_PASS_POINTS_FOR_STEP))
|
||||
{
|
||||
calculate %= Config.HUNT_PASS_POINTS_FOR_STEP;
|
||||
setCurrentStep(getCurrentStep() + 1);
|
||||
setRewardAlert(true);
|
||||
_user.sendPacket(new HuntPassSimpleInfo(_user));
|
||||
}
|
||||
setPoints(calculate);
|
||||
inTimeHuntingZone(calculate);
|
||||
}
|
||||
}
|
||||
|
||||
public void inTimeHuntingZone(int points) // TODO: points is unused.
|
||||
{
|
||||
final boolean Inhuntingzone = _user.isInTimedHuntingZone(_user.getX(), _user.getY());
|
||||
if (Inhuntingzone)
|
||||
{
|
||||
_points += 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
public void setPoints(int points)
|
||||
{
|
||||
_points = points;
|
||||
}
|
||||
|
||||
public int getCurrentStep()
|
||||
{
|
||||
return _currentStep;
|
||||
}
|
||||
|
||||
public void setCurrentStep(int step)
|
||||
{
|
||||
_currentStep = step;
|
||||
}
|
||||
|
||||
public int getRewardStep()
|
||||
{
|
||||
return _rewardStep;
|
||||
}
|
||||
|
||||
public void setRewardStep(int step)
|
||||
{
|
||||
if (_isPremium && (_premiumRewardStep <= _rewardStep))
|
||||
{
|
||||
_rewardStep += 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_rewardStep = step;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isPremium()
|
||||
{
|
||||
return _isPremium;
|
||||
}
|
||||
|
||||
public void setPremium(boolean premium)
|
||||
{
|
||||
_isPremium = premium;
|
||||
}
|
||||
|
||||
public int getPremiumRewardStep()
|
||||
{
|
||||
return _premiumRewardStep;
|
||||
}
|
||||
|
||||
public void setPremiumRewardStep(int step)
|
||||
{
|
||||
_premiumRewardStep = step;
|
||||
}
|
||||
|
||||
public boolean rewardAlert()
|
||||
{
|
||||
return _rewardAlert;
|
||||
}
|
||||
|
||||
public void setRewardAlert(boolean enable)
|
||||
{
|
||||
_rewardAlert = enable;
|
||||
}
|
||||
|
||||
public int getAvailableSayhaTime()
|
||||
{
|
||||
return _availableSayhaTime;
|
||||
}
|
||||
|
||||
public void setAvailableSayhaTime(int time)
|
||||
{
|
||||
_availableSayhaTime = time;
|
||||
}
|
||||
|
||||
public void addSayhaTime(int time)
|
||||
{
|
||||
// microsec to sec to database. 1 hour 3600 sec
|
||||
_availableSayhaTime += time * 60;
|
||||
}
|
||||
|
||||
public int getUsedSayhaTime()
|
||||
{
|
||||
return _usedSayhaTime;
|
||||
}
|
||||
|
||||
private void onSayhaEndTime()
|
||||
{
|
||||
setSayhasSustention(false);
|
||||
}
|
||||
|
||||
public void setUsedSayhaTime(int time)
|
||||
{
|
||||
_usedSayhaTime = time;
|
||||
}
|
||||
|
||||
public void addSayhasSustentionTimeUsed(int time)
|
||||
{
|
||||
_usedSayhaTime += time;
|
||||
}
|
||||
|
||||
public int getToggleStartTime()
|
||||
{
|
||||
return _toggleStartTime;
|
||||
}
|
||||
|
||||
public void setSayhasSustention(boolean active)
|
||||
{
|
||||
_toggleSayha = active;
|
||||
if (active)
|
||||
{
|
||||
_toggleStartTime = (int) (System.currentTimeMillis() / 1000);
|
||||
if (_sayhasSustentionTask != null)
|
||||
{
|
||||
_sayhasSustentionTask.cancel(true);
|
||||
_sayhasSustentionTask = null;
|
||||
}
|
||||
_user.sendPacket(new SystemMessage(SystemMessageId.SAYHA_S_GRACE_SUSTENTION_EFFECT_OF_THE_SEASON_PASS_IS_ACTIVATED_AVAILABLE_SAYHA_S_GRACE_SUSTENTION_TIME_IS_RUNNING));
|
||||
_sayhasSustentionTask = ThreadPool.schedule(this::onSayhaEndTime, Math.max(0, getAvailableSayhaTime() - getUsedSayhaTime()) * 1000L);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_sayhasSustentionTask != null)
|
||||
{
|
||||
addSayhasSustentionTimeUsed((int) ((System.currentTimeMillis() / 1000) - _toggleStartTime));
|
||||
_toggleStartTime = 0;
|
||||
_sayhasSustentionTask.cancel(true);
|
||||
_sayhasSustentionTask = null;
|
||||
_user.sendPacket(new SystemMessage(SystemMessageId.SAYHA_S_GRACE_SUSTENTION_EFFECT_OF_THE_SEASON_PASS_IS_SWITCHED_OFF_AVAILABLE_SAYHA_S_GRACE_SUSTENTION_TIME_IS_NOT_RUNNING));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -878,7 +878,9 @@ public class Party extends AbstractPlayerGroup
|
||||
if (clan != null)
|
||||
{
|
||||
double finalExp = exp;
|
||||
|
||||
if (target.useVitalityRate())
|
||||
|
||||
{
|
||||
finalExp *= member.getStat().getExpBonusMultiplier();
|
||||
}
|
||||
@ -887,6 +889,12 @@ public class Party extends AbstractPlayerGroup
|
||||
member.updateVitalityPoints(target.getVitalityPoints(member.getLevel(), exp, target.isRaid()), true, false);
|
||||
PcCafePointsManager.getInstance().givePcCafePoint(member, exp);
|
||||
MagicLampData.getInstance().addLampExp(member, exp, true);
|
||||
|
||||
final HuntPass huntpass = member.getHuntPass();
|
||||
if (huntpass != null)
|
||||
{
|
||||
huntpass.addPassPoint(exp);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.model.AggroInfo;
|
||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||
import org.l2jmobius.gameserver.model.DamageDoneInfo;
|
||||
import org.l2jmobius.gameserver.model.ElementalSpirit;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.Seed;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -613,6 +614,12 @@ public class Attackable extends Npc
|
||||
}
|
||||
PcCafePointsManager.getInstance().givePcCafePoint(attacker, exp);
|
||||
MagicLampData.getInstance().addLampExp(attacker, exp, true);
|
||||
|
||||
final HuntPass huntPass = attacker.getHuntPass();
|
||||
if (huntPass != null)
|
||||
{
|
||||
attacker.getHuntPass().addPassPoint(exp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,6 +148,7 @@ import org.l2jmobius.gameserver.model.CommandChannel;
|
||||
import org.l2jmobius.gameserver.model.ContactList;
|
||||
import org.l2jmobius.gameserver.model.Duel;
|
||||
import org.l2jmobius.gameserver.model.ElementalSpirit;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Macro;
|
||||
import org.l2jmobius.gameserver.model.MacroList;
|
||||
@ -944,6 +945,8 @@ public class Player extends Playable
|
||||
|
||||
private final Map<Integer, PurgePlayerHolder> _purgePoints = new HashMap<>();
|
||||
|
||||
private final HuntPass _huntPass;
|
||||
|
||||
private final Map<Integer, PetEvolveHolder> _petEvolves = new HashMap<>();
|
||||
|
||||
private int _clanDonationPoints = 3;
|
||||
@ -1226,6 +1229,8 @@ public class Player extends Playable
|
||||
app.setOwner(this);
|
||||
_appearance = app;
|
||||
|
||||
_huntPass = Config.ENABLE_HUNT_PASS ? new HuntPass(this) : null;
|
||||
|
||||
// Create an AI
|
||||
getAI();
|
||||
|
||||
@ -1316,6 +1321,11 @@ public class Player extends Playable
|
||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass);
|
||||
}
|
||||
|
||||
public HuntPass getHuntPass()
|
||||
{
|
||||
return _huntPass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the PlayerTemplate link to the Player.
|
||||
*/
|
||||
@ -7268,6 +7278,11 @@ public class Player extends Playable
|
||||
{
|
||||
_randomCraft.store();
|
||||
}
|
||||
|
||||
if (_huntPass != null)
|
||||
{
|
||||
_huntPass.store();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -12031,6 +12046,10 @@ public class Player extends Playable
|
||||
|
||||
public void updateVitalityPoints(int points, boolean useRates, boolean quiet)
|
||||
{
|
||||
if ((_huntPass != null) && _huntPass.toggleSayha())
|
||||
{
|
||||
return;
|
||||
}
|
||||
getStat().updateVitalityPoints(points, useRates, quiet);
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,11 @@ import org.l2jmobius.gameserver.network.clientpackets.equipmentupgrade.RequestUp
|
||||
import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntingzones.ExTimedHuntingZoneEnter;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntingzones.ExTimedHuntingZoneList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.HuntpassSayhasToggle;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.RequestHuntPassBuyPremium;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.RequestHuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.RequestHuntPassReward;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.RequestHuntPassRewardAll;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.limitshop.RequestPurchaseLimitShopItemBuy;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.limitshop.RequestPurchaseLimitShopItemList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGamePlay;
|
||||
@ -723,11 +728,11 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
EX_ITEM_USABLE_LIST(0x21F, null, ConnectionState.IN_GAME),
|
||||
EX_PACKETREADCOUNTPERSECOND(0x220, null, ConnectionState.IN_GAME),
|
||||
EX_SELECT_GLOBAL_EVENT_UI(0x221, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_INFO(0x222, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_REQUEST_REWARD(0x2231, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_REQUEST_REWARD_ALL(0x224, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_BUY_PREMIUM(0x225, null, ConnectionState.IN_GAME),
|
||||
EX_SAYHAS_SUPPORT_TOGGLE(0x226, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_INFO(0x222, RequestHuntPassInfo::new, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_REQUEST_REWARD(0x223, RequestHuntPassReward::new, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_REQUEST_REWARD_ALL(0x224, RequestHuntPassRewardAll::new, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_BUY_PREMIUM(0x225, RequestHuntPassBuyPremium::new, ConnectionState.IN_GAME),
|
||||
EX_SAYHAS_SUPPORT_TOGGLE(0x226, HuntpassSayhasToggle::new, ConnectionState.IN_GAME),
|
||||
EX_MAX(0x227, null, ConnectionState.IN_GAME);
|
||||
|
||||
public static final ExIncomingPackets[] PACKET_ARRAY;
|
||||
|
@ -117,6 +117,7 @@ import org.l2jmobius.gameserver.network.serverpackets.collection.ExCollectionInf
|
||||
import org.l2jmobius.gameserver.network.serverpackets.dailymission.ExConnectedTimeAndGettableReward;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.dailymission.ExOneDayReceiveRewardList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.friend.L2FriendList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSimpleInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExBloodyCoinCount;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.magiclamp.ExMagicLampExpInfoUI;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.pledgedonation.ExPledgeContributionList;
|
||||
@ -668,6 +669,11 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
player.sendPacket(new ExCraftInfo(player));
|
||||
}
|
||||
|
||||
if (Config.ENABLE_HUNT_PASS)
|
||||
{
|
||||
player.sendPacket(new HuntPassSimpleInfo(player));
|
||||
}
|
||||
|
||||
for (int category = 1; category <= 7; category++)
|
||||
{
|
||||
player.sendPacket(new ExCollectionInfo(player, category));
|
||||
|
@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
|
||||
public class HuntpassSayhasToggle implements IClientIncomingPacket
|
||||
{
|
||||
private boolean _sayhaToggle;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_sayhaToggle = packet.readC() != 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final HuntPass huntPass = player.getHuntPass();
|
||||
if (huntPass == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int timeEarned = huntPass.getAvailableSayhaTime();
|
||||
int timeUsed = huntPass.getUsedSayhaTime();
|
||||
if (player.getVitalityPoints() < 35000)
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.THE_CONDITIONS_ARE_NOT_MET_ACTIVATION_IS_IMPOSSIBLE_SAYHA_S_GRACE_SUSTENTION_EFFECT_OF_THE_SEASON_PASS_IS_AVAILABLE_ONLY_IF_YOU_HAVE_MORE_THAN_35_000_SAYHA_S_GRACE_POINTS));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_sayhaToggle && (timeEarned > 0) && (timeEarned > timeUsed))
|
||||
{
|
||||
huntPass.setSayhasSustention(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
huntPass.setSayhasSustention(false);
|
||||
}
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class RequestHuntPassBuyPremium implements IClientIncomingPacket
|
||||
{
|
||||
private int _huntPassType;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_huntPassType = packet.readC();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Calendar calendar = Calendar.getInstance();
|
||||
if ((calendar.get(Calendar.DAY_OF_MONTH) == Config.HUNT_PASS_PERIOD) && (calendar.get(Calendar.HOUR_OF_DAY) == 6) && (calendar.get(Calendar.MINUTE) < 30))
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.THIS_SERVICE_CANNOT_BE_PURCHASED_AT_THE_MOMENT_SEASON_PASS_PREMIUM_SERVICES_IS_AVAILABLE_FOR_PURCHASE_BEFORE_6_30_A_M_ON_THE_BEFORE_THE_SEASON_END));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!player.destroyItemByItemId("L-Coin", 91663, Config.HUNT_PASS_PREMIUM_COST, player, true))
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_MONEY_TO_USE_THE_FUNCTION));
|
||||
return;
|
||||
}
|
||||
|
||||
player.getHuntPass().setPremium(true);
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
player.sendPacket(new HuntPassInfo(player, _huntPassType));
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class RequestHuntPassInfo implements IClientIncomingPacket
|
||||
{
|
||||
private int _passType;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_passType = packet.readC();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new HuntPassInfo(player, _passType));
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.data.xml.HuntPassData;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSimpleInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class RequestHuntPassReward implements IClientIncomingPacket
|
||||
{
|
||||
private int _huntPassType;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_huntPassType = packet.readC();
|
||||
packet.readC(); // is Premium?
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final HuntPass huntPass = player.getHuntPass();
|
||||
final int normalReward = huntPass.getRewardStep();
|
||||
final ItemHolder reward = HuntPassData.getInstance().getRewards().get(normalReward);
|
||||
final ItemTemplate itemTemplate = ItemTable.getInstance().getTemplate(reward.getId());
|
||||
|
||||
final long weight = itemTemplate.getWeight() * reward.getCount();
|
||||
final long slots = itemTemplate.isStackable() ? 1 : reward.getCount();
|
||||
if (!player.getInventory().validateWeight(weight) || !player.getInventory().validateCapacity(slots))
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.YOUR_INVENTORY_S_WEIGHT_LIMIT_HAS_BEEN_EXCEEDED_SO_YOU_CAN_T_RECEIVE_THE_REWARD_PLEASE_FREE_UP_SOME_SPACE_AND_TRY_AGAIN));
|
||||
return;
|
||||
}
|
||||
|
||||
updateSayhaTime(player);
|
||||
premiumReward(player);
|
||||
huntPass.setRewardStep(normalReward + 1);
|
||||
huntPass.setRewardAlert(false);
|
||||
player.sendPacket(new HuntPassInfo(player, _huntPassType));
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
player.sendPacket(new HuntPassSimpleInfo(player));
|
||||
}
|
||||
|
||||
private void updateSayhaTime(Player player)
|
||||
{
|
||||
final HuntPass huntpass = player.getHuntPass();
|
||||
final int normalreward = huntpass.getRewardStep();
|
||||
final int premiumreward = huntpass.getPremiumRewardStep();
|
||||
final ItemHolder reward = HuntPassData.getInstance().getRewards().get(normalreward);
|
||||
|
||||
final int sayhaPoints = 0; // TODO: 0?
|
||||
final long count = reward.getCount();
|
||||
final int calc = (int) (sayhaPoints + count);
|
||||
final boolean isPremium = huntpass.isPremium();
|
||||
if (isPremium && (premiumreward < normalreward))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
huntpass.addSayhaTime(calc);
|
||||
player.addItem("HuntPassReward", reward, player, true);
|
||||
final SystemMessage msg = new SystemMessage(SystemMessageId.SAYHA_S_GRACE_SUSTENTION_POINTS_RECEIVED_S1);
|
||||
msg.addInt((int) (count));
|
||||
player.sendPacket(msg);
|
||||
}
|
||||
|
||||
private void premiumReward(Player player)
|
||||
{
|
||||
final HuntPass huntPass = player.getHuntPass();
|
||||
final int rewardStep = huntPass.getPremiumRewardStep();
|
||||
final ItemHolder premiumReward = HuntPassData.getInstance().getPremiumRewards().get(rewardStep);
|
||||
final boolean isPremium = huntPass.isPremium();
|
||||
if (isPremium)
|
||||
{
|
||||
player.addItem("SeasonPassReward", premiumReward, player, true);
|
||||
huntPass.setPremiumRewardStep(rewardStep + 1);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSimpleInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class RequestHuntPassRewardAll implements IClientIncomingPacket
|
||||
{
|
||||
private int _huntPassType;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_huntPassType = packet.readC();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new HuntPassInfo(player, _huntPassType));
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
player.sendPacket(new HuntPassSimpleInfo(player));
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.serverpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _interfaceType;
|
||||
private final HuntPass _huntPass;
|
||||
private final int _timeEnd;
|
||||
private final int _isPremium;
|
||||
private final int _points;
|
||||
private final int _step;
|
||||
private final int _rewardStep;
|
||||
private final int _premiumRewardStep;
|
||||
|
||||
public HuntPassInfo(Player player, int interfaceType)
|
||||
{
|
||||
|
||||
_interfaceType = interfaceType;
|
||||
_huntPass = player.getHuntPass();
|
||||
_timeEnd = _huntPass.getHuntPassDayEnd();
|
||||
_isPremium = _huntPass.isPremium() ? 1 : 0;
|
||||
_points = _huntPass.getPoints();
|
||||
_step = _huntPass.getCurrentStep();
|
||||
_rewardStep = _huntPass.getRewardStep();
|
||||
_premiumRewardStep = _huntPass.getPremiumRewardStep();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_L2PASS_INFO.writeId(packet);
|
||||
packet.writeC(_interfaceType);
|
||||
packet.writeD(_timeEnd); // LeftTime
|
||||
packet.writeC(_isPremium); // Premium
|
||||
packet.writeD(_points); // Points
|
||||
packet.writeD(_step); // CurrentStep
|
||||
packet.writeD(_rewardStep); // Reward
|
||||
packet.writeD(_premiumRewardStep); // PremiumReward
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.serverpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassSayhasSupportInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final HuntPass _huntPass;
|
||||
private final int _timeUsed;
|
||||
private final boolean _sayhaToggle;
|
||||
|
||||
public HuntPassSayhasSupportInfo(Player player)
|
||||
{
|
||||
_huntPass = player.getHuntPass();
|
||||
_sayhaToggle = _huntPass.toggleSayha();
|
||||
_timeUsed = _huntPass.getUsedSayhaTime() + (int) (_huntPass.getToggleStartTime() > 0 ? (System.currentTimeMillis() / 1000) - _huntPass.getToggleStartTime() : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SAYHAS_SUPPORT_INFO.writeId(packet);
|
||||
packet.writeC(_sayhaToggle ? 1 : 0);
|
||||
packet.writeD(_huntPass.getAvailableSayhaTime());
|
||||
packet.writeD(_timeUsed);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.serverpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassSimpleInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final HuntPass _huntPassInfo;
|
||||
|
||||
public HuntPassSimpleInfo(Player player)
|
||||
{
|
||||
_huntPassInfo = player.getHuntPass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_L2PASS_SIMPLE_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(1); // passInfos
|
||||
packet.writeC(0);
|
||||
packet.writeC(1); // isOn
|
||||
|
||||
packet.writeC(_huntPassInfo.rewardAlert() ? 1 : 0);
|
||||
packet.writeD(0);
|
||||
return true;
|
||||
}
|
||||
}
|
13
L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/sql/game/huntpass.sql
vendored
Normal file
13
L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/sql/game/huntpass.sql
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
DROP TABLE IF EXISTS `huntpass`;
|
||||
CREATE TABLE IF NOT EXISTS `huntpass` (
|
||||
`account_name` VARCHAR(45) NOT NULL DEFAULT '',
|
||||
`current_step` INT NOT NULL DEFAULT 0,
|
||||
`points` INT NOT NULL DEFAULT 0,
|
||||
`reward_step` INT NOT NULL DEFAULT 0,
|
||||
`is_paytowin` BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
`premium_reward_step` INT NOT NULL DEFAULT 0,
|
||||
`sayha_points_available` INT NOT NULL DEFAULT 0,
|
||||
`sayha_points_used` INT NOT NULL DEFAULT 0,
|
||||
`unclaimed_reward` BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
PRIMARY KEY (`account_name`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
16
L2J_Mobius_Essence_6.2_Vanguard/dist/game/config/HuntPass.ini
vendored
Normal file
16
L2J_Mobius_Essence_6.2_Vanguard/dist/game/config/HuntPass.ini
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
# --------------------------------------------------------------------------
|
||||
# HuntPass Settings
|
||||
# --------------------------------------------------------------------------
|
||||
EnabledHuntPass = False
|
||||
|
||||
# Period to end.
|
||||
# Retail 1 month.
|
||||
DayOfMonth = 16
|
||||
|
||||
# Pass Premium Cost.
|
||||
# Retail is 3600 L-Coin.
|
||||
PremiumCost = 3600
|
||||
|
||||
# Please take caution when changing anything.
|
||||
# Required Points per Window or step.
|
||||
PointsForstep = 2400
|
311
L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/HuntPass.xml
vendored
Normal file
311
L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/HuntPass.xml
vendored
Normal file
@ -0,0 +1,311 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/HuntPass.xsd">
|
||||
<!-- Page 1 -->
|
||||
<item id="72286" count="200" premiumId="91757" premiumCount="2"/> <!-- Sayha Points / Magic Lamp Charging Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94732" premiumCount="4" /> <!-- Sayha Points / Agathion Coupon -->
|
||||
<!-- Page 2 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94210" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Weapon -->
|
||||
<!-- Page 3 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94212" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Armor -->
|
||||
<!-- Page 4 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="93122" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 shield Sigil -->
|
||||
<!-- Page 5 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93449" premiumCount="1" /> <!-- Sayha Points / A grade Armor Coupon -->
|
||||
<!-- Page 6 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="90479" premiumCount="1" /> <!-- Sayha Points / Shiny Jewerly box -->
|
||||
<!-- Page 7 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94424" premiumCount="1" /> <!-- Sayha Points / LifeStone accesories -->
|
||||
<!-- Page 8 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94732" premiumCount="4" /> <!-- Sayha Points / Agathion Coupon -->
|
||||
<!-- Page 9 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94210" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Weapon -->
|
||||
<!-- Page 10 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93449" premiumCount="1" /> <!-- Sayha Points / A grade Armor Coupon -->
|
||||
<!-- Page 11 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94212" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Armor -->
|
||||
<!-- Page 12 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="93122" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 shield Sigil -->
|
||||
<!-- Page 13 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="90479" premiumCount="4" /> <!-- Sayha Points / Shiny Jewerly box -->
|
||||
<!-- Page 14 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94424" premiumCount="1" /> <!-- Sayha Points / LifeStone accesories -->
|
||||
<!-- Page 15 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93449" premiumCount="1" /> <!-- Sayha Points / A grade Armor Coupon -->
|
||||
<!-- Page 16 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94732" premiumCount="4" /> <!-- Sayha Points / Agathion Coupon -->
|
||||
<!-- Page 17 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94210" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Weapon -->
|
||||
<!-- Page 18 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94212" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Armor -->
|
||||
<!-- Page 19 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="93122" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 shield Sigil -->
|
||||
<!-- Page 20 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93449" premiumCount="1" /> <!-- Sayha Points / A grade Armor Coupon -->
|
||||
<!-- Page 21 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="90479" premiumCount="4" /> <!-- Sayha Points / Shiny Jewerly box -->
|
||||
<!-- Page 22 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94424" premiumCount="1" /> <!-- Sayha Points / LifeStone accesories -->
|
||||
<!-- Page 23 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94732" premiumCount="4" /> <!-- Sayha Points / Agathion Coupon -->
|
||||
<!-- Page 24 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94210" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Weapon -->
|
||||
<!-- Page 25 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="110" premiumId="93448" premiumCount="1" /> <!-- Sayha Points / A grade Weapon Coupon -->
|
||||
<!-- Page 26 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="94212" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 Armor -->
|
||||
<!-- Page 27 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="60" premiumId="93122" premiumCount="1" /> <!-- Sayha Points / LifeStone lvl 2 shield Sigil -->
|
||||
<!-- Page 28 -->
|
||||
<item id="72286" count="30" premiumId="91641" premiumCount="2" /> <!-- Sayha Points / Sayha Potion -->
|
||||
<item id="72286" count="30" premiumId="49674" premiumCount="2" /> <!-- Sayha Points / XP Scroll -->
|
||||
<item id="72286" count="30" premiumId="94269" premiumCount="2" /> <!-- Sayha Points / Boost Attack Scroll -->
|
||||
<item id="72286" count="30" premiumId="96729" premiumCount="1" /> <!-- Sayha Points / Einhasad protection -->
|
||||
<item id="72286" count="30" premiumId="90907" premiumCount="20" /> <!-- Sayha Points / Soulshot Ticket -->
|
||||
<item id="72286" count="30" premiumId="94271" premiumCount="2" /> <!-- Sayha Points / Boost Defense -->
|
||||
<item id="72286" count="30" premiumId="3031" premiumCount="2500" /> <!-- Sayha Points / Spirit Ore -->
|
||||
<item id="72286" count="30" premiumId="91690" premiumCount="7" /> <!-- Sayha Points / Special Hp Recovery Potion -->
|
||||
<item id="72286" count="30" premiumId="91076" premiumCount="2" /> <!-- Sayha Points / Venir Talisman -->
|
||||
<item id="72286" count="1" premiumId="95716" premiumCount="1" /> <!-- Great Hunter Reward / +3 Cloack Of Protection -->
|
||||
</list>
|
@ -191,6 +191,7 @@ public class EffectMasterHandler
|
||||
EffectHandler.getInstance().registerHandler("HpLimit", HpLimit::new);
|
||||
EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new);
|
||||
EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new);
|
||||
EffectHandler.getInstance().registerHandler("HuntPassPoints", HuntPassPoints::new);
|
||||
EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new);
|
||||
EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new);
|
||||
EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new);
|
||||
|
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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 handlers.effecthandlers;
|
||||
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassPoints extends AbstractEffect
|
||||
{
|
||||
private final int _amount;
|
||||
|
||||
public HuntPassPoints(StatSet params)
|
||||
{
|
||||
_amount = params.getInt("amount");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstant()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void instant(Creature effector, Creature effected, Skill skill, Item item)
|
||||
{
|
||||
if (effected == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Player player = effected.getActingPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final HuntPass huntpass = player.getHuntPass();
|
||||
if (huntpass != null)
|
||||
{
|
||||
huntpass.addPassPoint(_amount);
|
||||
}
|
||||
}
|
||||
}
|
@ -312,6 +312,7 @@
|
||||
<set name="default_action" val="NONE" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="material" val="LIQUID" />
|
||||
<set name="is_stackable" val="true" />
|
||||
</item>
|
||||
<item id="72287" name="Game Assistant's Exchange" type="EtcItem">
|
||||
<set name="icon" val="BranchIcon.icon.g_pass_advance_type_multisell_00" />
|
||||
|
@ -162,6 +162,7 @@ Hp: Increases current HP by a static value.
|
||||
HpLimit: Increase a character's max hp limit (l2jmobius)
|
||||
HpRegen: HP Regeneration stat.
|
||||
HpToOwner: DOT effect that absorbs HP over time.
|
||||
HuntPassPoints: Modify HuntPass points. (l2jmobius)
|
||||
IgnoreDeath: Become undying. Hp cannot decrease below 1.
|
||||
ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius)
|
||||
ImmobileDamageResist: Resist damage while immobile. (l2jmobius)
|
||||
|
20
L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/xsd/HuntPass.xsd
vendored
Normal file
20
L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/xsd/HuntPass.xsd
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="list">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="item" maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute type="xs:int" name="id" use="required"/>
|
||||
<xs:attribute type="xs:int" name="count" use="required"/>
|
||||
<xs:attribute type="xs:int" name="premiumId" use="optional"/>
|
||||
<xs:attribute type="xs:int" name="premiumCount" use="optional"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@ -99,6 +99,7 @@ public class Config
|
||||
private static final String GENERAL_CONFIG_FILE = "./config/General.ini";
|
||||
private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini";
|
||||
private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini";
|
||||
private static final String HUNT_PASS_CONFIG_FILE = "./config/HuntPass.ini";
|
||||
private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini";
|
||||
private static final String NPC_CONFIG_FILE = "./config/NPC.ini";
|
||||
private static final String PVP_CONFIG_FILE = "./config/PVP.ini";
|
||||
@ -904,6 +905,12 @@ public class Config
|
||||
public static int RANDOM_CRAFT_CREATE_FEE;
|
||||
public static boolean DROP_RANDOM_CRAFT_MATERIALS;
|
||||
|
||||
// HuntPass
|
||||
public static boolean ENABLE_HUNT_PASS;
|
||||
public static int HUNT_PASS_PERIOD;
|
||||
public static int HUNT_PASS_PREMIUM_COST;
|
||||
public static int HUNT_PASS_POINTS_FOR_STEP;
|
||||
|
||||
// GrandBoss Settings
|
||||
|
||||
// Antharas
|
||||
@ -2501,6 +2508,13 @@ public class Config
|
||||
ZAKEN_SPAWN_INTERVAL = grandBossConfig.getInt("IntervalOfZakenSpawn", 168);
|
||||
ZAKEN_SPAWN_RANDOM = grandBossConfig.getInt("RandomOfZakenSpawn", 48);
|
||||
|
||||
// Load HuntPass (if exists)
|
||||
final PropertiesParser huntPassConfig = new PropertiesParser(HUNT_PASS_CONFIG_FILE);
|
||||
ENABLE_HUNT_PASS = huntPassConfig.getBoolean("EnabledHuntPass", true);
|
||||
HUNT_PASS_PREMIUM_COST = huntPassConfig.getInt("PremiumCost", 3600);
|
||||
HUNT_PASS_POINTS_FOR_STEP = huntPassConfig.getInt("PointsForstep", 2400);
|
||||
HUNT_PASS_PERIOD = huntPassConfig.getInt("DayOfMonth", 1);
|
||||
|
||||
// Gracia Seeds
|
||||
final PropertiesParser graciaSeedsConfig = new PropertiesParser(GRACIASEEDS_CONFIG_FILE);
|
||||
SOD_TIAT_KILL_COUNT = graciaSeedsConfig.getInt("TiatKillCountForNextState", 10);
|
||||
|
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.data.xml;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.IXmlReader;
|
||||
import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(HuntPassData.class.getName());
|
||||
private final List<ItemHolder> _rewards = new ArrayList<>();
|
||||
private final List<ItemHolder> _premiumRewards = new ArrayList<>();
|
||||
private int _rewardCount = 0;
|
||||
private final int _premiumRewardCount = 0;
|
||||
|
||||
protected HuntPassData()
|
||||
{
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
if (Config.ENABLE_HUNT_PASS)
|
||||
{
|
||||
_rewards.clear();
|
||||
parseDatapackFile("data/HuntPass.xml");
|
||||
_rewardCount = _rewards.size();
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _rewardCount + " HuntPass rewards.");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Disabled.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc, File f)
|
||||
{
|
||||
forEach(doc, "list", listNode -> forEach(listNode, "item", rewardNode ->
|
||||
{
|
||||
final StatSet set = new StatSet(parseAttributes(rewardNode));
|
||||
final int itemId = set.getInt("id");
|
||||
final int itemCount = set.getInt("count");
|
||||
final int premiumitemId = set.getInt("premiumId");
|
||||
final int premiumitemCount = set.getInt("premiumCount");
|
||||
if (ItemTable.getInstance().getTemplate(itemId) == null)
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Item with id " + itemId + " does not exist.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_rewards.add(new ItemHolder(itemId, itemCount));
|
||||
_premiumRewards.add(new ItemHolder(premiumitemId, premiumitemCount));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public List<ItemHolder> getRewards()
|
||||
{
|
||||
return _rewards;
|
||||
}
|
||||
|
||||
public int getRewardsCount()
|
||||
{
|
||||
return _rewardCount;
|
||||
}
|
||||
|
||||
public List<ItemHolder> getPremiumRewards()
|
||||
{
|
||||
return _premiumRewards;
|
||||
}
|
||||
|
||||
public int getPremiumRewardsCount()
|
||||
{
|
||||
return _premiumRewardCount;
|
||||
}
|
||||
|
||||
public static HuntPassData getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final HuntPassData INSTANCE = new HuntPassData();
|
||||
}
|
||||
}
|
@ -0,0 +1,334 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.model;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Calendar;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.threads.ThreadPool;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSimpleInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPass
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(HuntPass.class.getName());
|
||||
private static final String INSERT_SEASONPASS = "REPLACE INTO huntpass (`account_name`, `current_step`, `points`, `reward_step`, `is_paytowin`, `premium_reward_step`, `sayha_points_available`, `sayha_points_used`, `unclaimed_reward`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
private static final String RESTORE_SEASONPASS = "SELECT * FROM huntpass WHERE account_name=?";
|
||||
|
||||
private final Player _user;
|
||||
private int _availableSayhaTime;
|
||||
private int _points;
|
||||
private boolean _isPremium = false;
|
||||
private boolean _rewardAlert = false;
|
||||
|
||||
private int _rewardStep;
|
||||
private int _currentStep;
|
||||
private int _premiumRewardStep;
|
||||
|
||||
private boolean _toggleSayha = false;
|
||||
private ScheduledFuture<?> _sayhasSustentionTask = null;
|
||||
private int _toggleStartTime = 0;
|
||||
private int _usedSayhaTime;
|
||||
|
||||
private static int _dayEnd = 0;
|
||||
|
||||
public HuntPass(Player user)
|
||||
{
|
||||
_user = user;
|
||||
restoreHuntPass();
|
||||
huntPassDayEnd();
|
||||
store();
|
||||
}
|
||||
|
||||
public void restoreHuntPass()
|
||||
{
|
||||
final Calendar calendar = Calendar.getInstance();
|
||||
if ((calendar.get(Calendar.DAY_OF_MONTH) == Config.HUNT_PASS_PERIOD) && (calendar.get(Calendar.HOUR_OF_DAY) == 6) && (calendar.get(Calendar.MINUTE) == 30))
|
||||
{
|
||||
deleteHuntPass();
|
||||
}
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(RESTORE_SEASONPASS))
|
||||
{
|
||||
statement.setString(1, getAccountName());
|
||||
try (ResultSet rset = statement.executeQuery())
|
||||
{
|
||||
if (rset.next())
|
||||
{
|
||||
setPoints(rset.getInt("points"));
|
||||
setCurrentStep(rset.getInt("current_step"));
|
||||
setRewardStep(rset.getInt("reward_step"));
|
||||
setPremium(rset.getBoolean("is_paytowin"));
|
||||
setPremiumRewardStep(rset.getInt("premium_reward_step"));
|
||||
setAvailableSayhaTime(rset.getInt("sayha_points_available"));
|
||||
setUsedSayhaTime(rset.getInt("sayha_points_used"));
|
||||
setRewardAlert(rset.getBoolean("unclaimed_reward"));
|
||||
}
|
||||
rset.close();
|
||||
statement.close();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, "Could not restore Season Pass for playerId: " + _user.getAccountName());
|
||||
}
|
||||
}
|
||||
|
||||
public String getAccountName()
|
||||
{
|
||||
return _user.getAccountName();
|
||||
}
|
||||
|
||||
public void store()
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(INSERT_SEASONPASS))
|
||||
{
|
||||
statement.setString(1, getAccountName());
|
||||
statement.setInt(2, getCurrentStep());
|
||||
statement.setInt(3, getPoints());
|
||||
statement.setInt(4, getRewardStep());
|
||||
statement.setBoolean(5, isPremium());
|
||||
statement.setInt(6, getPremiumRewardStep());
|
||||
statement.setInt(7, getAvailableSayhaTime());
|
||||
statement.setInt(8, getUsedSayhaTime());
|
||||
statement.setBoolean(9, rewardAlert());
|
||||
statement.execute();
|
||||
statement.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, "Could not store Season-Pass data for Account " + _user.getAccountName() + ": ", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteHuntPass()
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
PreparedStatement statement = con.prepareStatement("UPDATE huntpass SET current_step = ?, reward_step = ?, premium_reward_step = ?, sayha_points_available = ?, sayha_points_used = ? ");
|
||||
statement.execute();
|
||||
statement.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "HuntPass : Can't clear steps: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
public int getHuntPassDayEnd()
|
||||
{
|
||||
return _dayEnd;
|
||||
}
|
||||
|
||||
public void huntPassDayEnd()
|
||||
{
|
||||
final Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
calendar.set(Calendar.DAY_OF_MONTH, Config.HUNT_PASS_PERIOD);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 6);
|
||||
calendar.set(Calendar.MINUTE, 30);
|
||||
if (calendar.getTimeInMillis() < System.currentTimeMillis())
|
||||
{
|
||||
calendar.add(Calendar.MONTH, 1);
|
||||
}
|
||||
|
||||
_dayEnd = (int) (calendar.getTimeInMillis() / 1000);
|
||||
}
|
||||
|
||||
public boolean toggleSayha()
|
||||
{
|
||||
return _toggleSayha;
|
||||
}
|
||||
|
||||
public int getPoints()
|
||||
{
|
||||
return _points;
|
||||
}
|
||||
|
||||
public void addPassPoint(double point) // TODO: point is unused.
|
||||
{
|
||||
if (Config.ENABLE_HUNT_PASS)
|
||||
{
|
||||
final int seasonPasspoint = 1;
|
||||
int calculate = seasonPasspoint + getPoints();
|
||||
if ((getPoints() == Config.HUNT_PASS_POINTS_FOR_STEP))
|
||||
{
|
||||
calculate %= Config.HUNT_PASS_POINTS_FOR_STEP;
|
||||
setCurrentStep(getCurrentStep() + 1);
|
||||
setRewardAlert(true);
|
||||
_user.sendPacket(new HuntPassSimpleInfo(_user));
|
||||
}
|
||||
setPoints(calculate);
|
||||
inTimeHuntingZone(calculate);
|
||||
}
|
||||
}
|
||||
|
||||
public void inTimeHuntingZone(int points) // TODO: points is unused.
|
||||
{
|
||||
final boolean Inhuntingzone = _user.isInTimedHuntingZone(_user.getX(), _user.getY());
|
||||
if (Inhuntingzone)
|
||||
{
|
||||
_points += 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
public void setPoints(int points)
|
||||
{
|
||||
_points = points;
|
||||
}
|
||||
|
||||
public int getCurrentStep()
|
||||
{
|
||||
return _currentStep;
|
||||
}
|
||||
|
||||
public void setCurrentStep(int step)
|
||||
{
|
||||
_currentStep = step;
|
||||
}
|
||||
|
||||
public int getRewardStep()
|
||||
{
|
||||
return _rewardStep;
|
||||
}
|
||||
|
||||
public void setRewardStep(int step)
|
||||
{
|
||||
if (_isPremium && (_premiumRewardStep <= _rewardStep))
|
||||
{
|
||||
_rewardStep += 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_rewardStep = step;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isPremium()
|
||||
{
|
||||
return _isPremium;
|
||||
}
|
||||
|
||||
public void setPremium(boolean premium)
|
||||
{
|
||||
_isPremium = premium;
|
||||
}
|
||||
|
||||
public int getPremiumRewardStep()
|
||||
{
|
||||
return _premiumRewardStep;
|
||||
}
|
||||
|
||||
public void setPremiumRewardStep(int step)
|
||||
{
|
||||
_premiumRewardStep = step;
|
||||
}
|
||||
|
||||
public boolean rewardAlert()
|
||||
{
|
||||
return _rewardAlert;
|
||||
}
|
||||
|
||||
public void setRewardAlert(boolean enable)
|
||||
{
|
||||
_rewardAlert = enable;
|
||||
}
|
||||
|
||||
public int getAvailableSayhaTime()
|
||||
{
|
||||
return _availableSayhaTime;
|
||||
}
|
||||
|
||||
public void setAvailableSayhaTime(int time)
|
||||
{
|
||||
_availableSayhaTime = time;
|
||||
}
|
||||
|
||||
public void addSayhaTime(int time)
|
||||
{
|
||||
// microsec to sec to database. 1 hour 3600 sec
|
||||
_availableSayhaTime += time * 60;
|
||||
}
|
||||
|
||||
public int getUsedSayhaTime()
|
||||
{
|
||||
return _usedSayhaTime;
|
||||
}
|
||||
|
||||
private void onSayhaEndTime()
|
||||
{
|
||||
setSayhasSustention(false);
|
||||
}
|
||||
|
||||
public void setUsedSayhaTime(int time)
|
||||
{
|
||||
_usedSayhaTime = time;
|
||||
}
|
||||
|
||||
public void addSayhasSustentionTimeUsed(int time)
|
||||
{
|
||||
_usedSayhaTime += time;
|
||||
}
|
||||
|
||||
public int getToggleStartTime()
|
||||
{
|
||||
return _toggleStartTime;
|
||||
}
|
||||
|
||||
public void setSayhasSustention(boolean active)
|
||||
{
|
||||
_toggleSayha = active;
|
||||
if (active)
|
||||
{
|
||||
_toggleStartTime = (int) (System.currentTimeMillis() / 1000);
|
||||
if (_sayhasSustentionTask != null)
|
||||
{
|
||||
_sayhasSustentionTask.cancel(true);
|
||||
_sayhasSustentionTask = null;
|
||||
}
|
||||
_user.sendPacket(new SystemMessage(SystemMessageId.SAYHA_S_GRACE_SUSTENTION_EFFECT_OF_THE_SEASON_PASS_IS_ACTIVATED_AVAILABLE_SAYHA_S_GRACE_SUSTENTION_TIME_IS_RUNNING));
|
||||
_sayhasSustentionTask = ThreadPool.schedule(this::onSayhaEndTime, Math.max(0, getAvailableSayhaTime() - getUsedSayhaTime()) * 1000L);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_sayhasSustentionTask != null)
|
||||
{
|
||||
addSayhasSustentionTimeUsed((int) ((System.currentTimeMillis() / 1000) - _toggleStartTime));
|
||||
_toggleStartTime = 0;
|
||||
_sayhasSustentionTask.cancel(true);
|
||||
_sayhasSustentionTask = null;
|
||||
_user.sendPacket(new SystemMessage(SystemMessageId.SAYHA_S_GRACE_SUSTENTION_EFFECT_OF_THE_SEASON_PASS_HAS_BEEN_DEACTIVATED_THE_SUSTENTION_TIME_YOU_HAVE_DOES_NOT_DECREASE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -878,7 +878,9 @@ public class Party extends AbstractPlayerGroup
|
||||
if (clan != null)
|
||||
{
|
||||
double finalExp = exp;
|
||||
|
||||
if (target.useVitalityRate())
|
||||
|
||||
{
|
||||
finalExp *= member.getStat().getExpBonusMultiplier();
|
||||
}
|
||||
@ -887,6 +889,12 @@ public class Party extends AbstractPlayerGroup
|
||||
member.updateVitalityPoints(target.getVitalityPoints(member.getLevel(), exp, target.isRaid()), true, false);
|
||||
PcCafePointsManager.getInstance().givePcCafePoint(member, exp);
|
||||
MagicLampData.getInstance().addLampExp(member, exp, true);
|
||||
|
||||
final HuntPass huntpass = member.getHuntPass();
|
||||
if (huntpass != null)
|
||||
{
|
||||
huntpass.addPassPoint(exp);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.model.AggroInfo;
|
||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||
import org.l2jmobius.gameserver.model.DamageDoneInfo;
|
||||
import org.l2jmobius.gameserver.model.ElementalSpirit;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.Seed;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -613,6 +614,12 @@ public class Attackable extends Npc
|
||||
}
|
||||
PcCafePointsManager.getInstance().givePcCafePoint(attacker, exp);
|
||||
MagicLampData.getInstance().addLampExp(attacker, exp, true);
|
||||
|
||||
final HuntPass huntPass = attacker.getHuntPass();
|
||||
if (huntPass != null)
|
||||
{
|
||||
attacker.getHuntPass().addPassPoint(exp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,6 +148,7 @@ import org.l2jmobius.gameserver.model.CommandChannel;
|
||||
import org.l2jmobius.gameserver.model.ContactList;
|
||||
import org.l2jmobius.gameserver.model.Duel;
|
||||
import org.l2jmobius.gameserver.model.ElementalSpirit;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Macro;
|
||||
import org.l2jmobius.gameserver.model.MacroList;
|
||||
@ -949,6 +950,8 @@ public class Player extends Playable
|
||||
|
||||
private final Map<Integer, PurgePlayerHolder> _purgePoints = new HashMap<>();
|
||||
|
||||
private final HuntPass _huntPass;
|
||||
|
||||
private final Map<Integer, PetEvolveHolder> _petEvolves = new HashMap<>();
|
||||
|
||||
private int _clanDonationPoints = 3;
|
||||
@ -1231,6 +1234,8 @@ public class Player extends Playable
|
||||
app.setOwner(this);
|
||||
_appearance = app;
|
||||
|
||||
_huntPass = Config.ENABLE_HUNT_PASS ? new HuntPass(this) : null;
|
||||
|
||||
// Create an AI
|
||||
getAI();
|
||||
|
||||
@ -1321,6 +1326,11 @@ public class Player extends Playable
|
||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass);
|
||||
}
|
||||
|
||||
public HuntPass getHuntPass()
|
||||
{
|
||||
return _huntPass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the PlayerTemplate link to the Player.
|
||||
*/
|
||||
@ -7277,6 +7287,11 @@ public class Player extends Playable
|
||||
{
|
||||
_randomCraft.store();
|
||||
}
|
||||
|
||||
if (_huntPass != null)
|
||||
{
|
||||
_huntPass.store();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -12084,6 +12099,10 @@ public class Player extends Playable
|
||||
|
||||
public void updateVitalityPoints(int points, boolean useRates, boolean quiet)
|
||||
{
|
||||
if ((_huntPass != null) && _huntPass.toggleSayha())
|
||||
{
|
||||
return;
|
||||
}
|
||||
getStat().updateVitalityPoints(points, useRates, quiet);
|
||||
}
|
||||
|
||||
|
@ -99,6 +99,11 @@ import org.l2jmobius.gameserver.network.clientpackets.equipmentupgrade.RequestUp
|
||||
import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntingzones.ExTimedHuntingZoneEnter;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntingzones.ExTimedHuntingZoneList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.HuntpassSayhasToggle;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.RequestHuntPassBuyPremium;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.RequestHuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.RequestHuntPassReward;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.huntpass.RequestHuntPassRewardAll;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.limitshop.RequestPurchaseLimitShopItemBuy;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.limitshop.RequestPurchaseLimitShopItemList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGamePlay;
|
||||
@ -740,11 +745,11 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
EX_ITEM_USABLE_LIST(0x21F, null, ConnectionState.IN_GAME),
|
||||
EX_PACKETREADCOUNTPERSECOND(0x220, null, ConnectionState.IN_GAME),
|
||||
EX_SELECT_GLOBAL_EVENT_UI(0x221, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_INFO(0x222, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_REQUEST_REWARD(0x223, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_REQUEST_REWARD_ALL(0x224, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_BUY_PREMIUM(0x225, null, ConnectionState.IN_GAME),
|
||||
EX_SAYHAS_SUPPORT_TOGGLE(0x226, null, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_INFO(0x222, RequestHuntPassInfo::new, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_REQUEST_REWARD(0x223, RequestHuntPassReward::new, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_REQUEST_REWARD_ALL(0x224, RequestHuntPassRewardAll::new, ConnectionState.IN_GAME),
|
||||
EX_L2PASS_BUY_PREMIUM(0x225, RequestHuntPassBuyPremium::new, ConnectionState.IN_GAME),
|
||||
EX_SAYHAS_SUPPORT_TOGGLE(0x226, HuntpassSayhasToggle::new, ConnectionState.IN_GAME),
|
||||
// 362
|
||||
EX_REQ_ENCHANT_FAIL_REWARD_INFO(0x227, ExRequestEnchantFailRewardInfo::new, ConnectionState.IN_GAME),
|
||||
EX_SET_ENCHANT_CHALLENGE_POINT(0x228, null, ConnectionState.IN_GAME),
|
||||
|
@ -117,6 +117,7 @@ import org.l2jmobius.gameserver.network.serverpackets.collection.ExCollectionInf
|
||||
import org.l2jmobius.gameserver.network.serverpackets.dailymission.ExConnectedTimeAndGettableReward;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.dailymission.ExOneDayReceiveRewardList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.friend.L2FriendList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSimpleInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExBloodyCoinCount;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.magiclamp.ExMagicLampExpInfoUI;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.pledgedonation.ExPledgeContributionList;
|
||||
@ -674,6 +675,11 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
player.sendPacket(new ExCraftInfo(player));
|
||||
}
|
||||
|
||||
if (Config.ENABLE_HUNT_PASS)
|
||||
{
|
||||
player.sendPacket(new HuntPassSimpleInfo(player));
|
||||
}
|
||||
|
||||
for (int category = 1; category <= 7; category++)
|
||||
{
|
||||
player.sendPacket(new ExCollectionInfo(player, category));
|
||||
|
@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
|
||||
public class HuntpassSayhasToggle implements IClientIncomingPacket
|
||||
{
|
||||
private boolean _sayhaToggle;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_sayhaToggle = packet.readC() != 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final HuntPass huntPass = player.getHuntPass();
|
||||
if (huntPass == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int timeEarned = huntPass.getAvailableSayhaTime();
|
||||
int timeUsed = huntPass.getUsedSayhaTime();
|
||||
if (player.getVitalityPoints() < 35000)
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.UNABLE_TO_ACTIVATE_YOU_CAN_USE_SAYHA_S_GRACE_SUSTENTION_EFFECT_OF_THE_SEASON_PASS_ONLY_IF_YOU_HAVE_AT_LEAST_35_000_SAYHA_S_GRACE_POINTS));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_sayhaToggle && (timeEarned > 0) && (timeEarned > timeUsed))
|
||||
{
|
||||
huntPass.setSayhasSustention(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
huntPass.setSayhasSustention(false);
|
||||
}
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class RequestHuntPassBuyPremium implements IClientIncomingPacket
|
||||
{
|
||||
private int _huntPassType;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_huntPassType = packet.readC();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Calendar calendar = Calendar.getInstance();
|
||||
if ((calendar.get(Calendar.DAY_OF_MONTH) == Config.HUNT_PASS_PERIOD) && (calendar.get(Calendar.HOUR_OF_DAY) == 6) && (calendar.get(Calendar.MINUTE) < 30))
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.CURRENTLY_UNAVAILABLE_FOR_PURCHASE_YOU_CAN_BUY_THE_SEASON_PASS_ADDITIONAL_REWARDS_ONLY_UNTIL_6_30_A_M_OF_THE_SEASON_S_LAST_DAY));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!player.destroyItemByItemId("L-Coin", 91663, Config.HUNT_PASS_PREMIUM_COST, player, true))
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_MONEY_TO_USE_THE_FUNCTION));
|
||||
return;
|
||||
}
|
||||
|
||||
player.getHuntPass().setPremium(true);
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
player.sendPacket(new HuntPassInfo(player, _huntPassType));
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class RequestHuntPassInfo implements IClientIncomingPacket
|
||||
{
|
||||
private int _passType;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_passType = packet.readC();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new HuntPassInfo(player, _passType));
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.data.xml.HuntPassData;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSimpleInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class RequestHuntPassReward implements IClientIncomingPacket
|
||||
{
|
||||
private int _huntPassType;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_huntPassType = packet.readC();
|
||||
packet.readC(); // is Premium?
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final HuntPass huntPass = player.getHuntPass();
|
||||
final int normalReward = huntPass.getRewardStep();
|
||||
final ItemHolder reward = HuntPassData.getInstance().getRewards().get(normalReward);
|
||||
final ItemTemplate itemTemplate = ItemTable.getInstance().getTemplate(reward.getId());
|
||||
|
||||
final long weight = itemTemplate.getWeight() * reward.getCount();
|
||||
final long slots = itemTemplate.isStackable() ? 1 : reward.getCount();
|
||||
if (!player.getInventory().validateWeight(weight) || !player.getInventory().validateCapacity(slots))
|
||||
{
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.YOUR_INVENTORY_S_WEIGHT_LIMIT_HAS_BEEN_EXCEEDED_SO_YOU_CAN_T_RECEIVE_THE_REWARD_PLEASE_FREE_UP_SOME_SPACE_AND_TRY_AGAIN));
|
||||
return;
|
||||
}
|
||||
|
||||
updateSayhaTime(player);
|
||||
premiumReward(player);
|
||||
huntPass.setRewardStep(normalReward + 1);
|
||||
huntPass.setRewardAlert(false);
|
||||
player.sendPacket(new HuntPassInfo(player, _huntPassType));
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
player.sendPacket(new HuntPassSimpleInfo(player));
|
||||
}
|
||||
|
||||
private void updateSayhaTime(Player player)
|
||||
{
|
||||
final HuntPass huntpass = player.getHuntPass();
|
||||
final int normalreward = huntpass.getRewardStep();
|
||||
final int premiumreward = huntpass.getPremiumRewardStep();
|
||||
final ItemHolder reward = HuntPassData.getInstance().getRewards().get(normalreward);
|
||||
|
||||
final int sayhaPoints = 0; // TODO: 0?
|
||||
final long count = reward.getCount();
|
||||
final int calc = (int) (sayhaPoints + count);
|
||||
final boolean isPremium = huntpass.isPremium();
|
||||
if (isPremium && (premiumreward < normalreward))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
huntpass.addSayhaTime(calc);
|
||||
player.addItem("HuntPassReward", reward, player, true);
|
||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_RECEIVED_S1_SAYHA_S_GRACE_SUSTENTION_POINTS);
|
||||
msg.addInt((int) (count));
|
||||
player.sendPacket(msg);
|
||||
}
|
||||
|
||||
private void premiumReward(Player player)
|
||||
{
|
||||
final HuntPass huntPass = player.getHuntPass();
|
||||
final int rewardStep = huntPass.getPremiumRewardStep();
|
||||
final ItemHolder premiumReward = HuntPassData.getInstance().getPremiumRewards().get(rewardStep);
|
||||
final boolean isPremium = huntPass.isPremium();
|
||||
if (isPremium)
|
||||
{
|
||||
player.addItem("SeasonPassReward", premiumReward, player, true);
|
||||
huntPass.setPremiumRewardStep(rewardStep + 1);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.clientpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSayhasSupportInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntpass.HuntPassSimpleInfo;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class RequestHuntPassRewardAll implements IClientIncomingPacket
|
||||
{
|
||||
private int _huntPassType;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_huntPassType = packet.readC();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new HuntPassInfo(player, _huntPassType));
|
||||
player.sendPacket(new HuntPassSayhasSupportInfo(player));
|
||||
player.sendPacket(new HuntPassSimpleInfo(player));
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.serverpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _interfaceType;
|
||||
private final HuntPass _huntPass;
|
||||
private final int _timeEnd;
|
||||
private final int _isPremium;
|
||||
private final int _points;
|
||||
private final int _step;
|
||||
private final int _rewardStep;
|
||||
private final int _premiumRewardStep;
|
||||
|
||||
public HuntPassInfo(Player player, int interfaceType)
|
||||
{
|
||||
|
||||
_interfaceType = interfaceType;
|
||||
_huntPass = player.getHuntPass();
|
||||
_timeEnd = _huntPass.getHuntPassDayEnd();
|
||||
_isPremium = _huntPass.isPremium() ? 1 : 0;
|
||||
_points = _huntPass.getPoints();
|
||||
_step = _huntPass.getCurrentStep();
|
||||
_rewardStep = _huntPass.getRewardStep();
|
||||
_premiumRewardStep = _huntPass.getPremiumRewardStep();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_L2PASS_INFO.writeId(packet);
|
||||
packet.writeC(_interfaceType);
|
||||
packet.writeD(_timeEnd); // LeftTime
|
||||
packet.writeC(_isPremium); // Premium
|
||||
packet.writeD(_points); // Points
|
||||
packet.writeD(_step); // CurrentStep
|
||||
packet.writeD(_rewardStep); // Reward
|
||||
packet.writeD(_premiumRewardStep); // PremiumReward
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.serverpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassSayhasSupportInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final HuntPass _huntPass;
|
||||
private final int _timeUsed;
|
||||
private final boolean _sayhaToggle;
|
||||
|
||||
public HuntPassSayhasSupportInfo(Player player)
|
||||
{
|
||||
_huntPass = player.getHuntPass();
|
||||
_sayhaToggle = _huntPass.toggleSayha();
|
||||
_timeUsed = _huntPass.getUsedSayhaTime() + (int) (_huntPass.getToggleStartTime() > 0 ? (System.currentTimeMillis() / 1000) - _huntPass.getToggleStartTime() : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SAYHAS_SUPPORT_INFO.writeId(packet);
|
||||
packet.writeC(_sayhaToggle ? 1 : 0);
|
||||
packet.writeD(_huntPass.getAvailableSayhaTime());
|
||||
packet.writeD(_timeUsed);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.network.serverpackets.huntpass;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.HuntPass;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Serenitty
|
||||
*/
|
||||
public class HuntPassSimpleInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final HuntPass _huntPassInfo;
|
||||
|
||||
public HuntPassSimpleInfo(Player player)
|
||||
{
|
||||
_huntPassInfo = player.getHuntPass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_L2PASS_SIMPLE_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(1); // passInfos
|
||||
packet.writeC(0);
|
||||
packet.writeC(1); // isOn
|
||||
|
||||
packet.writeC(_huntPassInfo.rewardAlert() ? 1 : 0);
|
||||
packet.writeD(0);
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user