本文整理匯總了C#中Server.Network.PacketHitList.AddPacketToOthers方法的典型用法代碼示例。如果您正苦於以下問題:C# PacketHitList.AddPacketToOthers方法的具體用法?C# PacketHitList.AddPacketToOthers怎麽用?C# PacketHitList.AddPacketToOthers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Network.PacketHitList
的用法示例。
在下文中一共展示了PacketHitList.AddPacketToOthers方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AppendNpcXY
public static void AppendNpcXY(IMap map, PacketHitList hitlist, int mapSlot)
{
MapNpc mapNpc = map.ActiveNpc[mapSlot];
hitlist.AddPacketToOthers(mapNpc, map, CreateNpcXY(mapNpc), Enums.OutdateType.Location);
}
示例2: AppendNpcStatusAilment
//public static void AppendNpcConfusion(IMap map, PacketHitList hitlist, int mapNpcNum) {
// MapNpc mapNpc = map.ActiveNpc[mapNpcNum];
// hitlist.AddPacketToOthers(mapNpc, map, CreateNpcConfusion(mapNpc), Enums.OutdateType.Condition);
//}
public static void AppendNpcStatusAilment(MapNpc npc, PacketHitList hitlist)
{
hitlist.AddPacketToOthers(npc, Maps.MapManager.RetrieveActiveMap(npc.MapID), CreateNpcStatusAilment(npc), Enums.OutdateType.Condition);
}
示例3: AppendNpcVolatileStatus
public static void AppendNpcVolatileStatus(IMap map, PacketHitList hitlist, int mapNpcNum)
{
MapNpc mapNpc = map.ActiveNpc[mapNpcNum];
hitlist.AddPacketToOthers(mapNpc, map, CreateNpcVolatileStatus(mapNpc), Enums.OutdateType.Condition);
}
示例4: AppendEmote
public static void AppendEmote(Client client, int emote, int speed, int rounds, PacketHitList hitlist)
{
TcpPacket myPacket = TcpPacket.CreatePacket("emote", emote.ToString(), speed.ToString(), rounds.ToString());
hitlist.AddPacket(client, myPacket);
hitlist.AddPacketToOthers(client.Player.GetActiveRecruit(), client.Player.Map, CreatePlayerEmote(client, emote, speed, rounds), Enums.OutdateType.Condition);
}
示例5: AppendHunted
public static void AppendHunted(Client client, PacketHitList hitlist)
{
hitlist.AddPacket(client, TcpPacket.CreatePacket("hunted", client.Player.Hunted.ToIntString()));
hitlist.AddPacketToOthers(client.Player.GetActiveRecruit(), client.Player.Map, TcpPacket.CreatePacket("playerhunted", client.ConnectionID.ToString(), client.Player.Hunted.ToIntString()), Enums.OutdateType.Condition);
}
示例6: AppendVolatileStatus
public static void AppendVolatileStatus(Client client, PacketHitList hitlist)
{
TcpPacket myPacket = TcpPacket.CreatePacket("volatilestatus", client.Player.GetActiveRecruit().VolatileStatus.Count.ToString());
for (int j = 0; j < client.Player.GetActiveRecruit().VolatileStatus.Count; j++) {
myPacket.AppendParameter(client.Player.GetActiveRecruit().VolatileStatus[j].Emoticon);
}
hitlist.AddPacket(client, myPacket);
hitlist.AddPacketToOthers(client.Player.GetActiveRecruit(), client.Player.Map, CreatePlayerVolatileStatus(client), Enums.OutdateType.Condition);
}
示例7: AppendAttackPacket
public static void AppendAttackPacket(Client attacker, PacketHitList hitlist)
{
hitlist.AddPacketToOthers(attacker.Player.GetActiveRecruit(), attacker.Player.Map, CreateAttackPacket(attacker), Enums.OutdateType.None);
//hitlist.AddPacketToMapBut(attacker, attacker.Player.Map, CreateAttackPacket(attacker));
}
示例8: AppendStatusAilment
public static void AppendStatusAilment(Client client, PacketHitList hitlist)
{
TcpPacket packet = new TcpPacket("teamstatus");
for (int i = 0; i < Constants.MAX_ACTIVETEAM; i++) {
if (client.Player.Team[i].Loaded == true) {
packet.AppendParameter(((int)client.Player.Team[i].StatusAilment).ToString());
} else {
packet.AppendParameter("0");
}
}
packet.FinalizePacket();
hitlist.AddPacket(client, packet);
hitlist.AddPacket(client, TcpPacket.CreatePacket("statusailment", ((int)client.Player.GetActiveRecruit().StatusAilment).ToString()));
hitlist.AddPacketToOthers(client.Player.GetActiveRecruit(), client.Player.Map, CreatePlayerStatusAilment(client), Enums.OutdateType.Condition);
}
示例9: AppendSprite
public static void AppendSprite(Client client, PacketHitList hitlist)
{
Recruit player = client.Player.GetActiveRecruit();
hitlist.AddPacket(client, TcpPacket.CreatePacket("sprite", (player.Sprite).ToString(), (player.Form).ToString(), ((int)player.Shiny).ToString(), ((int)player.Sex).ToString()));
hitlist.AddPacketToOthers(client.Player.GetActiveRecruit(), client.Player.Map, TcpPacket.CreatePacket("playersprite", client.ConnectionID.ToString(),
player.Sprite.ToString(), player.Form.ToString(), ((int)player.Shiny).ToString(), ((int)player.Sex).ToString()), Enums.OutdateType.Condition);
}
示例10: AppendPlayerXY
public static void AppendPlayerXY(Client client, PacketHitList hitlist)
{
hitlist.AddPacketToOthers(client.Player.GetActiveRecruit(), client.Player.Map, CreatePlayerXY(client), Enums.OutdateType.Location);
//hitlist.AddPacketToMapBut(client, client.Player.Map, CreatePlayerXY(client));
AppendOwnXY(client, hitlist);
}
示例11: AppendPlayerMove
public static void AppendPlayerMove(Client client, PacketHitList hitlist, Enums.Direction direction, Enums.Speed speed)
{
hitlist.AddPacketToOthers(client.Player.GetActiveRecruit(), client.Player.Map, CreatePlayerMovePacket(client, direction, speed), Enums.OutdateType.Location);
}
示例12: RefreshCharacterVisibility
public static void RefreshCharacterVisibility(ICharacter character, IMap map, PacketHitList hitlist)
{
PacketHitList.MethodStart(ref hitlist);
//invisibility
ExtraStatus status;
bool visible = true;
status = character.VolatileStatus.GetStatus("SemiInvul");
if (status != null && status.Tag == "ShadowForce" ||
character.VolatileStatus.GetStatus("Invisible") != null) {
visible = false;
}
character.Visible = visible;
if (map != null)
{
if (character.CharacterType == Enums.CharacterType.Recruit)
{
Client client = ((Recruit)character).Owner;
hitlist.AddPacketToOthers(character, map, PacketBuilder.CreatePlayerActivation(client, character.Visible), Enums.OutdateType.Location);
PacketBuilder.AppendVisibility(client, hitlist, character.Visible);
}
else
{
hitlist.AddPacketToOthers(character, map, PacketBuilder.CreateNpcActivation((MapNpc)character, character.Visible), Enums.OutdateType.Location);
}
}
PacketHitList.MethodEnded(ref hitlist);
}