Jump to content
  • 0

[Request] Salvation and phoenix blessing Core side


Question

6 answers to this question

Recommended Posts

  • 0
Posted

And maybe cup of tea, ok?

 

First of all, you have to put ALL proper information before posting (even if these informations are useless - we have to respect rules all the time)

 

You can sync it from aother projects Core SVN and add it into your source.

  • 0
Posted

Index: C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/actor/instance/L2PlayableInstance.java

===================================================================

--- C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/actor/instance/L2PlayableInstance.java (revision 1617)

+++ C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/actor/instance/L2PlayableInstance.java (working copy)

@@ -37,6 +37,7 @@

 

private boolean _isNoblesseBlessed = false; // for Noblesse Blessing skill, restores buffs after death

private boolean _getCharmOfLuck = false; // Charm of Luck - During a Raid/Boss war, decreased chance for death penalty

+ private boolean _isPhoenixBlessed = false; // for Soul of The Phoenix or Salvation buffs

/**

* Constructor of L2PlayableInstance (use L2Character constructor).<BR><BR>

*

@@ -173,6 +174,27 @@

    setIsNoblesseBlessed(false);

    updateAbnormalEffect();

    }

+   

+    // Support for Soul of the Phoenix and Salvation skills

+    public final boolean isPhoenixBlessed() { return _isPhoenixBlessed; }

+    public final void setIsPhoenixBlessed(boolean value) { _isPhoenixBlessed = value; }

+       

+    public final void startPhoenixBlessing()

+    {

+      setIsPhoenixBlessed(true);

+      updateAbnormalEffect();

+    }

+   

+    public final void stopPhoenixBlessing(L2Effect effect)

+    {

+      if (effect == null)

+          stopEffects(L2Effect.EffectType.PHOENIX_BLESSING);

+      else

+          removeEffect(effect);

+                 

+      setIsPhoenixBlessed(false);

+      updateAbnormalEffect();

+    }

 

public abstract boolean destroyItemByItemId(String process, int itemId, int count, L2Object reference, boolean sendMessage);

public abstract boolean destroyItem(String process, int objectId, int count, L2Object reference, boolean sendMessage);

 

Index: C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

===================================================================

--- C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 1617)

+++ C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)

@@ -9379,7 +9379,10 @@

if((Pet && getPet() != null && getPet().isDead()) || (!Pet && isDead()))

{

_reviveRequested = 1;

- _revivePower = Formulas.getInstance().calculateSkillResurrectRestorePercent(skill.getPower(), Reviver.getWIT());

+ if (isPhoenixBlessed())

+     _revivePower=100;

+ else

+     _revivePower = Formulas.getInstance().calculateSkillResurrectRestorePercent(skill.getPower(), Reviver.getWIT());

_revivePet = Pet;

sendPacket(new ConfirmDlg(SystemMessageId.RESSURECTION_REQUEST.getId(),Reviver.getName()));

}

@@ -9389,6 +9392,12 @@

{

if (_reviveRequested != 1 || (!isDead() && !_revivePet) || (_revivePet && getPet() != null && !getPet().isDead()))

return;

+ //If character refuses a PhoenixBless autoress, cancell all buffs he had

+ if (answer == 0 && isPhoenixBlessed())

+ {

+     stopPhoenixBlessing(null);

+     stopAllEffects();

+ }

if (answer == 1)

{

if (!_revivePet)

 

Index: C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/L2Effect.java

===================================================================

--- C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/L2Effect.java (revision 1617)

+++ C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/L2Effect.java (working copy)

@@ -74,6 +74,7 @@

        SILENCE_MAGIC_PHYSICAL,

        BETRAY,

        NOBLESSE_BLESSING,

+        PHOENIX_BLESSING,

        PETRIFICATION,

        BLUFF,

        BATTLE_FORCE,

 

Index: C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/L2Character.java

===================================================================

--- C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/L2Character.java (revision 1617)

+++ C:/Documents and Settings/EdeN/Documenti/EclipseWorkspace/L2_GameServer_t1/java/net/sf/l2j/gameserver/model/L2Character.java (working copy)

@@ -1576,9 +1576,17 @@

getStatus().stopHpMpRegeneration();

 

// Stop all active skills effects in progress on the L2Character,

- // if the Character isn't a Noblesse Blessed L2PlayableInstance

- if (this instanceof L2PlayableInstance && ((L2PlayableInstance)this).isNoblesseBlessed())

- {

+ // if the Character isn't affected by Soul of The Phoenix or Salvation

+        if (this instanceof L2PlayableInstance && ((L2PlayableInstance)this).isPhoenixBlessed())

+        {

+          if (((L2PlayableInstance)this).getCharmOfLuck()) //remove Lucky Charm if player has SoulOfThePhoenix/Salvation buff

+              ((L2PlayableInstance)this).stopCharmOfLuck(null);

+            if (((L2PlayableInstance)this).isNoblesseBlessed())

+              ((L2PlayableInstance)this).stopNoblesseBlessing(null);

+        }

+        // Same thing if the Character isn't a Noblesse Blessed L2PlayableInstance

+        else if (this instanceof L2PlayableInstance && ((L2PlayableInstance)this).isNoblesseBlessed())

+        {

((L2PlayableInstance)this).stopNoblesseBlessing(null);

if (((L2PlayableInstance)this).getCharmOfLuck()) //remove Lucky Charm if player have Nobless blessing buff

((L2PlayableInstance)this).stopCharmOfLuck(null);

@@ -1605,6 +1613,14 @@

getNotifyQuestOfDeath().clear();

 

getAttackByList().clear();

+ //If character is PhoenixBlessed a resurrection popup will show up

+        if (this instanceof L2PlayableInstance && ((L2PlayableInstance)this).isPhoenixBlessed())

+        {

+          if (this instanceof L2Summon) {

+              ((L2Summon)this).getOwner().reviveRequest(((L2Summon)this).getOwner(), null, true);

+          }

+          else ((L2PcInstance)this).reviveRequest(((L2PcInstance)this),null,false);

+        }

return true;

}

 

@@ -1618,11 +1634,15 @@

if (!isTeleporting())

{

setIsPendingRevive(false);

-

- _status.setCurrentCp(getMaxCp() * Config.RESPAWN_RESTORE_CP);

+

+ if (this instanceof L2PlayableInstance && ((L2PlayableInstance)this).isPhoenixBlessed())

+ {

+     ((L2PlayableInstance)this).stopPhoenixBlessing(null);

+ }

+ //_status.setCurrentCp(getMaxCp() * Config.RESPAWN_RESTORE_CP);

_status.setCurrentHp(getMaxHp() * Config.RESPAWN_RESTORE_HP);

- //_Status.setCurrentMp(getMaxMp() * Config.RESPAWN_RESTORE_MP);

-

+ //_Status.setCurrentMp(getMaxMp() * Config.RESPAWN_RESTORE_MP);

+

// Start broadcast status

broadcastPacket(new Revive(this));

if (getWorldRegion() != null)

 

 

 

XML

 

<skill id="438" levels="1" name="Soul of the Phoenix">

<!--

  Description(s):

      Revives target from death and restores them to full health, retaining all buff/debuff effects except for Noblesse Blessing and Lucky Charm. Consumes 1 Blood of the Phoenix.

-->

  <set name="magicLvl" val="79"/>

  <set name="mpConsume" val="250"/>

  <set name="itemConsumeId" val="8873"/>

  <set name="itemConsumeCount" val="1"/>

  <set name="power" val="0.0"/>

  <set name="target" val="TARGET_SELF"/>

  <set name="reuseDelay" val="3600000"/>

  <set name="hitTime" val="4000"/>

  <set name="skillType" val="BUFF"/>

  <set name="isMagic" val="true"/>

  <set name="operateType" val="OP_ACTIVE"/>

  <set name="buffDuration" val="1800000"/>

  <set name="castRange" val="400"/>

  <set name="effectRange" val="900"/>

  <for>

<effect count="1" name="PhoenixBless" time="1800" val="0"/>

  </for>

</skill>

 

 

<skill id="1410" levels="1" name="Salvation">

<!--

  Some values need to be confirmed

--> 

  <set name="magicLvl" val="79"/>

  <set name="mpConsume" val="87"/>

  <set name="itemConsumeId" val="8874"/>

  <set name="itemConsumeCount" val="2"/>

  <set name="power" val="0.0"/>

  <set name="target" val="TARGET_ONE"/>

  <set name="reuseDelay" val="3600000"/>

  <set name="hitTime" val="4000"/> <!--guessing-->

  <set name="skillType" val="BUFF"/>

  <set name="isMagic" val="true"/>

  <set name="operateType" val="OP_ACTIVE"/>

  <set name="buffDuration" val="3600000"/>

  <set name="castRange" val="400"/>

  <set name="effectRange" val="900"/>

  <for>

<effect count="1" name="PhoenixBless" time="3600" val="0"/>

  </for>

</skill>

 

 

 

You will also need a new class, net.sf.l2j.gameserver.skills.effects.EffectPhoenixBless.java (Attached)

 

 

/*

* 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 2, 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, write to the Free Software

* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA

* 02111-1307, USA.

*

* http://www.gnu.org/copyleft/gpl.html

*/

