Sync with L2JServer Jan 12th 2015.
This commit is contained in:
@@ -98,6 +98,7 @@ public final class EffectMasterHandler
|
||||
GiveRecommendation.class,
|
||||
GiveSp.class,
|
||||
Grow.class,
|
||||
HairAccessorySet.class,
|
||||
Harvesting.class,
|
||||
HeadquarterCreate.class,
|
||||
Heal.class,
|
||||
|
@@ -46,7 +46,6 @@ import com.l2jserver.gameserver.model.base.ClassId;
|
||||
import com.l2jserver.gameserver.network.L2GameClient;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AcquireSkillList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExVoteSystemInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.GMViewItemList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
@@ -235,7 +234,6 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
player.setPkKills(pk);
|
||||
player.broadcastUserInfo();
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
player.sendMessage("A GM changed your PK count to " + pk);
|
||||
activeChar.sendMessage(player.getName() + "'s PK count changed to " + pk);
|
||||
}
|
||||
@@ -266,7 +264,6 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
player.setPvpKills(pvp);
|
||||
player.broadcastUserInfo();
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
player.sendMessage("A GM changed your PVP count to " + pvp);
|
||||
activeChar.sendMessage(player.getName() + "'s PVP count changed to " + pvp);
|
||||
}
|
||||
@@ -297,7 +294,6 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
player.setFame(fame);
|
||||
player.broadcastUserInfo();
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
player.sendMessage("A GM changed your Reputation points to " + fame);
|
||||
activeChar.sendMessage(player.getName() + "'s Fame changed to " + fame);
|
||||
}
|
||||
@@ -328,7 +324,6 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
player.setRecomHave(recVal);
|
||||
player.broadcastUserInfo();
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
player.sendPacket(new ExVoteSystemInfo(player));
|
||||
player.sendMessage("A GM changed your Recommend points to " + recVal);
|
||||
activeChar.sendMessage(player.getName() + "'s Recommend changed to " + recVal);
|
||||
|
@@ -36,10 +36,10 @@ import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CharInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.Earthquake;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExRedSky;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SocialAction;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SunRise;
|
||||
@@ -89,8 +89,6 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
"admin_effect",
|
||||
"admin_effect_menu",
|
||||
"admin_ave_abnormal",
|
||||
"admin_ave_special",
|
||||
"admin_ave_event",
|
||||
"admin_social_menu",
|
||||
"admin_play_sounds",
|
||||
"admin_play_sound",
|
||||
@@ -221,7 +219,7 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
{
|
||||
if (!player.isGM())
|
||||
{
|
||||
player.startAbnormalVisualEffect(true, AbnormalVisualEffect.PARALYZE);
|
||||
player.startAbnormalVisualEffect(AbnormalVisualEffect.PARALYZE);
|
||||
player.setIsParalyzed(true);
|
||||
player.startParalyze();
|
||||
}
|
||||
@@ -238,7 +236,7 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
Collection<L2PcInstance> plrs = activeChar.getKnownList().getKnownPlayers().values();
|
||||
for (L2PcInstance player : plrs)
|
||||
{
|
||||
player.stopAbnormalVisualEffect(true, AbnormalVisualEffect.PARALYZE);
|
||||
player.stopAbnormalVisualEffect(AbnormalVisualEffect.PARALYZE);
|
||||
player.setIsParalyzed(false);
|
||||
}
|
||||
}
|
||||
@@ -265,11 +263,11 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
player = (L2Character) target;
|
||||
if (type.equals("1"))
|
||||
{
|
||||
player.startAbnormalVisualEffect(true, AbnormalVisualEffect.PARALYZE);
|
||||
player.startAbnormalVisualEffect(AbnormalVisualEffect.PARALYZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.startAbnormalVisualEffect(true, AbnormalVisualEffect.FLESH_STONE);
|
||||
player.startAbnormalVisualEffect(AbnormalVisualEffect.FLESH_STONE);
|
||||
}
|
||||
player.setIsParalyzed(true);
|
||||
player.startParalyze();
|
||||
@@ -298,11 +296,11 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
player = (L2Character) target;
|
||||
if (type.equals("1"))
|
||||
{
|
||||
player.stopAbnormalVisualEffect(true, AbnormalVisualEffect.PARALYZE);
|
||||
player.stopAbnormalVisualEffect(AbnormalVisualEffect.PARALYZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.stopAbnormalVisualEffect(true, AbnormalVisualEffect.FLESH_STONE);
|
||||
player.stopAbnormalVisualEffect(AbnormalVisualEffect.FLESH_STONE);
|
||||
}
|
||||
player.setIsParalyzed(false);
|
||||
}
|
||||
@@ -320,7 +318,7 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
if (target instanceof L2Character)
|
||||
{
|
||||
player = (L2Character) target;
|
||||
player.startAbnormalVisualEffect(true, AbnormalVisualEffect.BIG_HEAD);
|
||||
player.startAbnormalVisualEffect(AbnormalVisualEffect.BIG_HEAD);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -336,7 +334,7 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
if (target instanceof L2Character)
|
||||
{
|
||||
player = (L2Character) target;
|
||||
player.stopAbnormalVisualEffect(true, AbnormalVisualEffect.BIG_HEAD);
|
||||
player.stopAbnormalVisualEffect(AbnormalVisualEffect.BIG_HEAD);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -377,7 +375,6 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
activeChar.broadcastPacket(info1);
|
||||
UserInfo info2 = new UserInfo(activeChar);
|
||||
activeChar.sendPacket(info2);
|
||||
activeChar.broadcastPacket(new ExBrExtraUserInfo(activeChar));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -393,7 +390,6 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
activeChar.broadcastPacket(info1);
|
||||
UserInfo info2 = new UserInfo(activeChar);
|
||||
activeChar.sendPacket(info2);
|
||||
activeChar.broadcastPacket(new ExBrExtraUserInfo(activeChar));
|
||||
}
|
||||
else if (command.equals("admin_clearteams"))
|
||||
{
|
||||
@@ -526,7 +522,7 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("admin_ave_abnormal") || command.startsWith("admin_ave_special") || command.startsWith("admin_ave_event"))
|
||||
else if (command.startsWith("admin_ave_abnormal"))
|
||||
{
|
||||
if (st.countTokens() > 0)
|
||||
{
|
||||
@@ -580,7 +576,18 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < AbnormalVisualEffect.values().length; i++)
|
||||
{
|
||||
final AbnormalVisualEffect abnormalVisualEffect = AbnormalVisualEffect.values()[i];
|
||||
sb.append("<button action=\"bypass admin_ave_abnormal " + abnormalVisualEffect.name() + "\" align=left icon=teleport>" + abnormalVisualEffect.name() + "</button>");
|
||||
}
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/ave_abnormal.htm");
|
||||
html.replace("%abnormals%", sb.toString());
|
||||
activeChar.sendPacket(html);
|
||||
activeChar.sendMessage("Usage: //" + command.replace("admin_", "") + " <AbnormalVisualEffect> [radius]");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("admin_effect"))
|
||||
@@ -640,7 +647,7 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
}
|
||||
}
|
||||
|
||||
if (command.contains("menu") || command.contains("ave_"))
|
||||
if (command.contains("menu"))
|
||||
{
|
||||
showMainPage(activeChar, command);
|
||||
}
|
||||
@@ -657,13 +664,13 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
if (target instanceof L2Character)
|
||||
{
|
||||
final L2Character character = (L2Character) target;
|
||||
if (character.hasAbnormalVisualEffect(ave))
|
||||
if (!character.hasAbnormalVisualEffect(ave))
|
||||
{
|
||||
character.stopAbnormalVisualEffect(true, ave);
|
||||
character.startAbnormalVisualEffect(ave);
|
||||
}
|
||||
else
|
||||
{
|
||||
character.startAbnormalVisualEffect(true, ave);
|
||||
character.stopAbnormalVisualEffect(ave);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -764,19 +771,7 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
private void showMainPage(L2PcInstance activeChar, String command)
|
||||
{
|
||||
String filename = "effects_menu";
|
||||
if (command.contains("ave_abnormal"))
|
||||
{
|
||||
filename = "ave_abnormal";
|
||||
}
|
||||
else if (command.contains("ave_special"))
|
||||
{
|
||||
filename = "ave_special";
|
||||
}
|
||||
else if (command.contains("ave_event"))
|
||||
{
|
||||
filename = "ave_event";
|
||||
}
|
||||
else if (command.contains("social"))
|
||||
if (command.contains("social"))
|
||||
{
|
||||
filename = "social";
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@ import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CharInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
|
||||
@@ -218,7 +217,6 @@ public class AdminEnchant implements IAdminCommandHandler
|
||||
player.sendPacket(iu);
|
||||
player.broadcastPacket(new CharInfo(player));
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.broadcastPacket(new ExBrExtraUserInfo(player));
|
||||
|
||||
// informations
|
||||
activeChar.sendMessage("Changed enchantment of " + player.getName() + "'s " + itemInstance.getItem().getName() + " from " + curEnchant + " to " + ench + ".");
|
||||
|
@@ -37,7 +37,6 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.entity.L2Event;
|
||||
import com.l2jserver.gameserver.model.entity.L2Event.EventState;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CharInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
@@ -331,7 +330,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
player.broadcastPacket(info1);
|
||||
UserInfo info2 = new UserInfo(player);
|
||||
player.sendPacket(info2);
|
||||
player.broadcastPacket(new ExBrExtraUserInfo(player));
|
||||
}
|
||||
showEventControl(activeChar);
|
||||
}
|
||||
@@ -348,7 +346,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
player.broadcastPacket(info1);
|
||||
UserInfo info2 = new UserInfo(player);
|
||||
player.sendPacket(info2);
|
||||
player.broadcastPacket(new ExBrExtraUserInfo(player));
|
||||
}
|
||||
}
|
||||
showEventControl(activeChar);
|
||||
|
@@ -61,6 +61,7 @@ public class AdminTeleport implements IAdminCommandHandler
|
||||
"admin_show_teleport",
|
||||
"admin_teleport_to_character",
|
||||
"admin_teleportto",
|
||||
"admin_teleport",
|
||||
"admin_move_to",
|
||||
"admin_teleport_character",
|
||||
"admin_recall",
|
||||
@@ -184,6 +185,23 @@ public class AdminTeleport implements IAdminCommandHandler
|
||||
{
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("admin_teleport"))
|
||||
{
|
||||
try
|
||||
{
|
||||
final StringTokenizer st = new StringTokenizer(command, " ");
|
||||
st.nextToken();
|
||||
final int x = (int) Float.parseFloat(st.nextToken());
|
||||
final int y = (int) Float.parseFloat(st.nextToken());
|
||||
final int z = (int) Float.parseFloat(st.nextToken());
|
||||
|
||||
activeChar.teleToLocation(x, y, z);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
activeChar.sendMessage("Wrong coordinates!");
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("admin_recall "))
|
||||
{
|
||||
try
|
||||
|
59
trunk/dist/game/data/scripts/handlers/effecthandlers/HairAccessorySet.java
vendored
Normal file
59
trunk/dist/game/data/scripts/handlers/effecthandlers/HairAccessorySet.java
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.l2jserver.gameserver.enums.UserInfoType;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.conditions.Condition;
|
||||
import com.l2jserver.gameserver.model.effects.AbstractEffect;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class HairAccessorySet extends AbstractEffect
|
||||
{
|
||||
public HairAccessorySet(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
|
||||
{
|
||||
super(attachCond, applyCond, set, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstant()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(BuffInfo info)
|
||||
{
|
||||
if ((info.getEffector() == null) || (info.getEffected() == null) || !info.getEffector().isPlayer() || !info.getEffected().isPlayer() || info.getEffected().isAlikeDead())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final L2PcInstance player = info.getEffected().getActingPlayer();
|
||||
|
||||
player.setHairAccessoryEnabled(!player.isHairAccessoryEnabled());
|
||||
player.broadcastUserInfo(UserInfoType.APPAREANCE);
|
||||
player.sendPacket(player.isHairAccessoryEnabled() ? SystemMessageId.HAIR_ACCESSORIES_WILL_BE_DISPLAYED_FROM_NOW_ON : SystemMessageId.HAIR_ACCESSORIES_WILL_NO_LONGER_BE_DISPLAYED);
|
||||
}
|
||||
}
|
@@ -57,6 +57,6 @@ public final class RefuelAirship extends AbstractEffect
|
||||
{
|
||||
final L2AirShipInstance ship = info.getEffector().getActingPlayer().getAirShip();
|
||||
ship.setFuel(ship.getFuel() + _value);
|
||||
ship.updateAbnormalEffect();
|
||||
ship.updateAbnormalVisualEffects();
|
||||
}
|
||||
}
|
||||
|
@@ -36,7 +36,6 @@ import com.l2jserver.gameserver.model.punishment.PunishmentTask;
|
||||
import com.l2jserver.gameserver.model.punishment.PunishmentType;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CharInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
@@ -321,7 +320,6 @@ public class PlayerHandler implements ITelnetHandler
|
||||
activeChar.sendPacket(iu);
|
||||
activeChar.broadcastPacket(new CharInfo(activeChar));
|
||||
activeChar.sendPacket(new UserInfo(activeChar));
|
||||
activeChar.broadcastPacket(new ExBrExtraUserInfo(activeChar));
|
||||
|
||||
// informations
|
||||
activeChar.sendMessage("Changed enchantment of " + activeChar.getName() + "'s " + itemInstance.getItem().getName() + " from " + curEnchant + " to " + ench + ".");
|
||||
|
@@ -149,7 +149,7 @@ public class Wedding implements IVoicedCommandHandler
|
||||
activeChar.sendMessage("You are already engaged.");
|
||||
if (Config.L2JMOD_WEDDING_PUNISH_INFIDELITY)
|
||||
{
|
||||
activeChar.startAbnormalVisualEffect(true, AbnormalVisualEffect.BIG_HEAD); // give player a Big Head
|
||||
activeChar.startAbnormalVisualEffect(AbnormalVisualEffect.BIG_HEAD); // give player a Big Head
|
||||
// lets recycle the sevensigns debuffs
|
||||
int skillId;
|
||||
|
||||
|
Reference in New Issue
Block a user