예제 #1
0
파일: NPCHandler.cs 프로젝트: NVN/WCell
        public static void SendPetitionRename(IPacketReceiver client, PetitionCharter petition)
        {
            var name = petition.Petition.Name;
            using (var packet = new RealmPacketOut(RealmServerOpCode.MSG_PETITION_RENAME, 8 + name.Length + 1))
            {
                packet.WriteULong(petition.EntityId.Full);
                packet.WriteCString(name);

                client.Send(packet);
            }
        }
예제 #2
0
파일: NPCHandler.cs 프로젝트: NVN/WCell
		public static void SendPetitionQueryResponse(IPacketReceiver client, PetitionCharter charter)
		{
            string name = charter.Petition.Name;
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_PETITION_QUERY_RESPONSE, 4 + 8 + name.Length + 1 + 1 + 4 * 12 + 2 + 10))
			{
                packet.WriteUInt(charter.EntityId.Low);
                packet.WriteULong(charter.Owner.EntityId.Full);
                packet.WriteCString(name);
                packet.WriteByte(0);

                var type = (uint)charter.Petition.Type;
                if(type == (uint)PetitionType.Guild)
                {
                    packet.WriteUInt(type);
                    packet.WriteUInt(type);
                    packet.WriteUInt(0);
                }
                else
                {
                    packet.WriteUInt(type-1);
                    packet.WriteUInt(type-1);
                    packet.WriteUInt(type);
                }
                packet.WriteUInt(0);
                packet.WriteUInt(0);
                packet.WriteUInt(0);
                packet.WriteUInt(0);
                packet.WriteUShort(0);
                packet.WriteUInt(0);
                packet.WriteUInt(0);
                packet.WriteUInt(0);

                for(int i = 0; i < 10; ++i)
                    packet.WriteByte(0);

                packet.WriteUInt(0);

                if(type == (uint)PetitionType.Guild)
                    packet.WriteUInt(0);
                else
                    packet.WriteUInt(1);

                client.Send(packet);
			}
		}
예제 #3
0
파일: NPCHandler.cs 프로젝트: NVN/WCell
		public static void SendPetitionSignatures(IPacketReceiver client, PetitionCharter charter)
		{
            var signs = charter.Petition.SignedIds;
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_PETITION_SHOW_SIGNATURES, 8+8+4+1+signs.Count*12))
			{
                packet.WriteULong(charter.EntityId.Full);
                packet.WriteULong(charter.Owner.EntityId.Full);
                packet.WriteUInt(charter.EntityId.Low);
                packet.WriteByte(signs.Count);
                
                foreach(var guid in signs)
                {
                    packet.WriteULong(guid);
                    packet.WriteUInt(0);
                }

				client.Send(packet);
			}
		}