mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 20:56:37 +00:00
Upstream merge
This commit is contained in:
+29
-2
@@ -14,6 +14,7 @@ SET(common_sources
|
||||
emu_opcodes.cpp
|
||||
EmuTCPConnection.cpp
|
||||
EmuTCPServer.cpp
|
||||
eq_dictionary.cpp
|
||||
EQDB.cpp
|
||||
EQDBRes.cpp
|
||||
eqemu_exception.cpp
|
||||
@@ -71,6 +72,7 @@ SET(common_sources
|
||||
patches/SoD.cpp
|
||||
patches/SoF.cpp
|
||||
patches/RoF.cpp
|
||||
#patches/RoF2.cpp
|
||||
patches/Titanium.cpp
|
||||
patches/Underfoot.cpp
|
||||
SocketLib/Base64.cpp
|
||||
@@ -111,6 +113,7 @@ SET(common_headers
|
||||
EmuTCPConnection.h
|
||||
EmuTCPServer.h
|
||||
eq_constants.h
|
||||
eq_dictionary.h
|
||||
eq_packet_structs.h
|
||||
EQDB.h
|
||||
EQDBRes.h
|
||||
@@ -189,15 +192,18 @@ SET(common_headers
|
||||
ZoneNumbers.h
|
||||
platform.h
|
||||
patches/Client62.h
|
||||
patches/Client62_constants.h
|
||||
patches/Client62_itemfields.h
|
||||
patches/Client62_ops.h
|
||||
patches/Client62_structs.h
|
||||
patches/patches.h
|
||||
patches/SoD.h
|
||||
patches/SoD_constants.h
|
||||
patches/SoD_itemfields.h
|
||||
patches/SoD_ops.h
|
||||
patches/SoD_structs.h
|
||||
patches/SoF.h
|
||||
patches/SoF_constants.h
|
||||
patches/SoF_itemfields.h
|
||||
patches/SoF_opcode_list.h
|
||||
patches/SoF_ops.h
|
||||
@@ -206,14 +212,22 @@ SET(common_headers
|
||||
patches/SSDefine.h
|
||||
patches/SSRegister.h
|
||||
patches/RoF.h
|
||||
patches/RoF_constants.h
|
||||
patches/RoF_itemfields.h
|
||||
patches/RoF_ops.h
|
||||
patches/RoF_structs.h
|
||||
#patches/RoF2.h
|
||||
#patches/RoF2_constants.h
|
||||
#patches/RoF2_itemfields.h
|
||||
#patches/RoF2_ops.h
|
||||
#patches/RoF2_structs.h
|
||||
patches/Titanium.h
|
||||
patches/Titanium_constants.h
|
||||
patches/Titanium_itemfields.h
|
||||
patches/Titanium_ops.h
|
||||
patches/Titanium_structs.h
|
||||
patches/Underfoot.h
|
||||
patches/Underfoot_constants.h
|
||||
patches/Underfoot_itemfields.h
|
||||
patches/Underfoot_ops.h
|
||||
patches/Underfoot_structs.h
|
||||
@@ -238,16 +252,19 @@ SOURCE_GROUP(Patches FILES
|
||||
patches/Client62.h
|
||||
patches/Client62_itemfields.h
|
||||
patches/Client62_ops.h
|
||||
patches/Client62_constants.h
|
||||
patches/Client62_structs.h
|
||||
patches/patches.h
|
||||
patches/SoD.h
|
||||
patches/SoD_itemfields.h
|
||||
patches/SoD_ops.h
|
||||
patches/SoD_constants.h
|
||||
patches/SoD_structs.h
|
||||
patches/SoF.h
|
||||
patches/SoF_itemfields.h
|
||||
patches/SoF_opcode_list.h
|
||||
patches/SoF_ops.h
|
||||
patches/SoF_constants.h
|
||||
patches/SoF_structs.h
|
||||
patches/SSDeclare.h
|
||||
patches/SSDefine.h
|
||||
@@ -255,20 +272,29 @@ SOURCE_GROUP(Patches FILES
|
||||
patches/RoF.h
|
||||
patches/RoF_itemfields.h
|
||||
patches/RoF_ops.h
|
||||
patches/RoF_constants.h
|
||||
patches/RoF_structs.h
|
||||
#patches/RoF2.h
|
||||
#patches/RoF2_itemfields.h
|
||||
#patches/RoF2_ops.h
|
||||
#patches/RoF2_constants.h
|
||||
#patches/RoF2_structs.h
|
||||
patches/Titanium.h
|
||||
patches/Titanium_itemfields.h
|
||||
patches/Titanium_ops.h
|
||||
patches/Titanium_constants.h
|
||||
patches/Titanium_structs.h
|
||||
patches/Underfoot.h
|
||||
patches/Underfoot_itemfields.h
|
||||
patches/Underfoot_ops.h
|
||||
patches/Underfoot_constants.h
|
||||
patches/Underfoot_structs.h
|
||||
patches/Client62.cpp
|
||||
patches/patches.cpp
|
||||
patches/SoD.cpp
|
||||
patches/SoF.cpp
|
||||
patches/RoF.cpp
|
||||
#patches/RoF2.cpp
|
||||
patches/Titanium.cpp
|
||||
patches/Underfoot.cpp
|
||||
)
|
||||
@@ -315,11 +341,12 @@ SOURCE_GROUP(TinyXML FILES
|
||||
|
||||
INCLUDE_DIRECTORIES(Patches SocketLib StackWalker TinyXML)
|
||||
|
||||
ADD_LIBRARY(Common ${common_sources} ${common_headers})
|
||||
ADD_LIBRARY(common ${common_sources} ${common_headers})
|
||||
|
||||
IF(UNIX)
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
#TODO: Add "patches/RoF2.cpp" when it becomes active
|
||||
SET_SOURCE_FILES_PROPERTIES("patches/SoD.cpp" "patches/SoF.cpp" "patches/RoF.cpp" "patches/Underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
|
||||
ENDIF(UNIX)
|
||||
|
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
|
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
|
||||
@@ -366,22 +366,6 @@ bool EmuTCPConnection::LineOutQueuePush(char* line) {
|
||||
safe_delete_array(line);
|
||||
return(true);
|
||||
}
|
||||
if (strcmp(line, "**PACKETMODESS**") == 0) {
|
||||
MSendQueue.lock();
|
||||
safe_delete_array(sendbuf);
|
||||
if (TCPMode == modeConsole)
|
||||
Send((const uchar*) "\0**PACKETMODESS**\r", 18);
|
||||
TCPMode = modePacket;
|
||||
PacketMode = packetModeSocket_Server;
|
||||
EmuTCPNetPacket_Struct* tnps = 0;
|
||||
while ((tnps = InModeQueue.pop())) {
|
||||
SendPacket(tnps);
|
||||
safe_delete_array(tnps);
|
||||
}
|
||||
MSendQueue.unlock();
|
||||
safe_delete_array(line);
|
||||
return(true);
|
||||
}
|
||||
}
|
||||
|
||||
return(TCPConnection::LineOutQueuePush(line));
|
||||
@@ -435,13 +419,6 @@ bool EmuTCPConnection::ConnectIP(uint32 irIP, uint16 irPort, char* errbuf) {
|
||||
sendbuf = new uchar[sendbuf_size];
|
||||
memcpy(sendbuf, "\0**PACKETMODEQS**\r", sendbuf_size);
|
||||
}
|
||||
else if (PacketMode == packetModeSocket_Server) {
|
||||
safe_delete_array(sendbuf);
|
||||
sendbuf_size = 18;
|
||||
sendbuf_used = sendbuf_size;
|
||||
sendbuf = new uchar[sendbuf_size];
|
||||
memcpy(sendbuf, "\0**PACKETMODESS**\r", sendbuf_size);
|
||||
}
|
||||
else {
|
||||
//default: packetModeZone
|
||||
safe_delete_array(sendbuf);
|
||||
|
||||
@@ -30,7 +30,7 @@ class EmuTCPServer;
|
||||
class EmuTCPConnection : public TCPConnection {
|
||||
public:
|
||||
enum eTCPMode { modeConsole, modeTransition, modePacket };
|
||||
enum ePacketMode { packetModeZone, packetModeLauncher, packetModeLogin, packetModeUCS, packetModeQueryServ, packetModeSocket_Server };
|
||||
enum ePacketMode { packetModeZone, packetModeLauncher, packetModeLogin, packetModeUCS, packetModeQueryServ };
|
||||
|
||||
EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, SOCKET iSock, uint32 irIP, uint16 irPort, bool iOldFormat = false);
|
||||
EmuTCPConnection(bool iOldFormat = false, EmuTCPServer* iRelayServer = 0, eTCPMode iMode = modePacket); // for outgoing connections
|
||||
|
||||
+149
-130
@@ -166,63 +166,63 @@ ItemInst* Inventory::GetItem(int16 slot_id) const
|
||||
ItemInst* result = nullptr;
|
||||
|
||||
// Cursor
|
||||
if (slot_id == SLOT_CURSOR) {
|
||||
if (slot_id == EmuConstants::CURSOR) {
|
||||
// Cursor slot
|
||||
result = m_cursor.peek_front();
|
||||
}
|
||||
|
||||
// Non bag slots
|
||||
else if (slot_id >= 3000 && slot_id <= 3007) {
|
||||
// Trade slots
|
||||
else if (slot_id >= EmuConstants::TRADE_BEGIN && slot_id <= EmuConstants::TRADE_END) {
|
||||
result = _GetItem(m_trade, slot_id);
|
||||
}
|
||||
else if (slot_id >= 2500 && slot_id <= 2501) {
|
||||
else if (slot_id >= EmuConstants::SHARED_BANK_BEGIN && slot_id <= EmuConstants::SHARED_BANK_END) {
|
||||
// Shared Bank slots
|
||||
result = _GetItem(m_shbank, slot_id);
|
||||
}
|
||||
else if (slot_id >= 2000 && slot_id <= 2023) {
|
||||
else if (slot_id >= EmuConstants::BANK_BEGIN && slot_id <= EmuConstants::BANK_END) {
|
||||
// Bank slots
|
||||
result = _GetItem(m_bank, slot_id);
|
||||
}
|
||||
else if ((slot_id >= 22 && slot_id <= 29)) {
|
||||
else if ((slot_id >= EmuConstants::GENERAL_BEGIN && slot_id <= EmuConstants::GENERAL_END)) {
|
||||
// Personal inventory slots
|
||||
result = _GetItem(m_inv, slot_id);
|
||||
}
|
||||
else if ((slot_id >= 0 && slot_id <= 21) || (slot_id >= 400 && slot_id <= 404) || (slot_id == 9999)) {
|
||||
else if ((slot_id >= EmuConstants::EQUIPMENT_BEGIN && slot_id <= EmuConstants::EQUIPMENT_END) ||
|
||||
(slot_id >= EmuConstants::TRIBUTE_BEGIN && slot_id <= EmuConstants::TRIBUTE_END) || (slot_id == EmuConstants::POWER_SOURCE)) {
|
||||
// Equippable slots (on body)
|
||||
result = _GetItem(m_worn, slot_id);
|
||||
}
|
||||
|
||||
// Inner bag slots
|
||||
else if (slot_id >= 3031 && slot_id <= 3110) {
|
||||
else if (slot_id >= EmuConstants::TRADE_BAGS_BEGIN && slot_id <= EmuConstants::TRADE_BAGS_END) {
|
||||
// Trade bag slots
|
||||
ItemInst* inst = _GetItem(m_trade, Inventory::CalcSlotId(slot_id));
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
result = inst->GetItem(Inventory::CalcBagIdx(slot_id));
|
||||
}
|
||||
}
|
||||
else if (slot_id >= 2531 && slot_id <= 2550) {
|
||||
else if (slot_id >= EmuConstants::SHARED_BANK_BAGS_BEGIN && slot_id <= EmuConstants::SHARED_BANK_BAGS_END) {
|
||||
// Shared Bank bag slots
|
||||
ItemInst* inst = _GetItem(m_shbank, Inventory::CalcSlotId(slot_id));
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
result = inst->GetItem(Inventory::CalcBagIdx(slot_id));
|
||||
}
|
||||
}
|
||||
else if (slot_id >= 2031 && slot_id <= 2270) {
|
||||
else if (slot_id >= EmuConstants::BANK_BAGS_BEGIN && slot_id <= EmuConstants::BANK_BAGS_END) {
|
||||
// Bank bag slots
|
||||
ItemInst* inst = _GetItem(m_bank, Inventory::CalcSlotId(slot_id));
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
result = inst->GetItem(Inventory::CalcBagIdx(slot_id));
|
||||
}
|
||||
}
|
||||
else if (slot_id >= 331 && slot_id <= 340) {
|
||||
else if (slot_id >= EmuConstants::CURSOR_BAG_BEGIN && slot_id <= EmuConstants::CURSOR_BAG_END) {
|
||||
// Cursor bag slots
|
||||
ItemInst* inst = m_cursor.peek_front();
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
result = inst->GetItem(Inventory::CalcBagIdx(slot_id));
|
||||
}
|
||||
}
|
||||
else if (slot_id >= 251 && slot_id <= 330) {
|
||||
else if (slot_id >= EmuConstants::GENERAL_BAGS_BEGIN && slot_id <= EmuConstants::GENERAL_BAGS_END) {
|
||||
// Personal inventory bag slots
|
||||
ItemInst* inst = _GetItem(m_inv, Inventory::CalcSlotId(slot_id));
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
@@ -258,7 +258,7 @@ int16 Inventory::PutItem(int16 slot_id, const ItemInst& inst)
|
||||
int16 Inventory::PushCursor(const ItemInst& inst)
|
||||
{
|
||||
m_cursor.push(inst.Clone());
|
||||
return SLOT_CURSOR;
|
||||
return MainCursor;
|
||||
}
|
||||
|
||||
// Swap items in inventory
|
||||
@@ -332,7 +332,7 @@ ItemInst* Inventory::PopItem(int16 slot_id)
|
||||
{
|
||||
ItemInst* p = nullptr;
|
||||
|
||||
if (slot_id == SLOT_CURSOR) { // Cursor
|
||||
if (slot_id == MainCursor) { // Cursor
|
||||
p = m_cursor.pop();
|
||||
}
|
||||
else if ((slot_id >= 0 && slot_id <= 21) || (slot_id >= 400 && slot_id <= 404) || (slot_id == 9999)) { // Worn slots
|
||||
@@ -469,7 +469,7 @@ bool Inventory::HasSpaceForItem(const Item_Struct *ItemToTry, int16 Quantity) {
|
||||
//when quantity is greater than 1 and not all of quantity can be found in 1 stack.
|
||||
int16 Inventory::HasItem(uint32 item_id, uint8 quantity, uint8 where)
|
||||
{
|
||||
int16 slot_id = SLOT_INVALID;
|
||||
int16 slot_id = INVALID_INDEX;
|
||||
|
||||
//Altered by Father Nitwit to support a specification of
|
||||
//where to search, with a default value to maintain compatibility
|
||||
@@ -477,38 +477,38 @@ int16 Inventory::HasItem(uint32 item_id, uint8 quantity, uint8 where)
|
||||
// Check each inventory bucket
|
||||
if (where & invWhereWorn) {
|
||||
slot_id = _HasItem(m_worn, item_id, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWherePersonal) {
|
||||
slot_id = _HasItem(m_inv, item_id, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereBank) {
|
||||
slot_id = _HasItem(m_bank, item_id, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereSharedBank) {
|
||||
slot_id = _HasItem(m_shbank, item_id, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereTrading) {
|
||||
slot_id = _HasItem(m_trade, item_id, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereCursor) {
|
||||
// Check cursor queue
|
||||
slot_id = _HasItem(m_cursor, item_id, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
@@ -518,43 +518,43 @@ int16 Inventory::HasItem(uint32 item_id, uint8 quantity, uint8 where)
|
||||
//this function has the same quantity flaw mentioned above in HasItem()
|
||||
int16 Inventory::HasItemByUse(uint8 use, uint8 quantity, uint8 where)
|
||||
{
|
||||
int16 slot_id = SLOT_INVALID;
|
||||
int16 slot_id = INVALID_INDEX;
|
||||
|
||||
// Check each inventory bucket
|
||||
if (where & invWhereWorn) {
|
||||
slot_id = _HasItemByUse(m_worn, use, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWherePersonal) {
|
||||
slot_id = _HasItemByUse(m_inv, use, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereBank) {
|
||||
slot_id = _HasItemByUse(m_bank, use, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereSharedBank) {
|
||||
slot_id = _HasItemByUse(m_shbank, use, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereTrading) {
|
||||
slot_id = _HasItemByUse(m_trade, use, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereCursor) {
|
||||
// Check cursor queue
|
||||
slot_id = _HasItemByUse(m_cursor, use, quantity);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
@@ -563,43 +563,43 @@ int16 Inventory::HasItemByUse(uint8 use, uint8 quantity, uint8 where)
|
||||
|
||||
int16 Inventory::HasItemByLoreGroup(uint32 loregroup, uint8 where)
|
||||
{
|
||||
int16 slot_id = SLOT_INVALID;
|
||||
int16 slot_id = INVALID_INDEX;
|
||||
|
||||
// Check each inventory bucket
|
||||
if (where & invWhereWorn) {
|
||||
slot_id = _HasItemByLoreGroup(m_worn, loregroup);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWherePersonal) {
|
||||
slot_id = _HasItemByLoreGroup(m_inv, loregroup);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereBank) {
|
||||
slot_id = _HasItemByLoreGroup(m_bank, loregroup);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereSharedBank) {
|
||||
slot_id = _HasItemByLoreGroup(m_shbank, loregroup);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereTrading) {
|
||||
slot_id = _HasItemByLoreGroup(m_trade, loregroup);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
if (where & invWhereCursor) {
|
||||
// Check cursor queue
|
||||
slot_id = _HasItemByLoreGroup(m_cursor, loregroup);
|
||||
if (slot_id != SLOT_INVALID)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
@@ -644,74 +644,93 @@ int16 Inventory::FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size, boo
|
||||
if (try_cursor)
|
||||
// Always room on cursor (it's a queue)
|
||||
// (we may wish to cap this in the future)
|
||||
return SLOT_CURSOR;
|
||||
return MainCursor;
|
||||
|
||||
// No available slots
|
||||
return SLOT_INVALID;
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
|
||||
// Opposite of below: Get parent bag slot_id from a slot inside of bag
|
||||
int16 Inventory::CalcSlotId(int16 slot_id)
|
||||
{
|
||||
int16 parent_slot_id = SLOT_INVALID;
|
||||
int16 Inventory::CalcSlotId(int16 slot_id) {
|
||||
int16 parent_slot_id = INVALID_INDEX;
|
||||
|
||||
if (slot_id >= 251 && slot_id <= 330)
|
||||
parent_slot_id = IDX_INV + (slot_id - 251) / MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 331 && slot_id <= 340)
|
||||
parent_slot_id = SLOT_CURSOR;
|
||||
else if (slot_id >= 2000 && slot_id <= 2023)
|
||||
parent_slot_id = IDX_BANK + (slot_id - 2000) / MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 2031 && slot_id <= 2270)
|
||||
parent_slot_id = IDX_BANK + (slot_id - 2031) / MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 2531 && slot_id <= 2550)
|
||||
parent_slot_id = IDX_SHBANK + (slot_id - 2531) / MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 3100 && slot_id <= 3179)
|
||||
parent_slot_id = IDX_TRADE + (slot_id - 3100) / MAX_ITEMS_PER_BAG;
|
||||
if (slot_id >= EmuConstants::GENERAL_BAGS_BEGIN && slot_id <= EmuConstants::GENERAL_BAGS_END)
|
||||
parent_slot_id = EmuConstants::GENERAL_BEGIN + (slot_id - EmuConstants::GENERAL_BAGS_BEGIN) / EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
|
||||
else if (slot_id >= EmuConstants::CURSOR_BAG_BEGIN && slot_id <= EmuConstants::CURSOR_BAG_END)
|
||||
parent_slot_id = EmuConstants::CURSOR;
|
||||
|
||||
/*
|
||||
// this is not a bag range...
|
||||
else if (slot_id >= EmuConstants::BANK_BEGIN && slot_id <= EmuConstants::BANK_END)
|
||||
parent_slot_id = EmuConstants::BANK_BEGIN + (slot_id - EmuConstants::BANK_BEGIN) / EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
*/
|
||||
|
||||
else if (slot_id >= EmuConstants::BANK_BAGS_BEGIN && slot_id <= EmuConstants::BANK_BAGS_END)
|
||||
parent_slot_id = EmuConstants::BANK_BEGIN + (slot_id - EmuConstants::BANK_BAGS_BEGIN) / EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
|
||||
else if (slot_id >= EmuConstants::SHARED_BANK_BAGS_BEGIN && slot_id <= EmuConstants::SHARED_BANK_BAGS_END)
|
||||
parent_slot_id = EmuConstants::SHARED_BANK_BEGIN + (slot_id - EmuConstants::SHARED_BANK_BAGS_BEGIN) / EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
|
||||
//else if (slot_id >= 3100 && slot_id <= 3179) should be {3031..3110}..where did this range come from!!? (verified db save range)
|
||||
else if (slot_id >= EmuConstants::TRADE_BAGS_BEGIN && slot_id <= EmuConstants::TRADE_BAGS_END)
|
||||
parent_slot_id = EmuConstants::TRADE_BEGIN + (slot_id - EmuConstants::TRADE_BAGS_BEGIN) / EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
|
||||
return parent_slot_id;
|
||||
}
|
||||
|
||||
// Calculate slot_id for an item within a bag
|
||||
int16 Inventory::CalcSlotId(int16 bagslot_id, uint8 bagidx)
|
||||
{
|
||||
if (!Inventory::SupportsContainers(bagslot_id)) {
|
||||
return SLOT_INVALID;
|
||||
}
|
||||
int16 Inventory::CalcSlotId(int16 bagslot_id, uint8 bagidx) {
|
||||
if (!Inventory::SupportsContainers(bagslot_id))
|
||||
return INVALID_INDEX;
|
||||
|
||||
int16 slot_id = SLOT_INVALID;
|
||||
int16 slot_id = INVALID_INDEX;
|
||||
|
||||
if (bagslot_id == SLOT_CURSOR || bagslot_id == 8000) // Cursor
|
||||
slot_id = IDX_CURSOR_BAG + bagidx;
|
||||
else if (bagslot_id >= 22 && bagslot_id <= 29) // Inventory slots
|
||||
slot_id = IDX_INV_BAG + (bagslot_id - 22)*MAX_ITEMS_PER_BAG + bagidx;
|
||||
else if (bagslot_id >= 2000 && bagslot_id <= 2023) // Bank slots
|
||||
slot_id = IDX_BANK_BAG + (bagslot_id - 2000)*MAX_ITEMS_PER_BAG + bagidx;
|
||||
else if (bagslot_id >= 2500 && bagslot_id <= 2501) // Shared bank slots
|
||||
slot_id = IDX_SHBANK_BAG + (bagslot_id - 2500)*MAX_ITEMS_PER_BAG + bagidx;
|
||||
else if (bagslot_id >= 3000 && bagslot_id <= 3007) // Trade window slots
|
||||
slot_id = IDX_TRADE_BAG + (bagslot_id - 3000)*MAX_ITEMS_PER_BAG + bagidx;
|
||||
if (bagslot_id == EmuConstants::CURSOR || bagslot_id == 8000)
|
||||
slot_id = EmuConstants::CURSOR_BAG_BEGIN + bagidx;
|
||||
|
||||
else if (bagslot_id >= EmuConstants::GENERAL_BEGIN && bagslot_id <= EmuConstants::GENERAL_END)
|
||||
slot_id = EmuConstants::GENERAL_BAGS_BEGIN + (bagslot_id - EmuConstants::GENERAL_BEGIN) * EmuConstants::ITEM_CONTAINER_SIZE + bagidx;
|
||||
|
||||
else if (bagslot_id >= EmuConstants::BANK_BEGIN && bagslot_id <= EmuConstants::BANK_END)
|
||||
slot_id = EmuConstants::BANK_BAGS_BEGIN + (bagslot_id - EmuConstants::BANK_BEGIN) * EmuConstants::ITEM_CONTAINER_SIZE + bagidx;
|
||||
|
||||
else if (bagslot_id >= EmuConstants::SHARED_BANK_BEGIN && bagslot_id <= EmuConstants::SHARED_BANK_END)
|
||||
slot_id = EmuConstants::SHARED_BANK_BAGS_BEGIN + (bagslot_id - EmuConstants::SHARED_BANK_BEGIN) * EmuConstants::ITEM_CONTAINER_SIZE + bagidx;
|
||||
|
||||
else if (bagslot_id >= EmuConstants::TRADE_BEGIN && bagslot_id <= EmuConstants::TRADE_END)
|
||||
slot_id = EmuConstants::TRADE_BAGS_BEGIN + (bagslot_id - EmuConstants::TRADE_BEGIN) * EmuConstants::ITEM_CONTAINER_SIZE + bagidx;
|
||||
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
uint8 Inventory::CalcBagIdx(int16 slot_id)
|
||||
{
|
||||
uint8 Inventory::CalcBagIdx(int16 slot_id) {
|
||||
uint8 index = 0;
|
||||
|
||||
if (slot_id >= 251 && slot_id <= 330)
|
||||
index = (slot_id - 251) % MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 331 && slot_id <= 340)
|
||||
index = (slot_id - 331) % MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 2000 && slot_id <= 2023)
|
||||
index = (slot_id - 2000) % MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 2031 && slot_id <= 2270)
|
||||
index = (slot_id - 2031) % MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 2531 && slot_id <= 2550)
|
||||
index = (slot_id - 2531) % MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 3100 && slot_id <= 3179)
|
||||
index = (slot_id - 3100) % MAX_ITEMS_PER_BAG;
|
||||
else if (slot_id >= 4000 && slot_id <= 4009)
|
||||
index = (slot_id - 4000) % MAX_ITEMS_PER_BAG;
|
||||
if (slot_id >= EmuConstants::GENERAL_BAGS_BEGIN && slot_id <= EmuConstants::GENERAL_BAGS_END)
|
||||
index = (slot_id - EmuConstants::GENERAL_BAGS_BEGIN) % EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
|
||||
else if (slot_id >= EmuConstants::CURSOR_BAG_BEGIN && slot_id <= EmuConstants::CURSOR_BAG_END)
|
||||
index = (slot_id - EmuConstants::CURSOR_BAG_BEGIN); // % EmuConstants::ITEM_CONTAINER_SIZE; - not needed since range is 10 slots
|
||||
|
||||
/*
|
||||
// this is not a bag range...
|
||||
else if (slot_id >= EmuConstants::BANK_BEGIN && slot_id <= EmuConstants::BANK_END)
|
||||
index = (slot_id - EmuConstants::BANK_BEGIN) % EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
*/
|
||||
|
||||
else if (slot_id >= EmuConstants::BANK_BAGS_BEGIN && slot_id <= EmuConstants::BANK_BAGS_END)
|
||||
index = (slot_id - EmuConstants::BANK_BAGS_BEGIN) % EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
|
||||
else if (slot_id >= EmuConstants::SHARED_BANK_BAGS_BEGIN && slot_id <= EmuConstants::SHARED_BANK_BAGS_END)
|
||||
index = (slot_id - EmuConstants::SHARED_BANK_BAGS_BEGIN) % EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
|
||||
else if (slot_id >= EmuConstants::TRADE_BAGS_BEGIN && slot_id <= EmuConstants::TRADE_BAGS_END)
|
||||
index = (slot_id - EmuConstants::TRADE_BAGS_BEGIN) % EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
|
||||
// odd..but, ok... (probably a range-slot conversion for ItemInst* Object::item
|
||||
else if (slot_id >= EmuConstants::WORLD_BEGIN && slot_id <= EmuConstants::WORLD_END)
|
||||
index = (slot_id - EmuConstants::WORLD_BEGIN); // % EmuConstants::ITEM_CONTAINER_SIZE; - not needed since range is 10 slots
|
||||
|
||||
return index;
|
||||
}
|
||||
@@ -721,25 +740,25 @@ int16 Inventory::CalcSlotFromMaterial(uint8 material)
|
||||
switch (material)
|
||||
{
|
||||
case MaterialHead:
|
||||
return SLOT_HEAD;
|
||||
return MainHead;
|
||||
case MaterialChest:
|
||||
return SLOT_CHEST;
|
||||
return MainChest;
|
||||
case MaterialArms:
|
||||
return SLOT_ARMS;
|
||||
return MainArms;
|
||||
case MaterialWrist:
|
||||
return SLOT_BRACER01; // there's 2 bracers, only one bracer material
|
||||
return MainWrist1; // there's 2 bracers, only one bracer material
|
||||
case MaterialHands:
|
||||
return SLOT_HANDS;
|
||||
return MainHands;
|
||||
case MaterialLegs:
|
||||
return SLOT_LEGS;
|
||||
return MainLegs;
|
||||
case MaterialFeet:
|
||||
return SLOT_FEET;
|
||||
return MainFeet;
|
||||
case MaterialPrimary:
|
||||
return SLOT_PRIMARY;
|
||||
return MainPrimary;
|
||||
case MaterialSecondary:
|
||||
return SLOT_SECONDARY;
|
||||
return MainSecondary;
|
||||
default:
|
||||
return SLOT_INVALID;
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -747,24 +766,24 @@ uint8 Inventory::CalcMaterialFromSlot(int16 equipslot)
|
||||
{
|
||||
switch (equipslot)
|
||||
{
|
||||
case SLOT_HEAD:
|
||||
case MainHead:
|
||||
return MaterialHead;
|
||||
case SLOT_CHEST:
|
||||
case MainChest:
|
||||
return MaterialChest;
|
||||
case SLOT_ARMS:
|
||||
case MainArms:
|
||||
return MaterialArms;
|
||||
case SLOT_BRACER01:
|
||||
case SLOT_BRACER02:
|
||||
case MainWrist1:
|
||||
//case SLOT_BRACER02: // non-live behavior
|
||||
return MaterialWrist;
|
||||
case SLOT_HANDS:
|
||||
case MainHands:
|
||||
return MaterialHands;
|
||||
case SLOT_LEGS:
|
||||
case MainLegs:
|
||||
return MaterialLegs;
|
||||
case SLOT_FEET:
|
||||
case MainFeet:
|
||||
return MaterialFeet;
|
||||
case SLOT_PRIMARY:
|
||||
case MainPrimary:
|
||||
return MaterialPrimary;
|
||||
case SLOT_SECONDARY:
|
||||
case MainSecondary:
|
||||
return MaterialSecondary;
|
||||
default:
|
||||
return _MaterialInvalid;
|
||||
@@ -790,7 +809,7 @@ bool Inventory::SupportsContainers(int16 slot_id)
|
||||
if ((slot_id >= 22 && slot_id <= 30) || // Personal inventory slots
|
||||
(slot_id >= 2000 && slot_id <= 2023) || // Bank slots
|
||||
(slot_id >= 2500 && slot_id <= 2501) || // Shared bank slots
|
||||
(slot_id == SLOT_CURSOR) || // Cursor
|
||||
(slot_id == MainCursor) || // Cursor
|
||||
(slot_id >= 3000 && slot_id <= 3007)) // Trade window
|
||||
return true;
|
||||
return false;
|
||||
@@ -826,7 +845,7 @@ int Inventory::GetSlotByItemInst(ItemInst *inst) {
|
||||
}
|
||||
|
||||
if (m_cursor.peek_front() == inst) {
|
||||
return SLOT_CURSOR;
|
||||
return MainCursor;
|
||||
}
|
||||
|
||||
return -1;
|
||||
@@ -942,9 +961,9 @@ int16 Inventory::_PutItem(int16 slot_id, ItemInst* inst)
|
||||
return slot_id;
|
||||
}
|
||||
|
||||
int16 result = SLOT_INVALID;
|
||||
int16 result = INVALID_INDEX;
|
||||
|
||||
if (slot_id == SLOT_CURSOR) { // Cursor
|
||||
if (slot_id == MainCursor) { // Cursor
|
||||
// Replace current item on cursor, if exists
|
||||
m_cursor.pop(); // no memory delete, clients of this function know what they are doing
|
||||
m_cursor.push_front(inst);
|
||||
@@ -979,7 +998,7 @@ int16 Inventory::_PutItem(int16 slot_id, ItemInst* inst)
|
||||
}
|
||||
}
|
||||
|
||||
if (result == SLOT_INVALID) {
|
||||
if (result == INVALID_INDEX) {
|
||||
LogFile->write(EQEMuLog::Error, "Inventory::_PutItem: Invalid slot_id specified (%i)", slot_id);
|
||||
Inventory::MarkDirty(inst); // Slot not found, clean up
|
||||
}
|
||||
@@ -1005,7 +1024,7 @@ int16 Inventory::_HasItem(std::map<int16, ItemInst*>& bucket, uint32 item_id, ui
|
||||
return it->first;
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_AUGMENT_SLOTS; i++) {
|
||||
for (int i = 0; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
|
||||
if (inst->GetAugmentItemID(i) == item_id && quantity <= 1)
|
||||
return SLOT_AUGMENT; // Only one augment per slot.
|
||||
}
|
||||
@@ -1020,7 +1039,7 @@ int16 Inventory::_HasItem(std::map<int16, ItemInst*>& bucket, uint32 item_id, ui
|
||||
if (quantity_found >= quantity)
|
||||
return Inventory::CalcSlotId(it->first, itb->first);
|
||||
}
|
||||
for (int i = 0; i < MAX_AUGMENT_SLOTS; i++) {
|
||||
for (int i = 0; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
|
||||
if (baginst->GetAugmentItemID(i) == item_id && quantity <= 1)
|
||||
return SLOT_AUGMENT; // Only one augment per slot.
|
||||
}
|
||||
@@ -1029,7 +1048,7 @@ int16 Inventory::_HasItem(std::map<int16, ItemInst*>& bucket, uint32 item_id, ui
|
||||
}
|
||||
|
||||
// Not found
|
||||
return SLOT_INVALID;
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
|
||||
// Internal Method: Checks an inventory queue type bucket for a particular item
|
||||
@@ -1047,9 +1066,9 @@ int16 Inventory::_HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity)
|
||||
if (inst->GetID() == item_id) {
|
||||
quantity_found += (inst->GetCharges() <= 0) ? 1 : inst->GetCharges();
|
||||
if (quantity_found >= quantity)
|
||||
return SLOT_CURSOR;
|
||||
return MainCursor;
|
||||
}
|
||||
for (int i = 0; i < MAX_AUGMENT_SLOTS; i++) {
|
||||
for (int i = 0; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
|
||||
if (inst->GetAugmentItemID(i) == item_id && quantity <= 1)
|
||||
return SLOT_AUGMENT; // Only one augment per slot.
|
||||
}
|
||||
@@ -1062,9 +1081,9 @@ int16 Inventory::_HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity)
|
||||
if (baginst->GetID() == item_id) {
|
||||
quantity_found += (baginst->GetCharges() <= 0) ? 1 : baginst->GetCharges();
|
||||
if (quantity_found >= quantity)
|
||||
return Inventory::CalcSlotId(SLOT_CURSOR, itb->first);
|
||||
return Inventory::CalcSlotId(MainCursor, itb->first);
|
||||
}
|
||||
for (int i = 0; i < MAX_AUGMENT_SLOTS; i++) {
|
||||
for (int i = 0; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
|
||||
if (baginst->GetAugmentItemID(i) == item_id && quantity <= 1)
|
||||
return SLOT_AUGMENT; // Only one augment per slot.
|
||||
}
|
||||
@@ -1074,7 +1093,7 @@ int16 Inventory::_HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity)
|
||||
}
|
||||
|
||||
// Not found
|
||||
return SLOT_INVALID;
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
|
||||
// Internal Method: Checks an inventory bucket for a particular item
|
||||
@@ -1109,7 +1128,7 @@ int16 Inventory::_HasItemByUse(std::map<int16, ItemInst*>& bucket, uint8 use, ui
|
||||
}
|
||||
|
||||
// Not found
|
||||
return SLOT_INVALID;
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
|
||||
// Internal Method: Checks an inventory queue type bucket for a particular item
|
||||
@@ -1125,7 +1144,7 @@ int16 Inventory::_HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity)
|
||||
if (inst && inst->IsType(ItemClassCommon) && inst->GetItem()->ItemType == use) {
|
||||
quantity_found += (inst->GetCharges() <= 0) ? 1 : inst->GetCharges();
|
||||
if (quantity_found >= quantity)
|
||||
return SLOT_CURSOR;
|
||||
return MainCursor;
|
||||
}
|
||||
|
||||
// Go through bag, if bag
|
||||
@@ -1136,14 +1155,14 @@ int16 Inventory::_HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity)
|
||||
if (baginst && baginst->IsType(ItemClassCommon) && baginst->GetItem()->ItemType == use) {
|
||||
quantity_found += (baginst->GetCharges() <= 0) ? 1 : baginst->GetCharges();
|
||||
if (quantity_found >= quantity)
|
||||
return Inventory::CalcSlotId(SLOT_CURSOR, itb->first);
|
||||
return Inventory::CalcSlotId(MainCursor, itb->first);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Not found
|
||||
return SLOT_INVALID;
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
|
||||
int16 Inventory::_HasItemByLoreGroup(std::map<int16, ItemInst*>& bucket, uint32 loregroup)
|
||||
@@ -1160,7 +1179,7 @@ int16 Inventory::_HasItemByLoreGroup(std::map<int16, ItemInst*>& bucket, uint32
|
||||
return it->first;
|
||||
|
||||
ItemInst* Aug;
|
||||
for (int i = 0; i < MAX_AUGMENT_SLOTS; i++) {
|
||||
for (int i = 0; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
|
||||
Aug = inst->GetAugment(i);
|
||||
if (Aug && Aug->GetItem()->LoreGroup == loregroup)
|
||||
return SLOT_AUGMENT; // Only one augment per slot.
|
||||
@@ -1175,7 +1194,7 @@ int16 Inventory::_HasItemByLoreGroup(std::map<int16, ItemInst*>& bucket, uint32
|
||||
return Inventory::CalcSlotId(it->first, itb->first);
|
||||
|
||||
ItemInst* Aug2;
|
||||
for (int i = 0; i < MAX_AUGMENT_SLOTS; i++) {
|
||||
for (int i = 0; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
|
||||
Aug2 = baginst->GetAugment(i);
|
||||
if (Aug2 && Aug2->GetItem()->LoreGroup == loregroup)
|
||||
return SLOT_AUGMENT; // Only one augment per slot.
|
||||
@@ -1185,7 +1204,7 @@ int16 Inventory::_HasItemByLoreGroup(std::map<int16, ItemInst*>& bucket, uint32
|
||||
}
|
||||
|
||||
// Not found
|
||||
return SLOT_INVALID;
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
|
||||
// Internal Method: Checks an inventory queue type bucket for a particular item
|
||||
@@ -1200,10 +1219,10 @@ int16 Inventory::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup)
|
||||
if (inst)
|
||||
{
|
||||
if (inst->GetItem()->LoreGroup == loregroup)
|
||||
return SLOT_CURSOR;
|
||||
return MainCursor;
|
||||
|
||||
ItemInst* Aug;
|
||||
for (int i = 0; i < MAX_AUGMENT_SLOTS; i++) {
|
||||
for (int i = 0; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
|
||||
Aug = inst->GetAugment(i);
|
||||
if (Aug && Aug->GetItem()->LoreGroup == loregroup)
|
||||
return SLOT_AUGMENT; // Only one augment per slot.
|
||||
@@ -1215,11 +1234,11 @@ int16 Inventory::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup)
|
||||
for (itb = inst->_begin(); itb != inst->_end(); ++itb) {
|
||||
ItemInst* baginst = itb->second;
|
||||
if (baginst && baginst->IsType(ItemClassCommon) && baginst->GetItem()->LoreGroup == loregroup)
|
||||
return Inventory::CalcSlotId(SLOT_CURSOR, itb->first);
|
||||
return Inventory::CalcSlotId(MainCursor, itb->first);
|
||||
|
||||
|
||||
ItemInst* Aug2;
|
||||
for (int i = 0; i < MAX_AUGMENT_SLOTS; i++) {
|
||||
for (int i = 0; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
|
||||
Aug2 = baginst->GetAugment(i);
|
||||
if (Aug2 && Aug2->GetItem()->LoreGroup == loregroup)
|
||||
return SLOT_AUGMENT; // Only one augment per slot.
|
||||
@@ -1230,7 +1249,7 @@ int16 Inventory::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup)
|
||||
}
|
||||
|
||||
// Not found
|
||||
return SLOT_INVALID;
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
|
||||
|
||||
@@ -1654,7 +1673,7 @@ ItemInst* ItemInst::RemoveAugment(uint8 index)
|
||||
|
||||
bool ItemInst::IsAugmented()
|
||||
{
|
||||
for (int i = 0; i < MAX_AUGMENT_SLOTS; ++i)
|
||||
for (int i = 0; i < EmuConstants::ITEM_COMMON_SIZE; ++i)
|
||||
if (GetAugmentItemID(i))
|
||||
return true;
|
||||
|
||||
|
||||
@@ -55,21 +55,6 @@ namespace ItemField
|
||||
};
|
||||
};
|
||||
|
||||
// Indexing positions to the beginning slot_id's for a bucket of slots
|
||||
#define IDX_EQUIP 0
|
||||
#define IDX_CURSOR_BAG 331
|
||||
#define IDX_INV 22
|
||||
#define IDX_INV_BAG 251
|
||||
#define IDX_TRIBUTE 400
|
||||
#define IDX_BANK 2000
|
||||
#define IDX_BANK_BAG 2031
|
||||
#define IDX_SHBANK 2500
|
||||
#define IDX_SHBANK_BAG 2531
|
||||
#define IDX_TRADE 3000
|
||||
#define IDX_TRADE_BAG 3031
|
||||
#define IDX_TRADESKILL 4000
|
||||
#define MAX_ITEMS_PER_BAG 10
|
||||
|
||||
// Specifies usage type for item inside ItemInst
|
||||
enum ItemInstTypes
|
||||
{
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#endif
|
||||
|
||||
#include <mysql.h>
|
||||
#include "../common/types.h"
|
||||
#include "../common/MySQLRequestRow.h"
|
||||
#include "types.h"
|
||||
#include "MySQLRequestRow.h"
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <mysql.h>
|
||||
#include <iterator>
|
||||
#include "../common/types.h"
|
||||
#include "types.h"
|
||||
|
||||
class MySQLRequestRow : public std::iterator<std::input_iterator_tag, MYSQL_ROW>
|
||||
{
|
||||
|
||||
+33
-18
@@ -1,27 +1,42 @@
|
||||
#ifndef CLIENTVERSIONS_H
|
||||
#define CLIENTVERSIONS_H
|
||||
|
||||
static const uint32 BIT_Client62 = 1;
|
||||
static const uint32 BIT_Titanium = 2;
|
||||
static const uint32 BIT_SoF = 4;
|
||||
static const uint32 BIT_SoD = 8;
|
||||
static const uint32 BIT_Underfoot = 16;
|
||||
static const uint32 BIT_RoF = 32;
|
||||
static const uint32 BIT_TitaniumAndEarlier = 3;
|
||||
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
|
||||
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
|
||||
static const uint32 BIT_UnderfootAndLater = 0xFFFFFFF0;
|
||||
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
|
||||
static const uint32 BIT_AllClients = 0xFFFFFFFF;
|
||||
static const uint32 BIT_Client62 = 1;
|
||||
static const uint32 BIT_Titanium = 2;
|
||||
static const uint32 BIT_SoF = 4;
|
||||
static const uint32 BIT_SoD = 8;
|
||||
static const uint32 BIT_Underfoot = 16;
|
||||
static const uint32 BIT_RoF = 32;
|
||||
static const uint32 BIT_RoF2 = 64;
|
||||
|
||||
static const uint32 BIT_TitaniumAndEarlier = 0x00000003;
|
||||
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
|
||||
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
|
||||
static const uint32 BIT_UnderfootAndLater = 0xFFFFFFF0;
|
||||
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
|
||||
static const uint32 BIT_RoF2AndLater = 0xFFFFFFC0;
|
||||
static const uint32 BIT_AllClients = 0xFFFFFFFF;
|
||||
|
||||
typedef enum {
|
||||
EQClientUnknown = 0,
|
||||
EQClient62,
|
||||
EQClientTitanium,
|
||||
EQClientSoF,
|
||||
EQClientSoD,
|
||||
EQClientUnderfoot,
|
||||
EQClientRoF
|
||||
EQClient62, // Build: 'Aug 4 2005 15:40:59'
|
||||
EQClientTitanium, // Build: 'Oct 31 2005 10:33:37'
|
||||
EQClientSoF, // Build: 'Sep 7 2007 09:11:49'
|
||||
EQClientSoD, // Build: 'Dec 19 2008 15:22:49'
|
||||
EQClientUnderfoot, // Build: 'Jun 8 2010 16:44:32'
|
||||
EQClientRoF, // Build: 'Dec 10 2012 17:35:44'
|
||||
EQClientRoF2, // Build: 'May 10 2013 23:30:08'
|
||||
|
||||
_EQClientCount, // place new clients before this point (preferably, in release/attribute order)
|
||||
|
||||
// Values below are not implemented, as yet...
|
||||
|
||||
EmuNPC = _EQClientCount,
|
||||
EmuMerc,
|
||||
EmuBot,
|
||||
EmuPet,
|
||||
|
||||
_EmuClientCount // array size for EQLimits
|
||||
} EQClientVersion;
|
||||
|
||||
#endif /* CLIENTVERSIONS_H */
|
||||
|
||||
+9
-7
@@ -605,7 +605,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
||||
|
||||
// now the inventory
|
||||
std::string invquery;
|
||||
for (int16 i=0; i<=2270;)
|
||||
for (int16 i=EmuConstants::POSSESSIONS_BEGIN; i<=EmuConstants::BANK_BAGS_END;)
|
||||
{
|
||||
const ItemInst* newinv = inv->GetItem(i);
|
||||
if (!newinv)
|
||||
@@ -622,14 +622,16 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
||||
#endif
|
||||
}
|
||||
|
||||
if(i==30){ //end of standard inventory/cursor, jump to internals of bags/cursor
|
||||
i = 251;
|
||||
if (i == EmuConstants::CURSOR) {
|
||||
i = EmuConstants::GENERAL_BAGS_BEGIN;
|
||||
continue;
|
||||
} else if(i==340){ //end of internals of bags/cursor, jump to bank slots
|
||||
i = 2000;
|
||||
}
|
||||
else if (i == EmuConstants::CURSOR_BAG_END) {
|
||||
i = EmuConstants::BANK_BEGIN;
|
||||
continue;
|
||||
} else if(i==2023){ //end of bank slots, jump to internals of bank bags
|
||||
i = 2031;
|
||||
}
|
||||
else if (i == EmuConstants::BANK_END) {
|
||||
i = EmuConstants::BANK_BAGS_BEGIN;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -539,3 +539,4 @@ N(OP_MercenaryTimerRequest),
|
||||
N(OP_OpenInventory),
|
||||
N(OP_OpenContainer),
|
||||
N(OP_Marquee),
|
||||
N(OP_ClientTimeStamp),
|
||||
|
||||
+183
-64
@@ -138,45 +138,86 @@ enum ItemUseTypes : uint8
|
||||
};
|
||||
|
||||
/*
|
||||
** Augmentation use types (in-work)
|
||||
** Augmentation use type bitmasks (1-based)
|
||||
**
|
||||
** (ref: dbstr_us.txt)
|
||||
**
|
||||
*/
|
||||
enum AugmentationUseTypes : uint32 {
|
||||
AugTypeNone = 0, // not 100% sure on this...
|
||||
AugTypeGeneralSingleStat, /*1^16^1 (General: Single Stat)^0*/
|
||||
AugTypeGeneralMultipleStat, /*2^16^2 (General: Multiple Stat)^0*/
|
||||
AugTypeGeneralSpellEffect, /*3^16^3 (General: Spell Effect)^0*/
|
||||
AugTypeWeaponGeneral, /*4^16^4 (Weapon: General)^0*/
|
||||
AugTypeWeaponElemDamage, /*5^16^5 (Weapon: Elem Damage)^0*/
|
||||
AugTypeWeaponBaseDamage, /*6^16^6 (Weapon: Base Damage)^0*/
|
||||
AugTypeGeneralGroup, /*7^16^7 (General: Group)^0*/
|
||||
AugTypeGeneralRaid, /*8^16^8 (General: Raid)^0*/
|
||||
AugTypeGeneralDragonsPoints, /*9^16^9 (General: Dragons Points)^0*/
|
||||
AugTypeCraftedCommon, /*10^16^10 (Crafted: Common)^0*/
|
||||
AugTypeCraftedGroup1, /*11^16^11 (Crafted: Group)^0*/
|
||||
AugTypeCraftedRaid1, /*12^16^12 (Crafted: Raid)^0*/
|
||||
AugTypeEnergeiacGroup, /*13^16^13 (Energeiac: Group)^0*/
|
||||
AugTypeEnergeiacRaid, /*14^16^14 (Energeiac: Raid)^0*/
|
||||
AugTypeEmblem, /*15^16^15 (Emblem)^0*/
|
||||
AugTypeCraftedGroup2, /*16^16^16 (Crafted: Group)^0*/
|
||||
AugTypeCraftedRaid2, /*17^16^17 (Crafted: Raid)^0*/
|
||||
AugTypeUnknown1, /*18^16^18^0*/
|
||||
AugTypeUnknown2, /*19^16^19^0*/
|
||||
AugTypeOrnamentation, /*20^16^20 (Ornamentation)^0*/
|
||||
AugTypeSpecialOrnamentation, /*21^16^21 (Special Ornamentation)^0*/
|
||||
AugTypeUnknown3, /*22^16^22^0*/
|
||||
AugTypeUnknown4, /*23^16^23^0*/
|
||||
AugTypeUnknown5, /*24^16^24^0*/
|
||||
AugTypeUnknown6, /*25^16^25^0*/
|
||||
AugTypeUnknown7, /*26^16^26^0*/
|
||||
AugTypeUnknown8, /*27^16^27^0*/
|
||||
AugTypeUnknown9, /*28^16^28^0*/
|
||||
AugTypeUnknown10, /*29^16^29^0*/
|
||||
AugTypeEpic25, /*30^16^30^0*/
|
||||
AugTypeTest, /*31^16^Test^0*/ // listed as 31^16^31^0 in 5-10 client
|
||||
_AugTypeCount
|
||||
enum AugmentationUseTypeBitmasks : uint32 {
|
||||
AugUseNone = 0x00000000,
|
||||
AugUseGeneralSingleStat = 0x00000001, /*1^16^1 (General: Single Stat)^0*/
|
||||
AugUseGeneralMultipleStat = 0x00000002, /*2^16^2 (General: Multiple Stat)^0*/
|
||||
AugUseGeneralSpellEffect = 0x00000004, /*3^16^3 (General: Spell Effect)^0*/
|
||||
AugUseWeaponGeneral = 0x00000008, /*4^16^4 (Weapon: General)^0*/
|
||||
AugUseWeaponElemDamage = 0x00000010, /*5^16^5 (Weapon: Elem Damage)^0*/
|
||||
AugUseWeaponBaseDamage = 0x00000020, /*6^16^6 (Weapon: Base Damage)^0*/
|
||||
AugUseGeneralGroup = 0x00000040, /*7^16^7 (General: Group)^0*/
|
||||
AugUseGeneralRaid = 0x00000080, /*8^16^8 (General: Raid)^0*/
|
||||
AugUseGeneralDragonsPoints = 0x00000100, /*9^16^9 (General: Dragons Points)^0*/
|
||||
AugUseCraftedCommon = 0x00000200, /*10^16^10 (Crafted: Common)^0*/
|
||||
AugUseCraftedGroup1 = 0x00000400, /*11^16^11 (Crafted: Group)^0*/
|
||||
AugUseCraftedRaid1 = 0x00000800, /*12^16^12 (Crafted: Raid)^0*/
|
||||
AugUseEnergeiacGroup = 0x00001000, /*13^16^13 (Energeiac: Group)^0*/
|
||||
AugUseEnergeiacRaid = 0x00002000, /*14^16^14 (Energeiac: Raid)^0*/
|
||||
AugUseEmblem = 0x00004000, /*15^16^15 (Emblem)^0*/
|
||||
AugUseCraftedGroup2 = 0x00008000, /*16^16^16 (Crafted: Group)^0*/
|
||||
AugUseCraftedRaid2 = 0x00010000, /*17^16^17 (Crafted: Raid)^0*/
|
||||
AugUseUnknown1 = 0x00020000, /*18^16^18^0*/
|
||||
AugUseUnknown2 = 0x00040000, /*19^16^19^0*/
|
||||
AugUseOrnamentation = 0x00080000, /*20^16^20 (Ornamentation)^0*/
|
||||
AugUseSpecialOrnamentation = 0x00100000, /*21^16^21 (Special Ornamentation)^0*/
|
||||
AugUseUnknown3 = 0x00200000, /*22^16^22^0*/
|
||||
AugUseUnknown4 = 0x00400000, /*23^16^23^0*/
|
||||
AugUseUnknown5 = 0x00800000, /*24^16^24^0*/
|
||||
AugUseUnknown6 = 0x01000000, /*25^16^25^0*/
|
||||
AugUseUnknown7 = 0x02000000, /*26^16^26^0*/
|
||||
AugUseUnknown8 = 0x04000000, /*27^16^27^0*/
|
||||
AugUseUnknown9 = 0x08000000, /*28^16^28^0*/
|
||||
AugUseUnknown10 = 0x10000000, /*29^16^29^0*/
|
||||
AugUseEpic25 = 0x20000000, /*30^16^30^0*/
|
||||
AugUseTest = 0x40000000, /*31^16^Test^0*/ // listed as 31^16^31^0 in 5-10 client
|
||||
AugUseAll = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
/*
|
||||
** Augmentation use types (enumerated)
|
||||
**
|
||||
*/
|
||||
enum AugmentationUseTypes : uint8 {
|
||||
AugTypeNone = 0,
|
||||
AugTypeGeneralSingleStat,
|
||||
AugTypeGeneralMultipleStat,
|
||||
AugTypeGeneralSpellEffect,
|
||||
AugTypeWeaponGeneral,
|
||||
AugTypeWeaponElemDamage,
|
||||
AugTypeWeaponBaseDamage,
|
||||
AugTypeGeneralGroup,
|
||||
AugTypeGeneralRaid,
|
||||
AugTypeGeneralDragonsPoints,
|
||||
AugTypeCraftedCommon,
|
||||
AugTypeCraftedGroup1,
|
||||
AugTypeCraftedRaid1,
|
||||
AugTypeEnergeiacGroup,
|
||||
AugTypeEnergeiacRaid,
|
||||
AugTypeEmblem,
|
||||
AugTypeCraftedGroup2,
|
||||
AugTypeCraftedRaid2,
|
||||
AugTypeUnknown1,
|
||||
AugTypeUnknown2,
|
||||
AugTypeOrnamentation,
|
||||
AugTypeSpecialOrnamentation,
|
||||
AugTypeUnknown3,
|
||||
AugTypeUnknown4,
|
||||
AugTypeUnknown5,
|
||||
AugTypeUnknown6,
|
||||
AugTypeUnknown7,
|
||||
AugTypeUnknown8,
|
||||
AugTypeUnknown9,
|
||||
AugTypeUnknown10,
|
||||
AugTypeEpic25,
|
||||
AugTypeTest,
|
||||
_AugTypeCount,
|
||||
AugTypeAll = 255
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -735,10 +776,11 @@ enum MaterialUseSlots : uint8
|
||||
_MaterialInvalid = 255
|
||||
};
|
||||
|
||||
/*
|
||||
// Used for worn NPC inventory tracking. NPCs don't use
|
||||
// augments, so only the basic slots need to be kept track of.
|
||||
#define MAX_WORN_INVENTORY 22
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
** Inventory Slot Equipment Enum
|
||||
@@ -768,42 +810,109 @@ enum MaterialUseSlots : uint8
|
||||
**
|
||||
*/
|
||||
|
||||
enum InventoryMapTypes : int16 {
|
||||
MapPossessions = 0,
|
||||
MapBank,
|
||||
MapSharedBank,
|
||||
MapTrade,
|
||||
MapWorld,
|
||||
MapLimbo,
|
||||
MapTribute,
|
||||
MapTrophyTribute,
|
||||
MapGuildTribute,
|
||||
MapMerchant,
|
||||
MapDeleted,
|
||||
MapCorpse,
|
||||
MapBazaar,
|
||||
MapInspect,
|
||||
MapRealEstate,
|
||||
MapViewMODPC,
|
||||
MapViewMODBank,
|
||||
MapViewMODSharedBank,
|
||||
MapViewMODLimbo,
|
||||
MapAltStorage,
|
||||
MapArchived,
|
||||
MapMail,
|
||||
MapGuildTrophyTribute,
|
||||
MapKrono,
|
||||
MapOther,
|
||||
_MapCount
|
||||
};
|
||||
|
||||
enum InventoryMainTypes : int16 {
|
||||
MainCharm = 0,
|
||||
MainEar1,
|
||||
MainHead,
|
||||
MainFace,
|
||||
MainEar2,
|
||||
MainNeck,
|
||||
MainShoulders,
|
||||
MainArms,
|
||||
MainBack,
|
||||
MainWrist1,
|
||||
MainWrist2,
|
||||
MainRange,
|
||||
MainHands,
|
||||
MainPrimary,
|
||||
MainSecondary,
|
||||
MainFinger1,
|
||||
MainFinger2,
|
||||
MainChest,
|
||||
MainLegs,
|
||||
MainFeet,
|
||||
MainWaist,
|
||||
MainPowerSource = 9999, // temp
|
||||
MainAmmo = 21, // temp
|
||||
MainGeneral1,
|
||||
MainGeneral2,
|
||||
MainGeneral3,
|
||||
MainGeneral4,
|
||||
MainGeneral5,
|
||||
MainGeneral6,
|
||||
MainGeneral7,
|
||||
MainGeneral8,
|
||||
//MainGeneral9,
|
||||
//MainGeneral10,
|
||||
MainCursor,
|
||||
_MainCount
|
||||
};
|
||||
|
||||
enum InventorySlot
|
||||
{
|
||||
////////////////////////
|
||||
// Equip slots
|
||||
////////////////////////
|
||||
|
||||
SLOT_CHARM = 0,
|
||||
SLOT_EAR01 = 1,
|
||||
SLOT_HEAD = 2,
|
||||
SLOT_FACE = 3,
|
||||
SLOT_EAR02 = 4,
|
||||
SLOT_NECK = 5,
|
||||
SLOT_SHOULDER = 6,
|
||||
SLOT_ARMS = 7,
|
||||
SLOT_BACK = 8,
|
||||
SLOT_BRACER01 = 9,
|
||||
SLOT_BRACER02 = 10,
|
||||
SLOT_RANGE = 11,
|
||||
SLOT_HANDS = 12,
|
||||
SLOT_PRIMARY = 13,
|
||||
SLOT_SECONDARY = 14,
|
||||
SLOT_RING01 = 15,
|
||||
SLOT_RING02 = 16,
|
||||
SLOT_CHEST = 17,
|
||||
SLOT_LEGS = 18,
|
||||
SLOT_FEET = 19,
|
||||
SLOT_WAIST = 20,
|
||||
SLOT_AMMO = 21,
|
||||
//SLOT_CHARM = 0,
|
||||
//SLOT_EAR01 = 1,
|
||||
//SLOT_HEAD = 2,
|
||||
//SLOT_FACE = 3,
|
||||
//SLOT_EAR02 = 4,
|
||||
//SLOT_NECK = 5,
|
||||
//SLOT_SHOULDER = 6,
|
||||
//SLOT_ARMS = 7,
|
||||
//SLOT_BACK = 8,
|
||||
//SLOT_BRACER01 = 9,
|
||||
//SLOT_BRACER02 = 10,
|
||||
//SLOT_RANGE = 11,
|
||||
//SLOT_HANDS = 12,
|
||||
//SLOT_PRIMARY = 13,
|
||||
//SLOT_SECONDARY = 14,
|
||||
//SLOT_RING01 = 15,
|
||||
//SLOT_RING02 = 16,
|
||||
//SLOT_CHEST = 17,
|
||||
//SLOT_LEGS = 18,
|
||||
//SLOT_FEET = 19,
|
||||
//SLOT_WAIST = 20,
|
||||
//SLOT_AMMO = 21,
|
||||
|
||||
////////////////////////
|
||||
// All other slots
|
||||
////////////////////////
|
||||
SLOT_PERSONAL_BEGIN = 22,
|
||||
SLOT_PERSONAL_END = 29,
|
||||
//SLOT_PERSONAL_BEGIN = 22,
|
||||
//SLOT_PERSONAL_END = 29,
|
||||
|
||||
SLOT_CURSOR = 30,
|
||||
//SLOT_CURSOR = 30,
|
||||
|
||||
SLOT_CURSOR_END = (int16)0xFFFE, // Last item on cursor queue
|
||||
// Cursor bag slots are 331->340 (10 slots)
|
||||
@@ -830,11 +939,21 @@ enum InventorySlot
|
||||
|
||||
// Slot used in OP_TradeSkillCombine for world tradeskill containers
|
||||
SLOT_TRADESKILL = 1000,
|
||||
SLOT_AUGMENT = 1001,
|
||||
SLOT_POWER_SOURCE = 9999,
|
||||
SLOT_AUGMENT = 1001//,
|
||||
//SLOT_POWER_SOURCE = 9999//,
|
||||
// Value recognized by client for destroying an item
|
||||
SLOT_INVALID = (int16)0xFFFF
|
||||
//SLOT_INVALID = (int16)0xFFFF
|
||||
};
|
||||
|
||||
#define INVALID_INDEX -1
|
||||
#define NOT_USED 0
|
||||
#define NO_ITEM 0
|
||||
|
||||
// yes..these are redundant... but, they help to identify and define what is actually being performed
|
||||
// plus, since they're pre-op's, they don't affect the actual binary size
|
||||
#define MAP_BEGIN 0
|
||||
#define MAIN_BEGIN 0
|
||||
#define SUB_BEGIN 0
|
||||
#define AUG_BEGIN 0
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,961 @@
|
||||
/*
|
||||
EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#include "eq_dictionary.h"
|
||||
#include "StringUtil.h"
|
||||
|
||||
//
|
||||
// class ServerConstants
|
||||
//
|
||||
uint16 EmuConstants::InventoryMapSize(int16 map) {
|
||||
switch (map) {
|
||||
case MapPossessions:
|
||||
return MAP_POSSESSIONS_SIZE;
|
||||
case MapBank:
|
||||
return MAP_BANK_SIZE;
|
||||
case MapSharedBank:
|
||||
return MAP_SHARED_BANK_SIZE;
|
||||
case MapTrade:
|
||||
return MAP_TRADE_SIZE;
|
||||
case MapWorld:
|
||||
return MAP_WORLD_SIZE;
|
||||
case MapLimbo:
|
||||
return MAP_LIMBO_SIZE;
|
||||
case MapTribute:
|
||||
return MAP_TRIBUTE_SIZE;
|
||||
case MapTrophyTribute:
|
||||
return MAP_TROPHY_TRIBUTE_SIZE;
|
||||
case MapGuildTribute:
|
||||
return MAP_GUILD_TRIBUTE_SIZE;
|
||||
case MapMerchant:
|
||||
return MAP_MERCHANT_SIZE;
|
||||
case MapDeleted:
|
||||
return MAP_DELETED_SIZE;
|
||||
case MapCorpse:
|
||||
return MAP_CORPSE_SIZE;
|
||||
case MapBazaar:
|
||||
return MAP_BAZAAR_SIZE;
|
||||
case MapInspect:
|
||||
return MAP_INSPECT_SIZE;
|
||||
case MapRealEstate:
|
||||
return MAP_REAL_ESTATE_SIZE;
|
||||
case MapViewMODPC:
|
||||
return MAP_VIEW_MOD_PC_SIZE;
|
||||
case MapViewMODBank:
|
||||
return MAP_VIEW_MOD_BANK_SIZE;
|
||||
case MapViewMODSharedBank:
|
||||
return MAP_VIEW_MOD_SHARED_BANK_SIZE;
|
||||
case MapViewMODLimbo:
|
||||
return MAP_VIEW_MOD_LIMBO_SIZE;
|
||||
case MapAltStorage:
|
||||
return MAP_ALT_STORAGE_SIZE;
|
||||
case MapArchived:
|
||||
return MAP_ARCHIVED_SIZE;
|
||||
case MapMail:
|
||||
return MAP_MAIL_SIZE;
|
||||
case MapGuildTrophyTribute:
|
||||
return MAP_GUILD_TROPHY_TRIBUTE_SIZE;
|
||||
case MapKrono:
|
||||
return MAP_KRONO_SIZE;
|
||||
case MapOther:
|
||||
return MAP_OTHER_SIZE;
|
||||
default:
|
||||
return NOT_USED;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
std::string EmuConstants::InventoryLocationName(Location_Struct location) {
|
||||
// not ready for implementation...
|
||||
std::string ret_str;
|
||||
StringFormat(ret_str, "%s, %s, %s, %s", InventoryMapName(location.map), InventoryMainName(location.main), InventorySubName(location.sub), InventoryAugName(location.aug));
|
||||
return ret_str;
|
||||
}
|
||||
*/
|
||||
|
||||
std::string EmuConstants::InventoryMapName(int16 map) {
|
||||
switch (map) {
|
||||
case INVALID_INDEX:
|
||||
return "Invalid Map";
|
||||
case MapPossessions:
|
||||
return "Possessions";
|
||||
case MapBank:
|
||||
return "Bank";
|
||||
case MapSharedBank:
|
||||
return "Shared Bank";
|
||||
case MapTrade:
|
||||
return "Trade";
|
||||
case MapWorld:
|
||||
return "World";
|
||||
case MapLimbo:
|
||||
return "Limbo";
|
||||
case MapTribute:
|
||||
return "Tribute";
|
||||
case MapTrophyTribute:
|
||||
return "Trophy Tribute";
|
||||
case MapGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case MapMerchant:
|
||||
return "Merchant";
|
||||
case MapDeleted:
|
||||
return "Deleted";
|
||||
case MapCorpse:
|
||||
return "Corpse";
|
||||
case MapBazaar:
|
||||
return "Bazaar";
|
||||
case MapInspect:
|
||||
return "Inspect";
|
||||
case MapRealEstate:
|
||||
return "Real Estate";
|
||||
case MapViewMODPC:
|
||||
return "View MOD PC";
|
||||
case MapViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case MapViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case MapViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case MapAltStorage:
|
||||
return "Alt Storage";
|
||||
case MapArchived:
|
||||
return "Archived";
|
||||
case MapMail:
|
||||
return "Mail";
|
||||
case MapGuildTrophyTribute:
|
||||
return "Guild Trophy Tribute";
|
||||
case MapKrono:
|
||||
return "Krono";
|
||||
case MapOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Map";
|
||||
}
|
||||
}
|
||||
|
||||
std::string EmuConstants::InventoryMainName(int16 main) {
|
||||
switch (main) {
|
||||
case INVALID_INDEX:
|
||||
return "Invalid Main";
|
||||
case MainCharm:
|
||||
return "Charm";
|
||||
case MainEar1:
|
||||
return "Ear 1";
|
||||
case MainHead:
|
||||
return "Head";
|
||||
case MainFace:
|
||||
return "Face";
|
||||
case MainEar2:
|
||||
return "Ear 2";
|
||||
case MainNeck:
|
||||
return "Neck";
|
||||
case MainShoulders:
|
||||
return "Shoulders";
|
||||
case MainArms:
|
||||
return "Arms";
|
||||
case MainBack:
|
||||
return "Back";
|
||||
case MainWrist1:
|
||||
return "Wrist 1";
|
||||
case MainWrist2:
|
||||
return "Wrist 2";
|
||||
case MainRange:
|
||||
return "Range";
|
||||
case MainHands:
|
||||
return "Hands";
|
||||
case MainPrimary:
|
||||
return "Primary";
|
||||
case MainSecondary:
|
||||
return "Secondary";
|
||||
case MainFinger1:
|
||||
return "Finger 1";
|
||||
case MainFinger2:
|
||||
return "Finger 2";
|
||||
case MainChest:
|
||||
return "Chest";
|
||||
case MainLegs:
|
||||
return "Legs";
|
||||
case MainFeet:
|
||||
return "Feet";
|
||||
case MainWaist:
|
||||
return "Waist";
|
||||
case MainPowerSource:
|
||||
return "Power Source";
|
||||
case MainAmmo:
|
||||
return "Ammo";
|
||||
case MainGeneral1:
|
||||
return "General 1";
|
||||
case MainGeneral2:
|
||||
return "General 2";
|
||||
case MainGeneral3:
|
||||
return "General 3";
|
||||
case MainGeneral4:
|
||||
return "General 4";
|
||||
case MainGeneral5:
|
||||
return "General 5";
|
||||
case MainGeneral6:
|
||||
return "General 6";
|
||||
case MainGeneral7:
|
||||
return "General 7";
|
||||
case MainGeneral8:
|
||||
return "General 8";
|
||||
/*
|
||||
case MainGeneral9:
|
||||
return "General 9";
|
||||
case MainGeneral10:
|
||||
return "General 10";
|
||||
*/
|
||||
case MainCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Main";
|
||||
}
|
||||
}
|
||||
|
||||
std::string EmuConstants::InventorySubName(int16 sub) {
|
||||
if (sub == INVALID_INDEX)
|
||||
return "Invalid Sub";
|
||||
|
||||
if ((uint16)sub >= ITEM_CONTAINER_SIZE)
|
||||
return "Unknown Sub";
|
||||
|
||||
std::string ret_str;
|
||||
ret_str = StringFormat("Container %i", (sub + 1)); // zero-based index..but, count starts at one
|
||||
|
||||
return ret_str;
|
||||
}
|
||||
|
||||
std::string EmuConstants::InventoryAugName(int16 aug) {
|
||||
if (aug == INVALID_INDEX)
|
||||
return "Invalid Aug";
|
||||
|
||||
if ((uint16)aug >= ITEM_COMMON_SIZE)
|
||||
return "Unknown Aug";
|
||||
|
||||
std::string ret_str;
|
||||
ret_str = StringFormat("Augment %i", (aug + 1)); // zero-based index..but, count starts at one
|
||||
|
||||
return ret_str;
|
||||
}
|
||||
|
||||
//
|
||||
// class ClientLimits
|
||||
//
|
||||
// client validation
|
||||
bool EQLimits::IsValidClientVersion(uint32 version) {
|
||||
if (version < _EQClientCount)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 EQLimits::ValidateClientVersion(uint32 version) {
|
||||
if (version < _EQClientCount)
|
||||
return version;
|
||||
|
||||
return EQClientUnknown;
|
||||
}
|
||||
|
||||
EQClientVersion EQLimits::ValidateClientVersion(EQClientVersion version) {
|
||||
if (version >= EQClientUnknown)
|
||||
if (version < _EQClientCount)
|
||||
return version;
|
||||
|
||||
return EQClientUnknown;
|
||||
}
|
||||
|
||||
// npc validation
|
||||
bool EQLimits::IsValidNPCVersion(uint32 version) {
|
||||
if (version >= _EQClientCount)
|
||||
if (version < _EmuClientCount)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 EQLimits::ValidateNPCVersion(uint32 version) {
|
||||
if (version >= _EQClientCount)
|
||||
if (version < _EmuClientCount)
|
||||
return version;
|
||||
|
||||
return EQClientUnknown;
|
||||
}
|
||||
|
||||
EQClientVersion EQLimits::ValidateNPCVersion(EQClientVersion version) {
|
||||
if (version >= _EQClientCount)
|
||||
if (version < _EmuClientCount)
|
||||
return version;
|
||||
|
||||
return EQClientUnknown;
|
||||
}
|
||||
|
||||
// mob validation
|
||||
bool EQLimits::IsValidMobVersion(uint32 version) {
|
||||
if (version < _EmuClientCount)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 EQLimits::ValidateMobVersion(uint32 version) {
|
||||
if (version < _EmuClientCount)
|
||||
return version;
|
||||
|
||||
return EQClientUnknown;
|
||||
}
|
||||
|
||||
EQClientVersion EQLimits::ValidateMobVersion(EQClientVersion version) {
|
||||
if (version >= EQClientUnknown)
|
||||
if (version < _EmuClientCount)
|
||||
return version;
|
||||
|
||||
return EQClientUnknown;
|
||||
}
|
||||
|
||||
// inventory
|
||||
uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
// not all maps will have an instantiated container..some are references for queue generators (i.e., bazaar, mail, etc...)
|
||||
// a zero '0' indicates a needed value..otherwise, change to '_NOTUSED' for a null value so indices requiring research can be identified
|
||||
// ALL of these values need to be verified before pushing to live
|
||||
//
|
||||
// make sure that you transcribe the actual value from 'defaults' to here before updating or client crashes will ensue..and/or...
|
||||
// insert older clients inside of the progression of client order
|
||||
//
|
||||
// MAP_POSSESSIONS_SIZE does not reflect all actual <client>_constants size due to bitmask-use compatibility
|
||||
//
|
||||
// when setting NPC-based values, try to adhere to an EmuConstants::<property> or NOT_USED value to avoid unnecessary issues
|
||||
|
||||
static const uint16 local[_MapCount][_EmuClientCount] = {
|
||||
// server and database are sync'd to current MapPossessions's client as set in 'using namespace RoF::slots;' and
|
||||
// 'EmuConstants::MAP_POSSESSIONS_SIZE' - use/update EquipmentBitmask(), GeneralBitmask() and CursorBitmask()
|
||||
// for partial range validation checks and 'EmuConstants::MAP_POSSESSIONS_SIZE' for full range iterations
|
||||
{ // local[MainPossessions]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*Titanium*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*SoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*SoD*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*Merc*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*Bot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*Pet*/ EmuConstants::MAP_POSSESSIONS_SIZE
|
||||
},
|
||||
{ // local[MapBank]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ Client62::consts::MAP_BANK_SIZE,
|
||||
/*Titanium*/ Titanium::consts::MAP_BANK_SIZE,
|
||||
/*SoF*/ EmuConstants::MAP_BANK_SIZE,
|
||||
/*SoD*/ EmuConstants::MAP_BANK_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_BANK_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_BANK_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
/*Bot*/ NOT_USED,
|
||||
/*Pet*/ NOT_USED
|
||||
},
|
||||
{ // local[MapSharedBank]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
/*Titanium*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
/*SoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
/*SoD*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
/*Bot*/ NOT_USED,
|
||||
/*Pet*/ NOT_USED
|
||||
},
|
||||
{ // local[MapTrade]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
/*Titanium*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
/*SoF*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
/*SoD*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 4,
|
||||
/*Merc*/ 4,
|
||||
/*Bot*/ EmuConstants::MAP_TRADE_SIZE, // client thinks this is another client
|
||||
/*Pet*/ 4
|
||||
},
|
||||
{ // local[MapWorld]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
/*Titanium*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
/*SoF*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
/*SoD*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
/*Bot*/ NOT_USED,
|
||||
/*Pet*/ NOT_USED
|
||||
},
|
||||
{ // local[MapLimbo]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
/*Titanium*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
/*SoF*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
/*SoD*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
/*Bot*/ NOT_USED,
|
||||
/*Pet*/ NOT_USED
|
||||
},
|
||||
{ // local[MapTribute]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
/*Titanium*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
/*SoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
/*SoD*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapTrophyTribute]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapGuildTribute]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapMerchant]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_MERCHANT_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapDeleted]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_DELETED_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapCorpse]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ Client62::consts::MAP_CORPSE_SIZE,
|
||||
/*Titanium*/ Titanium::consts::MAP_CORPSE_SIZE,
|
||||
/*SoF*/ SoF::consts::MAP_CORPSE_SIZE,
|
||||
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
|
||||
/*Underfoot*/ Underfoot::consts::MAP_CORPSE_SIZE,
|
||||
/*RoF*/ RoF::consts::MAP_CORPSE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapBazaar]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
/*Titanium*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
/*SoF*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
/*SoD*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0, // this may need to be 'EmuConstants::MAP_BAZAAR_SIZE' if offline client traders respawn as an npc
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapInspect]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ Client62::consts::MAP_INSPECT_SIZE,
|
||||
/*Titanium*/ Titanium::consts::MAP_INSPECT_SIZE,
|
||||
/*SoF*/ SoF::consts::MAP_INSPECT_SIZE,
|
||||
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
|
||||
/*Underfoot*/ Underfoot::consts::MAP_INSPECT_SIZE,
|
||||
/*RoF*/ RoF::consts::MAP_INSPECT_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
/*Bot*/ NOT_USED,
|
||||
/*Pet*/ NOT_USED
|
||||
},
|
||||
{ // local[MapRealEstate]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapViewMODPC]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapViewMODBank]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapViewMODSharedBank]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapViewMODLimbo]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapAltStorage]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapArchived]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_ARCHIVED_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapMail]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_MAIL_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapGuildTrophyTribute]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapKrono]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ NOT_USED,
|
||||
/*Titanium*/ NOT_USED,
|
||||
/*SoF*/ NOT_USED,
|
||||
/*SoD*/ NOT_USED,
|
||||
/*Underfoot*/ NOT_USED,
|
||||
/*RoF*/ EmuConstants::MAP_KRONO_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
},
|
||||
{ // local[MapOther]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0,
|
||||
/*Titanium*/ 0,
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_OTHER_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
}
|
||||
};
|
||||
|
||||
if ((uint16)map < _MapCount)
|
||||
return local[map][ValidateMobVersion(version)];
|
||||
|
||||
return NOT_USED;
|
||||
}
|
||||
|
||||
uint64 EQLimits::PossessionsBitmask(uint32 version) {
|
||||
// these are for the new inventory system (RoF)..not the current (Ti) one...
|
||||
// 0x0000000000200000 is SlotPowerSource (SoF+)
|
||||
// 0x0000000080000000 is SlotGeneral9 (RoF+)
|
||||
// 0x0000000100000000 is SlotGeneral10 (RoF+)
|
||||
|
||||
static const uint64 local[_EmuClientCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0x000000027FDFFFFF,
|
||||
/*Titanium*/ 0x000000027FDFFFFF,
|
||||
/*SoF*/ 0x000000027FFFFFFF,
|
||||
/*SoD*/ 0x000000027FFFFFFF,
|
||||
/*Underfoot*/ 0x000000027FFFFFFF,
|
||||
/*RoF*/ 0x00000003FFFFFFFF,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
};
|
||||
|
||||
return NOT_USED;
|
||||
//return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
uint64 EQLimits::EquipmentBitmask(uint32 version) {
|
||||
static const uint64 local[_EmuClientCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0x00000000005FFFFF,
|
||||
/*Titanium*/ 0x00000000005FFFFF,
|
||||
/*SoF*/ 0x00000000007FFFFF,
|
||||
/*SoD*/ 0x00000000007FFFFF,
|
||||
/*Underfoot*/ 0x00000000007FFFFF,
|
||||
/*RoF*/ 0x00000000007FFFFF,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
};
|
||||
|
||||
return NOT_USED;
|
||||
//return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
uint64 EQLimits::GeneralBitmask(uint32 version) {
|
||||
static const uint64 local[_EmuClientCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0x000000007F800000,
|
||||
/*Titanium*/ 0x000000007F800000,
|
||||
/*SoF*/ 0x000000007F800000,
|
||||
/*SoD*/ 0x000000007F800000,
|
||||
/*Underfoot*/ 0x000000007F800000,
|
||||
/*RoF*/ 0x00000001FF800000,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
};
|
||||
|
||||
return NOT_USED;
|
||||
//return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
uint64 EQLimits::CursorBitmask(uint32 version) {
|
||||
static const uint64 local[_EmuClientCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0x0000000200000000,
|
||||
/*Titanium*/ 0x0000000200000000,
|
||||
/*SoF*/ 0x0000000200000000,
|
||||
/*SoD*/ 0x0000000200000000,
|
||||
/*Underfoot*/ 0x0000000200000000,
|
||||
/*RoF*/ 0x0000000200000000,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
};
|
||||
|
||||
return NOT_USED;
|
||||
//return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
|
||||
static const bool local[_EmuClientCount] = {
|
||||
/*Unknown*/ false,
|
||||
/*62*/ Client62::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*Titanium*/ Titanium::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*SoF*/ SoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*Underfoot*/ Underfoot::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*RoF*/ RoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*RoF2*/ false,
|
||||
|
||||
/*NPC*/ false,
|
||||
/*Merc*/ false,
|
||||
/*Bot*/ false,
|
||||
/*Pet*/ false
|
||||
};
|
||||
|
||||
return false; // not implemented
|
||||
//return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
// items
|
||||
uint16 EQLimits::ItemCommonSize(uint32 version) {
|
||||
static const uint16 local[_EmuClientCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*Titanium*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*SoF*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*SoD*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*Underfoot*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*RoF*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*Merc*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*Bot*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*Pet*/ EmuConstants::ITEM_COMMON_SIZE
|
||||
};
|
||||
|
||||
return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
uint16 EQLimits::ItemContainerSize(uint32 version) {
|
||||
static const uint16 local[_EmuClientCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*Titanium*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*SoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*SoD*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*Underfoot*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*RoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*Merc*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*Bot*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*Pet*/ EmuConstants::ITEM_CONTAINER_SIZE
|
||||
};
|
||||
|
||||
return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
bool EQLimits::CoinHasWeight(uint32 version) {
|
||||
static const bool local[_EmuClientCount] = {
|
||||
/*Unknown*/ true,
|
||||
/*62*/ Client62::limits::COIN_HAS_WEIGHT,
|
||||
/*Titanium*/ Titanium::limits::COIN_HAS_WEIGHT,
|
||||
/*SoF*/ SoF::limits::COIN_HAS_WEIGHT,
|
||||
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
|
||||
/*Underfoot*/ Underfoot::limits::COIN_HAS_WEIGHT,
|
||||
/*RoF*/ RoF::limits::COIN_HAS_WEIGHT,
|
||||
/*RoF2*/ true,
|
||||
|
||||
/*NPC*/ true,
|
||||
/*Merc*/ true,
|
||||
/*Bot*/ true,
|
||||
/*Pet*/ true
|
||||
};
|
||||
|
||||
return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
uint32 EQLimits::BandoliersCount(uint32 version) {
|
||||
static const uint32 local[_EmuClientCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
/*Titanium*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
/*SoF*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
/*SoD*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
/*Underfoot*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
/*RoF*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
/*Bot*/ NOT_USED,
|
||||
/*Pet*/ NOT_USED
|
||||
};
|
||||
|
||||
return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
uint32 EQLimits::BandolierSize(uint32 version) {
|
||||
static const uint32 local[_EmuClientCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::BANDOLIER_SIZE,
|
||||
/*Titanium*/ EmuConstants::BANDOLIER_SIZE,
|
||||
/*SoF*/ EmuConstants::BANDOLIER_SIZE,
|
||||
/*SoD*/ EmuConstants::BANDOLIER_SIZE,
|
||||
/*Underfoot*/ EmuConstants::BANDOLIER_SIZE,
|
||||
/*RoF*/ EmuConstants::BANDOLIER_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
/*Bot*/ NOT_USED,
|
||||
/*Pet*/ NOT_USED
|
||||
};
|
||||
|
||||
return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
uint32 EQLimits::PotionBeltSize(uint32 version) {
|
||||
static const uint32 local[_EmuClientCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::POTION_BELT_SIZE,
|
||||
/*Titanium*/ EmuConstants::POTION_BELT_SIZE,
|
||||
/*SoF*/ EmuConstants::POTION_BELT_SIZE,
|
||||
/*SoD*/ EmuConstants::POTION_BELT_SIZE,
|
||||
/*Underfoot*/ EmuConstants::POTION_BELT_SIZE,
|
||||
/*RoF*/ EmuConstants::POTION_BELT_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
/*Bot*/ NOT_USED,
|
||||
/*Pet*/ NOT_USED
|
||||
};
|
||||
|
||||
return local[ValidateMobVersion(version)];
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
/*
|
||||
EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef EQ_DICTIONARY_H
|
||||
#define EQ_DICTIONARY_H
|
||||
|
||||
#include "types.h"
|
||||
#include "eq_constants.h"
|
||||
#include "clientversions.h"
|
||||
#include <string>
|
||||
#include "../common/patches/Client62_constants.h"
|
||||
#include "../common/patches/Titanium_constants.h"
|
||||
#include "../common/patches/SoF_constants.h"
|
||||
#include "../common/patches/SoD_constants.h"
|
||||
#include "../common/patches/Underfoot_constants.h"
|
||||
#include "../common/patches/RoF_constants.h"
|
||||
//#include "../common/patches/RoF2_constants.h"
|
||||
|
||||
// *** DO NOT CHANGE without a full understanding of the consequences..the server is set up to use these settings explicitly!! ***
|
||||
// *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to them change are made!! ***
|
||||
|
||||
// Hard-coded values usually indicate that further research is needed and the values given are from the old (known) system
|
||||
|
||||
// (future use)
|
||||
//using namespace RoF2::maps; // server inventory maps enumeration (code and database sync'd to reference)
|
||||
//using namespace RoF::slots; // server possessions slots enumeration (code and database sync'd to reference)
|
||||
|
||||
class EmuConstants {
|
||||
// an immutable value is required to initialize arrays, etc... use this class as a repository for those
|
||||
public:
|
||||
// database
|
||||
static const EQClientVersion CHARACTER_CREATION_CLIENT = EQClientRoF; // adjust according to starting item placement and target client
|
||||
|
||||
// inventory
|
||||
static uint16 InventoryMapSize(int16 map);
|
||||
//static std::string InventoryLocationName(Location_Struct location);
|
||||
static std::string InventoryMapName(int16 map);
|
||||
static std::string InventoryMainName(int16 main);
|
||||
static std::string InventorySubName(int16 sub);
|
||||
static std::string InventoryAugName(int16 aug);
|
||||
|
||||
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
|
||||
static const uint16 MAP_POSSESSIONS_SIZE = _MainCount;
|
||||
static const uint16 MAP_BANK_SIZE = 24;
|
||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 MAP_TRADE_SIZE = 8;
|
||||
static const uint16 MAP_WORLD_SIZE = 10;
|
||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
||||
static const uint16 MAP_TRIBUTE_SIZE = 5; // (need client values)
|
||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
||||
static const uint16 MAP_DELETED_SIZE = 0;
|
||||
static const uint16 MAP_CORPSE_SIZE = _MainCount; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
|
||||
static const uint16 MAP_BAZAAR_SIZE = 80;
|
||||
static const uint16 MAP_INSPECT_SIZE = 22;
|
||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = NOT_USED;
|
||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = NOT_USED;
|
||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = NOT_USED;
|
||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = NOT_USED;
|
||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
||||
static const uint16 MAP_MAIL_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_KRONO_SIZE = 0;
|
||||
static const uint16 MAP_OTHER_SIZE = 0;
|
||||
|
||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
|
||||
static const int16 POSSESSIONS_BEGIN = MainCharm;
|
||||
static const int16 POSSESSIONS_END = MainCursor;
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = MainCharm;
|
||||
static const int16 EQUIPMENT_END = MainAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
|
||||
|
||||
static const int16 POWER_SOURCE = MainPowerSource; // temp
|
||||
|
||||
static const int16 GENERAL_BEGIN = MainGeneral1;
|
||||
static const int16 GENERAL_END = MainGeneral8;
|
||||
static const uint16 GENERAL_SIZE = 8;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 CURSOR = MainCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 331;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_NPC_END = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
static const int16 WORLD_SIZE = 10;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
static const int16 TRIBUTE_SIZE = 5;
|
||||
|
||||
static const int16 CORPSE_BEGIN = 22;
|
||||
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
|
||||
|
||||
static const int16 MATERIAL_BEGIN = MaterialHead;
|
||||
static const int16 MATERIAL_END = MaterialSecondary;
|
||||
static const int16 MATERIAL_SIZE = _MaterialCount;
|
||||
|
||||
static const int16 TINTABLE_BEGIN = MaterialHead;
|
||||
static const int16 TINTABLE_END = MaterialFeet;
|
||||
static const int16 TINTABLE_SIZE = 7;
|
||||
|
||||
// items
|
||||
// common and container sizes will not increase until the new 'location' struct is implemented
|
||||
static const uint16 ITEM_COMMON_SIZE = Underfoot::consts::ITEM_COMMON_SIZE;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = Underfoot::consts::ITEM_CONTAINER_SIZE;
|
||||
|
||||
// player profile
|
||||
//static const uint32 CLASS_BITMASK = 0; // needs value
|
||||
//static const uint32 RACE_BITMASK = 0; // needs value
|
||||
|
||||
// BANDOLIERS_COUNT sets maximum limit..active limit will need to be handled by the appropriate AA
|
||||
static const uint32 BANDOLIERS_COUNT = Titanium::consts::BANDOLIERS_COUNT; // count = number of bandolier instances
|
||||
static const uint32 BANDOLIER_SIZE = Titanium::consts::BANDOLIER_SIZE; // size = number of equipment slots in bandolier instance
|
||||
static const uint32 POTION_BELT_SIZE = Titanium::consts::POTION_BELT_SIZE;
|
||||
};
|
||||
|
||||
class EQLimits {
|
||||
// values should default to a non-beneficial value..unless value conflicts with intended operation
|
||||
//
|
||||
// EmuConstants may be used as references..but, not every reference needs to be in EmuConstants (i.e., AllowsEmptyBagInBag(), CoinHasWeight(), etc...)
|
||||
public:
|
||||
// client version validation (checks to avoid crashing zone server when accessing reference arrays)
|
||||
// use this inside of class Client (limits to actual clients)
|
||||
static bool IsValidClientVersion(uint32 version);
|
||||
static uint32 ValidateClientVersion(uint32 version);
|
||||
static EQClientVersion ValidateClientVersion(EQClientVersion version);
|
||||
|
||||
// basically..any non-client classes - do not when setting a valid client
|
||||
static bool IsValidNPCVersion(uint32 version);
|
||||
static uint32 ValidateNPCVersion(uint32 version);
|
||||
static EQClientVersion ValidateNPCVersion(EQClientVersion version);
|
||||
|
||||
// these are 'universal' - do not when setting a valid client
|
||||
static bool IsValidMobVersion(uint32 version);
|
||||
static uint32 ValidateMobVersion(uint32 version);
|
||||
static EQClientVersion ValidateMobVersion(EQClientVersion version);
|
||||
|
||||
// inventory
|
||||
static uint16 InventoryMapSize(int16 map, uint32 version);
|
||||
static uint64 PossessionsBitmask(uint32 version);
|
||||
static uint64 EquipmentBitmask(uint32 version);
|
||||
static uint64 GeneralBitmask(uint32 version);
|
||||
static uint64 CursorBitmask(uint32 version);
|
||||
|
||||
static bool AllowsEmptyBagInBag(uint32 version);
|
||||
|
||||
// items
|
||||
static uint16 ItemCommonSize(uint32 version);
|
||||
static uint16 ItemContainerSize(uint32 version);
|
||||
|
||||
// player profile
|
||||
static bool CoinHasWeight(uint32 version);
|
||||
|
||||
static uint32 BandoliersCount(uint32 version);
|
||||
static uint32 BandolierSize(uint32 version);
|
||||
|
||||
static uint32 PotionBeltSize(uint32 version);
|
||||
};
|
||||
|
||||
#endif /* EQ_LIMITS_H */
|
||||
+19
-12
@@ -32,7 +32,8 @@ static const uint32 MAX_MERC_GRADES = 10;
|
||||
static const uint32 MAX_MERC_STANCES = 10;
|
||||
static const uint32 BLOCKED_BUFF_COUNT = 20;
|
||||
|
||||
#include "eq_constants.h"
|
||||
//#include "eq_constants.h"
|
||||
#include "eq_dictionary.h"
|
||||
|
||||
/*
|
||||
** Compiler override to ensure
|
||||
@@ -720,12 +721,8 @@ struct Disciplines_Struct {
|
||||
uint32 values[MAX_PP_DISCIPLINES];
|
||||
};
|
||||
|
||||
static const uint32 TRIBUTE_SLOT_START = 400;
|
||||
static const uint32 MAX_PLAYER_TRIBUTES = 5;
|
||||
static const uint32 MAX_PLAYER_BANDOLIER = 4;
|
||||
static const uint32 MAX_PLAYER_BANDOLIER_ITEMS = 4;
|
||||
static const uint32 MAX_POTIONS_IN_BELT = 4;
|
||||
static const uint32 TRIBUTE_NONE = 0xFFFFFFFF;
|
||||
|
||||
struct Tribute_Struct {
|
||||
uint32 tribute;
|
||||
uint32 tier;
|
||||
@@ -747,10 +744,10 @@ enum { //bandolier item positions
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[32];
|
||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||
BandolierItem_Struct items[EmuConstants::BANDOLIER_SIZE];
|
||||
};
|
||||
struct PotionBelt_Struct {
|
||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
||||
BandolierItem_Struct items[EmuConstants::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
struct MovePotionToBelt_Struct {
|
||||
@@ -999,7 +996,7 @@ struct PlayerProfile_Struct
|
||||
/*7212*/ uint32 tribute_points;
|
||||
/*7216*/ uint32 unknown7252;
|
||||
/*7220*/ uint32 tribute_active; //1=active
|
||||
/*7224*/ Tribute_Struct tributes[MAX_PLAYER_TRIBUTES];
|
||||
/*7224*/ Tribute_Struct tributes[EmuConstants::TRIBUTE_SIZE];
|
||||
/*7264*/ Disciplines_Struct disciplines;
|
||||
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
|
||||
/*7744*/ char unknown7780[160];
|
||||
@@ -1026,7 +1023,7 @@ struct PlayerProfile_Struct
|
||||
/*12800*/ uint32 expAA;
|
||||
/*12804*/ uint32 aapoints; //avaliable, unspent
|
||||
/*12808*/ uint8 unknown12844[36];
|
||||
/*12844*/ Bandolier_Struct bandoliers[MAX_PLAYER_BANDOLIER];
|
||||
/*12844*/ Bandolier_Struct bandoliers[EmuConstants::BANDOLIERS_COUNT];
|
||||
/*14124*/ uint8 unknown14160[4506];
|
||||
/*18630*/ SuspendedMinion_Struct SuspendedMinion; // No longer in use
|
||||
/*19240*/ uint32 timeentitledonaccount;
|
||||
@@ -1469,6 +1466,16 @@ struct MoveItem_Struct
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
};
|
||||
|
||||
// both MoveItem_Struct/DeleteItem_Struct server structures will be changing to a structure-based slot format..this will
|
||||
// be used for handling SoF/SoD/etc... time stamps sent using the MoveItem_Struct format. (nothing will be done with this
|
||||
// info at the moment..but, it forwards it on to the server for handling/future use)
|
||||
struct ClientTimeStamp_Struct
|
||||
{
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
};
|
||||
|
||||
//
|
||||
// from_slot/to_slot
|
||||
// -1 - destroy
|
||||
@@ -3342,8 +3349,8 @@ struct SelectTributeReply_Struct {
|
||||
|
||||
struct TributeInfo_Struct {
|
||||
uint32 active; //0 == inactive, 1 == active
|
||||
uint32 tributes[MAX_PLAYER_TRIBUTES]; //-1 == NONE
|
||||
uint32 tiers[MAX_PLAYER_TRIBUTES]; //all 00's
|
||||
uint32 tributes[EmuConstants::TRIBUTE_SIZE]; //-1 == NONE
|
||||
uint32 tiers[EmuConstants::TRIBUTE_SIZE]; //all 00's
|
||||
uint32 tribute_master_id;
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
* Made ya look! Ha!
|
||||
*/
|
||||
|
||||
#include "eq_constants.h"
|
||||
//#include "eq_constants.h"
|
||||
#include "eq_dictionary.h"
|
||||
|
||||
/*
|
||||
** Child struct of Item_Struct:
|
||||
@@ -68,7 +69,8 @@ struct InternalSerializedItem_Struct {
|
||||
const void * inst;
|
||||
};
|
||||
|
||||
#define MAX_AUGMENT_SLOTS 5
|
||||
// use EmuConstants::ITEM_COMMON_SIZE
|
||||
//#define MAX_AUGMENT_SLOTS 5
|
||||
|
||||
struct Item_Struct {
|
||||
bool IsEquipable(uint16 Race, uint16 Class) const;
|
||||
@@ -180,9 +182,9 @@ struct Item_Struct {
|
||||
int32 FactionAmt4; // Faction Amt 4
|
||||
char CharmFile[32]; // ?
|
||||
uint32 AugType;
|
||||
uint8 AugSlotType[MAX_AUGMENT_SLOTS]; // LDoN: Augment Slot 1-5 Type
|
||||
uint8 AugSlotVisible[MAX_AUGMENT_SLOTS]; // LDoN: Augment Slot 1-5 Visible
|
||||
uint8 AugSlotUnk2[MAX_AUGMENT_SLOTS]; // LDoN: Augment Slot 1-5 Unknown
|
||||
uint8 AugSlotType[EmuConstants::ITEM_COMMON_SIZE]; // LDoN: Augment Slot 1-5 Type
|
||||
uint8 AugSlotVisible[EmuConstants::ITEM_COMMON_SIZE]; // LDoN: Augment Slot 1-5 Visible
|
||||
uint8 AugSlotUnk2[EmuConstants::ITEM_COMMON_SIZE]; // LDoN: Augment Slot 1-5 Unknown
|
||||
uint32 LDoNTheme;
|
||||
uint32 LDoNPrice;
|
||||
uint32 LDoNSold;
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
/*
|
||||
EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CLIENT62_CONSTANTS_H_
|
||||
#define CLIENT62_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
|
||||
namespace Client62 {
|
||||
namespace maps {
|
||||
typedef enum : int16 {
|
||||
// this needs work to match actual client equivilents
|
||||
MapPossessions = 0,
|
||||
MapBank,
|
||||
MapSharedBank,
|
||||
MapTrade,
|
||||
MapWorld,
|
||||
MapLimbo,
|
||||
MapTribute,
|
||||
MapTrophyTribute,
|
||||
MapGuildTribute,
|
||||
MapMerchant,
|
||||
MapDeleted,
|
||||
MapCorpse,
|
||||
MapBazaar,
|
||||
MapInspect,
|
||||
MapRealEstate,
|
||||
MapViewMODPC,
|
||||
MapViewMODBank,
|
||||
MapViewMODSharedBank,
|
||||
MapViewMODLimbo,
|
||||
MapAltStorage,
|
||||
MapArchived,
|
||||
MapMail,
|
||||
MapGuildTrophyTribute,
|
||||
MapOther,
|
||||
_MapCount
|
||||
} InventoryMaps;
|
||||
}
|
||||
|
||||
namespace slots {
|
||||
typedef enum : int16 {
|
||||
MainCharm = 0,
|
||||
MainEar1,
|
||||
MainHead,
|
||||
MainFace,
|
||||
MainEar2,
|
||||
MainNeck,
|
||||
MainShoulders,
|
||||
MainArms,
|
||||
MainBack,
|
||||
MainWrist1,
|
||||
MainWrist2,
|
||||
MainRange,
|
||||
MainHands,
|
||||
MainPrimary,
|
||||
MainSecondary,
|
||||
MainFinger1,
|
||||
MainFinger2,
|
||||
MainChest,
|
||||
MainLegs,
|
||||
MainFeet,
|
||||
MainWaist,
|
||||
MainAmmo,
|
||||
MainGeneral1,
|
||||
MainGeneral2,
|
||||
MainGeneral3,
|
||||
MainGeneral4,
|
||||
MainGeneral5,
|
||||
MainGeneral6,
|
||||
MainGeneral7,
|
||||
MainGeneral8,
|
||||
MainCursor,
|
||||
_MainCount,
|
||||
_MainEquipmentBegin = MainCharm,
|
||||
_MainEquipmentEnd = MainAmmo,
|
||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
||||
_MainGeneralBegin = MainGeneral1,
|
||||
_MainGeneralEnd = MainGeneral8,
|
||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
||||
} EquipmentSlots;
|
||||
}
|
||||
|
||||
namespace consts {
|
||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BANK_SIZE = 16;
|
||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 MAP_TRADE_SIZE = 8;
|
||||
static const uint16 MAP_WORLD_SIZE = 10;
|
||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
||||
static const uint16 MAP_DELETED_SIZE = 0;
|
||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BAZAAR_SIZE = 80;
|
||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
||||
static const uint16 MAP_MAIL_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 MAP_OTHER_SIZE = 0;
|
||||
|
||||
static const int16 POSSESSIONS_BEGIN = slots::MainCharm;
|
||||
static const int16 POSSESSIONS_END = slots::MainCursor;
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
||||
|
||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
||||
static const int16 GENERAL_END = slots::MainGeneral8;
|
||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 CURSOR = slots::MainCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 331;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2015;
|
||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 159;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_END_NPC = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
|
||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
||||
|
||||
static const uint32 BANDOLIERS_COUNT = 4; // count = number of bandolier instances
|
||||
static const uint32 BANDOLIER_SIZE = 4; // size = number of equipment slots in bandolier instance
|
||||
static const uint32 POTION_BELT_SIZE = 4;
|
||||
}
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = true;
|
||||
}
|
||||
|
||||
}; //end namespace Client62
|
||||
|
||||
#endif /*CLIENT62_CONSTANTS_H_*/
|
||||
|
||||
/*
|
||||
Client62 Notes:
|
||||
** Integer-based inventory **
|
||||
ok Possessions: 0 - 30 (Corpse: 22 - 52 [Offset 22])
|
||||
ok [Equipment: 0 - 21]
|
||||
ok [General: 22 - 29]
|
||||
ok [Cursor: 30]
|
||||
ok General Bags: 251 - 330
|
||||
ok Cursor Bags: 331 - 340
|
||||
|
||||
ok Bank: 2000 - 2015
|
||||
ok Bank Bags: 2031 - 2190
|
||||
|
||||
ok Shared Bank: 2500 - 2501
|
||||
ok Shared Bank Bags: 2531 - 2550
|
||||
|
||||
Trade: 3000 - 3007
|
||||
(Trade Bags: 3031 - 3110 -- server values)
|
||||
|
||||
World: 4000 - 4009
|
||||
|
||||
*/
|
||||
@@ -1200,11 +1200,11 @@ ENCODE(OP_PlayerProfile)
|
||||
|
||||
outapp->WriteUInt32(structs::MAX_PLAYER_BANDOLIER);
|
||||
|
||||
for(uint32 r = 0; r < MAX_PLAYER_BANDOLIER; r++)
|
||||
for(uint32 r = 0; r < EmuConstants::BANDOLIERS_COUNT; r++)
|
||||
{
|
||||
outapp->WriteString(emu->bandoliers[r].name);
|
||||
|
||||
for(uint32 j = 0; j < MAX_PLAYER_BANDOLIER_ITEMS; ++j)
|
||||
for(uint32 j = 0; j < EmuConstants::BANDOLIER_SIZE; ++j)
|
||||
{
|
||||
outapp->WriteString(emu->bandoliers[r].items[j].item_name);
|
||||
outapp->WriteUInt32(emu->bandoliers[r].items[j].item_id);
|
||||
@@ -1212,11 +1212,11 @@ ENCODE(OP_PlayerProfile)
|
||||
}
|
||||
}
|
||||
|
||||
for(uint32 r = 0; r < structs::MAX_PLAYER_BANDOLIER - MAX_PLAYER_BANDOLIER; r++)
|
||||
for(uint32 r = 0; r < structs::MAX_PLAYER_BANDOLIER - EmuConstants::BANDOLIERS_COUNT; r++)
|
||||
{
|
||||
outapp->WriteString("");
|
||||
|
||||
for(uint32 j = 0; j < MAX_PLAYER_BANDOLIER_ITEMS; ++j)
|
||||
for(uint32 j = 0; j < EmuConstants::BANDOLIER_SIZE; ++j)
|
||||
{
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -1227,7 +1227,7 @@ ENCODE(OP_PlayerProfile)
|
||||
|
||||
outapp->WriteUInt32(structs::MAX_POTIONS_IN_BELT);
|
||||
|
||||
for(uint32 r = 0; r < MAX_POTIONS_IN_BELT; r++)
|
||||
for(uint32 r = 0; r < EmuConstants::POTION_BELT_SIZE; r++)
|
||||
{
|
||||
outapp->WriteString(emu->potionbelt.items[r].item_name);
|
||||
outapp->WriteUInt32(emu->potionbelt.items[r].item_id);
|
||||
@@ -1235,7 +1235,7 @@ ENCODE(OP_PlayerProfile)
|
||||
}
|
||||
|
||||
|
||||
for(uint32 r = 0; r < structs::MAX_POTIONS_IN_BELT - MAX_POTIONS_IN_BELT; r++)
|
||||
for(uint32 r = 0; r < structs::MAX_POTIONS_IN_BELT - EmuConstants::POTION_BELT_SIZE; r++)
|
||||
{
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -1357,9 +1357,9 @@ ENCODE(OP_PlayerProfile)
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(MAX_PLAYER_TRIBUTES);
|
||||
outapp->WriteUInt32(EmuConstants::TRIBUTE_SIZE);
|
||||
|
||||
for(uint32 r = 0; r < MAX_PLAYER_TRIBUTES; r++)
|
||||
for(uint32 r = 0; r < EmuConstants::TRIBUTE_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->tributes[r].tribute);
|
||||
outapp->WriteUInt32(emu->tributes[r].tier);
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
/*
|
||||
EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef RoF_CONSTANTS_H_
|
||||
#define RoF_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
|
||||
namespace RoF {
|
||||
namespace maps {
|
||||
typedef enum : int16 {
|
||||
MapPossessions = 0,
|
||||
MapBank,
|
||||
MapSharedBank,
|
||||
MapTrade,
|
||||
MapWorld,
|
||||
MapLimbo,
|
||||
MapTribute,
|
||||
MapTrophyTribute,
|
||||
MapGuildTribute,
|
||||
MapMerchant,
|
||||
MapDeleted,
|
||||
MapCorpse,
|
||||
MapBazaar,
|
||||
MapInspect,
|
||||
MapRealEstate,
|
||||
MapViewMODPC,
|
||||
MapViewMODBank,
|
||||
MapViewMODSharedBank,
|
||||
MapViewMODLimbo,
|
||||
MapAltStorage,
|
||||
MapArchived,
|
||||
MapMail,
|
||||
MapGuildTrophyTribute,
|
||||
MapOther,
|
||||
_MapCount
|
||||
} InventoryMaps;
|
||||
}
|
||||
|
||||
namespace slots {
|
||||
typedef enum : int16 {
|
||||
MainCharm = 0,
|
||||
MainEar1,
|
||||
MainHead,
|
||||
MainFace,
|
||||
MainEar2,
|
||||
MainNeck,
|
||||
MainShoulders,
|
||||
MainArms,
|
||||
MainBack,
|
||||
MainWrist1,
|
||||
MainWrist2,
|
||||
MainRange,
|
||||
MainHands,
|
||||
MainPrimary,
|
||||
MainSecondary,
|
||||
MainFinger1,
|
||||
MainFinger2,
|
||||
MainChest,
|
||||
MainLegs,
|
||||
MainFeet,
|
||||
MainWaist,
|
||||
MainPowerSource,
|
||||
MainAmmo,
|
||||
MainGeneral1,
|
||||
MainGeneral2,
|
||||
MainGeneral3,
|
||||
MainGeneral4,
|
||||
MainGeneral5,
|
||||
MainGeneral6,
|
||||
MainGeneral7,
|
||||
MainGeneral8,
|
||||
MainGeneral9,
|
||||
MainGeneral10,
|
||||
MainCursor,
|
||||
_MainCount,
|
||||
_MainEquipmentBegin = MainCharm,
|
||||
_MainEquipmentEnd = MainAmmo,
|
||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
||||
_MainGeneralBegin = MainGeneral1,
|
||||
_MainGeneralEnd = MainGeneral10,
|
||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
||||
} EquipmentSlots;
|
||||
}
|
||||
|
||||
namespace consts {
|
||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BANK_SIZE = 24;
|
||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 MAP_TRADE_SIZE = 8;
|
||||
static const uint16 MAP_WORLD_SIZE = 10;
|
||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
||||
static const uint16 MAP_DELETED_SIZE = 0;
|
||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BAZAAR_SIZE = 200;
|
||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
||||
static const uint16 MAP_MAIL_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 MAP_OTHER_SIZE = 0;
|
||||
|
||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||
// (bag slots and main slots beyond Possessions are assigned for compatibility with current server coding)
|
||||
static const int16 POSSESSIONS_BEGIN = slots::MainCharm;
|
||||
static const int16 POSSESSIONS_END = slots::MainCursor;
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
||||
|
||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
||||
static const int16 GENERAL_END = slots::MainGeneral10;
|
||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 99;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 CURSOR = slots::MainCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 351;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_END_NPC = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
|
||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 6;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 255; // 255; (server max will be 255..unsure what actual client is - test)
|
||||
|
||||
static const uint32 BANDOLIERS_COUNT = 20; // count = number of bandolier instances
|
||||
static const uint32 BANDOLIER_SIZE = 4; // size = number of equipment slots in bandolier instance
|
||||
static const uint32 POTION_BELT_SIZE = 5;
|
||||
}
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = true;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
|
||||
}; //end namespace RoF
|
||||
|
||||
#endif /*RoF_CONSTANTS_H_*/
|
||||
|
||||
/*
|
||||
RoF Notes:
|
||||
** Structure-based inventory **
|
||||
ok Possessions: ( 0, { 0 .. 33 }, -1, -1 ) (Corpse: { 23 .. 56 } [Offset 23])
|
||||
ok [Equipment: ( 0, { 0 .. 22 }, -1, -1 )]
|
||||
ok [General: ( 0, { 23 .. 32 }, -1, -1 )]
|
||||
ok [Cursor: ( 0, 33, -1, -1 )]
|
||||
General Bags: ( 0, { 23 .. 32 }, { 0 .. (maxsize - 1) }, -1 )
|
||||
Cursor Bags: ( 0, 33, { 0 .. (maxsize - 1) }, -1 )
|
||||
|
||||
Bank: ( 1, { 0 .. 23 }, -1, -1 )
|
||||
Bank Bags: ( 1, { 0 .. 23 }, { 0 .. (maxsize - 1)}, -1 )
|
||||
|
||||
Shared Bank: ( 2, { 0 .. 1 }, -1, -1 )
|
||||
Shared Bank Bags: ( 2, { 0 .. 1 }, { 0 .. (maxsize - 1) }, -1 )
|
||||
|
||||
Trade: ( 3, { 0 .. 8 }, -1, -1 )
|
||||
(Trade Bags: 3031 - 3110 -- server values)
|
||||
|
||||
World: ( 4, { 0 .. 10 }, -1, -1 )
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,215 @@
|
||||
/*
|
||||
EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef SoD_CONSTANTS_H_
|
||||
#define SoD_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
|
||||
namespace SoD {
|
||||
namespace maps {
|
||||
typedef enum : int16 {
|
||||
// this needs work to match actual client equivilents
|
||||
MapPossessions = 0,
|
||||
MapBank,
|
||||
MapSharedBank,
|
||||
MapTrade,
|
||||
MapWorld,
|
||||
MapLimbo,
|
||||
MapTribute,
|
||||
MapTrophyTribute,
|
||||
MapGuildTribute,
|
||||
MapMerchant,
|
||||
MapDeleted,
|
||||
MapCorpse,
|
||||
MapBazaar,
|
||||
MapInspect,
|
||||
MapRealEstate,
|
||||
MapViewMODPC,
|
||||
MapViewMODBank,
|
||||
MapViewMODSharedBank,
|
||||
MapViewMODLimbo,
|
||||
MapAltStorage,
|
||||
MapArchived,
|
||||
MapMail,
|
||||
MapGuildTrophyTribute,
|
||||
MapOther,
|
||||
_MapCount
|
||||
} InventoryMaps;
|
||||
}
|
||||
|
||||
namespace slots {
|
||||
typedef enum : int16 {
|
||||
MainCharm = 0,
|
||||
MainEar1,
|
||||
MainHead,
|
||||
MainFace,
|
||||
MainEar2,
|
||||
MainNeck,
|
||||
MainShoulders,
|
||||
MainArms,
|
||||
MainBack,
|
||||
MainWrist1,
|
||||
MainWrist2,
|
||||
MainRange,
|
||||
MainHands,
|
||||
MainPrimary,
|
||||
MainSecondary,
|
||||
MainFinger1,
|
||||
MainFinger2,
|
||||
MainChest,
|
||||
MainLegs,
|
||||
MainFeet,
|
||||
MainWaist,
|
||||
MainPowerSource,
|
||||
MainAmmo,
|
||||
MainGeneral1,
|
||||
MainGeneral2,
|
||||
MainGeneral3,
|
||||
MainGeneral4,
|
||||
MainGeneral5,
|
||||
MainGeneral6,
|
||||
MainGeneral7,
|
||||
MainGeneral8,
|
||||
MainCursor,
|
||||
_MainCount,
|
||||
_MainEquipmentBegin = MainCharm,
|
||||
_MainEquipmentEnd = MainAmmo,
|
||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
||||
_MainGeneralBegin = MainGeneral1,
|
||||
_MainGeneralEnd = MainGeneral8,
|
||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
||||
} EquipmentSlots;
|
||||
}
|
||||
|
||||
namespace consts {
|
||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BANK_SIZE = 24;
|
||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 MAP_TRADE_SIZE = 8;
|
||||
static const uint16 MAP_WORLD_SIZE = 10;
|
||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
||||
static const uint16 MAP_DELETED_SIZE = 0;
|
||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BAZAAR_SIZE = 80;
|
||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
||||
static const uint16 MAP_MAIL_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 MAP_OTHER_SIZE = 0;
|
||||
|
||||
static const int16 POSSESSIONS_BEGIN = slots::MainCharm;
|
||||
static const int16 POSSESSIONS_END = slots::MainCursor;
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
||||
|
||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
||||
static const int16 GENERAL_END = slots::MainGeneral8;
|
||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 262;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 CURSOR = slots::MainCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 342;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2032;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2532;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_END_NPC = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031; // no change from Ti?
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
|
||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
||||
|
||||
static const uint32 BANDOLIERS_COUNT = 20; // count = number of bandolier instances
|
||||
static const uint32 BANDOLIER_SIZE = 4; // size = number of equipment slots in bandolier instance
|
||||
static const uint32 POTION_BELT_SIZE = 5;
|
||||
}
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
|
||||
}; //end namespace SoD
|
||||
|
||||
#endif /*SoD_CONSTANTS_H_*/
|
||||
|
||||
/*
|
||||
SoD Notes:
|
||||
** Integer-based inventory **
|
||||
ok Possessions: 0 - 31 (Corpse: 23 - 54 [Offset 23])
|
||||
ok [Equipment: 0 - 22]
|
||||
ok [General: 23 - 30]
|
||||
ok [Cursor: 31]
|
||||
ok General Bags: 262 - 341
|
||||
ok Cursor Bags: 342 - 351
|
||||
|
||||
ok Bank: 2000 - 2023
|
||||
ok Bank Bags: 2032 - 2271
|
||||
|
||||
ok Shared Bank: 2500 - 2501
|
||||
ok Shared Bank Bags: 2532 - 2551
|
||||
|
||||
Trade: 3000 - 3007
|
||||
(Trade Bags: 3031 - 3110 -- server values)
|
||||
|
||||
World: 4000 - 4009
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,218 @@
|
||||
/*
|
||||
EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef SoF_CONSTANTS_H_
|
||||
#define SoF_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
|
||||
namespace SoF {
|
||||
namespace maps {
|
||||
typedef enum : int16 {
|
||||
// this needs work to match actual client equivilents
|
||||
MapPossessions = 0,
|
||||
MapBank,
|
||||
MapSharedBank,
|
||||
MapTrade,
|
||||
MapWorld,
|
||||
MapLimbo,
|
||||
MapTribute,
|
||||
MapTrophyTribute,
|
||||
MapGuildTribute,
|
||||
MapMerchant,
|
||||
MapDeleted,
|
||||
MapCorpse,
|
||||
MapBazaar,
|
||||
MapInspect,
|
||||
MapRealEstate,
|
||||
MapViewMODPC,
|
||||
MapViewMODBank,
|
||||
MapViewMODSharedBank,
|
||||
MapViewMODLimbo,
|
||||
MapAltStorage,
|
||||
MapArchived,
|
||||
MapMail,
|
||||
MapGuildTrophyTribute,
|
||||
MapOther,
|
||||
_MapCount
|
||||
} InventoryMaps;
|
||||
}
|
||||
|
||||
namespace slots {
|
||||
typedef enum : int16 {
|
||||
MainCharm = 0,
|
||||
MainEar1,
|
||||
MainHead,
|
||||
MainFace,
|
||||
MainEar2,
|
||||
MainNeck,
|
||||
MainShoulders,
|
||||
MainArms,
|
||||
MainBack,
|
||||
MainWrist1,
|
||||
MainWrist2,
|
||||
MainRange,
|
||||
MainHands,
|
||||
MainPrimary,
|
||||
MainSecondary,
|
||||
MainFinger1,
|
||||
MainFinger2,
|
||||
MainChest,
|
||||
MainLegs,
|
||||
MainFeet,
|
||||
MainWaist,
|
||||
MainPowerSource,
|
||||
MainAmmo,
|
||||
MainGeneral1,
|
||||
MainGeneral2,
|
||||
MainGeneral3,
|
||||
MainGeneral4,
|
||||
MainGeneral5,
|
||||
MainGeneral6,
|
||||
MainGeneral7,
|
||||
MainGeneral8,
|
||||
MainCursor,
|
||||
_MainCount,
|
||||
_MainEquipmentBegin = MainCharm,
|
||||
_MainEquipmentEnd = MainAmmo,
|
||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
||||
_MainGeneralBegin = MainGeneral1,
|
||||
_MainGeneralEnd = MainGeneral8,
|
||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
||||
} EquipmentSlots;
|
||||
}
|
||||
|
||||
namespace consts {
|
||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BANK_SIZE = 24;
|
||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 MAP_TRADE_SIZE = 8;
|
||||
static const uint16 MAP_WORLD_SIZE = 10;
|
||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
||||
static const uint16 MAP_DELETED_SIZE = 0;
|
||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BAZAAR_SIZE = 80;
|
||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
||||
static const uint16 MAP_MAIL_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 MAP_OTHER_SIZE = 0;
|
||||
|
||||
static const int16 POSSESSIONS_BEGIN = slots::MainCharm;
|
||||
static const int16 POSSESSIONS_END = slots::MainCursor;
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
||||
|
||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
||||
static const int16 GENERAL_END = slots::MainGeneral8;
|
||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 262;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 CURSOR = slots::MainCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 342;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2032;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2532;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_END_NPC = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031; // no change from Ti?
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
|
||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
||||
|
||||
static const uint32 BANDOLIERS_COUNT = 20; // count = number of bandolier instances
|
||||
static const uint32 BANDOLIER_SIZE = 4; // size = number of equipment slots in bandolier instance
|
||||
static const uint32 POTION_BELT_SIZE = 5;
|
||||
}
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = true;
|
||||
}
|
||||
|
||||
}; //end namespace SoF
|
||||
|
||||
#endif /*SoF_CONSTANTS_H_*/
|
||||
|
||||
/*
|
||||
SoF Notes:
|
||||
** Integer-based inventory **
|
||||
ok Possessions: 0 - 31 (Corpse: 23 - 54 [Offset 23])
|
||||
ok [Equipment: 0 - 22]
|
||||
ok [General: 23 - 30]
|
||||
ok [Cursor: 31]
|
||||
ok General Bags: 262 - 341
|
||||
ok Cursor Bags: 342 - 351
|
||||
|
||||
ok Bank: 2000 - 2023
|
||||
ok Bank Bags: 2032 - 2271
|
||||
|
||||
ok Shared Bank: 2500 - 2501
|
||||
ok Shared Bank Bags: 2532 - 2551
|
||||
|
||||
Trade: 3000 - 3007
|
||||
(Trade Bags: 3031 - 3110 -- server values)
|
||||
|
||||
World: 4000 - 4009
|
||||
|
||||
code file reviewed..
|
||||
..SerializeItem() needs work
|
||||
..still needs timestamp redirect code
|
||||
*/
|
||||
@@ -0,0 +1,214 @@
|
||||
/*
|
||||
EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef Titanium_CONSTANTS_H_
|
||||
#define Titanium_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
|
||||
namespace Titanium {
|
||||
namespace maps {
|
||||
typedef enum : int16 {
|
||||
// this needs work to match actual client equivilents
|
||||
MapPossessions = 0,
|
||||
MapBank,
|
||||
MapSharedBank,
|
||||
MapTrade,
|
||||
MapWorld,
|
||||
MapLimbo,
|
||||
MapTribute,
|
||||
MapTrophyTribute,
|
||||
MapGuildTribute,
|
||||
MapMerchant,
|
||||
MapDeleted,
|
||||
MapCorpse,
|
||||
MapBazaar,
|
||||
MapInspect,
|
||||
MapRealEstate,
|
||||
MapViewMODPC,
|
||||
MapViewMODBank,
|
||||
MapViewMODSharedBank,
|
||||
MapViewMODLimbo,
|
||||
MapAltStorage,
|
||||
MapArchived,
|
||||
MapMail,
|
||||
MapGuildTrophyTribute,
|
||||
MapOther,
|
||||
_MapCount
|
||||
} InventoryMaps;
|
||||
}
|
||||
|
||||
namespace slots {
|
||||
typedef enum : int16 {
|
||||
MainCharm = 0,
|
||||
MainEar1,
|
||||
MainHead,
|
||||
MainFace,
|
||||
MainEar2,
|
||||
MainNeck,
|
||||
MainShoulders,
|
||||
MainArms,
|
||||
MainBack,
|
||||
MainWrist1,
|
||||
MainWrist2,
|
||||
MainRange,
|
||||
MainHands,
|
||||
MainPrimary,
|
||||
MainSecondary,
|
||||
MainFinger1,
|
||||
MainFinger2,
|
||||
MainChest,
|
||||
MainLegs,
|
||||
MainFeet,
|
||||
MainWaist,
|
||||
MainAmmo,
|
||||
MainGeneral1,
|
||||
MainGeneral2,
|
||||
MainGeneral3,
|
||||
MainGeneral4,
|
||||
MainGeneral5,
|
||||
MainGeneral6,
|
||||
MainGeneral7,
|
||||
MainGeneral8,
|
||||
MainCursor,
|
||||
_MainCount,
|
||||
_MainEquipmentBegin = MainCharm,
|
||||
_MainEquipmentEnd = MainAmmo,
|
||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
||||
_MainGeneralBegin = MainGeneral1,
|
||||
_MainGeneralEnd = MainGeneral8,
|
||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
||||
} EquipmentSlots;
|
||||
}
|
||||
|
||||
namespace consts {
|
||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BANK_SIZE = 16;
|
||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 MAP_TRADE_SIZE = 8;
|
||||
static const uint16 MAP_WORLD_SIZE = 10;
|
||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
||||
static const uint16 MAP_DELETED_SIZE = 0;
|
||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BAZAAR_SIZE = 80;
|
||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
||||
static const uint16 MAP_MAIL_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 MAP_OTHER_SIZE = 0;
|
||||
|
||||
static const int16 POSSESSIONS_BEGIN = slots::MainCharm;
|
||||
static const int16 POSSESSIONS_END = slots::MainCursor;
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
||||
|
||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
||||
static const int16 GENERAL_END = slots::MainGeneral8;
|
||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 CURSOR = slots::MainCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 331;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2015;
|
||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 159;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_END_NPC = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
|
||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
||||
|
||||
static const uint32 BANDOLIERS_COUNT = 4; // count = number of bandolier instances
|
||||
static const uint32 BANDOLIER_SIZE = 4; // size = number of equipment slots in bandolier instance
|
||||
static const uint32 POTION_BELT_SIZE = 4;
|
||||
}
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = true;
|
||||
}
|
||||
|
||||
}; //end namespace Titanium
|
||||
|
||||
#endif /*Titanium_CONSTANTS_H_*/
|
||||
|
||||
/*
|
||||
Titanium Notes:
|
||||
** Integer-based inventory **
|
||||
ok Possessions: 0 - 30 (Corpse: 22 - 52 [Offset 22])
|
||||
ok [Equipment: 0 - 21]
|
||||
ok [General: 22 - 29]
|
||||
ok [Cursor: 30]
|
||||
ok General Bags: 251 - 330
|
||||
ok Cursor Bags: 331 - 340
|
||||
|
||||
ok Bank: 2000 - 2015
|
||||
ok Bank Bags: 2031 - 2190
|
||||
|
||||
ok Shared Bank: 2500 - 2501
|
||||
ok Shared Bank Bags: 2531 - 2550
|
||||
|
||||
Trade: 3000 - 3007
|
||||
(Trade Bags: 3031 - 3110 -- server values)
|
||||
|
||||
World: 4000 - 4009
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,215 @@
|
||||
/*
|
||||
EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef Underfoot_CONSTANTS_H_
|
||||
#define Underfoot_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
|
||||
namespace Underfoot {
|
||||
namespace maps {
|
||||
typedef enum : int16 {
|
||||
// this needs work to match actual client equivilents
|
||||
MapPossessions = 0,
|
||||
MapBank,
|
||||
MapSharedBank,
|
||||
MapTrade,
|
||||
MapWorld,
|
||||
MapLimbo,
|
||||
MapTribute,
|
||||
MapTrophyTribute,
|
||||
MapGuildTribute,
|
||||
MapMerchant,
|
||||
MapDeleted,
|
||||
MapCorpse,
|
||||
MapBazaar,
|
||||
MapInspect,
|
||||
MapRealEstate,
|
||||
MapViewMODPC,
|
||||
MapViewMODBank,
|
||||
MapViewMODSharedBank,
|
||||
MapViewMODLimbo,
|
||||
MapAltStorage,
|
||||
MapArchived,
|
||||
MapMail,
|
||||
MapGuildTrophyTribute,
|
||||
MapOther,
|
||||
_MapCount
|
||||
} InventoryMaps;
|
||||
}
|
||||
|
||||
namespace slots {
|
||||
typedef enum : int16 {
|
||||
MainCharm = 0,
|
||||
MainEar1,
|
||||
MainHead,
|
||||
MainFace,
|
||||
MainEar2,
|
||||
MainNeck,
|
||||
MainShoulders,
|
||||
MainArms,
|
||||
MainBack,
|
||||
MainWrist1,
|
||||
MainWrist2,
|
||||
MainRange,
|
||||
MainHands,
|
||||
MainPrimary,
|
||||
MainSecondary,
|
||||
MainFinger1,
|
||||
MainFinger2,
|
||||
MainChest,
|
||||
MainLegs,
|
||||
MainFeet,
|
||||
MainWaist,
|
||||
MainPowerSource,
|
||||
MainAmmo,
|
||||
MainGeneral1,
|
||||
MainGeneral2,
|
||||
MainGeneral3,
|
||||
MainGeneral4,
|
||||
MainGeneral5,
|
||||
MainGeneral6,
|
||||
MainGeneral7,
|
||||
MainGeneral8,
|
||||
MainCursor,
|
||||
_MainCount,
|
||||
_MainEquipmentBegin = MainCharm,
|
||||
_MainEquipmentEnd = MainAmmo,
|
||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
||||
_MainGeneralBegin = MainGeneral1,
|
||||
_MainGeneralEnd = MainGeneral8,
|
||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
||||
} EquipmentSlots;
|
||||
}
|
||||
|
||||
namespace consts {
|
||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BANK_SIZE = 24;
|
||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 MAP_TRADE_SIZE = 8;
|
||||
static const uint16 MAP_WORLD_SIZE = 10;
|
||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
||||
static const uint16 MAP_DELETED_SIZE = 0;
|
||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BAZAAR_SIZE = 80;
|
||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
||||
static const uint16 MAP_MAIL_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 MAP_OTHER_SIZE = 0;
|
||||
|
||||
static const int16 POSSESSIONS_BEGIN = slots::MainCharm;
|
||||
static const int16 POSSESSIONS_END = slots::MainCursor;
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
||||
|
||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
||||
static const int16 GENERAL_END = slots::MainGeneral8;
|
||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 262;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 CURSOR = slots::MainCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 342;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2032;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2532;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_END_NPC = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031; // no change from Ti?
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
|
||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
||||
|
||||
static const uint32 BANDOLIERS_COUNT = 20; // count = number of bandolier instances
|
||||
static const uint32 BANDOLIER_SIZE = 4; // size = number of equipment slots in bandolier instance
|
||||
static const uint32 POTION_BELT_SIZE = 5;
|
||||
}
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
|
||||
}; //end namespace Underfoot
|
||||
|
||||
#endif /*Underfoot_CONSTANTS_H_*/
|
||||
|
||||
/*
|
||||
Underfoot Notes:
|
||||
** Integer-based inventory **
|
||||
ok Possessions: 0 - 31 (Corpse: 23 - 54 [Offset 23])
|
||||
ok [Equipment: 0 - 22]
|
||||
ok [General: 23 - 30]
|
||||
ok [Cursor: 31]
|
||||
ok General Bags: 262 - 341
|
||||
ok Cursor Bags: 342 - 351
|
||||
|
||||
ok Bank: 2000 - 2023
|
||||
ok Bank Bags: 2032 - 2271
|
||||
|
||||
ok Shared Bank: 2500 - 2501
|
||||
ok Shared Bank Bags: 2532 - 2551
|
||||
|
||||
Trade: 3000 - 3007
|
||||
(Trade Bags: 3031 - 3110 -- server values)
|
||||
|
||||
World: 4000 - 4009
|
||||
|
||||
*/
|
||||
@@ -5,7 +5,7 @@ if [ -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for ext in .cpp .h _ops.h _structs.h
|
||||
for ext in .cpp .h _ops.h _constants.h _structs.h
|
||||
do
|
||||
cp template$ext $1$ext
|
||||
perl -pi -e "s/TEMPLATE/$1/g" $1$ext
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "SoF.h"
|
||||
#include "SoD.h"
|
||||
#include "RoF.h"
|
||||
//#include "RoF2.h"
|
||||
|
||||
void RegisterAllPatches(EQStreamIdentifier &into) {
|
||||
Client62::Register(into);
|
||||
@@ -16,6 +17,7 @@ void RegisterAllPatches(EQStreamIdentifier &into) {
|
||||
SoD::Register(into);
|
||||
Underfoot::Register(into);
|
||||
RoF::Register(into);
|
||||
//RoF2::Register(into);
|
||||
}
|
||||
|
||||
void ReloadAllPatches() {
|
||||
@@ -25,4 +27,5 @@ void ReloadAllPatches() {
|
||||
SoD::Reload();
|
||||
Underfoot::Reload();
|
||||
RoF::Reload();
|
||||
//RoF2::Reload();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef TEMPLATE_CONSTANTS_H_
|
||||
#define TEMPLATE_CONSTANTS_H_
|
||||
|
||||
namespace TEMPLATE {
|
||||
|
||||
// put constants here and #include appropriately
|
||||
|
||||
}; //end namespace TEMPLATE
|
||||
|
||||
#endif /*TEMPLATE_CONSTANTS_H_*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -311,6 +311,19 @@ RULE_INT ( Spells, FRProjectileItem_NPC, 80684) // Item id for NPC Fire 'spell p
|
||||
RULE_BOOL ( Spells, UseLiveSpellProjectileGFX, false) // Use spell projectile graphics set in the spells_new table (player_1). Server must be using UF+ spell file.
|
||||
RULE_BOOL ( Spells, FocusCombatProcs, false) //Allow all combat procs to receive focus effects.
|
||||
RULE_BOOL ( Spells, PreNerfBardAEDoT, false) //Allow bard AOE dots to damage targets when moving.
|
||||
RULE_INT ( Spells, AI_SpellCastFinishedFailRecast, 800) // AI spell recast time(MS) when an spell is cast but fails (ie stunned).
|
||||
RULE_INT ( Spells, AI_EngagedNoSpellMinRecast, 500) // AI spell recast time(MS) check when no spell is cast while engaged. (min time in random)
|
||||
RULE_INT ( Spells, AI_EngagedNoSpellMaxRecast, 1000) // AI spell recast time(MS) check when no spell is cast engaged.(max time in random)
|
||||
RULE_INT ( Spells, AI_EngagedBeneficialSelfChance, 100) // Chance during first AI Cast check to do a beneficial spell on self.
|
||||
RULE_INT ( Spells, AI_EngagedBeneficialOtherChance, 25) // Chance during second AI Cast check to do a beneficial spell on others.
|
||||
RULE_INT ( Spells, AI_EngagedDetrimentalChance, 20) // Chance during third AI Cast check to do a determental spell on others.
|
||||
RULE_INT ( Spells, AI_PursueNoSpellMinRecast, 500) // AI spell recast time(MS) check when no spell is cast while chasing target. (min time in random)
|
||||
RULE_INT ( Spells, AI_PursueNoSpellMaxRecast, 2000) // AI spell recast time(MS) check when no spell is cast while chasing target. (max time in random)
|
||||
RULE_INT ( Spells, AI_PursueDetrimentalChance, 90) // Chance while chasing target to cast a detrimental spell.
|
||||
RULE_INT ( Spells, AI_IdleNoSpellMinRecast, 500) // AI spell recast time(MS) check when no spell is cast while idle. (min time in random)
|
||||
RULE_INT ( Spells, AI_IdleNoSpellMaxRecast, 2000) // AI spell recast time(MS) check when no spell is cast while chasing target. (max time in random)
|
||||
RULE_INT ( Spells, AI_IdleBeneficialChance, 100) // Chance while idle to do a beneficial spell on self or others.
|
||||
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY( Combat )
|
||||
@@ -345,6 +358,8 @@ RULE_REAL ( Combat, HitBonusPerLevel, 1.2) //You gain this % of hit for every le
|
||||
RULE_REAL ( Combat, WeaponSkillFalloff, 0.33) //For every weapon skill point that's not maxed you lose this % of hit
|
||||
RULE_REAL ( Combat, ArcheryHitPenalty, 0.25) //Archery has a hit penalty to try to help balance it with the plethora of long term +hit modifiers for it
|
||||
RULE_REAL ( Combat, AgiHitFactor, 0.01)
|
||||
RULE_REAL ( Combat, MinChancetoHit, 5.0) //Minimum % chance to hit with regular melee/ranged
|
||||
RULE_REAL ( Combat, MaxChancetoHit, 95.0) //Maximum % chance to hit with regular melee/ranged
|
||||
RULE_INT ( Combat, MinRangedAttackDist, 25) //Minimum Distance to use Ranged Attacks
|
||||
RULE_BOOL ( Combat, ArcheryBonusRequiresStationary, true) //does the 2x archery bonus chance require a stationary npc
|
||||
RULE_REAL ( Combat, ArcheryBaseDamageBonus, 1) // % Modifier to Base Archery Damage (.5 = 50% base damage, 1 = 100%, 2 = 200%)
|
||||
|
||||
+6
-6
@@ -439,7 +439,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory* inv, bool is_charid) {
|
||||
const Item_Struct* item = GetItem(item_id);
|
||||
|
||||
if (item) {
|
||||
int16 put_slot_id = SLOT_INVALID;
|
||||
int16 put_slot_id = INVALID_INDEX;
|
||||
|
||||
ItemInst* inst = CreateBaseItem(item, charges);
|
||||
if (item->ItemClass == ItemClassCommon) {
|
||||
@@ -479,7 +479,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory* inv, bool is_charid) {
|
||||
safe_delete(inst);
|
||||
|
||||
// Save ptr to item in inventory
|
||||
if (put_slot_id == SLOT_INVALID) {
|
||||
if (put_slot_id == INVALID_INDEX) {
|
||||
LogFile->write(EQEMuLog::Error,
|
||||
"Warning: Invalid slot_id for item in shared bank inventory: %s=%i, item_id=%i, slot_id=%i",
|
||||
((is_charid==true) ? "charid" : "acctid"), id, item_id, slot_id);
|
||||
@@ -535,7 +535,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
|
||||
const Item_Struct* item = GetItem(item_id);
|
||||
|
||||
if (item) {
|
||||
int16 put_slot_id = SLOT_INVALID;
|
||||
int16 put_slot_id = INVALID_INDEX;
|
||||
|
||||
ItemInst* inst = CreateBaseItem(item, charges);
|
||||
|
||||
@@ -589,7 +589,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
|
||||
safe_delete(inst);
|
||||
|
||||
// Save ptr to item in inventory
|
||||
if (put_slot_id == SLOT_INVALID) {
|
||||
if (put_slot_id == INVALID_INDEX) {
|
||||
LogFile->write(EQEMuLog::Error,
|
||||
"Warning: Invalid slot_id for item in inventory: charid=%i, item_id=%i, slot_id=%i",
|
||||
char_id, item_id, slot_id);
|
||||
@@ -641,7 +641,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char* name, Inventory* inv)
|
||||
aug[4] = (uint32)atoi(row[8]);
|
||||
bool instnodrop = (row[9] && (uint16)atoi(row[9])) ? true : false;
|
||||
const Item_Struct* item = GetItem(item_id);
|
||||
int16 put_slot_id = SLOT_INVALID;
|
||||
int16 put_slot_id = INVALID_INDEX;
|
||||
if(!item)
|
||||
continue;
|
||||
|
||||
@@ -692,7 +692,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char* name, Inventory* inv)
|
||||
safe_delete(inst);
|
||||
|
||||
// Save ptr to item in inventory
|
||||
if (put_slot_id == SLOT_INVALID) {
|
||||
if (put_slot_id == INVALID_INDEX) {
|
||||
LogFile->write(EQEMuLog::Error,
|
||||
"Warning: Invalid slot_id for item in inventory: name=%s, acctid=%i, item_id=%i, slot_id=%i",
|
||||
name, account_id, item_id, slot_id);
|
||||
|
||||
+3
-2
@@ -53,7 +53,8 @@ enum SkillUseTypes : uint32
|
||||
/*13879*/ SkillDivination,
|
||||
/*13880*/ SkillDodge,
|
||||
/*13881*/ SkillDoubleAttack,
|
||||
/*13882*/ SkillDragonPunch, /*13924 SkillTailRake*/
|
||||
/*13882*/ SkillDragonPunch,
|
||||
/*13924*/ SkillTailRake = SkillDragonPunch, // Iksar Monk equivilent
|
||||
/*13883*/ SkillDualWield,
|
||||
/*13884*/ SkillEagleStrike,
|
||||
/*13885*/ SkillEvocation,
|
||||
@@ -199,7 +200,7 @@ typedef enum {
|
||||
DIVINATION = 18,
|
||||
DODGE = 19,
|
||||
DOUBLE_ATTACK = 20,
|
||||
DRAGON_PUNCH = 21 , //aka Tail Rake
|
||||
DRAGON_PUNCH = 21, //aka Tail Rake
|
||||
DUAL_WIELD = 22,
|
||||
EAGLE_STRIKE = 23,
|
||||
EVOCATION = 24,
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
#ifdef EQEMU_USE_STDINT
|
||||
#include <stdint.h>
|
||||
typedef uint8_t byte;
|
||||
typedef uint8_t uint8;
|
||||
@@ -29,29 +28,6 @@ typedef int8_t int8;
|
||||
typedef int16_t int16;
|
||||
typedef int32_t int32;
|
||||
typedef int64_t int64;
|
||||
#else
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
typedef unsigned short uint16;
|
||||
typedef signed short int16;
|
||||
typedef unsigned int uint32;
|
||||
typedef signed int int32;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#if defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64
|
||||
typedef unsigned __int64 uint64;
|
||||
typedef unsigned __int64 uint64;
|
||||
typedef signed __int64 int64;
|
||||
#else
|
||||
#error __int64 not supported
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned long long uint64;
|
||||
typedef unsigned long long uint64;
|
||||
typedef signed long long int64;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#pragma warning( disable : 4200 )
|
||||
|
||||
Reference in New Issue
Block a user