Core: Add enum for currency flags, update MAX_VENDOR_ITEMS and fix build

This commit is contained in:
Nay
2012-08-14 02:56:45 +01:00
parent df073d3d69
commit a768bba3c6
4 changed files with 12 additions and 4 deletions

View File

@@ -1120,7 +1120,7 @@ struct GtRegenMPPerSptEntry
struct GtSpellScalingEntry
{
float value;
}
};
struct GtOCTBaseHPByClassEntry
{

View File

@@ -406,7 +406,7 @@ typedef std::map<uint32, time_t> CreatureSpellCooldowns;
// max different by z coordinate for creature aggro reaction
#define CREATURE_Z_ATTACK_RANGE 3
#define MAX_VENDOR_ITEMS 150 // Limitation in 3.x.x item count in SMSG_LIST_INVENTORY
#define MAX_VENDOR_ITEMS 300 // Limitation in 4.x.x item count in SMSG_LIST_INVENTORY
enum CreatureCellMoveState
{

View File

@@ -210,6 +210,14 @@ enum ItemFlagsCustom
ITEM_FLAGS_CU_FOLLOW_LOOT_RULES = 0x0004, // Item will always follow group/master/need before greed looting rules
};
enum CurrencyFlags
{
CURRENCY_FLAG_TRADEABLE = 0x01,
// ...
CURRENCY_FLAG_HIGH_PRECISION = 0x08,
// ...
};
enum BAG_FAMILY_MASK
{
BAG_FAMILY_MASK_NONE = 0x00000000,

View File

@@ -7253,7 +7253,7 @@ void Player::SendCurrencies() const
if (!entry) // should never happen
continue;
uint32 precision = (entry->Flags & 0x8) ? 100 : 1;
uint32 precision = (entry->Flags & CURRENCY_FLAG_HIGH_PRECISION) ? 100 : 1;
uint32 weekCount = itr->second.weekCount / precision;
uint32 weekCap = _GetCurrencyWeekCap(entry) / precision;
@@ -7299,7 +7299,7 @@ void Player::ModifyCurrency(uint32 id, int32 count)
CurrencyTypesEntry const* currency = sCurrencyTypesStore.LookupEntry(id);
ASSERT(currency);
int32 precision = currency->Flags & 0x8 ? 100 : 1;
int32 precision = currency->Flags & CURRENCY_FLAG_HIGH_PRECISION ? 100 : 1;
uint32 oldTotalCount = 0;
uint32 oldWeekCount = 0;
PlayerCurrenciesMap::iterator itr = m_currencies.find(id);