Addition of relation info for summon packets.
Thanks to Index.
This commit is contained in:
@@ -34,6 +34,7 @@ public class ExPetInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
{
|
||||
private final Summon _summon;
|
||||
private final Player _attacker;
|
||||
private final int _relation;
|
||||
private final int _value;
|
||||
private final byte[] _masks = new byte[]
|
||||
{
|
||||
@@ -58,6 +59,7 @@ public class ExPetInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
{
|
||||
_summon = summon;
|
||||
_attacker = attacker;
|
||||
_relation = (attacker != null) && (summon.getOwner() != null) ? summon.getOwner().getRelation(attacker) : 0;
|
||||
_title = (summon.getOwner() != null) && summon.getOwner().isOnline() ? summon.getOwner().getName() : "";
|
||||
_value = value;
|
||||
_abnormalVisualEffects = summon.getEffectList().getCurrentAbnormalVisualEffects();
|
||||
@@ -217,7 +219,7 @@ public class ExPetInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
}
|
||||
if (containsMask(NpcInfoType.RELATIONS))
|
||||
{
|
||||
packet.writeD(0);
|
||||
packet.writeD(_relation);
|
||||
}
|
||||
if (containsMask(NpcInfoType.TITLE))
|
||||
{
|
||||
|
@@ -34,6 +34,7 @@ public class SummonInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
{
|
||||
private final Summon _summon;
|
||||
private final Player _attacker;
|
||||
private final int _relation;
|
||||
private final int _value;
|
||||
private final byte[] _masks = new byte[]
|
||||
{
|
||||
@@ -58,6 +59,7 @@ public class SummonInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
{
|
||||
_summon = summon;
|
||||
_attacker = attacker;
|
||||
_relation = (attacker != null) && (summon.getOwner() != null) ? summon.getOwner().getRelation(attacker) : 0;
|
||||
_title = (summon.getOwner() != null) && summon.getOwner().isOnline() ? summon.getOwner().getName() : "";
|
||||
_value = value;
|
||||
_abnormalVisualEffects = summon.getEffectList().getCurrentAbnormalVisualEffects();
|
||||
@@ -218,7 +220,7 @@ public class SummonInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
}
|
||||
if (containsMask(NpcInfoType.RELATIONS))
|
||||
{
|
||||
packet.writeD(0);
|
||||
packet.writeD(_relation);
|
||||
}
|
||||
if (containsMask(NpcInfoType.TITLE))
|
||||
{
|
||||
|
Reference in New Issue
Block a user