From 67567ef8f62845af1ecdf566a39637fecdc248bb Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Wed, 24 Jan 2018 07:08:17 +0000
Subject: [PATCH] Remove buff info from target. Contributed by proGenitor.
---
.../ExAbnormalStatusUpdateFromTarget.java | 16 +++------
.../network/serverpackets/UserInfo.java | 34 +++++++++----------
2 files changed, 20 insertions(+), 30 deletions(-)
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/ExAbnormalStatusUpdateFromTarget.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/ExAbnormalStatusUpdateFromTarget.java
index 128eeffb20..d6f0218e83 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/ExAbnormalStatusUpdateFromTarget.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/ExAbnormalStatusUpdateFromTarget.java
@@ -18,15 +18,17 @@ package com.l2jmobius.gameserver.network.serverpackets;
import java.util.ArrayList;
import java.util.List;
-import java.util.Objects;
import java.util.stream.Collectors;
import com.l2jmobius.commons.network.PacketWriter;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
-import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.OutgoingPackets;
+/**
+ * @author proGenitor
+ * Experimental packet compatible for L2Classic 2.0.
+ */
public class ExAbnormalStatusUpdateFromTarget implements IClientOutgoingPacket
{
private final L2Character _character;
@@ -43,19 +45,12 @@ public class ExAbnormalStatusUpdateFromTarget implements IClientOutgoingPacket
public Effect(BuffInfo info)
{
- final Skill skill = info.getSkill();
final L2Character caster = info.getEffector();
int casterId = 0;
if (caster != null)
{
casterId = caster.getObjectId();
}
-
- _skillId = skill.getDisplayId();
- _level = skill.getDisplayLevel();
- _subLevel = skill.getSubLevel();
- _abnormalType = skill.getAbnormalType().getClientId();
- _duration = skill.isAura() ? -1 : info.getTime();
_caster = casterId;
}
}
@@ -66,9 +61,6 @@ public class ExAbnormalStatusUpdateFromTarget implements IClientOutgoingPacket
_character = character;
_effects = character.getEffectList().getEffects()
.stream()
- .filter(Objects::nonNull)
- .filter(BuffInfo::isInUse)
- .filter(b -> !b.getSkill().isToggle())
.map(Effect::new)
.collect(Collectors.toList());
//@formatter:on
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/UserInfo.java
index 837c0809e7..8ece0327c1 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/UserInfo.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/UserInfo.java
@@ -19,9 +19,7 @@ package com.l2jmobius.gameserver.network.serverpackets;
import com.l2jmobius.Config;
import com.l2jmobius.commons.network.PacketWriter;
import com.l2jmobius.gameserver.data.xml.impl.ExperienceData;
-import com.l2jmobius.gameserver.enums.AttributeType;
import com.l2jmobius.gameserver.enums.UserInfoType;
-import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2Party;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@@ -30,7 +28,8 @@ import com.l2jmobius.gameserver.model.zone.ZoneId;
import com.l2jmobius.gameserver.network.OutgoingPackets;
/**
- * @author Sdw, UnAfraid
+ * @author Sdw, UnAfraid, proGenitor
+ * Experimental packet compatible for L2Classic 2.0.
*/
public class UserInfo extends AbstractMaskPacket
{
@@ -161,8 +160,8 @@ public class UserInfo extends AbstractMaskPacket
packet.writeH(_activeChar.getINT());
packet.writeH(_activeChar.getWIT());
packet.writeH(_activeChar.getMEN());
- packet.writeH(_activeChar.getLUC());
- packet.writeH(_activeChar.getCHA());
+ packet.writeH(0x00);
+ packet.writeH(0x00);
}
if (containsMask(UserInfoType.MAX_HPCPMP))
@@ -206,7 +205,7 @@ public class UserInfo extends AbstractMaskPacket
packet.writeC(_activeChar.getMountType().ordinal());
packet.writeC(_activeChar.getPrivateStoreType().getId());
packet.writeC(_activeChar.hasDwarvenCraft() || (_activeChar.getSkillLevel(248) > 0) ? 1 : 0);
- packet.writeC(_activeChar.getAbilityPointsUsed());
+ packet.writeC(0x00);
}
if (containsMask(UserInfoType.STATS))
@@ -231,12 +230,12 @@ public class UserInfo extends AbstractMaskPacket
if (containsMask(UserInfoType.ELEMENTALS))
{
packet.writeH(14);
- packet.writeH(_activeChar.getDefenseElementValue(AttributeType.FIRE));
- packet.writeH(_activeChar.getDefenseElementValue(AttributeType.WATER));
- packet.writeH(_activeChar.getDefenseElementValue(AttributeType.WIND));
- packet.writeH(_activeChar.getDefenseElementValue(AttributeType.EARTH));
- packet.writeH(_activeChar.getDefenseElementValue(AttributeType.HOLY));
- packet.writeH(_activeChar.getDefenseElementValue(AttributeType.DARK));
+ packet.writeH(0x00);
+ packet.writeH(0x00);
+ packet.writeH(0x00);
+ packet.writeH(0x00);
+ packet.writeH(0x00);
+ packet.writeH(0x00);
}
if (containsMask(UserInfoType.POSITION))
@@ -278,9 +277,8 @@ public class UserInfo extends AbstractMaskPacket
if (containsMask(UserInfoType.ATK_ELEMENTAL))
{
packet.writeH(5);
- final AttributeType attackAttribute = _activeChar.getAttackElement();
- packet.writeC(attackAttribute.getClientId());
- packet.writeH(_activeChar.getAttackElementValue(attackAttribute));
+ packet.writeC(0x00);
+ packet.writeH(0x00);
}
if (containsMask(UserInfoType.CLAN))
@@ -303,7 +301,7 @@ public class UserInfo extends AbstractMaskPacket
packet.writeH(22);
packet.writeC(_activeChar.getPvpFlag());
packet.writeD(_activeChar.getReputation()); // Reputation
- packet.writeC(_activeChar.isNoble() ? 0x01 : 0x00);
+ packet.writeC(0x00);
packet.writeC(_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) ? 1 : 0);
packet.writeC(_activeChar.getPledgeClass());
packet.writeD(_activeChar.getPkKills());
@@ -315,7 +313,7 @@ public class UserInfo extends AbstractMaskPacket
if (containsMask(UserInfoType.VITA_FAME))
{
packet.writeH(15);
- packet.writeD(_activeChar.getVitalityPoints());
+ packet.writeD(0x00);
packet.writeC(0x00); // Vita Bonus
packet.writeD(_activeChar.getFame());
packet.writeD(_activeChar.getRaidbossPoints());
@@ -353,7 +351,7 @@ public class UserInfo extends AbstractMaskPacket
packet.writeH(0x00);
packet.writeH(0x00);
packet.writeH(_activeChar.getInventoryLimit());
- packet.writeC(_activeChar.isCursedWeaponEquipped() ? CursedWeaponsManager.getInstance().getLevel(_activeChar.getCursedWeaponEquippedId()) : 0);
+ packet.writeC(0);
}
if (containsMask(UserInfoType.UNK_3))