EtcStatusUpdate addition and other C4 adjustments.
Contributed by emilianoify.
This commit is contained in:
@@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.data.xml.AdminData;
|
||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||
|
||||
/**
|
||||
@@ -183,6 +184,7 @@ public class AdminAio implements IAdminCommandHandler
|
||||
|
||||
player.rewardAioSkills();
|
||||
player.broadcastUserInfo();
|
||||
player.sendPacket(new EtcStatusUpdate(player));
|
||||
player.sendSkillList();
|
||||
AdminData.broadcastMessageToGMs("GM " + activeChar.getName() + " set Aio stat for player " + playerName + " for " + time + " day(s)");
|
||||
player.sendMessage("You are now an Aio, Congratulations!");
|
||||
@@ -215,6 +217,7 @@ public class AdminAio implements IAdminCommandHandler
|
||||
player.getAppearance().setNameColor(0xFFFFFF);
|
||||
player.getAppearance().setTitleColor(0xFFFFFF);
|
||||
player.broadcastUserInfo();
|
||||
player.sendPacket(new EtcStatusUpdate(player));
|
||||
player.sendSkillList();
|
||||
AdminData.broadcastMessageToGMs("GM " + activeChar.getName() + " remove Aio stat of player " + playerName);
|
||||
player.sendMessage("Now You are not an Aio..");
|
||||
|
@@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillCharge;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
@@ -109,6 +110,7 @@ public class EnergyStone implements IItemHandler
|
||||
final MagicSkillUse msu = new MagicSkillUse(playable, player, skill.getId(), 1, 1, 0);
|
||||
player.sendPacket(msu);
|
||||
player.broadcastPacket(msu);
|
||||
player.sendPacket(new EtcStatusUpdate(player));
|
||||
player.destroyItem("Consume", item.getObjectId(), 1, null, false);
|
||||
}
|
||||
|
||||
|
@@ -39,6 +39,7 @@ import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public class Pdam implements ISkillHandler
|
||||
@@ -296,6 +297,7 @@ public class Pdam implements ISkillHandler
|
||||
effectcharge++;
|
||||
effect.addNumCharges(1);
|
||||
|
||||
creature.sendPacket(new EtcStatusUpdate((Player) creature));
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_FORCE_HAS_INCREASED_TO_S1_LEVEL);
|
||||
sm.addNumber(effectcharge);
|
||||
creature.sendPacket(sm);
|
||||
|
@@ -61,6 +61,7 @@ import org.l2jmobius.gameserver.model.skill.funcs.Func;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.FuncTemplate;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
@@ -2514,6 +2515,7 @@ public abstract class Skill
|
||||
effect.addNumCharges(effectcharge);
|
||||
if (env.target instanceof Player)
|
||||
{
|
||||
env.target.sendPacket(new EtcStatusUpdate((Player) env.target));
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_FORCE_HAS_INCREASED_TO_S1_LEVEL);
|
||||
sm.addNumber(effectcharge);
|
||||
env.target.sendPacket(sm);
|
||||
|
@@ -175,6 +175,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ChangeWaitType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CharInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ConfirmDlg;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExAutoSoulShot;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExFishingEnd;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExFishingStart;
|
||||
@@ -2012,6 +2013,7 @@ public class Player extends Playable
|
||||
setOverloaded(false);
|
||||
_curWeightPenalty = 0;
|
||||
super.removeSkill(getKnownSkill(4270));
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
Broadcast.toKnownPlayers(this, new CharInfo(this, isGM() && getAppearance().isInvisible()));
|
||||
}
|
||||
else
|
||||
@@ -2056,6 +2058,7 @@ public class Player extends Playable
|
||||
sendSkillList(); // Fix visual bug
|
||||
}
|
||||
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
Broadcast.toKnownPlayers(this, new CharInfo(this, isGM() && getAppearance().isInvisible()));
|
||||
}
|
||||
}
|
||||
@@ -2157,6 +2160,7 @@ public class Player extends Playable
|
||||
super.removeSkill(getKnownSkill(4267));
|
||||
}
|
||||
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
_masteryPenalty = newMasteryPenalty;
|
||||
}
|
||||
}
|
||||
@@ -2346,6 +2350,7 @@ public class Player extends Playable
|
||||
super.removeSkill(getKnownSkill(4267));
|
||||
}
|
||||
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
_masteryWeapPenalty = newMasteryPenalty;
|
||||
}
|
||||
}
|
||||
@@ -5503,6 +5508,8 @@ public class Player extends Playable
|
||||
sendMessage("War Legend state removed.");
|
||||
}
|
||||
|
||||
// Refresh focus force like L2OFF
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -9363,6 +9370,7 @@ public class Player extends Playable
|
||||
}
|
||||
|
||||
effect.numCharges -= skill.getNumCharges();
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
if (effect.numCharges == 0)
|
||||
{
|
||||
effect.exit(false);
|
||||
@@ -10629,6 +10637,7 @@ public class Player extends Playable
|
||||
public void setInRefusalMode(boolean mode)
|
||||
{
|
||||
_messageRefusal = mode;
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -11519,6 +11528,7 @@ public class Player extends Playable
|
||||
checkAllowedSkills();
|
||||
}
|
||||
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
// if player has quest 422: Repent Your Sins, remove it
|
||||
final QuestState st = getQuestState("422_RepentYourSins");
|
||||
if (st != null)
|
||||
@@ -11862,6 +11872,7 @@ public class Player extends Playable
|
||||
super.doRevive();
|
||||
|
||||
updateEffectIcons();
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
_reviveRequested = 0;
|
||||
_revivePower = 0;
|
||||
|
||||
@@ -13810,6 +13821,7 @@ public class Player extends Playable
|
||||
public void setCharmOfCourage(boolean value)
|
||||
{
|
||||
_charmOfCourage = value;
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -13864,6 +13876,7 @@ public class Player extends Playable
|
||||
_deathPenaltyBuffLevel++;
|
||||
|
||||
addSkill(SkillTable.getInstance().getSkill(5076, getDeathPenaltyBuffLevel()), false);
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_DEATH_PENALTY_IS_NOW_LEVEL_S1);
|
||||
sm.addNumber(getDeathPenaltyBuffLevel());
|
||||
sendPacket(sm);
|
||||
@@ -13892,6 +13905,7 @@ public class Player extends Playable
|
||||
if (getDeathPenaltyBuffLevel() > 0)
|
||||
{
|
||||
addSkill(SkillTable.getInstance().getSkill(5076, getDeathPenaltyBuffLevel()), false);
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_DEATH_PENALTY_IS_NOW_LEVEL_S1);
|
||||
sm.addNumber(getDeathPenaltyBuffLevel());
|
||||
sendPacket(sm);
|
||||
@@ -13899,6 +13913,7 @@ public class Player extends Playable
|
||||
}
|
||||
else
|
||||
{
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
sendPacket(SystemMessageId.YOUR_DEATH_PENALTY_HAS_BEEN_LIFTED);
|
||||
}
|
||||
}
|
||||
@@ -13946,6 +13961,7 @@ public class Player extends Playable
|
||||
sm.addNumber(getDeathPenaltyBuffLevel());
|
||||
sendPacket(sm);
|
||||
}
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -14755,6 +14771,7 @@ public class Player extends Playable
|
||||
{
|
||||
_punishLevel = state;
|
||||
stopPunishTask(true);
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
sendMessage("Your Chat ban has been lifted");
|
||||
break;
|
||||
}
|
||||
@@ -14789,6 +14806,7 @@ public class Player extends Playable
|
||||
}
|
||||
_punishLevel = state;
|
||||
_punishTimer = 0;
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
// Remove the task if any
|
||||
stopPunishTask(false);
|
||||
|
||||
|
@@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.model.effects.Effect;
|
||||
import org.l2jmobius.gameserver.model.effects.EffectType;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public class EffectCharge extends Effect
|
||||
@@ -33,6 +34,7 @@ public class EffectCharge extends Effect
|
||||
numCharges = 1;
|
||||
if (env.target instanceof Player)
|
||||
{
|
||||
env.target.sendPacket(new EtcStatusUpdate((Player) env.target));
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_FORCE_HAS_INCREASED_TO_S1_LEVEL);
|
||||
sm.addNumber(numCharges);
|
||||
getEffected().sendPacket(sm);
|
||||
|
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public class SkillCharge extends Skill
|
||||
@@ -78,6 +79,7 @@ public class SkillCharge extends Skill
|
||||
effect.numCharges++;
|
||||
if (caster instanceof Player)
|
||||
{
|
||||
caster.sendPacket(new EtcStatusUpdate((Player) caster));
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_FORCE_HAS_INCREASED_TO_S1_LEVEL);
|
||||
sm.addNumber(effect.numCharges);
|
||||
caster.sendPacket(sm);
|
||||
|
@@ -31,6 +31,7 @@ import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public class SkillChargeDmg extends Skill
|
||||
@@ -86,6 +87,11 @@ public class SkillChargeDmg extends Skill
|
||||
effect.numCharges -= getNumCharges();
|
||||
}
|
||||
|
||||
if (caster instanceof Player)
|
||||
{
|
||||
caster.sendPacket(new EtcStatusUpdate((Player) caster));
|
||||
}
|
||||
|
||||
if (effect.numCharges == 0)
|
||||
{
|
||||
effect.exit(false);
|
||||
|
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public class SkillChargeEffect extends Skill
|
||||
@@ -90,5 +91,9 @@ public class SkillChargeEffect extends Skill
|
||||
applyEffects(creature, (Creature) target, false, false, false);
|
||||
}
|
||||
}
|
||||
if (creature instanceof Player)
|
||||
{
|
||||
creature.sendPacket(new EtcStatusUpdate((Player) creature));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@ import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
|
||||
/**
|
||||
* Another type of damage zone with skills.
|
||||
@@ -150,6 +151,7 @@ public class EffectZone extends ZoneType
|
||||
if (creature.isPlayer() && _isShowDangerIcon)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.DANGER_AREA, true);
|
||||
creature.sendPacket(new EtcStatusUpdate(creature.getActingPlayer()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +161,10 @@ public class EffectZone extends ZoneType
|
||||
if (creature.isPlayer() && _isShowDangerIcon)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.DANGER_AREA, false);
|
||||
if (!creature.isInsideZone(ZoneId.DANGER_AREA))
|
||||
{
|
||||
creature.sendPacket(new EtcStatusUpdate(creature.getActingPlayer()));
|
||||
}
|
||||
}
|
||||
|
||||
if (_removeEffectsOnExit && (_skills != null))
|
||||
|
@@ -27,6 +27,8 @@ import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.RequestAskJoinPartyRoom;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.RequestAutoSoulShot;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.RequestChangePartyLeader;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.RequestConfirmCancelItem;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.RequestConfirmTargetItem;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.RequestDismissPartyRoom;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.RequestExAcceptJoinMPCC;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.RequestExAskJoinMPCC;
|
||||
@@ -96,7 +98,9 @@ public enum ExClientPackets
|
||||
REQUEST_PC_CAFE_COUPON_USE(0x20, RequestPCCafeCouponUse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_PLEDGE_REORGANIZE_MEMBER(0x24, RequestPledgeReorganizeMember::new, ConnectionState.IN_GAME),
|
||||
REQUEST_EX_MPCC_SHOW_PARTY_MEMBERS_INFO(0x25, RequestExMPCCShowPartyMembersInfo::new, ConnectionState.IN_GAME),
|
||||
REQUEST_EX_MAGIC_SKILL_USE_GROUND(0x2F, RequestExMagicSkillUseGround::new, ConnectionState.IN_GAME);
|
||||
REQUEST_EX_MAGIC_SKILL_USE_GROUND(0x2F, RequestExMagicSkillUseGround::new, ConnectionState.IN_GAME),
|
||||
REQUEST_CONFIRM_TARGET_ITEM(0x29, RequestConfirmTargetItem::new, ConnectionState.IN_GAME),
|
||||
REQUEST_CONFIRM_CANCEL_ITEM(0x2D, RequestConfirmCancelItem::new, ConnectionState.IN_GAME);
|
||||
|
||||
public static final ExClientPackets[] PACKET_ARRAY;
|
||||
static
|
||||
|
@@ -69,6 +69,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ClientSetTime;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.Die;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExMailArrived;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExStorageMaxCount;
|
||||
@@ -185,6 +186,8 @@ public class EnterWorld implements ClientPacket
|
||||
player.restoreEffects();
|
||||
}
|
||||
|
||||
player.sendPacket(new EtcStatusUpdate(player));
|
||||
|
||||
for (Effect effect : player.getAllEffects())
|
||||
{
|
||||
if (effect.getEffectType() == EffectType.HEAL_OVER_TIME)
|
||||
@@ -706,6 +709,7 @@ public class EnterWorld implements ClientPacket
|
||||
player.sendPacket(new ItemList(player, false));
|
||||
player.sendPacket(new ShortCutInit(player));
|
||||
player.broadcastUserInfo();
|
||||
player.sendPacket(new EtcStatusUpdate(player));
|
||||
}
|
||||
|
||||
private void onEnterAio(Player player)
|
||||
|
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
import org.l2jmobius.commons.network.ReadablePacket;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExConfirmCancelItem;
|
||||
|
||||
/**
|
||||
* Format(ch) d
|
||||
* @author -Wooden-
|
||||
*/
|
||||
public class RequestConfirmCancelItem implements ClientPacket
|
||||
{
|
||||
private int _itemId;
|
||||
|
||||
@Override
|
||||
public void read(ReadablePacket packet)
|
||||
{
|
||||
_itemId = packet.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
final Item item = (Item) World.getInstance().findObject(_itemId);
|
||||
if ((player == null) || (item == null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int price = 0;
|
||||
switch (item.getTemplate().getItemGrade())
|
||||
{
|
||||
case ItemTemplate.CRYSTAL_C:
|
||||
{
|
||||
if (item.getCrystalCount() < 1720)
|
||||
{
|
||||
price = 95000;
|
||||
}
|
||||
else if (item.getCrystalCount() < 2452)
|
||||
{
|
||||
price = 150000;
|
||||
}
|
||||
else
|
||||
{
|
||||
price = 210000;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemTemplate.CRYSTAL_B:
|
||||
{
|
||||
if (item.getCrystalCount() < 1746)
|
||||
{
|
||||
price = 240000;
|
||||
}
|
||||
else
|
||||
{
|
||||
price = 270000;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemTemplate.CRYSTAL_A:
|
||||
{
|
||||
if (item.getCrystalCount() < 2160)
|
||||
{
|
||||
price = 330000;
|
||||
}
|
||||
else if (item.getCrystalCount() < 2824)
|
||||
{
|
||||
price = 390000;
|
||||
}
|
||||
else
|
||||
{
|
||||
price = 420000;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemTemplate.CRYSTAL_S:
|
||||
{
|
||||
price = 480000;
|
||||
break;
|
||||
}
|
||||
// any other item type is not augmentable
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
player.sendPacket(new ExConfirmCancelItem(_itemId, price));
|
||||
}
|
||||
}
|
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
import org.l2jmobius.commons.network.ReadablePacket;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExConfirmVariationItem;
|
||||
|
||||
/**
|
||||
* Format:(ch) d
|
||||
* @author -Wooden-
|
||||
*/
|
||||
public class RequestConfirmTargetItem implements ClientPacket
|
||||
{
|
||||
private int _itemObjId;
|
||||
|
||||
@Override
|
||||
public void read(ReadablePacket packet)
|
||||
{
|
||||
_itemObjId = packet.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
final Item item = (Item) World.getInstance().findObject(_itemObjId);
|
||||
if (item == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.getLevel() < 46)
|
||||
{
|
||||
player.sendMessage("You have to be level 46 in order to augment an item");
|
||||
return;
|
||||
}
|
||||
|
||||
// check if the item is augmentable
|
||||
final int itemGrade = item.getTemplate().getItemGrade();
|
||||
final int itemType = item.getTemplate().getType2();
|
||||
|
||||
// TODO: can do better? : currently: using isdestroyable() as a check for hero / cursed weapons
|
||||
if ((itemGrade < ItemTemplate.CRYSTAL_C) || (itemType != ItemTemplate.TYPE2_WEAPON) || !item.isDestroyable() || item.isShadowItem())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.THIS_IS_NOT_A_SUITABLE_ITEM);
|
||||
return;
|
||||
}
|
||||
|
||||
// check if the player can augment
|
||||
if (player.getPrivateStoreType() != Player.STORE_PRIVATE_NONE)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_AUGMENT_ITEMS_WHILE_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP_IS_IN_OPERATION);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isDead())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_AUGMENT_ITEMS_WHILE_DEAD);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isParalyzed())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_AUGMENT_ITEMS_WHILE_PARALYZED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isFishing())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_AUGMENT_ITEMS_WHILE_FISHING);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isSitting())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_AUGMENT_ITEMS_WHILE_SITTING_DOWN);
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new ExConfirmVariationItem(_itemObjId));
|
||||
player.sendPacket(SystemMessageId.SELECT_THE_CATALYST_FOR_AUGMENTATION);
|
||||
}
|
||||
}
|
@@ -46,7 +46,7 @@ public class RequestManorList implements ClientPacket
|
||||
manorsName.add("innadril");
|
||||
manorsName.add("goddard");
|
||||
manorsName.add("rune");
|
||||
manorsName.add("schuttgart");
|
||||
|
||||
player.sendPacket(new ExSendManorList(manorsName));
|
||||
}
|
||||
}
|
||||
|
@@ -42,6 +42,7 @@ import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ItemList;
|
||||
@@ -155,12 +156,12 @@ public class UseItem implements ClientPacket
|
||||
* Alt game - Karma punishment // SOE 736 Scroll of Escape 1538 Blessed Scroll of Escape 1829 Scroll of Escape: Clan Hall 1830 Scroll of Escape: Castle 3958 L2Day - Blessed Scroll of Escape 5858 Blessed Scroll of Escape: Clan Hall 5859 Blessed Scroll of Escape: Castle 6663 Scroll of Escape:
|
||||
* Orc Village 6664 Scroll of Escape: Silenos Village 7117 Scroll of Escape to Talking Island 7118 Scroll of Escape to Elven Village 7119 Scroll of Escape to Dark Elf Village 7120 Scroll of Escape to Orc Village 7121 Scroll of Escape to Dwarven Village 7122 Scroll of Escape to Gludin Village
|
||||
* 7123 Scroll of Escape to the Town of Gludio 7124 Scroll of Escape to the Town of Dion 7125 Scroll of Escape to Floran 7126 Scroll of Escape to Giran Castle Town 7127 Scroll of Escape to Hardin's Private Academy 7128 Scroll of Escape to Heine 7129 Scroll of Escape to the Town of Oren 7130
|
||||
* Scroll of Escape to Ivory Tower 7131 Scroll of Escape to Hunters Village 7132 Scroll of Escape to Aden Castle Town 7133 Scroll of Escape to the Town of Goddard 7134 Scroll of Escape to the Rune Township 7135 Scroll of Escape to the Town of Schuttgart. 7554 Scroll of Escape to Talking
|
||||
* Island 7555 Scroll of Escape to Elven Village 7556 Scroll of Escape to Dark Elf Village 7557 Scroll of Escape to Orc Village 7558 Scroll of Escape to Dwarven Village 7559 Scroll of Escape to Giran Castle Town 7618 Scroll of Escape - Ketra Orc Village 7619 Scroll of Escape - Varka Silenos
|
||||
* Village 10129 Scroll of Escape : Fortress 10130 Blessed Scroll of Escape : Fortress
|
||||
* Scroll of Escape to Ivory Tower 7131 Scroll of Escape to Hunters Village 7132 Scroll of Escape to Aden Castle Town 7133 Scroll of Escape to the Town of Goddard 7134 Scroll of Escape to the Rune Township. 7554 Scroll of Escape to Talking Island 7555 Scroll of Escape to Elven Village 7556
|
||||
* Scroll of Escape to Dark Elf Village 7557 Scroll of Escape to Orc Village 7558 Scroll of Escape to Dwarven Village 7559 Scroll of Escape to Giran Castle Town 7618 Scroll of Escape - Ketra Orc Village 7619 Scroll of Escape - Varka Silenos Village 10129 Scroll of Escape : Fortress 10130
|
||||
* Blessed Scroll of Escape : Fortress
|
||||
*/
|
||||
final int itemId = item.getItemId();
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT && (player.getKarma() > 0) && ((itemId == 736) || (itemId == 1538) || (itemId == 1829) || (itemId == 1830) || (itemId == 3958) || (itemId == 5858) || (itemId == 5859) || (itemId == 6663) || (itemId == 6664) || ((itemId >= 7117) && (itemId <= 7135)) || ((itemId >= 7554) && (itemId <= 7559)) || (itemId == 7618) || (itemId == 7619) || (itemId == 10129) || (itemId == 10130)))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT && (player.getKarma() > 0) && ((itemId == 736) || (itemId == 1538) || (itemId == 1829) || (itemId == 1830) || (itemId == 3958) || (itemId == 5858) || (itemId == 5859) || (itemId == 6663) || (itemId == 6664) || (itemId >= 7117) || ((itemId >= 7554) && (itemId <= 7559)) || (itemId == 7618) || (itemId == 7619) || (itemId == 10129) || (itemId == 10130)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -559,6 +560,7 @@ public class UseItem implements ClientPacket
|
||||
|
||||
player.abortAttack();
|
||||
|
||||
player.sendPacket(new EtcStatusUpdate(player));
|
||||
// If an "invisible" item has changed (Jewels, helmet), we dont need to send broadcast packet to all other users.
|
||||
if ((((item.getTemplate().getBodyPart() & ItemTemplate.SLOT_HEAD) <= 0) && ((item.getTemplate().getBodyPart() & ItemTemplate.SLOT_NECK) <= 0) && ((item.getTemplate().getBodyPart() & ItemTemplate.SLOT_L_EAR) <= 0) && ((item.getTemplate().getBodyPart() & ItemTemplate.SLOT_R_EAR) <= 0) && ((item.getTemplate().getBodyPart() & ItemTemplate.SLOT_L_FINGER) <= 0) && ((item.getTemplate().getBodyPart() & ItemTemplate.SLOT_R_FINGER) <= 0)))
|
||||
{
|
||||
|
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.effects.EffectType;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.ServerPackets;
|
||||
|
||||
/**
|
||||
* @author Luca Baldi
|
||||
*/
|
||||
public class EtcStatusUpdate extends ServerPacket
|
||||
{
|
||||
private final Player _player;
|
||||
private final EffectCharge _effect;
|
||||
|
||||
public EtcStatusUpdate(Player player)
|
||||
{
|
||||
_player = player;
|
||||
_effect = (EffectCharge) _player.getFirstEffect(EffectType.CHARGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write()
|
||||
{
|
||||
ServerPackets.ETC_STATUS_UPDATE.writeId(this);
|
||||
// several icons to a separate line (0 = disabled)
|
||||
if (_effect != null)
|
||||
{
|
||||
writeInt(_effect.getLevel()); // 1-7 increase force, level
|
||||
}
|
||||
else
|
||||
{
|
||||
writeInt(0); // 1-7 increase force, level
|
||||
}
|
||||
writeInt(_player.getWeightPenalty()); // 1-4 weight penalty, level (1=50%, 2=66.6%, 3=80%, 4=100%)
|
||||
writeInt(_player.isInRefusalMode() || _player.isChatBanned()); // 1 = block all chat
|
||||
// writeD(0); // 1 = danger area
|
||||
writeInt(_player.isInsideZone(ZoneId.DANGER_AREA)/* || _player.isInDangerArea() */); // 1 = danger area
|
||||
writeInt(Math.min(_player.getExpertisePenalty() + _player.getMasteryPenalty() + _player.getMasteryWeapPenalty(), 1)); // 1 = grade penalty
|
||||
writeInt(_player.getCharmOfCourage()); // 1 = charm of courage (no xp loss in siege..)
|
||||
writeInt(_player.getDeathPenaltyBuffLevel()); // 1-15 death penalty, level (combat ability decreased due to death)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user