Esempio n. 1
0
 /// <summary>
 /// Sends an arena team query response to the client.
 /// </summary>
 /// <param name="client">the client to send to</param>
 /// <param name="team">arena team to be sent</param>
 public static void SendArenaTeamQueryResponse(IPacketReceiver client, ArenaTeam team)
 {
     using (var packet = CreateArenaTeamQueryResponsePacket(team))
     {
         client.Send(packet);
     }
     using (var packet = CreateArenaTeamStatsResponsePacket(team))
     {
         client.Send(packet);
     }
 }
Esempio n. 2
0
		public static void SendAllAuras(IPacketReceiver rcv, Unit owner)
		{
			using (var packet = CreateAllAuraPacket(owner))
			{
				rcv.Send(packet);
			}
		}
Esempio n. 3
0
 public static void SendAllAuras(IPacketReceiver rcv, Unit owner)
 {
     if (!owner.IsAreaActive) return;
     using (var packet = CreateAllAuraPacket(owner))
     {
         rcv.Send(packet);
     }
 }
Esempio n. 4
0
 public static void SendCancelAutoRepeat(IPacketReceiver client, IEntity entity)
 {
     using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_CANCEL_AUTO_REPEAT))
     {
         entity.EntityId.WritePacked(packet);
         client.Send(packet);
     }
 }
Esempio n. 5
0
		public static void SendBreakTarget(IPacketReceiver rcvr, IEntity target)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_BREAK_TARGET, 8))
			{
				packet.Write(target.EntityId);
				rcvr.Send(packet);
			}
		}
Esempio n. 6
0
 public static void SendUpdateWorldState(IPacketReceiver rcv, WorldStateId key, int value)
 {
     using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_UPDATE_WORLD_STATE, 300))
     {
         packet.Write((uint)key);
         packet.Write(value);
         rcv.Send(packet);
     }
 }
Esempio n. 7
0
        public static void SendGameObjectTextPage(IPacketReceiver rcv, IEntity obj)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_GAMEOBJECT_PAGETEXT, 8))
            {
                packet.Write(obj.EntityId);

                rcv.Send(packet);
            }
        }
Esempio n. 8
0
		/// <summary>
		/// Makes the given faction visible to the client.
		/// </summary>
		public static void SendVisible(IPacketReceiver client, FactionReputationIndex reputationIndex)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_SET_FACTION_VISIBLE, 4))
			{
				packet.Write((int)reputationIndex);

				client.Send(packet);
			}
		}
Esempio n. 9
0
		public static void SendAreaTriggerMessage(IPacketReceiver client, string msg)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_AREA_TRIGGER_MESSAGE, (msg.Length * 2) + 4))
			{
				packet.WriteUIntPascalString(msg);
				packet.Write((byte)0);

				client.Send(packet);
			}
		}
Esempio n. 10
0
		public static void SendLearnedSpell(IPacketReceiver client, uint spellId)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_LEARNED_SPELL, 4))
			{
				packet.WriteUInt(spellId);
				packet.WriteUShort(0); // 3.3.3a

				client.Send(packet);
			}
		}
Esempio n. 11
0
		public static void SendItemNameQueryResponse(IPacketReceiver client, ItemTemplate item)
		{
			using (var outPacket = new RealmPacketOut(RealmServerOpCode.SMSG_ITEM_NAME_QUERY_RESPONSE, 4 + item.DefaultName.Length))
			{
				outPacket.WriteInt(item.Id);
				outPacket.WriteCString(item.DefaultName);

				client.Send(outPacket);
			}
		}
Esempio n. 12
0
        /*[ClientPacketHandler(RealmServerOpCode.CMSG_SET_PVP_TITLE)]
        public static void HandleSetPvPTitle(IRealmClient client, RealmPacketIn packet)
        {
        }*/


        public static void SendPVPCredit(IPacketReceiver receiver, uint points, Character victim)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_PVP_CREDIT))
            {
                packet.Write(points);
                packet.Write(victim.EntityId);
                packet.Write((int)victim.PvPRank);

                receiver.Send(packet);
            }
        }
