mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-13 03:22:40 -04:00
Core: Add enum for currency flags, update MAX_VENDOR_ITEMS and fix build
This commit is contained in:
@@ -1120,7 +1120,7 @@ struct GtRegenMPPerSptEntry
|
||||
struct GtSpellScalingEntry
|
||||
{
|
||||
float value;
|
||||
}
|
||||
};
|
||||
|
||||
struct GtOCTBaseHPByClassEntry
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user