GiveClanReputation effect handler.
This commit is contained in:
parent
e66e52f76c
commit
f14ebfeec6
@ -138,6 +138,7 @@ public final class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("GetAgro", GetAgro::new);
|
EffectHandler.getInstance().registerHandler("GetAgro", GetAgro::new);
|
||||||
EffectHandler.getInstance().registerHandler("GetDamageLimit", GetDamageLimit::new);
|
EffectHandler.getInstance().registerHandler("GetDamageLimit", GetDamageLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("GetMomentum", GetMomentum::new);
|
EffectHandler.getInstance().registerHandler("GetMomentum", GetMomentum::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("GiveClanReputation", GiveClanReputation::new);
|
||||||
EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new);
|
EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new);
|
||||||
EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new);
|
EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new);
|
||||||
EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new);
|
EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new);
|
||||||
|
67
L2J_Mobius_Classic/dist/game/data/scripts/handlers/effecthandlers/GiveClanReputation.java
vendored
Normal file
67
L2J_Mobius_Classic/dist/game/data/scripts/handlers/effecthandlers/GiveClanReputation.java
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* 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 com.l2jmobius.gameserver.model.L2ClanMember;
|
||||||
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Give Clan reputation effect implementation.
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public final class GiveClanReputation extends AbstractEffect
|
||||||
|
{
|
||||||
|
private final int _reputation;
|
||||||
|
|
||||||
|
public GiveClanReputation(StatsSet params)
|
||||||
|
{
|
||||||
|
_reputation = params.getInt("reputation", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInstant()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
|
{
|
||||||
|
if (!effector.isPlayer() || !effected.isPlayer() || effected.isAlikeDead() || (effector.getActingPlayer().getClan() == null))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
effector.getActingPlayer().getClan().addReputationScore(_reputation, true);
|
||||||
|
|
||||||
|
for (L2ClanMember member : effector.getActingPlayer().getClan().getMembers())
|
||||||
|
{
|
||||||
|
if (member.isOnline())
|
||||||
|
{
|
||||||
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_ADDED_S1_POINT_S_TO_ITS_CLAN_REPUTATION);
|
||||||
|
sm.addInt(_reputation);
|
||||||
|
member.getPlayerInstance().sendPacket(sm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -30,7 +30,6 @@ What is done
|
|||||||
-Admin menu teleport and shop cleanups
|
-Admin menu teleport and shop cleanups
|
||||||
|
|
||||||
Custom work
|
Custom work
|
||||||
-Start NPC dialogs until Newbie Helper
|
|
||||||
-Newbie Helper NPC location info
|
-Newbie Helper NPC location info
|
||||||
-Newbie Helper buff support until 40 level
|
-Newbie Helper buff support until 40 level
|
||||||
|
|
||||||
@ -45,3 +44,4 @@ TODO list
|
|||||||
-Blacksmith NPC updates
|
-Blacksmith NPC updates
|
||||||
-Floran Agricultural Area clan halls
|
-Floran Agricultural Area clan halls
|
||||||
-Test Castle Sieges and Merc stats
|
-Test Castle Sieges and Merc stats
|
||||||
|
-Whisper of Dreams quests
|
||||||
|
@ -138,6 +138,7 @@ public final class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("GetAgro", GetAgro::new);
|
EffectHandler.getInstance().registerHandler("GetAgro", GetAgro::new);
|
||||||
EffectHandler.getInstance().registerHandler("GetDamageLimit", GetDamageLimit::new);
|
EffectHandler.getInstance().registerHandler("GetDamageLimit", GetDamageLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("GetMomentum", GetMomentum::new);
|
EffectHandler.getInstance().registerHandler("GetMomentum", GetMomentum::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("GiveClanReputation", GiveClanReputation::new);
|
||||||
EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new);
|
EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new);
|
||||||
EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new);
|
EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new);
|
||||||
EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new);
|
EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new);
|
||||||
|
67
L2J_Mobius_Helios/dist/game/data/scripts/handlers/effecthandlers/GiveClanReputation.java
vendored
Normal file
67
L2J_Mobius_Helios/dist/game/data/scripts/handlers/effecthandlers/GiveClanReputation.java
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* 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 com.l2jmobius.gameserver.model.L2ClanMember;
|
||||||
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Give Clan reputation effect implementation.
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public final class GiveClanReputation extends AbstractEffect
|
||||||
|
{
|
||||||
|
private final int _reputation;
|
||||||
|
|
||||||
|
public GiveClanReputation(StatsSet params)
|
||||||
|
{
|
||||||
|
_reputation = params.getInt("reputation", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInstant()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
|
{
|
||||||
|
if (!effector.isPlayer() || !effected.isPlayer() || effected.isAlikeDead() || (effector.getActingPlayer().getClan() == null))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
effector.getActingPlayer().getClan().addReputationScore(_reputation, true);
|
||||||
|
|
||||||
|
for (L2ClanMember member : effector.getActingPlayer().getClan().getMembers())
|
||||||
|
{
|
||||||
|
if (member.isOnline())
|
||||||
|
{
|
||||||
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_ADDED_S1_POINT_S_TO_ITS_CLAN_REPUTATION);
|
||||||
|
sm.addInt(_reputation);
|
||||||
|
member.getPlayerInstance().sendPacket(sm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -138,6 +138,7 @@ public final class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("GetAgro", GetAgro::new);
|
EffectHandler.getInstance().registerHandler("GetAgro", GetAgro::new);
|
||||||
EffectHandler.getInstance().registerHandler("GetDamageLimit", GetDamageLimit::new);
|
EffectHandler.getInstance().registerHandler("GetDamageLimit", GetDamageLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("GetMomentum", GetMomentum::new);
|
EffectHandler.getInstance().registerHandler("GetMomentum", GetMomentum::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("GiveClanReputation", GiveClanReputation::new);
|
||||||
EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new);
|
EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new);
|
||||||
EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new);
|
EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new);
|
||||||
EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new);
|
EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new);
|
||||||
|
67
L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/GiveClanReputation.java
vendored
Normal file
67
L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/GiveClanReputation.java
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* 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 com.l2jmobius.gameserver.model.L2ClanMember;
|
||||||
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Give Clan reputation effect implementation.
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public final class GiveClanReputation extends AbstractEffect
|
||||||
|
{
|
||||||
|
private final int _reputation;
|
||||||
|
|
||||||
|
public GiveClanReputation(StatsSet params)
|
||||||
|
{
|
||||||
|
_reputation = params.getInt("reputation", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInstant()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
|
{
|
||||||
|
if (!effector.isPlayer() || !effected.isPlayer() || effected.isAlikeDead() || (effector.getActingPlayer().getClan() == null))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
effector.getActingPlayer().getClan().addReputationScore(_reputation, true);
|
||||||
|
|
||||||
|
for (L2ClanMember member : effector.getActingPlayer().getClan().getMembers())
|
||||||
|
{
|
||||||
|
if (member.isOnline())
|
||||||
|
{
|
||||||
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_ADDED_S1_POINT_S_TO_ITS_CLAN_REPUTATION);
|
||||||
|
sm.addInt(_reputation);
|
||||||
|
member.getPlayerInstance().sendPacket(sm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user