package net.sf.l2j.gameserver.skills.effects;

 

import net.sf.l2j.gameserver.model.L2Effect;

import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;

import net.sf.l2j.gameserver.skills.Env;

 

/**

* @author Faror

*/

final class EffectPhoenixBless extends L2Effect

{

public EffectPhoenixBless(Env env, EffectTemplate template)

{

super(env, template);

}

 

@Override

public EffectType getEffectType()

{

return EffectType.PHOENIX_BLESSING;

}

 

/** Notify started */

@Override

public void onStart()

{

if (getEffected() instanceof L2PlayableInstance)

((L2PlayableInstance)getEffected()).startPhoenixBlessing();

}

 

/** Notify exited */

@Override

public void onExit()

{

if (getEffected() instanceof L2PlayableInstance)

((L2PlayableInstance)getEffected()).stopPhoenixBlessing(this);

}

 

@Override

public boolean onActionTime()

{

// just stop this effect

return false;

}

}

 

 

Guest
This topic is now closed to further replies.


  • Posts

    • Where's the proof? I can tell you're a scammer.
    • Where was I called a scammer? Is there any proof, etc.? There are a lot of reviews about our store online, etc. https://zhyk.org/forum/showthread.php?t=1108673
    • U was reported as scammer in your previos topic why u create new topic?
    • 🔍 Inventory 1.0 is a next-generation inventory system that stands out with its special minimal clothing system. Carefully designed and prepared according to the highest standards of your server, it not only enhances your gaming experience but also contributes to your server's infrastructure. ⚙️ Supported: QB-CORE Features: ✅ Instant Delivery: All products you purchase will be instantly assigned to your account as soon as your payment is completed. ✅ Clothing System: With the special animated clothing configurations in your inventory, you will be able to change outfits with ease. Experience a unique roleplaying experience with high-quality animations and customizable clothing options. ✅ Minimalist Inventory System: This inventory system, with its visuals, animations, and mechanics, offers maximum efficiency without overwhelming your screen and limiting your roleplaying experience. It’s designed to be user-friendly while enhancing your roleplaying experience. ✅ Continuous Updates: The content in the inventory is regularly updated with innovative features added. New animations, additional clothing options, and cutting-edge features ensure a fresh and dynamic experience. ✅ Easy Setup and Compatibility: Compatible with QB-CORE, this system is easy to install and optimized for quick integration into your server. It works seamlessly with a simple drag-and-drop method. ✅ Performance Optimization: The system is optimized to avoid low FPS and performance drops. All features of the inventory run smoothly without affecting your server’s performance. ✅ Multilingual Support: With support for different languages, you can cater to an international player base and build a larger community on your server. ✅ Flexible Customization Options: You can fully customize the inventory according to your needs and server rules. Choose between different outfits and animations to create a unique gaming experience. ✅ Comprehensive Help and Support: With 24/7 support, you can quickly resolve any issues you encounter. Our technical support and user guides are always here to assist you. Shop Now! Take your game to the next level with Inventory 1.0  and enjoy its unique features. Get ready to make a real difference in your roleplaying experience!   --------------------------TEBEX: https://matza.tebex.io/package/7174862 --------------------------
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock