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

#include <Mail.h>

Public Member Functions

void AddItem (ObjectGuid::LowType itemGuidLow, uint32 item_template)
 
bool RemoveItem (ObjectGuid::LowType item_guid)
 
bool HasItems () const
 

Public Attributes

uint32 messageID
 
uint8 messageType
 
uint8 stationery
 
uint16 mailTemplateId
 
ObjectGuid::LowType sender
 
ObjectGuid::LowType receiver
 
std::string subject
 
std::string body
 
std::vector< MailItemInfoitems
 
std::vector< ObjectGuid::LowTyperemovedItems
 
time_t expire_time
 
time_t deliver_time
 
uint64 money
 
uint64 COD
 
uint32 checked
 
MailState state
 

Member Function Documentation

void Mail::AddItem ( ObjectGuid::LowType  itemGuidLow,
uint32  item_template 
)
inline
186  {
187  MailItemInfo mii;
188  mii.item_guid = itemGuidLow;
189  mii.item_template = item_template;
190  items.push_back(mii);
191  }
std::vector< MailItemInfo > items
Definition: Mail.h:176
uint32 item_template
Definition: Mail.h:162
Definition: Mail.h:159
ObjectGuid::LowType item_guid
Definition: Mail.h:161

+ Here is the caller graph for this function:

bool Mail::HasItems ( ) const
inline
206 { return !items.empty(); }
std::vector< MailItemInfo > items
Definition: Mail.h:176

+ Here is the caller graph for this function:

bool Mail::RemoveItem ( ObjectGuid::LowType  item_guid)
inline
194  {
195  for (MailItemInfoVec::iterator itr = items.begin(); itr != items.end(); ++itr)
196  {
197  if (itr->item_guid == item_guid)
198  {
199  items.erase(itr);
200  return true;
201  }
202  }
203  return false;
204  }
std::vector< MailItemInfo > items
Definition: Mail.h:176

+ Here is the caller graph for this function:

Member Data Documentation

std::string Mail::body
uint32 Mail::checked
uint64 Mail::COD
time_t Mail::deliver_time
time_t Mail::expire_time
std::vector<MailItemInfo> Mail::items
uint16 Mail::mailTemplateId
uint32 Mail::messageID
uint8 Mail::messageType
uint64 Mail::money
ObjectGuid::LowType Mail::receiver
std::vector<ObjectGuid::LowType> Mail::removedItems
ObjectGuid::LowType Mail::sender
MailState Mail::state
uint8 Mail::stationery
std::string Mail::subject

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