Esempio n. 13
0
        /// <summary>
        /// Lets player know they are at war with a certain faction.
        /// </summary>
        public static void SendSetAtWar(IPacketReceiver client, Reputation rep)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_SET_FACTION_ATWAR, 5))
			{
				packet.Write((int)rep.Faction.ReputationIndex);

				packet.Write((byte)rep.Flags); // rep flags

				client.Send(packet);
			}
		}
Esempio n. 14
0
        /// <summary>
        /// Sends result of actions connected with arenas
        /// </summary>
        /// <param name="client">the client to send to</param>
        /// <param name="commandId">command executed</param>
        /// <param name="name">name of player event has happened to</param>
        /// <param name="resultCode">The <see cref="ArenaTeamResult"/> result code</param>
        public static void SendResult(IPacketReceiver client, ArenaTeamCommandId commandId, string team, string player,
                                      ArenaTeamResult resultCode)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_ARENA_TEAM_COMMAND_RESULT))
            {
                packet.WriteUInt((uint)commandId);
                packet.WriteCString(team);
                packet.WriteCString(player);
                packet.WriteUInt((uint)resultCode);

                client.Send(packet);
            }
        }
Esempio n. 15
0
		public static void SendRealmStateResponse(IPacketReceiver client, uint realmNo)
		{
			//uint realmSplitState = 0;
			// realmNo = 0;
			const RealmState realmState = RealmState.Normal;
			var splitDate = "01/01/01";
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_REALM_SPLIT, 8 + 1 + splitDate.Length))
			{
				packet.WriteUInt(realmNo);
				packet.WriteUInt((uint)realmState);
				packet.WriteCString(splitDate);

				client.Send(packet);
			}
		}
Esempio n. 16
0
 public static void SendInitWorldStates(IPacketReceiver rcv, MapId map, ZoneId zone, uint areaId, params WorldState[] states)
 {
     using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_INIT_WORLD_STATES, 300))
     {
         packet.Write((uint)map);
         packet.Write((uint)zone);
         packet.Write(areaId);
         packet.Write((ushort)states.Length);
         foreach (var state in states)
         {
             packet.Write((uint)state.Key);
             packet.Write(state.DefaultValue);
         }
         rcv.Send(packet);
     }
 }
Esempio n. 17
0
        public static void SendInitWorldStates(IPacketReceiver rcv, WorldStateCollection states, Zone newZone)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_INIT_WORLD_STATES, 300))
            {
                packet.Write((uint)newZone.Map.Id);
                packet.Write((uint)newZone.ParentZoneId);
                packet.Write((uint)newZone.Id);

                var countPos = packet.Position;
                packet.Position += 2;

                var count = AppendWorldStates(packet, newZone);

                packet.Position = countPos;
                packet.Write((ushort)count);

                rcv.Send(packet);
            }
        }
Esempio n. 18
0
		/// <summary>
		/// Sends to the specified client the Who List based on the given characters
		/// </summary>
		/// <param name="client">The client to send the list</param>
		/// <param name="characters">The list of characters that matched the Who List search</param>
		public static void SendWhoList(IPacketReceiver client, ICollection<Character> characters)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_WHO))
			{
				packet.Write(characters.Count);
				packet.Write(characters.Count);

				foreach (Character character in characters)
				{
					packet.WriteCString(character.Name);
                    packet.WriteCString(character.Guild != null ? character.Guild.Name : string.Empty); //TODO: Add Guild name here
					packet.Write(character.Level);
					packet.WriteUInt((byte)character.Class);
					packet.WriteUInt((byte)character.Race);
					packet.WriteByte(0); //New in 2.4.x
					packet.Write(character.Zone != null ? (uint)character.Zone.Id : 0);
				}
				client.Send(packet);
			}
		}
Esempio n. 19
0
        public static bool SendTotemCreated(IPacketReceiver client, Spell totemSpell, EntityId totemEntityId)
        {
            var chr = client as Character;
            if (chr == null)
                return false;

            var effect = totemSpell.GetEffect(SpellEffectType.Summon);
            if (effect == null)
                return false;

            var slot = effect.SummonEntry.Slot - 1;

            using(var packet = new RealmPacketOut(RealmServerOpCode.SMSG_TOTEM_CREATED))
            {
                packet.Write(slot);
                packet.Write(totemEntityId);
                packet.Write(totemSpell.GetDuration(chr.SharedReference));
                packet.Write(totemSpell.Id);

                client.Send(packet);
            }
            return true;
        }
Esempio n. 20
0
 public static void SendGuildMotdSetErrorMessage(IPacketReceiver client, GuildMotdErrorEnum error)
 {
     client.Send(new GuildMotdSetErrorMessage((sbyte)error));
 }
Esempio n. 21
0
 public static void SendGuildBulletinMessage(IPacketReceiver client, Guild guild)
 {
     client.Send(new GuildBulletinMessage(guild.BulletinContent, guild.BulletinDate.GetUnixTimeStamp(), guild.BulletinMember?.Id ?? 0, guild.BulletinMember?.Name ?? "Unknown", guild.LastNotifiedDate.GetUnixTimeStamp()));
 }
Esempio n. 22
0
 public static void SendGuildLeftMessage(IPacketReceiver client)
 {
     client.Send(new GuildLeftMessage());
 }
Esempio n. 23
0
 public static void SendChatSmileyMessage(IPacketReceiver client, ContextActor entity, sbyte smileyId)
 {
     client.Send(new ChatSmileyMessage(entity.Id, smileyId, 0));
 }
Esempio n. 24
0
 public static void SendGuildInvitationStateRecrutedMessage(IPacketReceiver client, GuildInvitationStateEnum state)
 {
     client.Send(new GuildInvitationStateRecrutedMessage((sbyte)state));
 }
Esempio n. 25
0
 public static void SendLifePointsRegenBeginMessage(IPacketReceiver client, byte regenRate)
 {
     client.Send(new LifePointsRegenBeginMessage(regenRate));
 }
Esempio n. 26
0
 /// <summary>
 /// Sends the result of an instance reset attempt
 /// </summary>
 /// <param name="client"></param>
 /// <param name="reason"></param>
 public static void SendResetFailure(IPacketReceiver client, MapId map, InstanceResetFailed reason)
 {
     using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_INSTANCE_RESET_FAILED, 8))
     {
         packet.Write((uint)reason);
         packet.Write((uint)map);
         client.Send(packet);
     }
 }
Esempio n. 27
0
 /// <summary>
 /// An instance has been saved
 /// </summary>
 public static void SendInstanceSave(IPacketReceiver client, MapId mapId)
 {
     using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_UPDATE_LAST_INSTANCE, 4))
     {
         packet.Write((int)mapId);
         client.Send(packet);
     }
 }
Esempio n. 28
0
 public static void SendGuildInformationsMemberUpdateMessage(IPacketReceiver client, GuildMember member)
 {
     client.Send(new GuildInformationsMemberUpdateMessage(member.GetNetworkGuildMember()));
 }
Esempio n. 29
0
        public static void SendPvpData(IPacketReceiver reciever, BattlegroundSide side, Battleground bg)
        {
            bg.EnsureContext();

            using (var packet = new RealmPacketOut(RealmServerOpCode.MSG_PVP_LOG_DATA, 10 + bg.PlayerCount * 40))
            {
                var winner = bg.Winner;

                packet.Write(bg.IsArena);
                if (bg.IsArena)
                {
                    // TODO: Arena
                    for (var i = 0; i < 2; i++)
                    {
                        packet.Write(0);    // old rating
                        packet.Write(3999); // new rating (3000 + diff)
                        packet.Write(0);    // matchmaking value (lvl group/rank?)
                    }

                    packet.WriteCString(string.Empty); // arena team names
                    packet.WriteCString(string.Empty);
                }

                var isFinished = bg.Winner != null;
                packet.Write(isFinished);
                if (isFinished)
                {
                    packet.Write((byte)bg.Winner.Side);
                }

                var chrs = bg.Characters;
                List <BattlegroundStats> listStats = new List <BattlegroundStats>(chrs.Count);
                chrs.ForEach(chr => listStats.Add(chr.Battlegrounds.Stats));
                packet.Write(listStats.Count);

                for (var i = 0; i < listStats.Count; i++)
                {
                    var chr = chrs[i];
                    if (!chr.IsInBattleground)
                    {
                        continue;
                    }

                    var stats = chr.Battlegrounds.Stats;

                    packet.Write(chr.EntityId); // player guid
                    packet.Write(stats.KillingBlows);

                    if (bg.IsArena)
                    {
                        packet.Write(winner != null && chr.Battlegrounds.Team == winner); // is on the winning team
                    }
                    else
                    {
                        packet.Write(stats.HonorableKills);
                        packet.Write(stats.Deaths);
                        packet.Write(stats.BonusHonor);
                    }

                    packet.Write(stats.TotalDamage);
                    packet.Write(stats.TotalHealing);

                    packet.Write(stats.SpecialStatCount);

                    stats.WriteSpecialStats(packet);
                }

                reciever.Send(packet);
            }
        }
