本文整理匯總了C#中RS2.Server.player.Player.getEntityFocus方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.getEntityFocus方法的具體用法?C# Player.getEntityFocus怎麽用?C# Player.getEntityFocus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類RS2.Server.player.Player
的用法示例。
在下文中一共展示了Player.getEntityFocus方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: appendFaceEntityUpdate
private static void appendFaceEntityUpdate(Player p, PacketBuilder updateBlock)
{
updateBlock.addShortA(p.getEntityFocus());
}
示例2: handlePacket
public void handlePacket(Player player, Packet packet)
{
int size = packet.getLength();
if (packet.getPacketId() == PacketHandlers.PacketId.WALK_2)
{
size -= 14;
}
player.getWalkingQueue().resetWalkingQueue();
int steps = (size - 5) / 2;
if (steps > WalkingQueue.MAX_WALKING_WAYPOINTS)
{
Misc.WriteError("Warning: Walk command contains too many steps (" + steps + ") currently set to 50 [maybe need increase?]");
return;
}
player.getWalkingQueue().setIsRunning(packet.readByteA() == 1);
bool following = false;
if (!canWalk(player, packet, following))
{
player.getPackets().clearMapFlag();
player.getWalkingQueue().resetWalkingQueue();
return;
}
int firstX = packet.readUShort() - (player.getLocation().getRegionX() - 6) * 8;
int firstY = packet.readShortA() - (player.getLocation().getRegionY() - 6) * 8;
player.getWalkingQueue().addToWalkingQueue(firstX, firstY);
for (int i = 0; i < steps; i++) //all the waypoints.
player.getWalkingQueue().addToWalkingQueue((packet.readByteA() + firstX), (packet.readByteS() + firstY));
if (player.getTeleportTo() != null) //is teleporting?
player.getWalkingQueue().resetWalkingQueue();
if (player.getTemporaryAttribute("homeTeleporting") != null)
{
player.removeTemporaryAttribute("homeTeleporting");
}
SkillHandler.resetAllSkills(player);
if (player.getTrade() != null)
player.getTrade().decline();
if (player.getDuel() != null)
{
if (player.getDuel().getStatus() < 4)
player.getDuel().declineDuel();
else if (player.getDuel().getStatus() == 8)
player.getDuel().recieveWinnings(player);
}
if (player.getTarget() != null)
{
if (!following && player.getTarget().getAttacker() != null && player.getTarget().getAttacker().Equals(player))
player.getTarget().setAttacker(null);
}
if (!following)
{
player.getFollow().setFollowing(null);
player.setTarget(null);
player.removeTemporaryAttribute("autoCasting");
if (player.getEntityFocus() != 65535)
player.setEntityFocus(65535);
}
player.getPackets().closeInterfaces();
}