public static void SendPetRemovedResponse(IRealmClient client, int petGuid) { AchievementProgressRecord progressRecord = client.ActiveCharacter.Achievements.GetOrCreateProgressRecord(168U); switch (++progressRecord.Counter) { case 5: client.ActiveCharacter.Map.CallDelayed(500, (Action)(() => client.ActiveCharacter.DiscoverTitle(Asda2TitleId.Abandoned363))); break; case 10: client.ActiveCharacter.Map.CallDelayed(500, (Action)(() => client.ActiveCharacter.GetTitle(Asda2TitleId.Abandoned363))); break; } progressRecord.SaveAndFlush(); using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.PetRemoved)) { packet.WriteInt32(client.ActiveCharacter.AccId); packet.WriteInt32(petGuid); packet.WriteByte(1); client.Send(packet, true); } }
public static void SendRegisterItemToAukCancelWindowResponse(IRealmClient client, List <Asda2ItemTradeRef> items = null) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.RegisterItemToAukCancelWindow)) { if (items != null) { foreach (Asda2ItemTradeRef asda2ItemTradeRef in items) { packet.WriteByte(0); packet.WriteInt32(asda2ItemTradeRef.Item.ItemId); packet.WriteByte((byte)asda2ItemTradeRef.Item.InventoryType); packet.WriteInt16(asda2ItemTradeRef.Item.Slot); packet.WriteSkip(Asda2AuctionHandler.stab15); packet.WriteInt32(asda2ItemTradeRef.Amount); packet.WriteInt32(asda2ItemTradeRef.Item.Amount); packet.WriteInt16(asda2ItemTradeRef.Item.Weight); packet.WriteSkip(Asda2AuctionHandler.stab37); packet.WriteInt32(client.ActiveCharacter.Asda2Inventory.Weight); packet.WriteInt32(client.ActiveCharacter.Money); packet.WriteInt64(-1L); } } client.Send(packet, false); } }
public static void SendInitPetInfoOnLoginResponse(IRealmClient client, Asda2PetRecord pet) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.InitPetInfoOnLogin)) { packet.WriteInt32(client.ActiveCharacter.AccId); packet.WriteByte(0); packet.WriteInt32(pet.Guid); packet.WriteInt16(pet.Id); packet.WriteFixedAsciiString(pet.Name, 16, Locale.Start); packet.WriteByte(pet.HungerPrc); packet.WriteByte(pet.Level); packet.WriteByte(pet.MaxLevel); packet.WriteInt16(pet.Expirience); packet.WriteByte(pet.Level); packet.WriteInt16((short)pet.Stat1Type); packet.WriteInt32(pet.Stat1Value); packet.WriteInt16((short)pet.Stat2Type); packet.WriteInt32(pet.Stat2Value); packet.WriteInt16((short)pet.Stat3Type); packet.WriteInt32(pet.Stat3Value); packet.WriteByte(client.ActiveCharacter.Asda2Pet == null ? 0 : (client.ActiveCharacter.Asda2Pet.Guid == pet.Guid ? 1 : 0)); client.Send(packet, false); } }
public static void SendFaceOrHairChangedResponse(IRealmClient client, bool isHair, bool success = false, Asda2Item usedItem = null) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.FaceOrHairChanged)) { packet.WriteByte(success ? 1 : 0); packet.WriteByte(isHair ? 1 : 2); packet.WriteByte(client.ActiveCharacter.HairStyle); packet.WriteByte(client.ActiveCharacter.HairColor); packet.WriteByte(client.ActiveCharacter.Record.Face); packet.WriteInt32(client.ActiveCharacter.Asda2Inventory.Weight); packet.WriteInt32(client.ActiveCharacter.Money); Asda2InventoryHandler.WriteItemInfoToPacket(packet, usedItem, false); client.Send(packet, true); if (!success) { return; } AchievementProgressRecord progressRecord = client.ActiveCharacter.Achievements.GetOrCreateProgressRecord(9U); switch (++progressRecord.Counter) { case 50: client.ActiveCharacter.DiscoverTitle(Asda2TitleId.Beautiful47); break; case 100: client.ActiveCharacter.GetTitle(Asda2TitleId.Beautiful47); break; } progressRecord.SaveAndFlush(); } }
public static void SendRegisterItemToAukCancelWindowResponse(IRealmClient client, List <Asda2ItemTradeRef> items = null) { using (var packet = new RealmPacketOut(RealmServerOpCode.RegisterItemToAukCancelWindow))//9902 { if (items != null) { foreach (var item in items) { packet.WriteByte(0); //{status}default value : 0 Len : 1 packet.WriteInt32(item.Item.ItemId); //{itemId}default value : 31855 Len : 4 packet.WriteByte((byte)item.Item.InventoryType); //{invNum}default value : 2 Len : 1 packet.WriteInt16(item.Item.Slot); //{cell}default value : 5 Len : 2 packet.WriteSkip(stab15); //value name : stab15 default value : stab15Len : 12 packet.WriteInt32(item.Amount); //{registeredAmount}default value : 250 Len : 4 packet.WriteInt32(item.Item.Amount); //{beforeAmount}default value : 250 Len : 4 packet.WriteInt16(item.Item.Weight); //{weight}default value : 0 Len : 2 packet.WriteSkip(stab37); //value name : stab37 default value : stab37Len : 21 packet.WriteInt32(client.ActiveCharacter.Asda2Inventory.Weight); //{invWeight}default value : 315 Len : 4 packet.WriteInt32(client.ActiveCharacter.Money); //{money}default value : 8503216 Len : 4 packet.WriteInt64(-1); //value name : unk8 default value : -1Len : 8 } } client.Send(packet); } }
public static void SendRegularTradeCompleteResponse(IRealmClient client, Asda2Item[] items) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.RegularTradeComplete)) { packet.WriteByte(5); packet.WriteInt32(client.ActiveCharacter.Asda2Inventory.Weight); for (int index = 0; index < 5; ++index) { Asda2Item asda2Item = items[index]; if (asda2Item == null) { packet.WriteInt32(-1); packet.WriteByte(0); packet.WriteInt16(-1); packet.WriteInt32(0); packet.WriteInt16(0); } else { packet.WriteInt32(asda2Item.ItemId); packet.WriteByte((byte)asda2Item.InventoryType); packet.WriteInt16(asda2Item.Slot); packet.WriteInt32(asda2Item.Amount); packet.WriteInt16(asda2Item.Weight); } } client.Send(packet, false); } }
public static void SendMonstrStateChangedResponse(NPC npc, Asda2NpcState state) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.MonstrStateChanged)) { packet.WriteSkip(Asda2CombatHandler.stab6); packet.WriteInt16(npc.UniqIdOnMap); packet.WriteInt32((int)state); for (int index = 0; index < 28; ++index) { Aura aura = (Aura)null; if (npc.Auras.ActiveAuras.Length > index) { aura = npc.Auras.ActiveAuras[index].TicksLeft == 0 ? (Aura)null : npc.Auras.ActiveAuras[index]; } packet.WriteInt16(aura == null ? -1 : (int)aura.Spell.RealId); } for (int index = 0; index < 28; ++index) { Aura aura = (Aura)null; if (npc.Auras.ActiveAuras.Length > index) { aura = npc.Auras.ActiveAuras[index]; } packet.WriteByte(aura == null ? 0 : 1); } packet.WriteInt32(npc.Health); packet.WriteInt16((short)npc.Position.X); packet.WriteInt16((short)npc.Position.Y); npc.SendPacketToArea(packet, false, true, Locale.Any, new float?()); } }
public static void SendRegularTradeCompleteResponse(IRealmClient client, Asda2Item[] items) { using (var packet = new RealmPacketOut(RealmServerOpCode.RegularTradeComplete)) //5295 { packet.WriteByte(5); //{status}default value : 5 Len : 1 packet.WriteInt32(client.ActiveCharacter.Asda2Inventory.Weight); //{invWeight}default value : 2381 Len : 4 for (int i = 0; i < 5; i += 1) { var item = items[i]; if (item == null) { packet.WriteInt32(-1); //{itemId}default value : 31850 Len : 4 packet.WriteByte(0); //{invNum}default value : 2 Len : 1 packet.WriteInt16(-1); //{slot}default value : 1 Len : 2 packet.WriteInt32(0); //{amount}default value : 5 Len : 4 packet.WriteInt16(0); //{weight}default value : 60 Len : 2 } else { packet.WriteInt32(item.ItemId); //{itemId}default value : 31850 Len : 4 packet.WriteByte((byte)item.InventoryType); //{invNum}default value : 2 Len : 1 packet.WriteInt16(item.Slot); //{slot}default value : 1 Len : 2 packet.WriteInt32(item.Amount); //{amount}default value : 5 Len : 4 packet.WriteInt16(item.Weight); //{weight}default value : 60 Len : 2 } } client.Send(packet, addEnd: false); } }
public static void SendMonstrStateChangedResponse(NPC npc, Asda2NpcState state) { using (var packet = new RealmPacketOut(RealmServerOpCode.MonstrStateChanged)) //4017 { packet.WriteSkip(stab6); //value name : stab6 default value : stab6Len : 2 packet.WriteInt16(npc.UniqIdOnMap); //{mobId}default value : 253 Len : 2 packet.WriteInt32((int)state); //{status}default value : 0 Len : 4 for (int i = 0; i < 28; i += 1) { Spells.Auras.Aura aura = null; if (npc.Auras.ActiveAuras.Length > i) { aura = npc.Auras.ActiveAuras[i].TicksLeft == 0 ? null : npc.Auras.ActiveAuras[i]; //npc.Auras.VisibleAuras[i]; } packet.WriteInt16(aura == null?-1:aura.Spell.RealId); //{effect}default value : -1 Len : 2 } for (int i = 0; i < 28; i += 1) { Spells.Auras.Aura aura = null; if (npc.Auras.ActiveAuras.Length > i) { aura = npc.Auras.ActiveAuras[i]; //npc.Auras.VisibleAuras[i]; } packet.WriteByte(aura == null?0:1); //{effectExist}default value : 0 Len : 1 } packet.WriteInt32(npc.Health); //{hp}default value : 0 Len : 4 packet.WriteInt16((short)npc.Position.X); //{x}default value : 74 Len : 2 packet.WriteInt16((short)npc.Position.Y); //{y}default value : 246 Len : 2 npc.SendPacketToArea(packet, false, true); } }
public static void SendPetGoesSleepDueStarvationResponse(IRealmClient client, Asda2PetRecord pet) { if (client == null || client.ActiveCharacter == null || pet == null) { return; } AchievementProgressRecord progressRecord = client.ActiveCharacter.Achievements.GetOrCreateProgressRecord(167U); switch (++progressRecord.Counter) { case 5: client.ActiveCharacter.Map.CallDelayed(500, (Action)(() => client.ActiveCharacter.DiscoverTitle(Asda2TitleId.Neglected364))); break; case 10: client.ActiveCharacter.Map.CallDelayed(500, (Action)(() => client.ActiveCharacter.GetTitle(Asda2TitleId.Neglected364))); break; } progressRecord.SaveAndFlush(); using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.PetGoesSleepDueStarvation)) { packet.WriteInt32(client.ActiveCharacter.AccId); packet.WriteInt32(pet.Guid); client.Send(packet, true); } }
public static void SendFishingBooksInfoResponse(IRealmClient client, Asda2FishingBook book) { using (var packet = new RealmPacketOut(RealmServerOpCode.FishingBooksInfo)) //6174 { packet.WriteByte(book.Num); //{fishBookNum}default value : 0 Len : 1 packet.WriteInt32(0); //value name : unk4 default value : 0Len : 4 for (int i = 0; i < 30; i += 1) { packet.WriteInt32(book.FishIds[i]); //{fishId}default value : 0 Len : 4 } for (int i = 0; i < 30; i += 1) { packet.WriteInt16(book.Amounts[i]); //{amounts}default value : 0 Len : 2 } for (int i = 0; i < 30; i += 1) { packet.WriteInt16(book.MaxLength[i]); //{maxLength}default value : 0 Len : 2 } for (int i = 0; i < 30; i += 1) { packet.WriteInt16(book.MinLengths[i]); //{minLength}default value : 0 Len : 2 } client.Send(packet, addEnd: true); } }
public static void SendPartyMemberBuffInfoResponse(Character member) { using (var packet = new RealmPacketOut(RealmServerOpCode.PartyMemberBuffInfo)) //5108 { packet.WriteInt32(member.AccId); //{accId}default value : 340701 Len : 4 var auras = new Aura[28]; var it = 0; foreach (var visibleAura in member.Auras.ActiveAuras) { if (visibleAura.TicksLeft <= 0) { continue; } auras[it++] = visibleAura; if (auras.Length <= it) { break; } } for (int i = 0; i < 28; i += 1) { var aura = auras[i]; packet.WriteByte(aura == null ? 0 : 1); //exist? packet.WriteByte(0); //spadaet? packet.WriteInt32(aura == null ? -1 : aura.Spell.RealId); //{duration}default value : -1 Len : 4 } member.Group.Send(packet, addEnd: false); } }
public static void SendMonstrTakesDamageSecondaryResponse(Character chr, Character targetChr, NPC targetNpc, int damage) { if (targetChr == null && targetNpc == null) { return; } using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.MonstrTakesDamageSecondary)) { packet.WriteByte(targetNpc != null ? 0 : 1); packet.WriteInt16(targetNpc != null ? (short)targetNpc.UniqIdOnMap : targetChr.SessionId); packet.WriteInt16(160); packet.WriteInt32(damage); packet.WriteInt32(450); packet.WriteByte(1); packet.WriteInt16(66); packet.WriteByte(0); if (targetChr != null) { targetChr.SendPacketToArea(packet, true, true, Locale.Any, new float?()); } else { targetNpc.SendPacketToArea(packet, true, true, Locale.Any, new float?()); } } }
public static void SendMailsListResponse(IRealmClient client, IEnumerable <Asda2MailMessage> mailMsgs) { var msgs = new Asda2MailMessage[10]; var ii = 0; foreach (var m in mailMsgs) { if (m.DeleteTime < DateTime.Now) { client.ActiveCharacter.MailMessages.Remove(m.Guid); m.DeleteLater(); } else { msgs[ii] = m; } ii++; } using (var packet = new RealmPacketOut(RealmServerOpCode.MailsList)) //6619 { packet.WriteByte(0); //{page}default value : 1 Len : 1 for (int i = 0; i < 10; i += 1) { var msg = msgs[i]; packet.WriteInt32((int)(msg == null?-1:msg.Guid)); //{guidRec}default value : 379808 Len : 4 packet.WriteByte(msg == null?0:msg.IsReaded?1:0); //{taked}default value : 0 Len : 1 packet.WriteInt32((int)(msg == null ? 0 : (msg.DeleteTime - DateTime.Now).TotalMinutes)); //{timeTodeletemins}default value : 10061 Len : 4 packet.WriteFixedAsciiString(msg == null?"":msg.SenderName, 20); //{senderName}default value : Len : 20 packet.WriteFixedAsciiString(msg == null ? "" : msg.Subject, 32); //{title}default value : Len : 32 } client.Send(packet, addEnd: true); } }
public static void SendPartyMemberBuffInfoResponse(Character member) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.PartyMemberBuffInfo)) { packet.WriteInt32(member.AccId); Aura[] auraArray = new Aura[28]; int num = 0; foreach (Aura activeAura in member.Auras.ActiveAuras) { if (activeAura.TicksLeft > 0) { auraArray[num++] = activeAura; if (auraArray.Length <= num) { break; } } } for (int index = 0; index < 28; ++index) { Aura aura = auraArray[index]; packet.WriteByte(aura == null ? 0 : 1); packet.WriteByte(0); packet.WriteInt32(aura == null ? -1 : (int)aura.Spell.RealId); } member.Group.Send(packet, false); } }
public static void SendWiningFactionInfoResponse(Asda2BattlegroundTown townId, int factionId, string mvpName) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.WiningFactionInfo)) { packet.WriteInt32((int)townId); packet.WriteInt32(factionId); packet.WriteFixedAsciiString(mvpName, 20, Locale.Start); WCell.RealmServer.Global.World.Broadcast(packet, true, Locale.Any); } }
public static void SendPetRemovedResponse(IRealmClient client, int petGuid) { using (var packet = new RealmPacketOut(RealmServerOpCode.PetRemoved)) //6111 { packet.WriteInt32(client.ActiveCharacter.AccId); //{accId}default value : 361343 Len : 4 packet.WriteInt32(petGuid); //{petGuId}default value : 68411 Len : 4 packet.WriteByte(1); //value name : unk1 default value : 1Len : 1 client.Send(packet, addEnd: true); } }
public static void SendPetSummonOrUnSummondResponse(IRealmClient client, Asda2PetRecord pet) { using (var packet = new RealmPacketOut(RealmServerOpCode.PetSummonOrUnSummond)) //6101 { packet.WriteInt32(client.ActiveCharacter.AccId); //{accId}default value : 355335 Len : 4 packet.WriteByte(pet == null ? 0 : 1); //{status}default value : 1 Len : 1 packet.WriteInt32(pet == null ? 0 : pet.Guid); //{petId}default value : 54857 Len : 4 client.Send(packet, addEnd: true); } }
public static void SendVeicheStatusChangedResponse(Character chr, Asda2MountHandler.MountStatusChanged status) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.VeicheStatusChanged)) { packet.WriteByte((byte)status); packet.WriteInt32(chr.AccId); packet.WriteInt32(chr.MountId); chr.SendPacketToArea(packet, true, true, Locale.Any, new float?()); } }
public static void SendPetSummonOrUnSummondResponse(IRealmClient client, Asda2PetRecord pet) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.PetSummonOrUnSummond)) { packet.WriteInt32(client.ActiveCharacter.AccId); packet.WriteByte(pet == null ? 0 : 1); packet.WriteInt32(pet == null ? 0 : pet.Guid); client.Send(packet, true); } }
public static void SendVeicheStatusChangedResponse(Character chr, MountStatusChanged status) { using (var packet = new RealmPacketOut(RealmServerOpCode.VeicheStatusChanged)) //6767 { packet.WriteByte((byte)status); //{zeroUnsummonOneGetOnTwoSummoning}default value : 1 Len : 1 packet.WriteInt32(chr.AccId); //{accId}default value : 361343 Len : 4 packet.WriteInt32(chr.MountId); //{veicheId}default value : 56 Len : 4 chr.SendPacketToArea(packet, true, true); } }
public static void SendSkillResetedResponse(IRealmClient client, short skillId, short skillLevel, uint goldRecived) { using (var packet = new RealmPacketOut(RealmServerOpCode.SkillReseted)) //5464 { packet.WriteInt32(skillId); //{skillId}default value : 505 Len : 4 packet.WriteInt16(skillLevel); //{skillLevel}default value : 7 Len : 2 packet.WriteInt32(goldRecived); //{goldRecived}default value : 80500 Len : 4 client.Send(packet, addEnd: true); } }
public static void SendShopItemUsedResponse(IRealmClient rcv, Character trigger, int durationSecs = -1) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.ShopItemUsed)) { packet.WriteInt16(trigger.SessionId); packet.WriteInt32(trigger.TransportItemId); packet.WriteInt32(durationSecs); rcv.Send(packet, true); rcv.ActiveCharacter.SendPacketToArea(packet, true, true, Locale.Any, new float?()); } }
public static void SendSomeOneStartedFishingResponse(Character fisher, int fishId, short fishSize) { using (var packet = new RealmPacketOut(RealmServerOpCode.SomeOneStartedFishing)) //6173 { packet.WriteByte(1); //{status}default value : 1 Len : 1 packet.WriteInt32(fisher.AccId); //{accId}default value : 361343 Len : 4 packet.WriteInt32(fishId); //{fishId}default value : 31740 Len : 4 packet.WriteInt16(fishSize); //{fishSize}default value : 64 Len : 2 fisher.SendPacketToArea(packet); } }
public static void SendShopItemUsedResponse(IRealmClient rcv, Character trigger, int durationSecs = -1) { using (var packet = new RealmPacketOut(RealmServerOpCode.ShopItemUsed)) //5453 { packet.WriteInt16(trigger.SessionId); //{sessId}default value : 96 Len : 2 packet.WriteInt32(trigger.TransportItemId); //{itemId}default value : 82 Len : 4 packet.WriteInt32(durationSecs); //{durationSecs}default value : 1800 Len : 4 rcv.ActiveCharacter.SendPacketToArea(packet, true, true); rcv.Send(packet, addEnd: true); } }
public static void SendSkillResetedResponse(IRealmClient client, short skillId, short skillLevel, uint goldRecived) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.SkillReseted)) { packet.WriteInt32(skillId); packet.WriteInt16(skillLevel); packet.WriteInt32(goldRecived); client.Send(packet, true); } }
public static void SendCharacterOnMountStatusChangedToPneClientResponse(IRealmClient reciver, Character trigger) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.CHaracterOnMountStatusChanged)) { packet.WriteByte((byte)1); packet.WriteByte(trigger.IsOnMount); packet.WriteInt32(trigger.AccId); packet.WriteInt32(trigger.MountId); reciver.Send(packet, true); } }
public static void SendWiningFactionInfoResponse(Asda2BattlegroundTown townId, int factionId, string mvpName) { using (var packet = new RealmPacketOut(RealmServerOpCode.WiningFactionInfo)) //6257 { packet.WriteInt32((int)townId); //{townId}default value : 0 Len : 4 packet.WriteInt32(factionId); //{factionId}default value : 0 Len : 4 packet.WriteFixedAsciiString(mvpName, 20); //{MVPName}default value : Len : 20 World.Broadcast(packet, true, Locale.Any); } }
public static void SendShopTradeCompleteResponse(IRealmClient client, Asda2Item[] items) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.ShopTradeComplete)) { packet.WriteByte(5); packet.WriteInt32(client.ActiveCharacter.Asda2Inventory.Weight); for (int index = 0; index < 5; ++index) { Asda2Item asda2Item = items[index]; packet.WriteInt32(asda2Item == null ? 0 : asda2Item.ItemId); packet.WriteByte(asda2Item == null ? (byte)0 : (byte)asda2Item.InventoryType); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Slot); packet.WriteInt16(asda2Item == null ? -1 : (asda2Item.IsDeleted ? -1 : 0)); packet.WriteByte(asda2Item == null ? -1 : asda2Item.Durability); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Weight); packet.WriteInt32(0); packet.WriteByte(asda2Item == null ? -1 : asda2Item.Enchant); packet.WriteByte(0); packet.WriteByte(0); packet.WriteByte(0); packet.WriteByte(asda2Item == null ? -1 : asda2Item.SealCount); packet.WriteInt16(asda2Item == null ? -1 : (short)asda2Item.Parametr1Type); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Parametr1Value); packet.WriteInt16(asda2Item == null ? -1 : (short)asda2Item.Parametr2Type); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Parametr2Value); packet.WriteInt16(asda2Item == null ? -1 : (short)asda2Item.Parametr3Type); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Parametr3Value); packet.WriteInt16(asda2Item == null ? -1 : (short)asda2Item.Parametr4Type); if (asda2Item != null && asda2Item.Template.IsAvatar) { Asda2ItemTemplate template1 = Asda2ItemMgr.GetTemplate(asda2Item.Soul2Id); Asda2ItemTemplate template2 = Asda2ItemMgr.GetTemplate(asda2Item.Soul3Id); packet.WriteInt16(template1 == null ? -1 : template1.SowelBonusValue); packet.WriteInt16(-1); packet.WriteInt16(template2 == null ? -1 : template2.SowelBonusValue); } else { packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Parametr4Value); packet.WriteInt16(asda2Item == null ? -1 : (short)asda2Item.Parametr5Type); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Parametr5Value); } packet.WriteByte(0); packet.WriteItemAmount(asda2Item, false); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Soul1Id); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Soul2Id); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Soul3Id); packet.WriteInt16(asda2Item == null ? -1 : asda2Item.Soul4Id); } client.Send(packet, false); } }
public static void SendRoomChatMsgResponse(IRealmClient client, uint senderAccId, int color, string msg, Locale locale) { using (var packet = new RealmPacketOut(RealmServerOpCode.RoomChatMsg)) //6247 { packet.WriteInt32(senderAccId); //{accId}default value : 361343 Len : 4 packet.WriteInt32(color); //{color}default value : -10240 Len : 4 packet.WriteInt32(0); //value name : unk7 default value : 0Len : 4 packet.WriteAsciiString(msg, locale); //{msg}default value : Len : 0 client.ActiveCharacter.ChatRoom.Send(packet, true, locale); } }