public byte[] GetWrittenBuffer(PacketIds packetid) { Packet p = new Packet((uint)this.Index + 4); p.WriteHeader(packetid, this); return(p.GetWrittenBuffer()); }
public static byte[] SendHardSkillList() { Packet p = new Packet(200); p.WriteHexString("1D 31 01 00 00"); return p.GetWrittenBuffer(); }
/// <summary> /// Create character /// </summary> /// <param name="ms">State of character making</param> /// <param name="playerid">ID of character that was made</param> /// <returns></returns> public static byte[] SendCreateCharacter(CharCreationState ms, int playerid) { Packet p = new Packet(500); p.WriteByte((byte)ms); if (ms == CharCreationState.Success) p.WriteInt(playerid); else p.WriteHexString("00 00 00 00"); return p.GetWrittenBuffer(PacketIds.SendCreateCharacter); }
public static byte[] SendChatMessage(Character ch, ChatMessageInfo cmi) { Packet p = new Packet(200); p.WriteInt(ch.CharacterId); p.WriteByte((byte)cmi.Type); // chat type probably p.WriteString(cmi.Message); p.WriteString(ch.Name); if (cmi.Type == ChatType.Whisper) { p.WriteInt(cmi.TargetID); p.WriteString(cmi.TargetName); } return p.GetWrittenBuffer(PacketIds.SendChatMessage); }
public static byte[] SendChannelStatus() { Packet p = new Packet(200); p.WriteHexString("02 00 01 01 01 32 00 01 02 01 08 00"); return p.GetWrittenBuffer(PacketIds.SendChannelStatus); }
/// <summary> /// Send channel to client /// </summary> /// <param name="CI">Channel Info, containing id, name, desc, ip address and port</param> /// <param name="TotalChannels"></param> /// <returns></returns> public static byte[] SendChannel(ChannelInfo CI, int TotalChannels) { Packet p = new Packet(500); p.WriteByte(TotalChannels); // total channels p.WriteByte(CI.ChannelId); // channel id p.WriteString(CI.ChannelName); // name p.WriteString(CI.ChannelDesc); // desc p.WriteHexString("12 F4 01"); p.WriteString(CI.IPAddress); // ip p.WriteShort(CI.Port); // port p.WriteHexString("00 00 00"); return p.GetWrittenBuffer(PacketIds.SendChannelList); }
public static byte[] SendBagItems(List<BaseItem> items, int bag) { Packet p = new Packet(200); // p.WriteHexString("18 31 A4 00 00 02 00 73 83 D0 00 2A 4E 01 02 B0 04 00 00 00 00 00 00 02 00 00 04 00 05 00 06 00 07 00 08 00 C0 C8 00 C8 00 05 00 06 00 07 00 08 00 09 00 0A 00 0B 00 0C 00 0D 00 0E 00 0F 08 00 00 00 04 00 05 00 07 00 0A 00 0B 00 0C 00 0D 00 00 00 00 01 01 01 02 02 74 83 D0 00 35 4E 02 01 34 08 00 00 00 00 00 00 02 01 00 01 00 00 00 00 00 01 00 00 00 C8 64 00 64 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); p.WriteByte(bag); p.WriteByte(items.Count); foreach (BaseItem i in items) { p.WriteByte(i.Slot); p.WriteInt(i.ItemID); p.WriteShort(i.ReferenceID); p.WriteByte(i.bType); p.WriteByte(i.bKind); p.WriteShort(i.VisualID); p.WriteInt(i.Price); p.WriteHexString("00 00"); if (i is Equipment) { Equipment e = i as Equipment; p.WriteByte(e.RequiredClass); p.WriteShort(e.Amount); p.WriteShort(e.RequiredLevel); p.WriteShort(e.RequiredDexterity); p.WriteShort(e.RequiredStrength); p.WriteShort(e.RequiredStamina); p.WriteShort(e.RequiredEnergy); p.WriteByte(e.MaxImbueTries); p.WriteShort(e.Durability); p.WriteShort(e.MaxDurability); p.WriteShort(e.Damage); p.WriteShort(e.Defence); p.WriteShort(e.AttackRating); p.WriteShort(e.AttackSpeed); p.WriteShort(e.AttackRange); p.WriteShort(e.IncMaxLife); p.WriteShort(e.IncMaxMana); p.WriteShort(e.IncLifeRegen); p.WriteShort(e.IncManaRegen); p.WriteShort(e.Critical); p.WriteByte(e.Plus); p.WriteByte(e.Slvl); p.WriteHexString("00"); // unknown p.WriteByte(e.ImbueTries); p.WriteHexString("00"); // unknown p.WriteShort(e.DragonSuccessImbueTries); p.WriteByte(e.DiscountRepairFee); p.WriteShort(e.TotalDragonImbueTries); p.WriteShort(e.DragonDamage); p.WriteShort(e.DragonDefence); p.WriteShort(e.DragonAttackRating); p.WriteShort(e.DragonLife); p.WriteByte(e.MappedData); if (!(e is Ring) && !(e is Necklace) && !(e is Cape)) p.WriteByte(e.ForceSlot); p.WriteHexString("00 00"); // unknown if (e is Cape) { Cape c = e as Cape; p.WriteHexString("00 00"); // required guild position p.WriteHexString("00 00 00 00 00 00 00"); p.WriteHexString("01 00"); // decrease times of durability p.WriteByte(c.PolishImbueTries); // polish imbue tries p.WriteShort(c.MaxPolishImbueTries); // polish max tries p.WriteShort(c.VigiStat1); // stat1 p.WriteShort(c.VigiStat2); // stat2 p.WriteShort(c.VigiStat3); // stat3 p.WriteShort(c.VigiStat4); // stat4 p.WriteHexString("00 00"); // stat5 p.WriteShort(c.VigiStatAdd1); // stat1 increase p.WriteShort(c.VigiStatAdd2); // stat2 increase p.WriteShort(c.VigiStatAdd3); // stat3 increase p.WriteShort(c.VigiStatAdd4); // stat4 increase p.WriteHexString("00 00"); // stat5 increase p.WriteHexString("00 00"); // unknown } if (!(e is Ring) && !(e is Necklace) && !(e is Cape)) { p.WriteByte(e.RebirthHole); p.WriteByte(e.RebirthHoleItem); p.WriteShort(e.RebirthHoleStat); } } if (i is ImbueItem) { ImbueItem im = i as ImbueItem; p.WriteByte(im.RequiredClass); p.WriteShort(i.Amount); p.WriteHexString("00"); // imbuestat, eg dec level, increase value etc p.WriteShort(im.ImbueChance); p.WriteShort(im.IncreaseValue); p.WriteHexString("00 00"); // could be lowest lvl who knows p.WriteHexString("00 00"); // maxlevel of usage, for dragon stones p.WriteHexString("00 00"); // unknown } if (i is PotionItem) { PotionItem pot = i as PotionItem; p.WriteByte(pot.RequiredClass); p.WriteShort(pot.Amount); p.WriteHexString("00 00 00 00"); p.WriteShort(pot.HealHp); p.WriteShort(pot.HealMana); p.WriteHexString("00 20 4E 00 00 00 00"); } if (i is BookItem) { BookItem book = i as BookItem; p.WriteByte(book.RequiredClass); p.WriteShort(book.Amount); p.WriteShort(book.RequiredLevel); p.WriteInt(book.SkillID); p.WriteByte(book.SkillLevel); p.WriteInt(book.SkillData); } if (i is BeadItem) { BeadItem bead = i as BeadItem; p.WriteByte(bead.RequiredClass); p.WriteShort(bead.Amount); p.WriteInt(bead.ToMapID); p.WriteHexString("01 00 00 00 00 00 00"); } } return p.GetWrittenBuffer(PacketIds.SendItemList); }
public static byte[] SendAddStat(int error, AddStatInfo asi, int pointsleft, int statamount) { Packet p = new Packet(200); p.WriteHexString("1E 35 07 00"); p.WriteByte(error); p.WriteByte(asi.Stat); p.WriteByte(asi.Amount); p.WriteShort(pointsleft); p.WriteShort(statamount); return p.GetWrittenBuffer(); }
public static byte[] SendSpawnPlayerSomething2() { Packet p = new Packet(200); p.WriteHexString("36 31 01 00 00"); return p.GetWrittenBuffer(); }
public static byte[] SendSpawnPlayers(Character ch) { Packet p = new Packet(200); p.WriteHexString("00"); p.WriteInt(ch.MapId); p.WriteHexString("01 00"); p.WriteInt(ch.CharacterId); p.WriteShort(ch.X); p.WriteShort(ch.Y); p.WriteHexString("76"); p.WriteShort(ch.X); p.WriteShort(ch.Y); p.WriteHexString("76"); p.WriteHexString("16 B2 00 00"); p.WriteByte(ch.Class); p.WriteString(ch.Name); p.WriteInt(ch.Fame); p.WriteHexString("00"); // bool selling p.WriteString(""); // shopname p.WriteString(""); // shopdesc p.WriteHexString("00"); // purple name p.WriteHexString("00"); // fe p.WriteHexString("00"); // fe ring p.WriteHexString("00"); // maybe has guild thingy //if Character has guild //p.WriteHexString("00 00 00 00"); // guild id //p.WriteString(""); // guild name //p.WriteHexString("00 00 00 00"); // maybe guild position //p.WriteHexString("00 00 00 00"); // maybe guild position //p.WriteHexString("00 00 00 00 00 00 00 00"); //p.WriteHexString("00"); // something p.WriteHexString("00 00 00 00 00 00 00 00 00"); // else write this foreach (Equipment e in ch.GetVisuals()) { p.WriteShort(e.VisualID); p.WriteByte(e.Plus); p.WriteByte(e.Slvl); p.WriteByte(e.RequiredClass); } p.WriteByte(ch.Rebirth); // rebirth p.WriteHexString("00 00 00 00 00"); return p.GetWrittenBuffer(PacketIds.SendSpawnPlayers); }
public static byte[] SendSpawnNpc(List<Npc> npcs, int mapid) { Packet p = new Packet(200); p.WriteHexString("00"); // unknown p.WriteInt(mapid); p.WriteShort(npcs.Count); foreach (Npc n in npcs) { p.WriteInt(n.NpcID); p.WriteByte(n.NpcType); p.WriteByte(n.NpcType); p.WriteHexString("01"); // unknown p.WriteShort(n.X); p.WriteShort(n.Y); p.WriteHexString("00"); // unknown p.WriteShort(n.Direction); p.WriteHexString("00 00 00 00 00 00 00 00 00"); // unknown } return p.GetWrittenBuffer(PacketIds.SendNpcSpawn); }
public static byte[] SendSpawn12(Client[] Characters) { Packet p = new Packet(200); p.WriteByte(0); p.WriteByte(Characters.Length); for (int i = 0; i < Characters.Length; i++) { p.WriteInt(Characters[i].MyCharacter.CharacterId); p.WriteHexString("01 00"); // entity type, like 1 for players blabla } return p.GetWrittenBuffer(PacketIds.SendPlayerIdsSomething); }
public static byte[] SendSpawn11() { Packet p = new Packet(200); p.WriteHexString("2E 40 B6 00 00 0B 00 00 00 05 00 E4 4E F8 07 75 D2 06 2D 00 A8 03 00 ED 00 E4 4E 00 00 14 BE 06 8B 03 00 45 0C 00 00 45 0C 00 00 0B 80 FF E4 4E F5 07 75 B8 06 2D 00 8B 03 00 65 00 E4 4E 00 00 14 B5 06 97 03 00 45 0C 00 00 45 0C 00 00 0B 80 FF E4 4E F6 07 75 E2 06 2D 00 A0 03 00 50 00 E4 4E 00 00 18 E2 06 A0 03 00 45 0C 00 00 45 0C 00 00 0B 80 FF E4 4E F9 07 75 96 06 2D 00 8E 03 00 63 00 E4 4E 00 00 02 96 06 8E 03 00 45 0C 00 00 45 0C 00 00 0B 80 FF E4 4E F7 07 75 C8 06 2D 00 89 03 00 09 01 E4 4E 00 00 14 C3 06 5B 03 00 45 0C 00 00 45 0C 00 00 0B 80 FF"); return p.GetWrittenBuffer(); }
public static byte[] SendSpawn10(Character Char) { Packet p = new Packet(200); p.WriteByte(0); p.WriteInt(Char.MapId); p.WriteInt(Char.CharacterId); p.WriteByte(Char.Class); p.WriteShort(Char.X); p.WriteShort(Char.Y); p.WriteHexString("00 00 00 00 13 00 00 00 00 00 00 00 00"); return p.GetWrittenBuffer(PacketIds.SendSpawn); }
public static byte[] SendSomething2() { Packet p = new Packet(200); p.WriteHexString("04 3C 0A 00 01 01 01 00 00 00 00 00 00 00"); return p.GetWrittenBuffer(); }
// something about repulation, current hp/mana, stats public static byte[] SendSpawnStats(Character ch) { Packet p = new Packet(200); p.WriteShort(ch.Level); p.WriteShort(ch.Strength); p.WriteShort(ch.Stamina); p.WriteShort(ch.Dexterity); p.WriteShort(ch.Energy); p.WriteHexString("01 01 01 01"); // unknown :(, maybe base stats?: D p.WriteShort(ch.MaxMana); p.WriteShort(ch.CurrentMana); p.WriteInt(ch.MaxHp); p.WriteInt(ch.CurrentHp); p.WriteLong(ch.CurrentExp); // cur exp p.WriteHexString("00 00 00 00 00 00 00 00"); // curxp to next training p.WriteLong(1200000); // exp to level p.WriteHexString("00 00 00 00 00 00 00 00"); // xp to next training p.WriteHexString("00 00"); p.WriteHexString("04 00 00 00"); p.WriteHexString("00 00"); p.WriteHexString("08 00 00 00"); p.WriteShort(ch.StatPoint); // stat points p.WriteHexString("6B 00 00 00"); // total trainings? p.WriteShort(ch.TrainingPoint); // current trainings p.WriteHexString("7C 00"); // damage from stats p.WriteHexString("C5 00 00 00"); // total damage (from items, skills etc) p.WriteHexString("11 00"); // defence from stats p.WriteHexString("12 00 00 00"); // total defence (from items, skills etc) p.WriteHexString("13 00"); // attack rating from stats p.WriteHexString("14 00 00 00"); // total attack rating (from items, skills etc) p.WriteHexString("07 00"); // attack range or speed p.WriteHexString("0B 0B"); // animation speed (the speed hax thingy in xiah 2827) p.WriteHexString("0B"); // movement speed, from shoes ^_ ^ p.WriteHexString("00 00 00 00 00"); p.WriteInt(ch.Money); p.WriteHexString("02 00"); // Critical p.WriteHexString("1A 00"); p.WriteInt(ch.Fame); p.WriteShort(ch.FiveElementPoint); // five element points (unused) p.WriteInt(ch.CurrentFEExp); // current fe experience p.WriteHexString("02 00 00 00"); // fe experience to point, 40000 each level p.WriteHexString("00 00 00 00"); // that other five element skill experience :S p.WriteHexString("00 00"); // fire fe level p.WriteHexString("00 00"); // water fe level p.WriteHexString("00 00"); // wood fe level p.WriteHexString("00 00"); // steel fe level p.WriteHexString("00 00"); // soil fe level p.WriteByte(ch.Rebirth); // rebirths p.WriteInt(ch.RepulationPoint); // Repulation points, the points near stat ones :U return p.GetWrittenBuffer(PacketIds.SendSpawnStats); }
public static byte[] SendAcceptImbueItem(ImbueState i) { Packet p = new Packet(5); p.WriteByte((byte)i); return p.GetWrittenBuffer(PacketIds.SendAcceptImbueItem); }
public static byte[] SendStartMoving(MovementInfo mo, byte movingspeed) { Packet p = new Packet(200); p.WriteByte(0); p.WriteInt(mo.CharacterID); p.WriteShort(mo.FromX); p.WriteShort(mo.FromY); p.WriteByte(mo.FromZ); p.WriteShort(mo.ToX); p.WriteShort(mo.ToY); p.WriteByte(mo.ToZ); p.WriteShort(mo.Rotation); p.WriteHexString("00"); p.WriteByte(11 + movingspeed); p.WriteHexString("00"); return p.GetWrittenBuffer(PacketIds.SendStartMoving); }
public static byte[] SendBagIsFull() { Packet p = new Packet(200); p.WriteHexString("02 33 01 00 01"); return p.GetWrittenBuffer(); }
public static byte[] SendStats(Character ch) { Packet p = new Packet(200); // p.WriteHexString("02 3A 52 00 01 00 02 00 03 00 04 00 05 00 06 00 00 00 00 00 07 00 00 00 08 00 00 00 09 00 00 00 00 0B 05 00 00 00 06 00 00 00 07 00 08 00 09 00 01 00 02 00 02 00 0C 07 00 02 03 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); p.WriteShort(ch.Level); p.WriteShort(ch.Strength); p.WriteShort(ch.Stamina); p.WriteShort(ch.Dexterity); p.WriteShort(ch.Energy); p.WriteShort(ch.StatPoint); // stat points //PLOX FUNCTION OF STATS HERE ch.CalculateTotalStats(); p.WriteHexString("00 00 00 00"); // unknown p.WriteInt(ch.TotalDamage); // total damage p.WriteInt(ch.TotalDefence); // total defence p.WriteInt(ch.TotalAttackRating); // total attack rating p.WriteHexString("00 0B"); // unknown p.WriteInt(ch.CurrentHp); p.WriteInt(ch.MaxHp); p.WriteShort(ch.CurrentMana); p.WriteShort(ch.MaxMana); p.WriteShort(ch.Critical); // critical hit p.WriteShort(ch.StatDamage); // damage from stats p.WriteShort(ch.StatDefence); // defence from stats p.WriteShort(ch.StatAttackRating); // attack rating from stats p.WriteHexString("0C 07 01"); // unknown p.WriteByte(ch.MovingSpeed); // movement speed p.WriteShort(ch.TrainingPoint); // trainings p.WriteHexString("00 00 00 00"); // unknown p.WriteInt(ch.Fame); p.WriteHexString("00"); // gives you green name, luls p.WriteByte(ch.Rebirth); // rebirths p.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00"); // unknown p.WriteInt(ch.RepulationPoint); // repulation points return p.GetWrittenBuffer(PacketIds.SendStats); }
public static byte[] SendBuyItemState(BuyItemState b) { Packet p = new Packet(20); p.WriteByte((byte)b); return p.GetWrittenBuffer(PacketIds.SendBuyItemState); }
public static byte[] SendStopMoving(MovementInfo mo) { Packet p = new Packet(200); p.WriteByte(0); p.WriteInt(mo.CharacterID); p.WriteShort(mo.FromX); p.WriteShort(mo.FromY); p.WriteByte(mo.FromZ); p.WriteByte(0); return p.GetWrittenBuffer(PacketIds.SendStopMoving); }
public static byte[] SendChannelChange(int something, int something2) { Packet p = new Packet(200); p.WriteByte(0); p.WriteByte(something); p.WriteByte(something2); return p.GetWrittenBuffer(PacketIds.SendChannelChange); }
/// <summary> /// Send Unit Server login state to client /// </summary> /// <param name="uls"></param> /// <param name="PlayerID"></param> /// <returns></returns> public static byte[] SendUnitLoginState(LoginState uls, int PlayerID) { Packet p = new Packet(100); if (uls == LoginState.Success) { p.WriteShort((short)uls); p.WriteInt(PlayerID); // if client were ingame before, else its just 00 00 00 00 } else { p.WriteShort((short)uls); p.WriteHexString("00 00 00 00"); // if its error just logintype and rest zeroes } return p.GetWrittenBuffer(PacketIds.SendUnitLoginState); }
/// <summary> /// Send character list to client /// </summary> /// <returns></returns> public static byte[] SendCharacterList(Character[] characters) { Packet p = new Packet(200); p.WriteByte(characters.Length); foreach (Character c in characters) { p.WriteInt(c.MapId); p.WriteInt(c.CharacterId); p.WriteString(c.Name); p.WriteByte(c.Class); p.WriteShort(c.Level); p.WriteInt(c.CurrentHp); p.WriteInt(c.MaxHp); p.WriteInt(c.MaxMana); p.WriteShort(c.Strength); p.WriteShort(c.Stamina); p.WriteShort(c.Dexterity); p.WriteShort(c.Energy); p.WriteHexString("00 00 00 00 02 00 00 00 00 00 00 00"); // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); foreach (Equipment e in c.GetVisuals()) { p.WriteShort(e.VisualID); p.WriteByte(e.Plus); p.WriteByte(e.Slvl); } p.WriteHexString("01 00"); // ending bytes } return p.GetWrittenBuffer(PacketIds.SendCharacterList); }
/// <summary> /// Send chosed world ip to client /// </summary> /// <param name="ip"></param> /// <returns></returns> public static byte[] SendWorldIP(string ip, int port) { Packet p = new Packet(100); p.WriteString(ip); // world ip, if theres multiple worlds request will send the world id in order to get right ones ip p.WriteInt(port); return p.GetWrittenBuffer(PacketIds.SendWorldIP); }
public static byte[] SendCommand(Character ch, CommandInfo ci) { Packet p = new Packet(200); p.WriteInt(ch.CharacterId); p.WriteByte(ci.Type); p.WriteByte(ci.Action); p.WriteByte(ci.Something); p.WriteByte(ci.Something2); return p.GetWrittenBuffer(PacketIds.SendCommand); }
/// <summary> /// Send list of worlds to client /// </summary> /// <returns></returns> public static byte[] SendWorldList(WorldInfo[] worldInfos) { Packet p = new Packet(100); p.WriteByte(worldInfos.Length); for (int i = 0; i < worldInfos.Length; i++) { p.WriteByte(worldInfos[i].WorldId); p.WriteString(worldInfos[i].WorldName); p.WriteString(worldInfos[i].WorldDesc); } return p.GetWrittenBuffer(PacketIds.SendWorldList); }
public static byte[] SendGuildList() { Packet p = new Packet(200); p.WriteHexString("35 3B 01 00 00"); return p.GetWrittenBuffer(); }
public static byte[] SpawnMonster() { Packet p = new Packet(200); p.WriteHexString("2C 40"); // id p.WriteHexString("28 00"); // length p.WriteHexString("00"); // something p.WriteHexString("39 05 00 00"); // monsterid p.WriteHexString("C0"); // monstertype, also visual p.WriteHexString("06 00 00 00"); // mapid p.WriteHexString("9C 01"); // posx, // spawnx p.WriteHexString("C8 00"); // level p.WriteHexString("67 02"); // posy, // spawny p.WriteHexString("00"); // unknown p.WriteHexString("00 00"); // direction p.WriteHexString("56 54 00 00"); // monsterwrefid, for name p.WriteHexString("14 1F 03 FF 03 00 96 00 00 00 96 00 00 00 07 80 FF"); return p.GetWrittenBuffer(); }
public static byte[] SendImbuedItem(BaseItem i) { Packet p = new Packet(500); p.WriteByte(i.Bag); p.WriteByte(i.Slot); p.WriteInt(i.ItemID); p.WriteShort(i.ReferenceID); p.WriteByte(i.bType); p.WriteByte(i.bKind); p.WriteShort(i.VisualID); p.WriteInt(i.Price); p.WriteHexString("00 00"); Equipment e = i as Equipment; p.WriteByte(e.RequiredClass); p.WriteShort(e.Amount); p.WriteShort(e.RequiredLevel); p.WriteShort(e.RequiredDexterity); p.WriteShort(e.RequiredStrength); p.WriteShort(e.RequiredStamina); p.WriteShort(e.RequiredEnergy); p.WriteByte(e.MaxImbueTries); p.WriteShort(e.Durability); p.WriteShort(e.MaxDurability); p.WriteShort(e.Damage); p.WriteShort(e.Defence); p.WriteShort(e.AttackRating); p.WriteShort(e.AttackSpeed); p.WriteShort(e.AttackRange); p.WriteShort(e.IncMaxLife); p.WriteShort(e.IncMaxMana); p.WriteShort(e.IncLifeRegen); p.WriteShort(e.IncManaRegen); p.WriteShort(e.Critical); p.WriteByte(e.Plus); p.WriteByte(e.Slvl); p.WriteHexString("00"); // unknown p.WriteByte(e.ImbueTries); p.WriteHexString("00"); // unknown p.WriteShort(e.DragonSuccessImbueTries); p.WriteByte(e.DiscountRepairFee); p.WriteShort(e.TotalDragonImbueTries); p.WriteShort(e.DragonDamage); p.WriteShort(e.DragonDefence); p.WriteShort(e.DragonAttackRating); p.WriteShort(e.DragonLife); p.WriteByte(e.MappedData); if (!(e is Ring) && !(e is Necklace) && !(e is Cape)) p.WriteByte(e.ForceSlot); p.WriteHexString("00 00"); // unknown if (e is Cape) { Cape c = e as Cape; p.WriteHexString("00 00"); // required guild position p.WriteHexString("00 00 00 00 00 00 00"); p.WriteHexString("01 00"); // decrease times of durability p.WriteByte(c.PolishImbueTries); // polish imbue tries p.WriteShort(c.MaxPolishImbueTries); // polish max tries p.WriteShort(c.VigiStat1); // stat1 p.WriteShort(c.VigiStat2); // stat2 p.WriteShort(c.VigiStat3); // stat3 p.WriteShort(c.VigiStat4); // stat4 p.WriteHexString("00 00"); // stat5 p.WriteShort(c.VigiStatAdd1); // stat1 increase p.WriteShort(c.VigiStatAdd2); // stat2 increase p.WriteShort(c.VigiStatAdd3); // stat3 increase p.WriteShort(c.VigiStatAdd4); // stat4 increase p.WriteHexString("00 00"); // stat5 increase p.WriteHexString("00 00"); // unknown } if (!(e is Ring) && !(e is Necklace) && !(e is Cape)) { p.WriteByte(e.RebirthHole); p.WriteByte(e.RebirthHoleItem); p.WriteShort(e.RebirthHoleStat); } return p.GetWrittenBuffer(PacketIds.SendImbuedItem); }
//Write methods private void WriteHeader(PacketIds so, Packet p) { WriteShort((short)so); WriteShort(p.Index); WriteArray(p.GetWrittenBuffer()); }