Esempio n. 30
0
 public static void SendGuildInformationsMembersMessage(IPacketReceiver client, Guild guild)
 {
     client.Send(new GuildInformationsMembersMessage(guild.Members.Select(x => x.GetNetworkGuildMember())));
 }
Esempio n. 31
0
 public static void SendGuildInformationsGeneralMessage(IPacketReceiver client, Guild guild)
 {
     client.Send(new GuildInformationsGeneralMessage(true, false, guild.Level, guild.ExperienceLevelFloor, guild.Experience,
                                                     guild.ExperienceNextLevelFloor, guild.CreationDate.GetUnixTimeStamp(), (short)guild.Members.Count(), (short)guild.Members.Count(x => x.IsConnected)));
 }
Esempio n. 32
0
 public static void SendGuildCreationResultMessage(IPacketReceiver client, SocialGroupCreationResultEnum result)
 {
     client.Send(new GuildCreationResultMessage((sbyte)result));
 }
Esempio n. 33
0
 public static void SendGuildBulletinSetErrorMessage(IPacketReceiver client, SocialNoticeErrorEnum error)
 {
     client.Send(new GuildBulletinSetErrorMessage((sbyte)error));
 }
Esempio n. 34
0
        public static void SendPvpData(IPacketReceiver reciever, BattlegroundSide side, Battleground bg)
        {
            bg.EnsureContext();

            using (var packet = new RealmPacketOut(RealmServerOpCode.MSG_PVP_LOG_DATA, 10 + bg.PlayerCount * 40))
            {
            	var winner = bg.Winner;

                packet.Write(bg.IsArena);
                if (bg.IsArena)
                {
                    // TODO: Arena
                    for (var i = 0; i < 2; i++)
                    {
                        packet.Write(0); // old rating
                        packet.Write(3999); // new rating (3000 + diff)
                        packet.Write(0); // matchmaking value (lvl group/rank?)
                    }

                    packet.WriteCString(string.Empty); // arena team names
                    packet.WriteCString(string.Empty);
                }

                var isFinished = bg.Winner != null;
                packet.Write(isFinished);
                if (isFinished)
                {
                    packet.Write((byte)bg.Winner.Side);
                }

				var chrs = bg.Characters;

				var chrCount = 0;
            	var chrCountPos = packet.Position;
            	packet.Position += 4;
                for (var i = 0; i < chrCount; i++)
                {
                	var chr = chrs[i];
					if (!chr.IsInBattleground)
					{
						continue;
					}

                	var stats = chr.Battlegrounds.Stats;

                	++chrCount;
                    packet.Write(chr.EntityId); // player guid
					packet.Write(stats.KillingBlows);

                    if (bg.IsArena)
					{
                        packet.Write(winner != null && chr.Battlegrounds.Team == winner); // is on the winning team
                    }
                    else
                    {
						packet.Write(stats.HonorableKills);
						packet.Write(stats.Deaths);
						packet.Write(stats.BonusHonor);
                    }

					packet.Write(stats.TotalDamage);
					packet.Write(stats.TotalHealing);

                    packet.Write(stats.SpecialStatCount);

                	stats.WriteSpecialStats(packet);
                }

            	packet.Position = chrCountPos;
            	packet.Write(chrCount);

                reciever.Send(packet);
            }
        }
