|
RuneHive-Game
|
The packet that's responsible for updating npcs. More...
Public Member Functions | |
| boolean | encode (Player player) |
| SendNpcUpdate () | |
| Public Member Functions inherited from com.runehive.net.packet.OutgoingPacket | |
| void | execute (Player player) |
| OutgoingPacket (int opcode, int capacity) | |
| OutgoingPacket (int opcode, PacketType type) | |
| OutgoingPacket (int opcode, PacketType type, int size) | |
Static Private Member Functions | |
| static void | addNewNpc (PacketBuilder packet, Player player, Npc npc) |
| static void | appendAnimationMask (Npc npc, PacketBuilder maskBuf) |
| static void | appendFaceCoordinateMask (Npc npc, PacketBuilder maskBuf) |
| static void | appendFaceEntityMask (Npc npc, PacketBuilder maskBuf) |
| static void | appendFirstHitMask (final Npc npc, final PacketBuilder updateBlock) |
| static void | appendForceChatMask (Npc npc, PacketBuilder maskBuf) |
| static void | appendGfxMask (Npc npc, PacketBuilder maskBuf) |
| static void | appendSecondHitMask (final Npc npc, final PacketBuilder updateBlock) |
| static void | appendTransformationMask (Npc npc, PacketBuilder maskBuf) |
| static void | updateMovement (PacketBuilder packet, Npc npc) |
| static void | updateNpc (PacketBuilder maskBuf, Npc npc) |
Additional Inherited Members | |
| Protected Attributes inherited from com.runehive.net.packet.OutgoingPacket | |
| final PacketBuilder | builder |
The packet that's responsible for updating npcs.
Definition at line 33 of file SendNpcUpdate.java.
| com.runehive.net.packet.out.SendNpcUpdate.SendNpcUpdate | ( | ) |
Definition at line 35 of file SendNpcUpdate.java.
References com.runehive.net.packet.PacketType.VAR_SHORT.
|
staticprivate |
Definition at line 103 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.Entity.getIndex(), com.runehive.game.world.entity.Entity.getPosition(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), com.runehive.game.world.entity.mob.Mob.id, com.runehive.game.world.entity.mob.Mob.isUpdateRequired(), and com.runehive.Config.NPC_BITS.
Referenced by encode().
|
staticprivate |
Definition at line 195 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.mob.Mob.getAnimation(), com.runehive.game.Animation.getDelay(), com.runehive.game.Animation.getId(), com.runehive.net.codec.ByteOrder.LE, com.runehive.game.Animation.RESET, com.runehive.net.packet.PacketBuilder.writeByte(), and com.runehive.net.packet.PacketBuilder.writeShort().
Referenced by updateNpc().
|
staticprivate |
Definition at line 225 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.mob.Mob.facePosition, com.runehive.game.world.entity.mob.Direction.getDirectionX(), com.runehive.game.world.entity.mob.Direction.getDirectionY(), com.runehive.game.world.entity.Entity.getPosition(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), com.runehive.game.world.entity.mob.movement.Movement.lastDirection, com.runehive.net.codec.ByteOrder.LE, com.runehive.game.world.entity.mob.Mob.movement, and com.runehive.net.packet.PacketBuilder.writeShort().
Referenced by updateNpc().
|
staticprivate |
Definition at line 207 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.Entity.getIndex(), com.runehive.game.world.entity.mob.Mob.interactingWith, com.runehive.game.world.entity.mob.Mob.isPlayer(), and com.runehive.net.packet.PacketBuilder.writeShort().
Referenced by updateNpc().
|
staticprivate |
Definition at line 242 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.mob.Mob.firstHit, com.runehive.game.world.entity.mob.Mob.getCurrentHealth(), com.runehive.game.world.entity.combat.hit.Hit.getDamage(), com.runehive.game.world.entity.combat.hit.Hit.getHitIcon(), com.runehive.game.world.entity.combat.hit.Hit.getHitsplat(), com.runehive.game.world.entity.combat.hit.HitIcon.getId(), com.runehive.game.world.entity.combat.hit.Hitsplat.getId(), com.runehive.game.world.entity.mob.Mob.getMaximumHealth(), com.runehive.game.world.entity.combat.hit.Hit.getMultipleHits(), com.runehive.game.world.entity.combat.hit.Hitsplat.NORMAL, and com.runehive.net.packet.PacketBuilder.writeByte().
Referenced by updateNpc().
|
staticprivate |
Definition at line 221 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.mob.Mob.forceChat, and com.runehive.net.packet.PacketBuilder.writeString().
Referenced by updateNpc().
|
staticprivate |
Definition at line 201 of file SendNpcUpdate.java.
References com.runehive.game.Graphic.getDelay(), com.runehive.game.world.entity.mob.Mob.getGraphic(), com.runehive.game.Graphic.getHeight(), com.runehive.game.Graphic.getId(), com.runehive.game.Graphic.RESET, com.runehive.net.packet.PacketBuilder.writeInt(), and com.runehive.net.packet.PacketBuilder.writeShort().
Referenced by updateNpc().
|
staticprivate |
Definition at line 302 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.mob.Mob.getCurrentHealth(), com.runehive.game.world.entity.combat.hit.Hit.getDamage(), com.runehive.game.world.entity.combat.hit.Hit.getHitIcon(), com.runehive.game.world.entity.combat.hit.Hit.getHitsplat(), com.runehive.game.world.entity.combat.hit.HitIcon.getId(), com.runehive.game.world.entity.combat.hit.Hitsplat.getId(), com.runehive.game.world.entity.mob.Mob.getMaximumHealth(), com.runehive.game.world.entity.combat.hit.Hit.getMultipleHits(), com.runehive.game.world.entity.combat.hit.Hitsplat.NORMAL, com.runehive.game.world.entity.mob.Mob.secondHit, and com.runehive.net.packet.PacketBuilder.writeByte().
Referenced by updateNpc().
|
staticprivate |
Definition at line 238 of file SendNpcUpdate.java.
References com.runehive.net.codec.ByteModification.ADD, com.runehive.game.world.entity.mob.Mob.id, com.runehive.net.codec.ByteOrder.LE, and com.runehive.net.packet.PacketBuilder.writeShort().
Referenced by updateNpc().
| boolean com.runehive.net.packet.out.SendNpcUpdate.encode | ( | Player | player | ) |
Reimplemented from com.runehive.net.packet.OutgoingPacket.
Definition at line 40 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.mob.Viewport.add(), com.runehive.game.world.entity.mob.Viewport.ADD_THRESHOLD, addNewNpc(), com.runehive.net.packet.PacketBuilder.alloc(), com.runehive.game.world.entity.mob.npc.Npc.atomicPlayerCount, com.runehive.net.codec.AccessType.BIT, com.runehive.net.packet.OutgoingPacket.builder, com.runehive.net.codec.AccessType.BYTE, com.runehive.game.world.entity.mob.Viewport.CAPACITY, com.runehive.game.world.region.RegionManager.getLocalNpcs(), com.runehive.game.world.entity.mob.Viewport.getNpcsInViewport(), com.runehive.game.world.World.getRegions(), com.runehive.game.world.entity.mob.Mob.isUpdateRequired(), com.runehive.game.world.entity.mob.Viewport.shouldRemove(), updateMovement(), updateNpc(), and com.runehive.game.world.entity.mob.player.Player.viewport.
|
staticprivate |
Definition at line 112 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.mob.movement.Movement.getRunningDirection(), com.runehive.game.world.entity.mob.movement.Movement.getWalkingDirection(), com.runehive.game.world.entity.mob.Mob.isUpdateRequired(), and com.runehive.game.world.entity.mob.Mob.movement.
Referenced by encode().
|
staticprivate |
Definition at line 138 of file SendNpcUpdate.java.
References com.runehive.game.world.entity.mob.UpdateFlag.ANIMATION, appendAnimationMask(), appendFaceCoordinateMask(), appendFaceEntityMask(), appendFirstHitMask(), appendForceChatMask(), appendGfxMask(), appendSecondHitMask(), appendTransformationMask(), com.runehive.game.world.entity.mob.UpdateFlag.canApply(), com.runehive.game.world.entity.mob.UpdateFlag.containsNpc(), com.runehive.game.world.entity.mob.UpdateFlag.FACE_COORDINATE, com.runehive.game.world.entity.mob.UpdateFlag.FIRST_HIT, com.runehive.game.world.entity.mob.UpdateFlag.FORCED_CHAT, com.runehive.game.world.entity.mob.UpdateFlag.GRAPHICS, com.runehive.game.world.entity.mob.UpdateFlag.INTERACT, com.runehive.game.world.entity.mob.Mob.isUpdateRequired(), com.runehive.game.world.entity.mob.UpdateFlag.npcMask, com.runehive.game.world.entity.mob.UpdateFlag.npcOrder, com.runehive.game.world.entity.mob.UpdateFlag.SECOND_HIT, com.runehive.game.world.entity.mob.UpdateFlag.TRANSFORM, com.runehive.game.world.entity.mob.Mob.updateFlags, and com.runehive.net.packet.PacketBuilder.writeByte().
Referenced by encode().