mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-14 20:12:26 +00:00
Updated EQDictionary entries to allow ease of reading and gui tooltip propagation
This commit is contained in:
parent
9c9d46e3ea
commit
011d7a6a29
1008
common/eq_limits.cpp
1008
common/eq_limits.cpp
File diff suppressed because it is too large
Load Diff
@ -34,8 +34,7 @@
|
|||||||
namespace EQEmu
|
namespace EQEmu
|
||||||
{
|
{
|
||||||
namespace constants {
|
namespace constants {
|
||||||
class LookupEntry {
|
struct LookupEntry {
|
||||||
public:
|
|
||||||
int16 CharacterCreationLimit;
|
int16 CharacterCreationLimit;
|
||||||
int LongBuffs;
|
int LongBuffs;
|
||||||
int ShortBuffs;
|
int ShortBuffs;
|
||||||
@ -51,14 +50,50 @@ namespace EQEmu
|
|||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace inventory {
|
namespace inventory {
|
||||||
class LookupEntry {
|
struct LookupEntry {
|
||||||
public:
|
|
||||||
// note: 'PossessionsBitmask' needs to be attuned to the client version with the highest number
|
// note: 'PossessionsBitmask' needs to be attuned to the client version with the highest number
|
||||||
// of possessions slots and 'InventoryTypeSize[typePossessions]' should reflect the same count
|
// of possessions slots and 'InventoryTypeSize[typePossessions]' should reflect the same count
|
||||||
// with translators adjusting for valid slot indices. Server-side validations will be performed
|
// with translators adjusting for valid slot indices. Server-side validations will be performed
|
||||||
// against 'PossessionsBitmask' (note: the same applies to Corpse type size and bitmask)
|
// against 'PossessionsBitmask' (note: the same applies to Corpse type size and bitmask)
|
||||||
|
|
||||||
int16 InventoryTypeSize[25]; // should reflect EQEmu::invtype::TYPE_COUNT referenced in emu_constants.h
|
struct InventoryTypeSize_Struct { // should reflect count and naming conventions referenced in emu_constants.h
|
||||||
|
int16 Possessions, Bank, SharedBank;
|
||||||
|
int16 Trade, World, Limbo;
|
||||||
|
int16 Tribute, TrophyTribute, GuildTribute;
|
||||||
|
int16 Merchant, Deleted, Corpse;
|
||||||
|
int16 Bazaar, Inspect, RealEstate;
|
||||||
|
int16 ViewMODPC, ViewMODBank, ViewMODSharedBank;
|
||||||
|
int16 ViewMODLimbo, AltStorage, Archived;
|
||||||
|
int16 Mail, GuildTrophyTribute, Krono;
|
||||||
|
int16 Other;
|
||||||
|
|
||||||
|
InventoryTypeSize_Struct(
|
||||||
|
int16 Possessions, int16 Bank, int16 SharedBank,
|
||||||
|
int16 Trade, int16 World, int16 Limbo,
|
||||||
|
int16 Tribute, int16 TrophyTribute, int16 GuildTribute,
|
||||||
|
int16 Merchant, int16 Deleted, int16 Corpse,
|
||||||
|
int16 Bazaar, int16 Inspect, int16 RealEstate,
|
||||||
|
int16 ViewMODPC, int16 ViewMODBank, int16 ViewMODSharedBank,
|
||||||
|
int16 ViewMODLimbo, int16 AltStorage, int16 Archived,
|
||||||
|
int16 Mail, int16 GuildTrophyTribute, int16 Krono,
|
||||||
|
int16 Other
|
||||||
|
) :
|
||||||
|
Possessions(Possessions), Bank(Bank), SharedBank(SharedBank),
|
||||||
|
Trade(Trade), World(World), Limbo(Limbo),
|
||||||
|
Tribute(Tribute), TrophyTribute(TrophyTribute), GuildTribute(GuildTribute),
|
||||||
|
Merchant(Merchant), Deleted(Deleted), Corpse(Corpse),
|
||||||
|
Bazaar(Bazaar), Inspect(Inspect), RealEstate(RealEstate),
|
||||||
|
ViewMODPC(ViewMODPC), ViewMODBank(ViewMODBank), ViewMODSharedBank(ViewMODSharedBank),
|
||||||
|
ViewMODLimbo(ViewMODLimbo), AltStorage(AltStorage), Archived(Archived),
|
||||||
|
Mail(Mail), GuildTrophyTribute(GuildTrophyTribute), Krono(Krono),
|
||||||
|
Other(Other)
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
|
union {
|
||||||
|
InventoryTypeSize_Struct InventoryTypeSize;
|
||||||
|
int16 InventoryTypeSizeArray[25]; // should reflect EQEmu::invtype::TYPE_COUNT referenced in emu_constants.h
|
||||||
|
};
|
||||||
|
|
||||||
uint64 PossessionsBitmask;
|
uint64 PossessionsBitmask;
|
||||||
uint64 CorpseBitmask;
|
uint64 CorpseBitmask;
|
||||||
@ -69,6 +104,28 @@ namespace EQEmu
|
|||||||
bool AllowClickCastFromBag;
|
bool AllowClickCastFromBag;
|
||||||
bool ConcatenateInvTypeLimbo;
|
bool ConcatenateInvTypeLimbo;
|
||||||
bool AllowOverLevelEquipment;
|
bool AllowOverLevelEquipment;
|
||||||
|
|
||||||
|
LookupEntry(
|
||||||
|
InventoryTypeSize_Struct InventoryTypeSize,
|
||||||
|
uint64 PossessionsBitmask,
|
||||||
|
uint64 CorpseBitmask,
|
||||||
|
int16 BagSlotCount,
|
||||||
|
int16 AugSocketCount,
|
||||||
|
bool AllowEmptyBagInBag,
|
||||||
|
bool AllowClickCastFromBag,
|
||||||
|
bool ConcatenateInvTypeLimbo,
|
||||||
|
bool AllowOverLevelEquipment
|
||||||
|
) :
|
||||||
|
InventoryTypeSize(InventoryTypeSize),
|
||||||
|
PossessionsBitmask(PossessionsBitmask),
|
||||||
|
CorpseBitmask(CorpseBitmask),
|
||||||
|
BagSlotCount(BagSlotCount),
|
||||||
|
AugSocketCount(AugSocketCount),
|
||||||
|
AllowEmptyBagInBag(AllowEmptyBagInBag),
|
||||||
|
AllowClickCastFromBag(AllowClickCastFromBag),
|
||||||
|
ConcatenateInvTypeLimbo(ConcatenateInvTypeLimbo),
|
||||||
|
AllowOverLevelEquipment(AllowOverLevelEquipment)
|
||||||
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
const LookupEntry* Lookup(versions::MobVersion mob_version);
|
const LookupEntry* Lookup(versions::MobVersion mob_version);
|
||||||
@ -76,8 +133,7 @@ namespace EQEmu
|
|||||||
} /*inventory*/
|
} /*inventory*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
class LookupEntry {
|
struct LookupEntry {
|
||||||
public:
|
|
||||||
bool CoinHasWeight;
|
bool CoinHasWeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -241,12 +241,12 @@ int16 EQEmu::InventoryProfile::PutItem(int16 slot_id, const ItemInstance& inst)
|
|||||||
return EQEmu::invslot::SLOT_INVALID;
|
return EQEmu::invslot::SLOT_INVALID;
|
||||||
}
|
}
|
||||||
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize.Bank)
|
||||||
return EQEmu::invslot::SLOT_INVALID;
|
return EQEmu::invslot::SLOT_INVALID;
|
||||||
}
|
}
|
||||||
else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||||
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||||
if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (temp_slot >= m_lookup->InventoryTypeSize.Bank)
|
||||||
return EQEmu::invslot::SLOT_INVALID;
|
return EQEmu::invslot::SLOT_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,14 +298,14 @@ bool EQEmu::InventoryProfile::SwapItem(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (source_slot <= EQEmu::invslot::BANK_END && source_slot >= EQEmu::invslot::BANK_BEGIN) {
|
else if (source_slot <= EQEmu::invslot::BANK_END && source_slot >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if ((source_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
if ((source_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize.Bank) {
|
||||||
fail_state = swapNotAllowed;
|
fail_state = swapNotAllowed;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (source_slot <= EQEmu::invbag::BANK_BAGS_END && source_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
else if (source_slot <= EQEmu::invbag::BANK_BAGS_END && source_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||||
auto temp_slot = (source_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
auto temp_slot = (source_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||||
if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
if (temp_slot >= m_lookup->InventoryTypeSize.Bank) {
|
||||||
fail_state = swapNotAllowed;
|
fail_state = swapNotAllowed;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -325,14 +325,14 @@ bool EQEmu::InventoryProfile::SwapItem(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (destination_slot <= EQEmu::invslot::BANK_END && destination_slot >= EQEmu::invslot::BANK_BEGIN) {
|
else if (destination_slot <= EQEmu::invslot::BANK_END && destination_slot >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if ((destination_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
if ((destination_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize.Bank) {
|
||||||
fail_state = swapNotAllowed;
|
fail_state = swapNotAllowed;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (destination_slot <= EQEmu::invbag::BANK_BAGS_END && destination_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
else if (destination_slot <= EQEmu::invbag::BANK_BAGS_END && destination_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||||
auto temp_slot = (destination_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
auto temp_slot = (destination_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||||
if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
if (temp_slot >= m_lookup->InventoryTypeSize.Bank) {
|
||||||
fail_state = swapNotAllowed;
|
fail_state = swapNotAllowed;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1308,7 +1308,7 @@ EQEmu::ItemInstance* EQEmu::InventoryProfile::_GetItem(const std::map<int16, Ite
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if (slot_id - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (slot_id - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1360,7 +1360,7 @@ int16 EQEmu::InventoryProfile::_PutItem(int16 slot_id, ItemInstance* inst)
|
|||||||
result = slot_id;
|
result = slot_id;
|
||||||
}
|
}
|
||||||
else if (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) {
|
else if (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) {
|
||||||
if (slot_id - EQEmu::invslot::BANK_BEGIN < m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
if (slot_id - EQEmu::invslot::BANK_BEGIN < m_lookup->InventoryTypeSize.Bank) {
|
||||||
m_bank[slot_id] = inst;
|
m_bank[slot_id] = inst;
|
||||||
result = slot_id;
|
result = slot_id;
|
||||||
}
|
}
|
||||||
@ -1403,7 +1403,7 @@ int16 EQEmu::InventoryProfile::_HasItem(std::map<int16, ItemInstance*>& bucket,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) {
|
else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1505,7 +1505,7 @@ int16 EQEmu::InventoryProfile::_HasItemByUse(std::map<int16, ItemInstance*>& buc
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) {
|
else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1578,7 +1578,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(std::map<int16, ItemInstance*
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) {
|
else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -571,7 +571,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv)
|
|||||||
|
|
||||||
auto cv_conflict = false;
|
auto cv_conflict = false;
|
||||||
auto pmask = inv->GetLookup()->PossessionsBitmask;
|
auto pmask = inv->GetLookup()->PossessionsBitmask;
|
||||||
auto bank_size = inv->GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank];
|
auto bank_size = inv->GetLookup()->InventoryTypeSize.Bank;
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
int16 slot_id = atoi(row[0]);
|
int16 slot_id = atoi(row[0]);
|
||||||
|
|||||||
@ -1374,7 +1374,7 @@ void Corpse::QueryLoot(Client* to) {
|
|||||||
cur = itemlist.begin();
|
cur = itemlist.begin();
|
||||||
end = itemlist.end();
|
end = itemlist.end();
|
||||||
|
|
||||||
int corpselootlimit = EQEmu::inventory::Lookup(EQEmu::versions::ConvertClientVersionToMobVersion(to->ClientVersion()))->InventoryTypeSize[EQEmu::invtype::typeCorpse];
|
int corpselootlimit = EQEmu::inventory::Lookup(EQEmu::versions::ConvertClientVersionToMobVersion(to->ClientVersion()))->InventoryTypeSize.Corpse;
|
||||||
|
|
||||||
for(; cur != end; ++cur) {
|
for(; cur != end; ++cur) {
|
||||||
ServerLootItem_Struct* sitem = *cur;
|
ServerLootItem_Struct* sitem = *cur;
|
||||||
|
|||||||
@ -113,7 +113,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) {
|
|||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteItemInInventory(i, 0, ((i - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]));
|
DeleteItemInInventory(i, 0, ((i - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) {
|
|||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteItemInInventory(i, 0, (((i - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]));
|
DeleteItemInInventory(i, 0, (((i - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT) >= GetInv().GetLookup()->InventoryTypeSize.Bank));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -781,12 +781,12 @@ int32 Client::GetItemIDAt(int16 slot_id) {
|
|||||||
return INVALID_ID;
|
return INVALID_ID;
|
||||||
}
|
}
|
||||||
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
return INVALID_ID;
|
return INVALID_ID;
|
||||||
}
|
}
|
||||||
else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||||
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||||
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
return INVALID_ID;
|
return INVALID_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -811,12 +811,12 @@ int32 Client::GetAugmentIDAt(int16 slot_id, uint8 augslot) {
|
|||||||
return INVALID_ID;
|
return INVALID_ID;
|
||||||
}
|
}
|
||||||
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
return INVALID_ID;
|
return INVALID_ID;
|
||||||
}
|
}
|
||||||
else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||||
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||||
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
return INVALID_ID;
|
return INVALID_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1474,11 +1474,11 @@ bool Client::IsValidSlot(uint32 slot) {
|
|||||||
return ((((uint64)1 << temp_slot) & GetInv().GetLookup()->PossessionsBitmask) != 0);
|
return ((((uint64)1 << temp_slot) & GetInv().GetLookup()->PossessionsBitmask) != 0);
|
||||||
}
|
}
|
||||||
else if (slot <= EQEmu::invslot::BANK_END && slot >= EQEmu::invslot::BANK_BEGIN) {
|
else if (slot <= EQEmu::invslot::BANK_END && slot >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
return ((slot - EQEmu::invslot::BANK_BEGIN) < GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]);
|
return ((slot - EQEmu::invslot::BANK_BEGIN) < GetInv().GetLookup()->InventoryTypeSize.Bank);
|
||||||
}
|
}
|
||||||
else if (slot <= EQEmu::invbag::BANK_BAGS_END && slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
else if (slot <= EQEmu::invbag::BANK_BAGS_END && slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||||
auto temp_slot = (slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
auto temp_slot = (slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||||
return (temp_slot < GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]);
|
return (temp_slot < GetInv().GetLookup()->InventoryTypeSize.Bank);
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
(slot == (uint32)INVALID_INDEX) ||
|
(slot == (uint32)INVALID_INDEX) ||
|
||||||
@ -2500,7 +2500,7 @@ void Client::DisenchantSummonedBags(bool client_update)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) {
|
for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) {
|
||||||
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto inst = m_inv[slot_id];
|
auto inst = m_inv[slot_id];
|
||||||
@ -2627,7 +2627,7 @@ void Client::RemoveNoRent(bool client_update)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) {
|
for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) {
|
||||||
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto inst = m_inv[slot_id];
|
auto inst = m_inv[slot_id];
|
||||||
@ -2639,7 +2639,7 @@ void Client::RemoveNoRent(bool client_update)
|
|||||||
|
|
||||||
for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) {
|
for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) {
|
||||||
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||||
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto inst = m_inv[slot_id];
|
auto inst = m_inv[slot_id];
|
||||||
@ -2745,7 +2745,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) {
|
for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) {
|
||||||
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto inst = m_inv.PopItem(slot_id);
|
auto inst = m_inv.PopItem(slot_id);
|
||||||
@ -2762,7 +2762,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
|||||||
|
|
||||||
for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) {
|
for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) {
|
||||||
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||||
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto inst = m_inv.PopItem(slot_id);
|
auto inst = m_inv.PopItem(slot_id);
|
||||||
@ -2925,12 +2925,12 @@ void Client::SendItemPacket(int16 slot_id, const EQEmu::ItemInstance* inst, Item
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
||||||
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||||
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||||
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])
|
if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user