Esempio n. 35
0
 public static void SendGuildFactsErrorMessage(IPacketReceiver client, int guildId)
 {
     client.Send(new GuildFactsErrorMessage(guildId));
 }
Esempio n. 36
0
        public static void SendPlayerLeft(IPacketReceiver rcv, Character leavingCharacter)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_BATTLEGROUND_PLAYER_LEFT, 8))
            {
                packet.Write(leavingCharacter.EntityId);

                rcv.Send(packet);
            }
        }
Esempio n. 37
0
 public static void SendCharacterLevelUpMessage(IPacketReceiver client, byte level)
 {
     client.Send(new CharacterLevelUpMessage(level));
 }
Esempio n. 38
0
 public static void SendChatSmileyMessage(IPacketReceiver client, Character character, sbyte smileyId)
 {
     client.Send(new ChatSmileyMessage(character.Id, smileyId, character.Account.Id));
 }
Esempio n. 39
0
 public static void SendEnabledChannelsMessage(IPacketReceiver client, sbyte[] allows, sbyte[] disallows)
 {
     client.Send(new EnabledChannelsMessage(allows, disallows));
 }
Esempio n. 40
0
 public static void SendChatErrorMessage(IPacketReceiver client, ChatErrorEnum error)
 {
     client.Send(new ChatErrorMessage((sbyte)error));
 }
Esempio n. 41
0
 public static void SendGuildInvitedMessage(IPacketReceiver client, Character recruter)
 {
     client.Send(new GuildInvitedMessage(recruter.Id, recruter.Name, recruter.Guild.GetBasicGuildInformations()));
 }
Esempio n. 42
0
 public static void SendGuildMemberWarnOnConnectionStateMessage(IPacketReceiver client, bool state)
 {
     client.Send(new GuildMemberWarnOnConnectionStateMessage(state));
 }
Esempio n. 43
0
        /// <summary>
        /// "Your group joined Name"
        /// </summary>
        /// <param name="battleground"></param>
        public static void SendGroupJoinedBattleground(IPacketReceiver rcv, BattlegroundId battleground)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_GROUP_JOINED_BATTLEGROUND, 4))
            {
                packet.Write((int)battleground);

                rcv.Send(packet);
            }
        }
Esempio n. 44
0
 public static void SendGuildInvitationStateRecruterMessage(IPacketReceiver client, Character recruted, GuildInvitationStateEnum state)
 {
     client.Send(new GuildInvitationStateRecruterMessage(recruted.Name, (sbyte)state));
 }
Esempio n. 45
0
 public static void SendPopupWarningMessage(IPacketReceiver client, string content, string author, byte lockDuration)
 {
     client.Send(new PopupWarningMessage(lockDuration, author, content));
 }
Esempio n. 46
0
 public static void SendGuildMotdMessage(IPacketReceiver client, Guild guild)
 {
     client.Send(new GuildMotdMessage(guild.MotdContent, guild.MotdDate.GetUnixTimeStamp(), guild.MotdMember?.Id ?? 0, guild.MotdMember?.Name ?? "Unknown"));
 }
Esempio n. 47
0
 public static void SendGuildInfosUpgradeMessage(IPacketReceiver client, Guild guild)
 {
     client.Send(new GuildInfosUpgradeMessage((sbyte)guild.MaxTaxCollectors, (sbyte)guild.TaxCollectors.Count, (short)guild.TaxCollectorHealth, (short)guild.TaxCollectorDamageBonuses,
                                              (short)guild.TaxCollectorPods, (short)guild.TaxCollectorProspecting, (short)guild.TaxCollectorWisdom, (short)guild.Boost,
                                              Guild.TAX_COLLECTOR_SPELLS, guild.GetTaxCollectorSpellsLevels().Select(x => (sbyte)x)));
 }
Esempio n. 48
0
 public static void SendCharacterSelectedForceMessage(IPacketReceiver client, int id)
 {
     client.Send(new CharacterSelectedForceMessage(id));
 }
