TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WorldPackets::Mail::MailAttachedItem Struct Reference

#include <MailPackets.h>

Public Member Functions

 MailAttachedItem (::Item const *item, uint8 pos)
 

Public Attributes

uint8 Position = 0
 
int32 AttachID = 0
 
Item::ItemInstance Item
 
int32 Count = 0
 
int32 Charges = 0
 
int32 MaxDurability = 0
 
int32 Durability = 0
 
bool Unlocked = false
 
MailAttachedItemEnchant Enchants [8]
 

Constructor & Destructor Documentation

WorldPackets::Mail::MailAttachedItem::MailAttachedItem ( ::Item const item,
uint8  pos 
)
24 {
25  Position = pos;
26  AttachID = item->GetGUID().GetCounter();
27  Item.Initialize(item);
28  Count = item->GetCount();
29  Charges = item->GetSpellCharges();
30  MaxDurability = item->GetUInt32Value(ITEM_FIELD_MAXDURABILITY);
31  Durability = item->GetUInt32Value(ITEM_FIELD_DURABILITY);
32  Unlocked = !item->IsLocked(); //TODO: Check
33 
34  for (uint8 j = 0; j < MAX_INSPECTED_ENCHANTMENT_SLOT; j++)
35  {
36  Enchants[j].Enchant = item->GetEnchantmentId((EnchantmentSlot)j);
37  Enchants[j].Duration = item->GetEnchantmentDuration((EnchantmentSlot)j);
38  Enchants[j].Charges = item->GetEnchantmentCharges((EnchantmentSlot)j);
39  }
40 }
bool Unlocked
Definition: MailPackets.h:50
EnchantmentSlot
Definition: Item.h:172
Definition: UpdateFields.h:53
int32 Count
Definition: MailPackets.h:46
int32 Charges
Definition: MailPackets.h:36
int32 AttachID
Definition: MailPackets.h:44
Definition: Item.h:259
int32 Enchant
Definition: MailPackets.h:34
int32 Duration
Definition: MailPackets.h:35
MailAttachedItemEnchant Enchants[8]
Definition: MailPackets.h:51
int32 Durability
Definition: MailPackets.h:49
int32 MaxDurability
Definition: MailPackets.h:48
uint8_t uint8
Definition: Define.h:152
Definition: Position.h:27
Definition: UpdateFields.h:54
int32 Charges
Definition: MailPackets.h:47
Definition: Item.h:183

+ Here is the call graph for this function:

Member Data Documentation

int32 WorldPackets::Mail::MailAttachedItem::AttachID = 0
int32 WorldPackets::Mail::MailAttachedItem::Charges = 0
int32 WorldPackets::Mail::MailAttachedItem::Count = 0
int32 WorldPackets::Mail::MailAttachedItem::Durability = 0
MailAttachedItemEnchant WorldPackets::Mail::MailAttachedItem::Enchants[8]
Item::ItemInstance WorldPackets::Mail::MailAttachedItem::Item
int32 WorldPackets::Mail::MailAttachedItem::MaxDurability = 0
uint8 WorldPackets::Mail::MailAttachedItem::Position = 0
bool WorldPackets::Mail::MailAttachedItem::Unlocked = false

The documentation for this struct was generated from the following files: