Exemplo n.º 1
0
 public static void SendRollWon(Character looter, Loot loot, LootItem item, LootRollEntry entry)
 {
     using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.SMSG_LOOT_ROLL_WON))
     {
         packet.Write((ulong)loot.Lootable.EntityId);
         packet.Write(item.Index);
         packet.Write((ulong)looter.EntityId);
         packet.Write(item.Template.Id);
         packet.Write(item.Template.RandomSuffixFactor);
         packet.Write(item.Template.RandomSuffixFactor > 0U
             ? (int)-item.Template.RandomSuffixId
             : (int)item.Template.RandomPropertiesId);
         packet.Write((ulong)looter.EntityId);
         packet.Write(entry.Number);
         packet.Write((int)entry.Type);
         foreach (LooterEntry looter1 in (IEnumerable <LooterEntry>)loot.Looters)
         {
             if (looter1.Owner != null)
             {
                 looter1.Owner.Client.Send(packet, false);
             }
         }
     }
 }
Exemplo n.º 2
0
        public static void SendRollWon(Character looter, Loot loot, LootItem item, LootRollEntry entry)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_LOOT_ROLL_WON))
            {
                packet.Write(loot.Lootable.EntityId);
                packet.Write(item.Index);
                packet.Write(looter.EntityId);
                packet.Write(item.Template.Id);
                packet.Write(item.Template.RandomSuffixFactor);
                packet.Write((int)(item.Template.RandomSuffixFactor > 0 ? -item.Template.RandomSuffixId : item.Template.RandomPropertiesId));
                packet.Write(looter.EntityId);

                packet.Write(entry.Number);
                packet.Write((int)entry.Type);

                foreach (var looterEntry in loot.Looters)
                {
                    if (looterEntry.Owner != null)
                    {
                        looterEntry.Owner.Client.Send(packet);
                    }
                }
            }
        }