Esempio n. 49
0
 /// <summary>
 /// Starts the kick timer
 /// </summary>
 public static void SendRequiresRaid(IPacketReceiver client, int time)
 {
     using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_RAID_GROUP_ONLY, 8))
     {
         packet.Write(time);
         packet.Write(1);
         client.Send(packet);
     }
 }
Esempio n. 50
0
 public static void SendGuildInformationsPaddocksMessage(IPacketReceiver client)
 {
     client.Send(new GuildInformationsPaddocksMessage(0, new PaddockContentInformations[0]));
 }
Esempio n. 51
0
 /// <summary>
 /// Warns a player within the instance that the leader is attempting to reset the instance
 /// </summary>
 /// <param name="client"></param>
 public static void SendResetWarning(IPacketReceiver client, MapId map)
 {
     using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_RESET_FAILED_NOTIFY, 4))
     {
         packet.Write((uint)map);
         client.Send(packet);
     }
 }
Esempio n. 52
0
 public static void SendGuildHousesInformationMessage(IPacketReceiver client)
 {
     client.Send(new GuildHousesInformationMessage(new HouseInformationsForGuild[0]));
 }
Esempio n. 53
0
        public static void ClearStatus(IPacketReceiver client, int queueIndex)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_BATTLEFIELD_STATUS))
            {
                packet.Write(queueIndex);

                // We write an empty BGID, this makes the client clear out data for this queue
                packet.Write(0ul);

                client.Send(packet);
                return;
            }
        }
Esempio n. 54
0
 public static void SendGuildJoinedMessage(IPacketReceiver client, GuildMember member)
 {
     client.Send(new GuildJoinedMessage(member.Guild.GetGuildInformations(), (int)member.Rights, true));
 }
Esempio n. 55
0
        public static void SendPlayerJoined(IPacketReceiver rcv, Character joiningCharacter)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_BATTLEGROUND_PLAYER_JOINED, 8))
            {
                packet.Write(joiningCharacter.EntityId);

                rcv.Send(packet);
            }
        }
Esempio n. 56
0
 public static void SendGuildMemberLeavingMessage(IPacketReceiver client, GuildMember member, bool kicked)
 {
     client.Send(new GuildMemberLeavingMessage(kicked, member.Id));
 }
Esempio n. 57
0
        public static void SendBattlegroundError(IPacketReceiver rcv, BattlegroundJoinError err)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_GROUP_JOINED_BATTLEGROUND, 4))
            {
                packet.Write((int)err);

                if (err == BattlegroundJoinError.JoinTimedOut || err == BattlegroundJoinError.JoinFailed)
                    packet.Write((ulong)0);

                rcv.Send(packet);
            }
        }
Esempio n. 58
0
 public static void SendGuildCreationStartedMessage(IPacketReceiver client)
 {
     client.Send(new GuildCreationStartedMessage());
 }
Esempio n. 59
0
        public static void SendPlayerPositions(IPacketReceiver client, IList<Character> players, IList<Character> flagCarriers)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.MSG_BATTLEGROUND_PLAYER_POSITIONS))
            {
                if (players != null)
                {
                    packet.Write(players.Count); // for the players side
                    foreach (var player in players)
                    {
                        packet.Write(player.EntityId); // player guid
                        packet.Write(player.Position.X); // player x
                        packet.Write(player.Position.Y); // player y
                    }
                }
                else
                {
                    packet.Write(0);
                }

                if (flagCarriers != null)
                {
                    packet.Write(flagCarriers.Count);
                    foreach (var player in flagCarriers)
                    {
                        packet.Write(player.EntityId);
                        packet.Write(player.Position.X);
                        packet.Write(player.Position.Y);
                    }
                }
                else
                {
                    packet.Write(0);
                }

                client.Send(packet);
            }
        }
Esempio n. 60
0
 public static void SendGuildModificationStartedMessage(IPacketReceiver client, bool changeName, bool changeEmblem)
 {
     client.Send(new GuildModificationStartedMessage(changeName, changeEmblem));
 }