From 039bff7a8092d97b46150fc9bcdb15ba15d5d639 Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Fri, 23 Dec 2016 21:57:23 +0000
Subject: [PATCH] Hunt for Santa improvements. Contributed by gigilo1968.
---
.../dist/game/data/AppearanceStones.xml | 11 +++
.../dist/game/data/multisell/3400801.xml | 30 ++++++++
.../events/HuntForSanta/HuntForSanta.java | 2 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/RewardItemOnExit.java | 46 +++++++++++
.../game/data/stats/items/37500-37599.xml | 23 ++++--
.../game/data/stats/items/40300-40399.xml | 21 ++++-
.../game/data/stats/skills/16400-16499.xml | 77 ++++++++++++++++++-
8 files changed, 200 insertions(+), 11 deletions(-)
create mode 100644 L2J_Mobius_Underground/dist/game/data/multisell/3400801.xml
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java
diff --git a/L2J_Mobius_Underground/dist/game/data/AppearanceStones.xml b/L2J_Mobius_Underground/dist/game/data/AppearanceStones.xml
index c06d2ac9ee..7436b2e49f 100644
--- a/L2J_Mobius_Underground/dist/game/data/AppearanceStones.xml
+++ b/L2J_Mobius_Underground/dist/game/data/AppearanceStones.xml
@@ -570,4 +570,15 @@
hair2
hairall
+
+
+ chest
+ fullarmor
+
+
+
+ hair
+ hair2
+ hairall
+
diff --git a/L2J_Mobius_Underground/dist/game/data/multisell/3400801.xml b/L2J_Mobius_Underground/dist/game/data/multisell/3400801.xml
new file mode 100644
index 0000000000..a39410767d
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/multisell/3400801.xml
@@ -0,0 +1,30 @@
+
+
+
+ 34008
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java b/L2J_Mobius_Underground/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java
index 1c9e0eef5c..117aaca5fc 100644
--- a/L2J_Mobius_Underground/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java
@@ -38,6 +38,8 @@ public final class HuntForSanta extends LongTimeEvent
private static final SkillHolder BUFF_STOCKING = new SkillHolder(16419, 1);
private static final SkillHolder BUFF_TREE = new SkillHolder(16420, 1);
private static final SkillHolder BUFF_SNOWMAN = new SkillHolder(16421, 1);
+ // Item
+ // private static final int SANTAS_MARK = 40313;
private HuntForSanta()
{
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
index cac211d921..96fdcf01ee 100644
--- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -264,6 +264,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Resurrection", Resurrection::new);
EffectHandler.getInstance().registerHandler("ResurrectionSpecial", ResurrectionSpecial::new);
EffectHandler.getInstance().registerHandler("Reuse", Reuse::new);
+ EffectHandler.getInstance().registerHandler("RewardItemOnExit",RewardItemOnExit::new);
EffectHandler.getInstance().registerHandler("Root", Root::new);
EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new);
EffectHandler.getInstance().registerHandler("SendSystemMessageToClan", SendSystemMessageToClan::new);
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java
new file mode 100644
index 0000000000..d49dbae496
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java
@@ -0,0 +1,46 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.skills.BuffInfo;
+
+/**
+ * Reward Item on Exit effect implementation.
+ * @author Mobius
+ */
+public final class RewardItemOnExit extends AbstractEffect
+{
+ private final int _itemId;
+ private final long _itemCount;
+
+ public RewardItemOnExit(StatsSet params)
+ {
+ _itemId = params.getInt("itemId", 40313); // Default item is Santa's Mark.
+ _itemCount = params.getLong("itemCount", 1);
+ }
+
+ @Override
+ public void onExit(BuffInfo info)
+ {
+ if (!info.isRemoved() && info.getEffected().isPlayer() && !info.getEffected().getActingPlayer().isDead())
+ {
+ info.getEffected().getActingPlayer().addItem("RewardItemOnExitEffect", _itemId, _itemCount, info.getEffected().getActingPlayer(), true);
+ }
+ }
+}
diff --git a/L2J_Mobius_Underground/dist/game/data/stats/items/37500-37599.xml b/L2J_Mobius_Underground/dist/game/data/stats/items/37500-37599.xml
index 334f88c8b9..972de2b908 100644
--- a/L2J_Mobius_Underground/dist/game/data/stats/items/37500-37599.xml
+++ b/L2J_Mobius_Underground/dist/game/data/stats/items/37500-37599.xml
@@ -469,17 +469,30 @@
-
+
+
+
+
+
-
+
+
+
-
-
-
+
+
+
+
-
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_Underground/dist/game/data/stats/items/40300-40399.xml b/L2J_Mobius_Underground/dist/game/data/stats/items/40300-40399.xml
index f28551a55a..7bc9ddaa3d 100644
--- a/L2J_Mobius_Underground/dist/game/data/stats/items/40300-40399.xml
+++ b/L2J_Mobius_Underground/dist/game/data/stats/items/40300-40399.xml
@@ -138,9 +138,17 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
@@ -157,6 +165,8 @@
+
+
@@ -310,10 +320,15 @@
-
+
+
+
+
+
-
diff --git a/L2J_Mobius_Underground/dist/game/data/stats/skills/16400-16499.xml b/L2J_Mobius_Underground/dist/game/data/stats/skills/16400-16499.xml
index 30fa212b02..b6314922f2 100644
--- a/L2J_Mobius_Underground/dist/game/data/stats/skills/16400-16499.xml
+++ b/L2J_Mobius_Underground/dist/game/data/stats/skills/16400-16499.xml
@@ -176,10 +176,13 @@
P
-
BranchSys.icon.br_xmas_present_i00
A2
+ 1
+ 7200
+ BR_EVENT_BUF2
+ XMAS_SOCKS
900
1000
@@ -187,12 +190,33 @@
1
4
+
+
+ 3
+ STR
+
+
+ 3
+ INT
+
+
+ 7
+ DIFF
+
+
+ 40313
+ 1
+
+
-
BranchSys.icon.br_xmas_miracle_i00
A2
+ 1
+ 7200
+ BR_EVENT_BUF2
+ XMAS_TREE
900
1000
@@ -200,12 +224,37 @@
1
4
+
+
+ 3
+ CON
+
+
+ 3
+ MEN
+
+
+ 30
+ DIFF
+
+
+ 30
+ DIFF
+
+
+ 40313
+ 1
+
+
-
BranchSys.icon.br_xmas_present_luck_i00
A2
+ 1
+ 7200
+ BR_EVENT_BUF2
+ XMAS_SNOWMAN
900
1000
@@ -213,6 +262,28 @@
1
4
+
+
+ 3
+ DEX
+
+
+ 3
+ WIT
+
+
+ 2013
+ DIFF
+
+
+ 2013
+ DIFF
+
+
+ 40313
+ 1
+
+