mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Fix an issue where the mob interaction index was set incorrectly for players.
This commit is contained in:
@@ -402,6 +402,15 @@ public abstract class Mob extends Entity {
|
||||
this.index = index;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this mobs interacting index.
|
||||
*
|
||||
* @return The interaction index of this mob.
|
||||
*/
|
||||
public int getInteractionIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates this mob's interacting mob.
|
||||
@@ -410,7 +419,7 @@ public abstract class Mob extends Entity {
|
||||
*/
|
||||
public final void setInteractingMob(Mob mob) {
|
||||
interactingMob = mob;
|
||||
blockSet.add(SynchronizationBlock.createInteractingMobBlock(mob.index));
|
||||
blockSet.add(SynchronizationBlock.createInteractingMobBlock(mob.getInteractionIndex()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -355,6 +355,11 @@ public final class Player extends Mob {
|
||||
return EntityType.PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInteractionIndex() {
|
||||
return getIndex() | 0x8000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets this player's friend chat {@link PrivacyState}.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user