Player sendInfo now sends relations when asked.
This commit is contained in:
@@ -12108,45 +12108,38 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int relation1 = getRelation(activeChar);
|
final int relation1 = getRelation(activeChar);
|
||||||
|
final RelationChanged rc1 = new RelationChanged();
|
||||||
|
rc1.addRelation(this, relation1, isAutoAttackable(activeChar));
|
||||||
|
if (hasSummon())
|
||||||
|
{
|
||||||
|
final L2Summon pet = getPet();
|
||||||
|
if (pet != null)
|
||||||
|
{
|
||||||
|
rc1.addRelation(pet, relation1, isAutoAttackable(activeChar));
|
||||||
|
}
|
||||||
|
if (hasServitors())
|
||||||
|
{
|
||||||
|
getServitors().values().forEach(s -> rc1.addRelation(s, relation1, isAutoAttackable(activeChar)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(rc1);
|
||||||
|
|
||||||
final int relation2 = activeChar.getRelation(this);
|
final int relation2 = activeChar.getRelation(this);
|
||||||
Integer oldrelation = getKnownRelations().get(activeChar.getObjectId());
|
final RelationChanged rc2 = new RelationChanged();
|
||||||
if ((oldrelation != null) && (oldrelation != relation1))
|
rc2.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
||||||
|
if (activeChar.hasSummon())
|
||||||
{
|
{
|
||||||
final RelationChanged rc = new RelationChanged();
|
final L2Summon pet = getPet();
|
||||||
rc.addRelation(this, relation1, isAutoAttackable(activeChar));
|
if (pet != null)
|
||||||
if (hasSummon())
|
|
||||||
{
|
{
|
||||||
final L2Summon pet = getPet();
|
rc2.addRelation(pet, relation2, activeChar.isAutoAttackable(this));
|
||||||
if (pet != null)
|
|
||||||
{
|
|
||||||
rc.addRelation(pet, relation1, isAutoAttackable(activeChar));
|
|
||||||
}
|
|
||||||
if (hasServitors())
|
|
||||||
{
|
|
||||||
getServitors().values().forEach(s -> rc.addRelation(s, relation1, isAutoAttackable(activeChar)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
activeChar.sendPacket(rc);
|
if (hasServitors())
|
||||||
}
|
|
||||||
oldrelation = activeChar.getKnownRelations().get(getObjectId());
|
|
||||||
if ((oldrelation != null) && (oldrelation != relation2) && activeChar.isVisibleFor(this))
|
|
||||||
{
|
|
||||||
final RelationChanged rc = new RelationChanged();
|
|
||||||
rc.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
|
||||||
if (activeChar.hasSummon())
|
|
||||||
{
|
{
|
||||||
final L2Summon pet = getPet();
|
getServitors().values().forEach(s -> rc2.addRelation(s, relation2, activeChar.isAutoAttackable(this)));
|
||||||
if (pet != null)
|
|
||||||
{
|
|
||||||
rc.addRelation(pet, relation2, activeChar.isAutoAttackable(this));
|
|
||||||
}
|
|
||||||
if (hasServitors())
|
|
||||||
{
|
|
||||||
getServitors().values().forEach(s -> rc.addRelation(s, relation2, activeChar.isAutoAttackable(this)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sendPacket(rc);
|
|
||||||
}
|
}
|
||||||
|
sendPacket(rc2);
|
||||||
|
|
||||||
switch (getPrivateStoreType())
|
switch (getPrivateStoreType())
|
||||||
{
|
{
|
||||||
|
@@ -12108,45 +12108,38 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int relation1 = getRelation(activeChar);
|
final int relation1 = getRelation(activeChar);
|
||||||
|
final RelationChanged rc1 = new RelationChanged();
|
||||||
|
rc1.addRelation(this, relation1, isAutoAttackable(activeChar));
|
||||||
|
if (hasSummon())
|
||||||
|
{
|
||||||
|
final L2Summon pet = getPet();
|
||||||
|
if (pet != null)
|
||||||
|
{
|
||||||
|
rc1.addRelation(pet, relation1, isAutoAttackable(activeChar));
|
||||||
|
}
|
||||||
|
if (hasServitors())
|
||||||
|
{
|
||||||
|
getServitors().values().forEach(s -> rc1.addRelation(s, relation1, isAutoAttackable(activeChar)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(rc1);
|
||||||
|
|
||||||
final int relation2 = activeChar.getRelation(this);
|
final int relation2 = activeChar.getRelation(this);
|
||||||
Integer oldrelation = getKnownRelations().get(activeChar.getObjectId());
|
final RelationChanged rc2 = new RelationChanged();
|
||||||
if ((oldrelation != null) && (oldrelation != relation1))
|
rc2.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
||||||
|
if (activeChar.hasSummon())
|
||||||
{
|
{
|
||||||
final RelationChanged rc = new RelationChanged();
|
final L2Summon pet = getPet();
|
||||||
rc.addRelation(this, relation1, isAutoAttackable(activeChar));
|
if (pet != null)
|
||||||
if (hasSummon())
|
|
||||||
{
|
{
|
||||||
final L2Summon pet = getPet();
|
rc2.addRelation(pet, relation2, activeChar.isAutoAttackable(this));
|
||||||
if (pet != null)
|
|
||||||
{
|
|
||||||
rc.addRelation(pet, relation1, isAutoAttackable(activeChar));
|
|
||||||
}
|
|
||||||
if (hasServitors())
|
|
||||||
{
|
|
||||||
getServitors().values().forEach(s -> rc.addRelation(s, relation1, isAutoAttackable(activeChar)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
activeChar.sendPacket(rc);
|
if (hasServitors())
|
||||||
}
|
|
||||||
oldrelation = activeChar.getKnownRelations().get(getObjectId());
|
|
||||||
if ((oldrelation != null) && (oldrelation != relation2) && activeChar.isVisibleFor(this))
|
|
||||||
{
|
|
||||||
final RelationChanged rc = new RelationChanged();
|
|
||||||
rc.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
|
||||||
if (activeChar.hasSummon())
|
|
||||||
{
|
{
|
||||||
final L2Summon pet = getPet();
|
getServitors().values().forEach(s -> rc2.addRelation(s, relation2, activeChar.isAutoAttackable(this)));
|
||||||
if (pet != null)
|
|
||||||
{
|
|
||||||
rc.addRelation(pet, relation2, activeChar.isAutoAttackable(this));
|
|
||||||
}
|
|
||||||
if (hasServitors())
|
|
||||||
{
|
|
||||||
getServitors().values().forEach(s -> rc.addRelation(s, relation2, activeChar.isAutoAttackable(this)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sendPacket(rc);
|
|
||||||
}
|
}
|
||||||
|
sendPacket(rc2);
|
||||||
|
|
||||||
switch (getPrivateStoreType())
|
switch (getPrivateStoreType())
|
||||||
{
|
{
|
||||||
|
@@ -12119,45 +12119,38 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int relation1 = getRelation(activeChar);
|
final int relation1 = getRelation(activeChar);
|
||||||
|
final RelationChanged rc1 = new RelationChanged();
|
||||||
|
rc1.addRelation(this, relation1, isAutoAttackable(activeChar));
|
||||||
|
if (hasSummon())
|
||||||
|
{
|
||||||
|
final L2Summon pet = getPet();
|
||||||
|
if (pet != null)
|
||||||
|
{
|
||||||
|
rc1.addRelation(pet, relation1, isAutoAttackable(activeChar));
|
||||||
|
}
|
||||||
|
if (hasServitors())
|
||||||
|
{
|
||||||
|
getServitors().values().forEach(s -> rc1.addRelation(s, relation1, isAutoAttackable(activeChar)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(rc1);
|
||||||
|
|
||||||
final int relation2 = activeChar.getRelation(this);
|
final int relation2 = activeChar.getRelation(this);
|
||||||
Integer oldrelation = getKnownRelations().get(activeChar.getObjectId());
|
final RelationChanged rc2 = new RelationChanged();
|
||||||
if ((oldrelation != null) && (oldrelation != relation1))
|
rc2.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
||||||
|
if (activeChar.hasSummon())
|
||||||
{
|
{
|
||||||
final RelationChanged rc = new RelationChanged();
|
final L2Summon pet = getPet();
|
||||||
rc.addRelation(this, relation1, isAutoAttackable(activeChar));
|
if (pet != null)
|
||||||
if (hasSummon())
|
|
||||||
{
|
{
|
||||||
final L2Summon pet = getPet();
|
rc2.addRelation(pet, relation2, activeChar.isAutoAttackable(this));
|
||||||
if (pet != null)
|
|
||||||
{
|
|
||||||
rc.addRelation(pet, relation1, isAutoAttackable(activeChar));
|
|
||||||
}
|
|
||||||
if (hasServitors())
|
|
||||||
{
|
|
||||||
getServitors().values().forEach(s -> rc.addRelation(s, relation1, isAutoAttackable(activeChar)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
activeChar.sendPacket(rc);
|
if (hasServitors())
|
||||||
}
|
|
||||||
oldrelation = activeChar.getKnownRelations().get(getObjectId());
|
|
||||||
if ((oldrelation != null) && (oldrelation != relation2) && activeChar.isVisibleFor(this))
|
|
||||||
{
|
|
||||||
final RelationChanged rc = new RelationChanged();
|
|
||||||
rc.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
|
||||||
if (activeChar.hasSummon())
|
|
||||||
{
|
{
|
||||||
final L2Summon pet = getPet();
|
getServitors().values().forEach(s -> rc2.addRelation(s, relation2, activeChar.isAutoAttackable(this)));
|
||||||
if (pet != null)
|
|
||||||
{
|
|
||||||
rc.addRelation(pet, relation2, activeChar.isAutoAttackable(this));
|
|
||||||
}
|
|
||||||
if (hasServitors())
|
|
||||||
{
|
|
||||||
getServitors().values().forEach(s -> rc.addRelation(s, relation2, activeChar.isAutoAttackable(this)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sendPacket(rc);
|
|
||||||
}
|
}
|
||||||
|
sendPacket(rc2);
|
||||||
|
|
||||||
switch (getPrivateStoreType())
|
switch (getPrivateStoreType())
|
||||||
{
|
{
|
||||||
|
@@ -12081,45 +12081,38 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int relation1 = getRelation(activeChar);
|
final int relation1 = getRelation(activeChar);
|
||||||
|
final RelationChanged rc1 = new RelationChanged();
|
||||||
|
rc1.addRelation(this, relation1, isAutoAttackable(activeChar));
|
||||||
|
if (hasSummon())
|
||||||
|
{
|
||||||
|
final L2Summon pet = getPet();
|
||||||
|
if (pet != null)
|
||||||
|
{
|
||||||
|
rc1.addRelation(pet, relation1, isAutoAttackable(activeChar));
|
||||||
|
}
|
||||||
|
if (hasServitors())
|
||||||
|
{
|
||||||
|
getServitors().values().forEach(s -> rc1.addRelation(s, relation1, isAutoAttackable(activeChar)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(rc1);
|
||||||
|
|
||||||
final int relation2 = activeChar.getRelation(this);
|
final int relation2 = activeChar.getRelation(this);
|
||||||
Integer oldrelation = getKnownRelations().get(activeChar.getObjectId());
|
final RelationChanged rc2 = new RelationChanged();
|
||||||
if ((oldrelation != null) && (oldrelation != relation1))
|
rc2.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
||||||
|
if (activeChar.hasSummon())
|
||||||
{
|
{
|
||||||
final RelationChanged rc = new RelationChanged();
|
final L2Summon pet = getPet();
|
||||||
rc.addRelation(this, relation1, isAutoAttackable(activeChar));
|
if (pet != null)
|
||||||
if (hasSummon())
|
|
||||||
{
|
{
|
||||||
final L2Summon pet = getPet();
|
rc2.addRelation(pet, relation2, activeChar.isAutoAttackable(this));
|
||||||
if (pet != null)
|
|
||||||
{
|
|
||||||
rc.addRelation(pet, relation1, isAutoAttackable(activeChar));
|
|
||||||
}
|
|
||||||
if (hasServitors())
|
|
||||||
{
|
|
||||||
getServitors().values().forEach(s -> rc.addRelation(s, relation1, isAutoAttackable(activeChar)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
activeChar.sendPacket(rc);
|
if (hasServitors())
|
||||||
}
|
|
||||||
oldrelation = activeChar.getKnownRelations().get(getObjectId());
|
|
||||||
if ((oldrelation != null) && (oldrelation != relation2) && activeChar.isVisibleFor(this))
|
|
||||||
{
|
|
||||||
final RelationChanged rc = new RelationChanged();
|
|
||||||
rc.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
|
||||||
if (activeChar.hasSummon())
|
|
||||||
{
|
{
|
||||||
final L2Summon pet = getPet();
|
getServitors().values().forEach(s -> rc2.addRelation(s, relation2, activeChar.isAutoAttackable(this)));
|
||||||
if (pet != null)
|
|
||||||
{
|
|
||||||
rc.addRelation(pet, relation2, activeChar.isAutoAttackable(this));
|
|
||||||
}
|
|
||||||
if (hasServitors())
|
|
||||||
{
|
|
||||||
getServitors().values().forEach(s -> rc.addRelation(s, relation2, activeChar.isAutoAttackable(this)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sendPacket(rc);
|
|
||||||
}
|
}
|
||||||
|
sendPacket(rc2);
|
||||||
|
|
||||||
switch (getPrivateStoreType())
|
switch (getPrivateStoreType())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user