mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore)
This commit is contained in:
+179
-179
@@ -45,7 +45,7 @@ namespace RoF
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type);
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 server_slot);
|
||||
@@ -65,8 +65,8 @@ namespace RoF
|
||||
// client to server say link converter
|
||||
static inline void RoFToServerSayLink(std::string& serverSayLink, const std::string& rofSayLink);
|
||||
|
||||
static inline spells::CastingSlot ServerToRoFCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot RoFToServerCastingSlot(spells::CastingSlot slot);
|
||||
static inline spells::CastingSlot ServerToRoFCastingSlot(EQ::spells::CastingSlot slot);
|
||||
static inline EQ::spells::CastingSlot RoFToServerCastingSlot(spells::CastingSlot slot);
|
||||
|
||||
static inline int ServerToRoFBuffSlot(int index);
|
||||
static inline int RoFToServerBuffSlot(int index);
|
||||
@@ -147,9 +147,9 @@ namespace RoF
|
||||
return(r);
|
||||
}
|
||||
|
||||
const EQEmu::versions::ClientVersion Strategy::ClientVersion() const
|
||||
const EQ::versions::ClientVersion Strategy::ClientVersion() const
|
||||
{
|
||||
return EQEmu::versions::ClientVersion::RoF;
|
||||
return EQ::versions::ClientVersion::RoF;
|
||||
}
|
||||
|
||||
#include "ss_define.h"
|
||||
@@ -193,7 +193,7 @@ namespace RoF
|
||||
|
||||
eq->unknown000 = 1;
|
||||
OUT(npcid);
|
||||
eq->inventory_slot = ServerToRoFTypelessSlot(emu->slot, EQEmu::invtype::typePossessions);
|
||||
eq->inventory_slot = ServerToRoFTypelessSlot(emu->slot, EQ::invtype::typePossessions);
|
||||
OUT(charges);
|
||||
OUT(sell_price);
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace RoF
|
||||
SETUP_DIRECT_ENCODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
||||
|
||||
OUT(merchant_entity_id);
|
||||
eq->inventory_slot = ServerToRoFTypelessSlot(emu->slot_id, EQEmu::invtype::typePossessions);
|
||||
eq->inventory_slot = ServerToRoFTypelessSlot(emu->slot_id, EQ::invtype::typePossessions);
|
||||
OUT(charges);
|
||||
OUT(cost);
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace RoF
|
||||
ENCODE_LENGTH_EXACT(ApplyPoison_Struct);
|
||||
SETUP_DIRECT_ENCODE(ApplyPoison_Struct, structs::ApplyPoison_Struct);
|
||||
|
||||
eq->inventory_slot = ServerToRoFTypelessSlot(emu->inventorySlot, EQEmu::invtype::typePossessions);
|
||||
eq->inventory_slot = ServerToRoFTypelessSlot(emu->inventorySlot, EQ::invtype::typePossessions);
|
||||
OUT(success);
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -502,7 +502,7 @@ namespace RoF
|
||||
ENCODE_LENGTH_EXACT(CastSpell_Struct);
|
||||
SETUP_DIRECT_ENCODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
eq->slot = static_cast<uint32>(ServerToRoFCastingSlot(static_cast<EQEmu::spells::CastingSlot>(emu->slot)));
|
||||
eq->slot = static_cast<uint32>(ServerToRoFCastingSlot(static_cast<EQ::spells::CastingSlot>(emu->slot)));
|
||||
|
||||
OUT(spell_id);
|
||||
eq->inventory_slot = ServerToRoFSlot(emu->inventoryslot);
|
||||
@@ -570,24 +570,24 @@ namespace RoF
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
int item_count = in->size / sizeof(EQEmu::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQEmu::InternalSerializedItem_Struct)) != 0) {
|
||||
int item_count = in->size / sizeof(EQ::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQ::InternalSerializedItem_Struct)) != 0) {
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Wrong size on outbound %s: Got %d, expected multiple of %d",
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQEmu::InternalSerializedItem_Struct));
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQ::InternalSerializedItem_Struct));
|
||||
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* eq = (EQEmu::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
EQ::InternalSerializedItem_Struct* eq = (EQ::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory);
|
||||
if (ob.tellp() == last_pos)
|
||||
LogNetcode("RoF::ENCODE(OP_CharInventory) Serialization failed on item slot [{}] during OP_CharInventory. Item skipped", eq->slot_id);
|
||||
|
||||
@@ -1513,14 +1513,14 @@ namespace RoF
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
ItemPacket_Struct* old_item_pkt = (ItemPacket_Struct*)__emu_buffer;
|
||||
EQEmu::InternalSerializedItem_Struct* int_struct = (EQEmu::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
||||
if (ob.tellp() == last_pos) {
|
||||
LogNetcode("RoF::ENCODE(OP_ItemPacket) Serialization failed on item slot [{}]", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -1957,7 +1957,7 @@ namespace RoF
|
||||
|
||||
outapp->WriteUInt32(22); // Equipment count
|
||||
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
for (int r = EQ::textures::textureBegin; r < EQ::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->item_material.Slot[r].Material);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -1977,9 +1977,9 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Equipment2 count
|
||||
outapp->WriteUInt32(EQ::textures::materialCount); // Equipment2 count
|
||||
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
for (int r = EQ::textures::textureBegin; r < EQ::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -1988,7 +1988,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint Count
|
||||
outapp->WriteUInt32(EQ::textures::materialCount); // Tint Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -1998,7 +1998,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint2 Count
|
||||
outapp->WriteUInt32(EQ::textures::materialCount); // Tint2 Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -2127,7 +2127,7 @@ namespace RoF
|
||||
|
||||
outapp->WriteUInt32(spells::SPELLBOOK_SIZE); // Spellbook slots
|
||||
|
||||
if (spells::SPELLBOOK_SIZE <= EQEmu::spells::SPELLBOOK_SIZE) {
|
||||
if (spells::SPELLBOOK_SIZE <= EQ::spells::SPELLBOOK_SIZE) {
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
outapp->WriteUInt32(emu->spell_book[r]);
|
||||
@@ -2136,33 +2136,33 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELLBOOK_SIZE; r++) {
|
||||
for (uint32 r = 0; r < EQ::spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
outapp->WriteUInt32(emu->spell_book[r]);
|
||||
else
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
// invalidate the rest of the spellbook slots
|
||||
for (uint32 r = EQEmu::spells::SPELLBOOK_SIZE; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
for (uint32 r = EQ::spells::SPELLBOOK_SIZE; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(spells::SPELL_GEM_COUNT); // Memorised spell slots
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELL_GEM_COUNT; r++) // first 12
|
||||
for (uint32 r = 0; r < EQ::spells::SPELL_GEM_COUNT; r++) // first 12
|
||||
{
|
||||
outapp->WriteUInt32(emu->mem_spells[r]);
|
||||
}
|
||||
// zeroes for the rest of the slots -- the other 4 which don't work at all!
|
||||
for (uint32 r = 0; r < spells::SPELL_GEM_COUNT - EQEmu::spells::SPELL_GEM_COUNT; r++)
|
||||
for (uint32 r = 0; r < spells::SPELL_GEM_COUNT - EQ::spells::SPELL_GEM_COUNT; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(13); // gem refresh count
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELL_GEM_COUNT; r++)
|
||||
for (uint32 r = 0; r < EQ::spells::SPELL_GEM_COUNT; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->spellSlotRefresh[r]); // spell gem refresh
|
||||
}
|
||||
@@ -2251,7 +2251,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(profile::BANDOLIERS_SIZE);
|
||||
|
||||
// Copy bandoliers where server and client indices converge
|
||||
for (uint32 r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQ::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
@@ -2266,7 +2266,7 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indices diverge, with a client bias
|
||||
for (uint32 r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = EQ::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
@@ -2278,7 +2278,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(profile::POTION_BELT_SIZE);
|
||||
|
||||
// Copy potion belt where server and client indices converge
|
||||
for (uint32 r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQ::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2290,7 +2290,7 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
// Nullify potion belt where server and client indices diverge, with a client bias
|
||||
for (uint32 r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (uint32 r = EQ::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -2412,9 +2412,9 @@ namespace RoF
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(EQEmu::invtype::TRIBUTE_SIZE);
|
||||
outapp->WriteUInt32(EQ::invtype::TRIBUTE_SIZE);
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++)
|
||||
for (uint32 r = 0; r < EQ::invtype::TRIBUTE_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->tributes[r].tribute);
|
||||
outapp->WriteUInt32(emu->tributes[r].tier);
|
||||
@@ -2949,7 +2949,7 @@ namespace RoF
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQ::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
@@ -3066,7 +3066,7 @@ namespace RoF
|
||||
SETUP_DIRECT_ENCODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct);
|
||||
|
||||
OUT(npcid);
|
||||
eq->inventory_slot = ServerToRoFTypelessSlot(emu->itemslot, EQEmu::invtype::typePossessions);
|
||||
eq->inventory_slot = ServerToRoFTypelessSlot(emu->itemslot, EQ::invtype::typePossessions);
|
||||
//OUT(itemslot);
|
||||
OUT(quantity);
|
||||
OUT(price);
|
||||
@@ -3980,7 +3980,7 @@ namespace RoF
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -3989,7 +3989,7 @@ namespace RoF
|
||||
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; k++) {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
@@ -3997,7 +3997,7 @@ namespace RoF
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Unknown2;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQ::textures::materialCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4714,7 +4714,7 @@ namespace RoF
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = EQEmu::invaug::SOCKET_BEGIN; r <= EQEmu::invaug::SOCKET_END; r++) {
|
||||
for (r = EQ::invaug::SOCKET_BEGIN; r <= EQ::invaug::SOCKET_END; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
IN(link_hash);
|
||||
@@ -4739,7 +4739,7 @@ namespace RoF
|
||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||
|
||||
for (unsigned int i = 0; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
for (unsigned int i = 0; i < EQ::spells::SPELL_GEM_COUNT; ++i)
|
||||
{
|
||||
if (eq->spell[i] == 0)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
@@ -5091,9 +5091,9 @@ namespace RoF
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
||||
{
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
RoF::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -5156,7 +5156,7 @@ namespace RoF
|
||||
uint32 hero_model = 0;
|
||||
|
||||
if (inst->GetOrnamentationIDFile()) {
|
||||
hero_model = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
|
||||
hero_model = inst->GetOrnamentHeroModel(EQ::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
|
||||
|
||||
char tmp[30];
|
||||
memset(tmp, 0x0, 30);
|
||||
@@ -5358,7 +5358,7 @@ namespace RoF
|
||||
|
||||
// Done to hack older clients to label expendable fishing poles as such
|
||||
// July 28th, 2018 patch
|
||||
if (item->ItemType == EQEmu::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
if (item->ItemType == EQ::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
itbs.expendablearrow = 1;
|
||||
}
|
||||
|
||||
@@ -5517,28 +5517,28 @@ namespace RoF
|
||||
|
||||
ob.write((const char*)&iqbs, sizeof(RoF::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
EQEmu::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
EQ::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
uint32 subitem_count = 0;
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
// moved outside of loop since it is not modified within that scope
|
||||
int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID;
|
||||
int16 SubSlotNumber = EQ::invbag::SLOT_INVALID;
|
||||
|
||||
if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in == EQEmu::invslot::slotCursor)
|
||||
SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
if (slot_id_in <= EQ::invslot::GENERAL_END && slot_id_in >= EQ::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQ::invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in == EQ::invslot::slotCursor)
|
||||
SubSlotNumber = EQ::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQ::invslot::BANK_END && slot_id_in >= EQ::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQ::invslot::SHARED_BANK_END && slot_id_in >= EQ::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::SHARED_BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now
|
||||
|
||||
if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (SubSlotNumber != EQ::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQ::invbag::SLOT_BEGIN; index <= EQ::invbag::SLOT_END; ++index) {
|
||||
EQ::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
@@ -5564,77 +5564,77 @@ namespace RoF
|
||||
RoFSlot.AugIndex = invaug::SOCKET_INVALID;
|
||||
RoFSlot.Unknown01 = INULL;
|
||||
|
||||
uint32 temp_slot = (uint32) EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 temp_slot = (uint32) EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (server_slot < EQEmu::invtype::POSSESSIONS_SIZE) {
|
||||
if (server_slot < EQ::invtype::POSSESSIONS_SIZE) {
|
||||
RoFSlot.Type = invtype::typePossessions;
|
||||
RoFSlot.Slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) {
|
||||
temp_slot = server_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::CURSOR_BAG_END && server_slot >= EQ::invbag::GENERAL_BAGS_BEGIN) {
|
||||
temp_slot = server_slot - EQ::invbag::GENERAL_BAGS_BEGIN;
|
||||
|
||||
RoFSlot.Type = invtype::typePossessions;
|
||||
RoFSlot.Slot = invslot::GENERAL_BEGIN + (temp_slot / EQEmu::invbag::SLOT_COUNT);
|
||||
RoFSlot.SubIndex = temp_slot - ((RoFSlot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
RoFSlot.Slot = invslot::GENERAL_BEGIN + (temp_slot / EQ::invbag::SLOT_COUNT);
|
||||
RoFSlot.SubIndex = temp_slot - ((RoFSlot.Slot - invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::TRIBUTE_END && server_slot >= EQEmu::invslot::TRIBUTE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::TRIBUTE_END && server_slot >= EQ::invslot::TRIBUTE_BEGIN) {
|
||||
RoFSlot.Type = invtype::typeTribute;
|
||||
RoFSlot.Slot = server_slot - EQEmu::invslot::TRIBUTE_BEGIN;
|
||||
RoFSlot.Slot = server_slot - EQ::invslot::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::GUILD_TRIBUTE_END && server_slot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::GUILD_TRIBUTE_END && server_slot >= EQ::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
RoFSlot.Type = invtype::typeGuildTribute;
|
||||
RoFSlot.Slot = server_slot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN;
|
||||
RoFSlot.Slot = server_slot - EQ::invslot::GUILD_TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
else if (server_slot == EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
RoFSlot.Type = invtype::typeWorld;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::BANK_END && server_slot >= EQ::invslot::BANK_BEGIN) {
|
||||
RoFSlot.Type = invtype::typeBank;
|
||||
RoFSlot.Slot = server_slot - EQEmu::invslot::BANK_BEGIN;
|
||||
RoFSlot.Slot = server_slot - EQ::invslot::BANK_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::BANK_BAGS_END && server_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||
temp_slot = server_slot - EQEmu::invbag::BANK_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::BANK_BAGS_END && server_slot >= EQ::invbag::BANK_BAGS_BEGIN) {
|
||||
temp_slot = server_slot - EQ::invbag::BANK_BAGS_BEGIN;
|
||||
|
||||
RoFSlot.Type = invtype::typeBank;
|
||||
RoFSlot.Slot = temp_slot / EQEmu::invbag::SLOT_COUNT;
|
||||
RoFSlot.SubIndex = temp_slot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT);
|
||||
RoFSlot.Slot = temp_slot / EQ::invbag::SLOT_COUNT;
|
||||
RoFSlot.SubIndex = temp_slot - (RoFSlot.Slot * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::SHARED_BANK_END && server_slot >= EQEmu::invslot::SHARED_BANK_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::SHARED_BANK_END && server_slot >= EQ::invslot::SHARED_BANK_BEGIN) {
|
||||
RoFSlot.Type = invtype::typeSharedBank;
|
||||
RoFSlot.Slot = server_slot - EQEmu::invslot::SHARED_BANK_BEGIN;
|
||||
RoFSlot.Slot = server_slot - EQ::invslot::SHARED_BANK_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::SHARED_BANK_BAGS_END && server_slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
temp_slot = server_slot - EQEmu::invbag::SHARED_BANK_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::SHARED_BANK_BAGS_END && server_slot >= EQ::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
temp_slot = server_slot - EQ::invbag::SHARED_BANK_BAGS_BEGIN;
|
||||
|
||||
RoFSlot.Type = invtype::typeSharedBank;
|
||||
RoFSlot.Slot = temp_slot / EQEmu::invbag::SLOT_COUNT;
|
||||
RoFSlot.SubIndex = temp_slot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT);
|
||||
RoFSlot.Slot = temp_slot / EQ::invbag::SLOT_COUNT;
|
||||
RoFSlot.SubIndex = temp_slot - (RoFSlot.Slot * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::TRADE_END && server_slot >= EQEmu::invslot::TRADE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::TRADE_END && server_slot >= EQ::invslot::TRADE_BEGIN) {
|
||||
RoFSlot.Type = invtype::typeTrade;
|
||||
RoFSlot.Slot = server_slot - EQEmu::invslot::TRADE_BEGIN;
|
||||
RoFSlot.Slot = server_slot - EQ::invslot::TRADE_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::TRADE_BAGS_END && server_slot >= EQEmu::invbag::TRADE_BAGS_BEGIN) {
|
||||
temp_slot = server_slot - EQEmu::invbag::TRADE_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::TRADE_BAGS_END && server_slot >= EQ::invbag::TRADE_BAGS_BEGIN) {
|
||||
temp_slot = server_slot - EQ::invbag::TRADE_BAGS_BEGIN;
|
||||
|
||||
RoFSlot.Type = invtype::typeTrade;
|
||||
RoFSlot.Slot = temp_slot / EQEmu::invbag::SLOT_COUNT;
|
||||
RoFSlot.SubIndex = temp_slot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT);
|
||||
RoFSlot.Slot = temp_slot / EQ::invbag::SLOT_COUNT;
|
||||
RoFSlot.SubIndex = temp_slot - (RoFSlot.Slot * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::WORLD_END && server_slot >= EQEmu::invslot::WORLD_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::WORLD_END && server_slot >= EQ::invslot::WORLD_BEGIN) {
|
||||
RoFSlot.Type = invtype::typeWorld;
|
||||
RoFSlot.Slot = server_slot - EQEmu::invslot::WORLD_BEGIN;
|
||||
RoFSlot.Slot = server_slot - EQ::invslot::WORLD_BEGIN;
|
||||
}
|
||||
|
||||
Log(Logs::Detail,
|
||||
@@ -5683,7 +5683,7 @@ namespace RoF
|
||||
{
|
||||
uint32 RoFSlot = invslot::SLOT_INVALID;
|
||||
|
||||
if (server_corpse_slot <= EQEmu::invslot::CORPSE_END && server_corpse_slot >= EQEmu::invslot::CORPSE_BEGIN) {
|
||||
if (server_corpse_slot <= EQ::invslot::CORPSE_END && server_corpse_slot >= EQ::invslot::CORPSE_BEGIN) {
|
||||
RoFSlot = server_corpse_slot;
|
||||
}
|
||||
|
||||
@@ -5700,18 +5700,18 @@ namespace RoF
|
||||
RoFSlot.AugIndex = invaug::SOCKET_INVALID;
|
||||
RoFSlot.Unknown01 = INULL;
|
||||
|
||||
uint32 TempSlot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 TempSlot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (server_type == EQEmu::invtype::typePossessions) {
|
||||
if (server_slot < EQEmu::invtype::POSSESSIONS_SIZE) {
|
||||
if (server_type == EQ::invtype::typePossessions) {
|
||||
if (server_slot < EQ::invtype::POSSESSIONS_SIZE) {
|
||||
RoFSlot.Slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::CURSOR_BAG_END && server_slot >= EQ::invbag::GENERAL_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQ::invbag::GENERAL_BAGS_BEGIN;
|
||||
|
||||
RoFSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT);
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
RoFSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQ::invbag::SLOT_COUNT);
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot - invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5732,12 +5732,12 @@ namespace RoF
|
||||
rof_slot.AugIndex,
|
||||
rof_slot.Unknown02,
|
||||
rof_slot.Unknown01,
|
||||
EQEmu::invslot::SLOT_INVALID);
|
||||
EQ::invslot::SLOT_INVALID);
|
||||
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
return EQ::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
uint32 temp_slot = invslot::SLOT_INVALID;
|
||||
|
||||
switch (rof_slot.Type) {
|
||||
@@ -5747,10 +5747,10 @@ namespace RoF
|
||||
server_slot = rof_slot.Slot;
|
||||
} else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) {
|
||||
if (rof_slot.Slot < invslot::GENERAL_BEGIN)
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
return EQ::invslot::SLOT_INVALID;
|
||||
|
||||
temp_slot = (rof_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::GENERAL_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
server_slot = EQ::invbag::GENERAL_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5759,10 +5759,10 @@ namespace RoF
|
||||
case invtype::typeBank: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::BANK_SIZE) {
|
||||
if (rof_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::BANK_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::BANK_BEGIN + rof_slot.Slot;
|
||||
} else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) {
|
||||
temp_slot = rof_slot.Slot * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
server_slot = EQ::invbag::BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5771,10 +5771,10 @@ namespace RoF
|
||||
case invtype::typeSharedBank: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::SHARED_BANK_SIZE) {
|
||||
if (rof_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::SHARED_BANK_BEGIN + rof_slot.Slot;
|
||||
} else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) {
|
||||
temp_slot = rof_slot.Slot * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
server_slot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5783,10 +5783,10 @@ namespace RoF
|
||||
case invtype::typeTrade: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::TRADE_SIZE) {
|
||||
if (rof_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::TRADE_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::TRADE_BEGIN + rof_slot.Slot;
|
||||
} else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) {
|
||||
temp_slot = rof_slot.Slot * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::TRADE_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
server_slot = EQ::invbag::TRADE_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5794,32 +5794,32 @@ namespace RoF
|
||||
}
|
||||
case invtype::typeWorld: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::WORLD_SIZE) {
|
||||
server_slot = EQEmu::invslot::WORLD_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::WORLD_BEGIN + rof_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof_slot.Slot == invslot::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||
server_slot = EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeLimbo: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::LIMBO_SIZE) {
|
||||
server_slot = EQEmu::invslot::slotCursor;
|
||||
server_slot = EQ::invslot::slotCursor;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeTribute: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::TRIBUTE_SIZE) {
|
||||
server_slot = EQEmu::invslot::TRIBUTE_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::TRIBUTE_BEGIN + rof_slot.Slot;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeGuildTribute: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
|
||||
server_slot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::GUILD_TRIBUTE_BEGIN + rof_slot.Slot;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -5853,10 +5853,10 @@ namespace RoF
|
||||
|
||||
static inline uint32 RoFToServerCorpseSlot(structs::InventorySlot_Struct rof_corpse_slot)
|
||||
{
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (rof_corpse_slot.Type != invtype::typeCorpse || rof_corpse_slot.SubIndex != invbag::SLOT_INVALID || rof_corpse_slot.AugIndex != invaug::SOCKET_INVALID) {
|
||||
server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
server_slot = EQ::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
else {
|
||||
@@ -5878,7 +5878,7 @@ namespace RoF
|
||||
}
|
||||
|
||||
static inline uint32 RoFToServerCorpseMainSlot(uint32 rof_corpse_slot) {
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (rof_corpse_slot <= invslot::CORPSE_END && rof_corpse_slot >= invslot::CORPSE_BEGIN) {
|
||||
server_slot = rof_corpse_slot;
|
||||
@@ -5904,12 +5904,12 @@ namespace RoF
|
||||
rof_slot.AugIndex,
|
||||
rof_type,
|
||||
rof_slot.Unknown01,
|
||||
EQEmu::invslot::SLOT_INVALID);
|
||||
EQ::invslot::SLOT_INVALID);
|
||||
|
||||
return (uint32) EQEmu::invslot::SLOT_INVALID;
|
||||
return (uint32) EQ::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
uint32 temp_slot = invslot::SLOT_INVALID;
|
||||
|
||||
switch (rof_type) {
|
||||
@@ -5919,10 +5919,10 @@ namespace RoF
|
||||
server_slot = rof_slot.Slot;
|
||||
} else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) {
|
||||
if (rof_slot.Slot < invslot::GENERAL_BEGIN)
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
return EQ::invslot::SLOT_INVALID;
|
||||
|
||||
temp_slot = (rof_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::GENERAL_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
server_slot = EQ::invbag::GENERAL_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5931,10 +5931,10 @@ namespace RoF
|
||||
case invtype::typeBank: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::BANK_SIZE) {
|
||||
if (rof_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::BANK_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::BANK_BEGIN + rof_slot.Slot;
|
||||
} else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) {
|
||||
temp_slot = rof_slot.Slot * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
server_slot = EQ::invbag::BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5943,10 +5943,10 @@ namespace RoF
|
||||
case invtype::typeSharedBank: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::SHARED_BANK_SIZE) {
|
||||
if (rof_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::SHARED_BANK_BEGIN + rof_slot.Slot;
|
||||
} else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) {
|
||||
temp_slot = rof_slot.Slot * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
server_slot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5955,10 +5955,10 @@ namespace RoF
|
||||
case invtype::typeTrade: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::TRADE_SIZE) {
|
||||
if (rof_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::TRADE_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::TRADE_BEGIN + rof_slot.Slot;
|
||||
} else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) {
|
||||
temp_slot = rof_slot.Slot * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::TRADE_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
server_slot = EQ::invbag::TRADE_BAGS_BEGIN + temp_slot + rof_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5966,32 +5966,32 @@ namespace RoF
|
||||
}
|
||||
case invtype::typeWorld: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::WORLD_SIZE) {
|
||||
server_slot = EQEmu::invslot::WORLD_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::WORLD_BEGIN + rof_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof_slot.Slot == invslot::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||
server_slot = EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeLimbo: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::LIMBO_SIZE) {
|
||||
server_slot = EQEmu::invslot::slotCursor;
|
||||
server_slot = EQ::invslot::slotCursor;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeTribute: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::TRIBUTE_SIZE) {
|
||||
server_slot = EQEmu::invslot::TRIBUTE_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::TRIBUTE_BEGIN + rof_slot.Slot;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeGuildTribute: {
|
||||
if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
|
||||
server_slot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof_slot.Slot;
|
||||
server_slot = EQ::invslot::GUILD_TRIBUTE_BEGIN + rof_slot.Slot;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -6024,7 +6024,7 @@ namespace RoF
|
||||
|
||||
static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQ::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
rofSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -6033,7 +6033,7 @@ namespace RoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
if (segments[segment_iter].length() <= EQ::constants::SAY_LINK_BODY_SIZE) {
|
||||
rofSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -6063,7 +6063,7 @@ namespace RoF
|
||||
|
||||
static inline void RoFToServerSayLink(std::string& serverSayLink, const std::string& rofSayLink)
|
||||
{
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rofSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQ::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rofSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = rofSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -6095,80 +6095,80 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
|
||||
static inline spells::CastingSlot ServerToRoFCastingSlot(EQEmu::spells::CastingSlot slot)
|
||||
static inline spells::CastingSlot ServerToRoFCastingSlot(EQ::spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
case EQ::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
case EQ::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
case EQ::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
case EQ::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
case EQ::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
case EQ::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
case EQ::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
case EQ::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
case EQ::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Gem10:
|
||||
case EQ::spells::CastingSlot::Gem10:
|
||||
return spells::CastingSlot::Gem10;
|
||||
case EQEmu::spells::CastingSlot::Gem11:
|
||||
case EQ::spells::CastingSlot::Gem11:
|
||||
return spells::CastingSlot::Gem11;
|
||||
case EQEmu::spells::CastingSlot::Gem12:
|
||||
case EQ::spells::CastingSlot::Gem12:
|
||||
return spells::CastingSlot::Gem12;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
case EQ::spells::CastingSlot::Item:
|
||||
case EQ::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
case EQ::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
case EQ::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::spells::CastingSlot RoFToServerCastingSlot(spells::CastingSlot slot)
|
||||
static inline EQ::spells::CastingSlot RoFToServerCastingSlot(spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
return EQ::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
return EQ::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
return EQ::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
return EQ::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
return EQ::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
return EQ::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
return EQ::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
return EQ::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
return EQ::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Gem10:
|
||||
return EQEmu::spells::CastingSlot::Gem10;
|
||||
return EQ::spells::CastingSlot::Gem10;
|
||||
case spells::CastingSlot::Gem11:
|
||||
return EQEmu::spells::CastingSlot::Gem11;
|
||||
return EQ::spells::CastingSlot::Gem11;
|
||||
case spells::CastingSlot::Gem12:
|
||||
return EQEmu::spells::CastingSlot::Gem12;
|
||||
return EQ::spells::CastingSlot::Gem12;
|
||||
case spells::CastingSlot::Discipline:
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
case spells::CastingSlot::Item:
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
return EQ::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
return EQ::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6177,12 +6177,12 @@ namespace RoF
|
||||
static inline int ServerToRoFBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
|
||||
if (index >= EQ::spells::LONG_BUFFS + EQ::spells::SHORT_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS - EQ::spells::SHORT_BUFFS +
|
||||
spells::LONG_BUFFS + spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= EQEmu::spells::LONG_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
if (index >= EQ::spells::LONG_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
@@ -6191,11 +6191,11 @@ namespace RoF
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
|
||||
EQEmu::spells::SHORT_BUFFS;
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQ::spells::LONG_BUFFS +
|
||||
EQ::spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= spells::LONG_BUFFS)
|
||||
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
|
||||
return index - spells::LONG_BUFFS + EQ::spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace RoF
|
||||
protected:
|
||||
|
||||
virtual std::string Describe() const;
|
||||
virtual const EQEmu::versions::ClientVersion ClientVersion() const;
|
||||
virtual const EQ::versions::ClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "ss_declare.h"
|
||||
|
||||
+179
-179
@@ -46,7 +46,7 @@ namespace RoF2
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type);
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 server_slot);
|
||||
@@ -66,8 +66,8 @@ namespace RoF2
|
||||
// client to server say link converter
|
||||
static inline void RoF2ToServerSayLink(std::string &server_saylink, const std::string &rof2_saylink);
|
||||
|
||||
static inline spells::CastingSlot ServerToRoF2CastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot RoF2ToServerCastingSlot(spells::CastingSlot slot);
|
||||
static inline spells::CastingSlot ServerToRoF2CastingSlot(EQ::spells::CastingSlot slot);
|
||||
static inline EQ::spells::CastingSlot RoF2ToServerCastingSlot(spells::CastingSlot slot);
|
||||
|
||||
static inline int ServerToRoF2BuffSlot(int index);
|
||||
static inline int RoF2ToServerBuffSlot(int index);
|
||||
@@ -151,9 +151,9 @@ namespace RoF2
|
||||
return(r);
|
||||
}
|
||||
|
||||
const EQEmu::versions::ClientVersion Strategy::ClientVersion() const
|
||||
const EQ::versions::ClientVersion Strategy::ClientVersion() const
|
||||
{
|
||||
return EQEmu::versions::ClientVersion::RoF2;
|
||||
return EQ::versions::ClientVersion::RoF2;
|
||||
}
|
||||
|
||||
#include "ss_define.h"
|
||||
@@ -263,7 +263,7 @@ namespace RoF2
|
||||
|
||||
eq->unknown000 = 1;
|
||||
OUT(npcid);
|
||||
eq->inventory_slot = ServerToRoF2TypelessSlot(emu->slot, EQEmu::invtype::typePossessions);
|
||||
eq->inventory_slot = ServerToRoF2TypelessSlot(emu->slot, EQ::invtype::typePossessions);
|
||||
OUT(charges);
|
||||
OUT(sell_price);
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace RoF2
|
||||
SETUP_DIRECT_ENCODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
||||
|
||||
OUT(merchant_entity_id);
|
||||
eq->inventory_slot = ServerToRoF2TypelessSlot(emu->slot_id, EQEmu::invtype::typePossessions);
|
||||
eq->inventory_slot = ServerToRoF2TypelessSlot(emu->slot_id, EQ::invtype::typePossessions);
|
||||
OUT(charges);
|
||||
OUT(cost);
|
||||
|
||||
@@ -340,7 +340,7 @@ namespace RoF2
|
||||
ENCODE_LENGTH_EXACT(ApplyPoison_Struct);
|
||||
SETUP_DIRECT_ENCODE(ApplyPoison_Struct, structs::ApplyPoison_Struct);
|
||||
|
||||
eq->inventorySlot = ServerToRoF2TypelessSlot(emu->inventorySlot, EQEmu::invtype::typePossessions);
|
||||
eq->inventorySlot = ServerToRoF2TypelessSlot(emu->inventorySlot, EQ::invtype::typePossessions);
|
||||
OUT(success);
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -571,7 +571,7 @@ namespace RoF2
|
||||
ENCODE_LENGTH_EXACT(CastSpell_Struct);
|
||||
SETUP_DIRECT_ENCODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
eq->slot = static_cast<uint32>(ServerToRoF2CastingSlot(static_cast<EQEmu::spells::CastingSlot>(emu->slot)));
|
||||
eq->slot = static_cast<uint32>(ServerToRoF2CastingSlot(static_cast<EQ::spells::CastingSlot>(emu->slot)));
|
||||
|
||||
OUT(spell_id);
|
||||
eq->inventory_slot = ServerToRoF2Slot(emu->inventoryslot);
|
||||
@@ -639,24 +639,24 @@ namespace RoF2
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
int item_count = in->size / sizeof(EQEmu::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQEmu::InternalSerializedItem_Struct)) != 0) {
|
||||
int item_count = in->size / sizeof(EQ::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQ::InternalSerializedItem_Struct)) != 0) {
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Wrong size on outbound %s: Got %d, expected multiple of %d",
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQEmu::InternalSerializedItem_Struct));
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQ::InternalSerializedItem_Struct));
|
||||
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* eq = (EQEmu::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
EQ::InternalSerializedItem_Struct* eq = (EQ::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory);
|
||||
if (ob.tellp() == last_pos)
|
||||
LogNetcode("RoF2::ENCODE(OP_CharInventory) Serialization failed on item slot [{}] during OP_CharInventory. Item skipped", eq->slot_id);
|
||||
|
||||
@@ -1562,14 +1562,14 @@ namespace RoF2
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
ItemPacket_Struct* old_item_pkt = (ItemPacket_Struct*)__emu_buffer;
|
||||
EQEmu::InternalSerializedItem_Struct* int_struct = (EQEmu::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
||||
if (ob.tellp() == last_pos) {
|
||||
LogNetcode("RoF2::ENCODE(OP_ItemPacket) Serialization failed on item slot [{}]", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -2014,7 +2014,7 @@ namespace RoF2
|
||||
|
||||
outapp->WriteUInt32(22); // Equipment count
|
||||
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
for (int r = EQ::textures::textureBegin; r < EQ::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->item_material.Slot[r].Material);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2034,9 +2034,9 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Equipment2 count
|
||||
outapp->WriteUInt32(EQ::textures::materialCount); // Equipment2 count
|
||||
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
for (int r = EQ::textures::textureBegin; r < EQ::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2045,7 +2045,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint Count
|
||||
outapp->WriteUInt32(EQ::textures::materialCount); // Tint Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -2055,7 +2055,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint2 Count
|
||||
outapp->WriteUInt32(EQ::textures::materialCount); // Tint2 Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -2184,7 +2184,7 @@ namespace RoF2
|
||||
|
||||
outapp->WriteUInt32(spells::SPELLBOOK_SIZE); // Spellbook slots
|
||||
|
||||
if (spells::SPELLBOOK_SIZE <= EQEmu::spells::SPELLBOOK_SIZE) {
|
||||
if (spells::SPELLBOOK_SIZE <= EQ::spells::SPELLBOOK_SIZE) {
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
outapp->WriteUInt32(emu->spell_book[r]);
|
||||
@@ -2193,33 +2193,33 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELLBOOK_SIZE; r++) {
|
||||
for (uint32 r = 0; r < EQ::spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
outapp->WriteUInt32(emu->spell_book[r]);
|
||||
else
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
// invalidate the rest of the spellbook slots
|
||||
for (uint32 r = EQEmu::spells::SPELLBOOK_SIZE; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
for (uint32 r = EQ::spells::SPELLBOOK_SIZE; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(spells::SPELL_GEM_COUNT); // Memorised spell slots
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELL_GEM_COUNT; r++) // write first 12
|
||||
for (uint32 r = 0; r < EQ::spells::SPELL_GEM_COUNT; r++) // write first 12
|
||||
{
|
||||
outapp->WriteUInt32(emu->mem_spells[r]);
|
||||
}
|
||||
// zeroes for the rest of the slots the other 4, which actually don't work on the client at all :D
|
||||
for (uint32 r = 0; r < spells::SPELL_GEM_COUNT - EQEmu::spells::SPELL_GEM_COUNT; r++)
|
||||
for (uint32 r = 0; r < spells::SPELL_GEM_COUNT - EQ::spells::SPELL_GEM_COUNT; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(13); // gem refresh counts
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELL_GEM_COUNT; r++)
|
||||
for (uint32 r = 0; r < EQ::spells::SPELL_GEM_COUNT; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->spellSlotRefresh[r]); // spell gem refresh
|
||||
}
|
||||
@@ -2308,7 +2308,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(profile::BANDOLIERS_SIZE);
|
||||
|
||||
// Copy bandoliers where server and client indices converge
|
||||
for (uint32 r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQ::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
@@ -2323,7 +2323,7 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indices diverge, with a client bias
|
||||
for (uint32 r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = EQ::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
@@ -2335,7 +2335,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(profile::POTION_BELT_SIZE);
|
||||
|
||||
// Copy potion belt where server and client indices converge
|
||||
for (uint32 r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQ::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2347,7 +2347,7 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
// Nullify potion belt where server and client indices diverge, with a client bias
|
||||
for (uint32 r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (uint32 r = EQ::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -2464,9 +2464,9 @@ namespace RoF2
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(EQEmu::invtype::TRIBUTE_SIZE);
|
||||
outapp->WriteUInt32(EQ::invtype::TRIBUTE_SIZE);
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++)
|
||||
for (uint32 r = 0; r < EQ::invtype::TRIBUTE_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->tributes[r].tribute);
|
||||
outapp->WriteUInt32(emu->tributes[r].tier);
|
||||
@@ -3015,7 +3015,7 @@ namespace RoF2
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQ::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
@@ -3114,7 +3114,7 @@ namespace RoF2
|
||||
SETUP_DIRECT_ENCODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct);
|
||||
|
||||
OUT(npcid);
|
||||
eq->inventory_slot = ServerToRoF2TypelessSlot(emu->itemslot, EQEmu::invtype::typePossessions);
|
||||
eq->inventory_slot = ServerToRoF2TypelessSlot(emu->itemslot, EQ::invtype::typePossessions);
|
||||
//OUT(itemslot);
|
||||
OUT(quantity);
|
||||
OUT(price);
|
||||
@@ -4183,7 +4183,7 @@ namespace RoF2
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -4192,7 +4192,7 @@ namespace RoF2
|
||||
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; k++) {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
@@ -4200,7 +4200,7 @@ namespace RoF2
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Unknown2;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQ::textures::materialCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4911,7 +4911,7 @@ namespace RoF2
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = EQEmu::invaug::SOCKET_BEGIN; r <= EQEmu::invaug::SOCKET_END; r++) {
|
||||
for (r = EQ::invaug::SOCKET_BEGIN; r <= EQ::invaug::SOCKET_END; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
IN(link_hash);
|
||||
@@ -4936,7 +4936,7 @@ namespace RoF2
|
||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||
|
||||
for (unsigned int i = 0; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
for (unsigned int i = 0; i < EQ::spells::SPELL_GEM_COUNT; ++i)
|
||||
{
|
||||
if (eq->spell[i] == 0)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
@@ -5346,9 +5346,9 @@ namespace RoF2
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
||||
{
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
RoF2::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -5411,7 +5411,7 @@ namespace RoF2
|
||||
uint32 hero_model = 0;
|
||||
|
||||
if (inst->GetOrnamentationIDFile()) {
|
||||
hero_model = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
|
||||
hero_model = inst->GetOrnamentHeroModel(EQ::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
|
||||
|
||||
char tmp[30];
|
||||
memset(tmp, 0x0, 30);
|
||||
@@ -5613,7 +5613,7 @@ namespace RoF2
|
||||
|
||||
// Done to hack older clients to label expendable fishing poles as such
|
||||
// July 28th, 2018 patch
|
||||
if (item->ItemType == EQEmu::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
if (item->ItemType == EQ::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
itbs.expendablearrow = 1;
|
||||
}
|
||||
|
||||
@@ -5782,28 +5782,28 @@ namespace RoF2
|
||||
|
||||
ob.write((const char*)&iqbs, sizeof(RoF2::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
EQEmu::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
EQ::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
uint32 subitem_count = 0;
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
// moved outside of loop since it is not modified within that scope
|
||||
int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID;
|
||||
int16 SubSlotNumber = EQ::invbag::SLOT_INVALID;
|
||||
|
||||
if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in == EQEmu::invslot::slotCursor)
|
||||
SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
if (slot_id_in <= EQ::invslot::GENERAL_END && slot_id_in >= EQ::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQ::invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in == EQ::invslot::slotCursor)
|
||||
SubSlotNumber = EQ::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQ::invslot::BANK_END && slot_id_in >= EQ::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQ::invslot::SHARED_BANK_END && slot_id_in >= EQ::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::SHARED_BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now
|
||||
|
||||
if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (SubSlotNumber != EQ::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQ::invbag::SLOT_BEGIN; index <= EQ::invbag::SLOT_END; ++index) {
|
||||
EQ::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
@@ -5828,77 +5828,77 @@ namespace RoF2
|
||||
RoF2Slot.AugIndex = invaug::SOCKET_INVALID;
|
||||
RoF2Slot.Unknown01 = INULL;
|
||||
|
||||
uint32 TempSlot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 TempSlot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (server_slot < EQEmu::invtype::POSSESSIONS_SIZE) {
|
||||
if (server_slot < EQ::invtype::POSSESSIONS_SIZE) {
|
||||
RoF2Slot.Type = invtype::typePossessions;
|
||||
RoF2Slot.Slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::CURSOR_BAG_END && server_slot >= EQ::invbag::GENERAL_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQ::invbag::GENERAL_BAGS_BEGIN;
|
||||
|
||||
RoF2Slot.Type = invtype::typePossessions;
|
||||
RoF2Slot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT);
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
RoF2Slot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQ::invbag::SLOT_COUNT);
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot - invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::TRIBUTE_END && server_slot >= EQEmu::invslot::TRIBUTE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::TRIBUTE_END && server_slot >= EQ::invslot::TRIBUTE_BEGIN) {
|
||||
RoF2Slot.Type = invtype::typeTribute;
|
||||
RoF2Slot.Slot = server_slot - EQEmu::invslot::TRIBUTE_BEGIN;
|
||||
RoF2Slot.Slot = server_slot - EQ::invslot::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::GUILD_TRIBUTE_END && server_slot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::GUILD_TRIBUTE_END && server_slot >= EQ::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
RoF2Slot.Type = invtype::typeGuildTribute;
|
||||
RoF2Slot.Slot = server_slot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN;
|
||||
RoF2Slot.Slot = server_slot - EQ::invslot::GUILD_TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
else if (server_slot == EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
RoF2Slot.Type = invtype::typeWorld;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::BANK_END && server_slot >= EQ::invslot::BANK_BEGIN) {
|
||||
RoF2Slot.Type = invtype::typeBank;
|
||||
RoF2Slot.Slot = server_slot - EQEmu::invslot::BANK_BEGIN;
|
||||
RoF2Slot.Slot = server_slot - EQ::invslot::BANK_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::BANK_BAGS_END && server_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQEmu::invbag::BANK_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::BANK_BAGS_END && server_slot >= EQ::invbag::BANK_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQ::invbag::BANK_BAGS_BEGIN;
|
||||
|
||||
RoF2Slot.Type = invtype::typeBank;
|
||||
RoF2Slot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT;
|
||||
RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQEmu::invbag::SLOT_COUNT);
|
||||
RoF2Slot.Slot = TempSlot / EQ::invbag::SLOT_COUNT;
|
||||
RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::SHARED_BANK_END && server_slot >= EQEmu::invslot::SHARED_BANK_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::SHARED_BANK_END && server_slot >= EQ::invslot::SHARED_BANK_BEGIN) {
|
||||
RoF2Slot.Type = invtype::typeSharedBank;
|
||||
RoF2Slot.Slot = server_slot - EQEmu::invslot::SHARED_BANK_BEGIN;
|
||||
RoF2Slot.Slot = server_slot - EQ::invslot::SHARED_BANK_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::SHARED_BANK_BAGS_END && server_slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQEmu::invbag::SHARED_BANK_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::SHARED_BANK_BAGS_END && server_slot >= EQ::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQ::invbag::SHARED_BANK_BAGS_BEGIN;
|
||||
|
||||
RoF2Slot.Type = invtype::typeSharedBank;
|
||||
RoF2Slot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT;
|
||||
RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQEmu::invbag::SLOT_COUNT);
|
||||
RoF2Slot.Slot = TempSlot / EQ::invbag::SLOT_COUNT;
|
||||
RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::TRADE_END && server_slot >= EQEmu::invslot::TRADE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::TRADE_END && server_slot >= EQ::invslot::TRADE_BEGIN) {
|
||||
RoF2Slot.Type = invtype::typeTrade;
|
||||
RoF2Slot.Slot = server_slot - EQEmu::invslot::TRADE_BEGIN;
|
||||
RoF2Slot.Slot = server_slot - EQ::invslot::TRADE_BEGIN;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::TRADE_BAGS_END && server_slot >= EQEmu::invbag::TRADE_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQEmu::invbag::TRADE_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::TRADE_BAGS_END && server_slot >= EQ::invbag::TRADE_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQ::invbag::TRADE_BAGS_BEGIN;
|
||||
|
||||
RoF2Slot.Type = invtype::typeTrade;
|
||||
RoF2Slot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT;
|
||||
RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQEmu::invbag::SLOT_COUNT);
|
||||
RoF2Slot.Slot = TempSlot / EQ::invbag::SLOT_COUNT;
|
||||
RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::WORLD_END && server_slot >= EQEmu::invslot::WORLD_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::WORLD_END && server_slot >= EQ::invslot::WORLD_BEGIN) {
|
||||
RoF2Slot.Type = invtype::typeWorld;
|
||||
RoF2Slot.Slot = server_slot - EQEmu::invslot::WORLD_BEGIN;
|
||||
RoF2Slot.Slot = server_slot - EQ::invslot::WORLD_BEGIN;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)",
|
||||
@@ -5930,7 +5930,7 @@ namespace RoF2
|
||||
{
|
||||
uint32 RoF2Slot = invslot::SLOT_INVALID;
|
||||
|
||||
if (server_corpse_slot <= EQEmu::invslot::CORPSE_END && server_corpse_slot >= EQEmu::invslot::CORPSE_BEGIN) {
|
||||
if (server_corpse_slot <= EQ::invslot::CORPSE_END && server_corpse_slot >= EQ::invslot::CORPSE_BEGIN) {
|
||||
RoF2Slot = server_corpse_slot;
|
||||
}
|
||||
|
||||
@@ -5947,18 +5947,18 @@ namespace RoF2
|
||||
RoF2Slot.AugIndex = invaug::SOCKET_INVALID;
|
||||
RoF2Slot.Unknown01 = INULL;
|
||||
|
||||
uint32 TempSlot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 TempSlot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (server_type == EQEmu::invtype::typePossessions) {
|
||||
if (server_slot < EQEmu::invtype::POSSESSIONS_SIZE) {
|
||||
if (server_type == EQ::invtype::typePossessions) {
|
||||
if (server_slot < EQ::invtype::POSSESSIONS_SIZE) {
|
||||
RoF2Slot.Slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN;
|
||||
else if (server_slot <= EQ::invbag::CURSOR_BAG_END && server_slot >= EQ::invbag::GENERAL_BAGS_BEGIN) {
|
||||
TempSlot = server_slot - EQ::invbag::GENERAL_BAGS_BEGIN;
|
||||
|
||||
RoF2Slot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT);
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
RoF2Slot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQ::invbag::SLOT_COUNT);
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot - invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5972,12 +5972,12 @@ namespace RoF2
|
||||
{
|
||||
if (rof2_slot.AugIndex < invaug::SOCKET_INVALID || rof2_slot.AugIndex >= invaug::SOCKET_COUNT) {
|
||||
Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i",
|
||||
rof2_slot.Type, rof2_slot.Slot, rof2_slot.SubIndex, rof2_slot.AugIndex, rof2_slot.Unknown02, rof2_slot.Unknown01, EQEmu::invslot::SLOT_INVALID);
|
||||
rof2_slot.Type, rof2_slot.Slot, rof2_slot.SubIndex, rof2_slot.AugIndex, rof2_slot.Unknown02, rof2_slot.Unknown01, EQ::invslot::SLOT_INVALID);
|
||||
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
return EQ::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
uint32 temp_slot = invslot::SLOT_INVALID;
|
||||
|
||||
switch (rof2_slot.Type) {
|
||||
@@ -5989,10 +5989,10 @@ namespace RoF2
|
||||
|
||||
else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) {
|
||||
if (rof2_slot.Slot < invslot::GENERAL_BEGIN)
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
return EQ::invslot::SLOT_INVALID;
|
||||
|
||||
temp_slot = (rof2_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::GENERAL_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex;
|
||||
server_slot = EQ::invbag::GENERAL_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6001,12 +6001,12 @@ namespace RoF2
|
||||
case invtype::typeBank: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::BANK_SIZE) {
|
||||
if (rof2_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::BANK_BEGIN + rof2_slot.Slot;
|
||||
server_slot = EQ::invslot::BANK_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) {
|
||||
temp_slot = rof2_slot.Slot * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::BANK_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex;
|
||||
server_slot = EQ::invbag::BANK_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6015,12 +6015,12 @@ namespace RoF2
|
||||
case invtype::typeSharedBank: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::SHARED_BANK_SIZE) {
|
||||
if (rof2_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot;
|
||||
server_slot = EQ::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) {
|
||||
temp_slot = rof2_slot.Slot * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex;
|
||||
server_slot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6029,12 +6029,12 @@ namespace RoF2
|
||||
case invtype::typeTrade: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::TRADE_SIZE) {
|
||||
if (rof2_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::TRADE_BEGIN + rof2_slot.Slot;
|
||||
server_slot = EQ::invslot::TRADE_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) {
|
||||
temp_slot = rof2_slot.Slot * invbag::SLOT_COUNT;
|
||||
server_slot = EQEmu::invbag::TRADE_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex;
|
||||
server_slot = EQ::invbag::TRADE_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6042,32 +6042,32 @@ namespace RoF2
|
||||
}
|
||||
case invtype::typeWorld: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::WORLD_SIZE) {
|
||||
server_slot = EQEmu::invslot::WORLD_BEGIN + rof2_slot.Slot;
|
||||
server_slot = EQ::invslot::WORLD_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof2_slot.Slot == invslot::SLOT_INVALID) {
|
||||
server_slot = EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||
server_slot = EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeLimbo: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::LIMBO_SIZE) {
|
||||
server_slot = EQEmu::invslot::slotCursor;
|
||||
server_slot = EQ::invslot::slotCursor;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeTribute: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::TRIBUTE_SIZE) {
|
||||
server_slot = EQEmu::invslot::TRIBUTE_BEGIN + rof2_slot.Slot;
|
||||
server_slot = EQ::invslot::TRIBUTE_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeGuildTribute: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
|
||||
server_slot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof2_slot.Slot;
|
||||
server_slot = EQ::invslot::GUILD_TRIBUTE_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -6093,10 +6093,10 @@ namespace RoF2
|
||||
|
||||
static inline uint32 RoF2ToServerCorpseSlot(structs::InventorySlot_Struct rof2_corpse_slot)
|
||||
{
|
||||
uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (rof2_corpse_slot.Type != invtype::typeCorpse || rof2_corpse_slot.SubIndex != invbag::SLOT_INVALID || rof2_corpse_slot.AugIndex != invaug::SOCKET_INVALID) {
|
||||
ServerSlot = EQEmu::invslot::SLOT_INVALID;
|
||||
ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
else {
|
||||
@@ -6111,7 +6111,7 @@ namespace RoF2
|
||||
|
||||
static inline uint32 RoF2ToServerCorpseMainSlot(uint32 rof2_corpse_slot)
|
||||
{
|
||||
uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (rof2_corpse_slot <= invslot::CORPSE_END && rof2_corpse_slot >= invslot::CORPSE_BEGIN) {
|
||||
ServerSlot = rof2_corpse_slot;
|
||||
@@ -6126,12 +6126,12 @@ namespace RoF2
|
||||
{
|
||||
if (rof2_slot.AugIndex < invaug::SOCKET_INVALID || rof2_slot.AugIndex >= invaug::SOCKET_COUNT) {
|
||||
Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i",
|
||||
rof2_slot.Slot, rof2_slot.SubIndex, rof2_slot.AugIndex, rof2_type, rof2_slot.Unknown01, EQEmu::invslot::SLOT_INVALID);
|
||||
rof2_slot.Slot, rof2_slot.SubIndex, rof2_slot.AugIndex, rof2_type, rof2_slot.Unknown01, EQ::invslot::SLOT_INVALID);
|
||||
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
return EQ::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||
uint32 TempSlot = invslot::SLOT_INVALID;
|
||||
|
||||
switch (rof2_type) {
|
||||
@@ -6143,10 +6143,10 @@ namespace RoF2
|
||||
|
||||
else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) {
|
||||
if (rof2_slot.Slot < invslot::GENERAL_BEGIN)
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
return EQ::invslot::SLOT_INVALID;
|
||||
|
||||
TempSlot = (rof2_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
|
||||
ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex;
|
||||
ServerSlot = EQ::invbag::GENERAL_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6155,12 +6155,12 @@ namespace RoF2
|
||||
case invtype::typeBank: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::BANK_SIZE) {
|
||||
if (rof2_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
ServerSlot = EQEmu::invslot::BANK_BEGIN + rof2_slot.Slot;
|
||||
ServerSlot = EQ::invslot::BANK_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) {
|
||||
TempSlot = rof2_slot.Slot * invbag::SLOT_COUNT;
|
||||
ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex;
|
||||
ServerSlot = EQ::invbag::BANK_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6169,12 +6169,12 @@ namespace RoF2
|
||||
case invtype::typeSharedBank: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::SHARED_BANK_SIZE) {
|
||||
if (rof2_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot;
|
||||
ServerSlot = EQ::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) {
|
||||
TempSlot = rof2_slot.Slot * invbag::SLOT_COUNT;
|
||||
ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex;
|
||||
ServerSlot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6183,12 +6183,12 @@ namespace RoF2
|
||||
case invtype::typeTrade: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::TRADE_SIZE) {
|
||||
if (rof2_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||
ServerSlot = EQEmu::invslot::TRADE_BEGIN + rof2_slot.Slot;
|
||||
ServerSlot = EQ::invslot::TRADE_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) {
|
||||
TempSlot = rof2_slot.Slot * invbag::SLOT_COUNT;
|
||||
ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex;
|
||||
ServerSlot = EQ::invbag::TRADE_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6196,32 +6196,32 @@ namespace RoF2
|
||||
}
|
||||
case invtype::typeWorld: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::WORLD_SIZE) {
|
||||
ServerSlot = EQEmu::invslot::WORLD_BEGIN + rof2_slot.Slot;
|
||||
ServerSlot = EQ::invslot::WORLD_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
else if (rof2_slot.Slot == invslot::SLOT_INVALID) {
|
||||
ServerSlot = EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||
ServerSlot = EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeLimbo: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::LIMBO_SIZE) {
|
||||
ServerSlot = EQEmu::invslot::slotCursor;
|
||||
ServerSlot = EQ::invslot::slotCursor;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeTribute: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::TRIBUTE_SIZE) {
|
||||
ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rof2_slot.Slot;
|
||||
ServerSlot = EQ::invslot::TRIBUTE_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case invtype::typeGuildTribute: {
|
||||
if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
|
||||
ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof2_slot.Slot;
|
||||
ServerSlot = EQ::invslot::GUILD_TRIBUTE_BEGIN + rof2_slot.Slot;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -6247,7 +6247,7 @@ namespace RoF2
|
||||
|
||||
static inline void ServerToRoF2SayLink(std::string &rof2_saylink, const std::string &server_saylink)
|
||||
{
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQ::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) {
|
||||
rof2_saylink = server_saylink;
|
||||
return;
|
||||
}
|
||||
@@ -6256,7 +6256,7 @@ namespace RoF2
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
if (segments[segment_iter].length() <= EQ::constants::SAY_LINK_BODY_SIZE) {
|
||||
rof2_saylink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -6279,7 +6279,7 @@ namespace RoF2
|
||||
|
||||
static inline void RoF2ToServerSayLink(std::string &server_saylink, const std::string &rof2_saylink)
|
||||
{
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rof2_saylink.find('\x12') == std::string::npos)) {
|
||||
if ((EQ::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rof2_saylink.find('\x12') == std::string::npos)) {
|
||||
server_saylink = rof2_saylink;
|
||||
return;
|
||||
}
|
||||
@@ -6309,80 +6309,80 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
|
||||
static inline spells::CastingSlot ServerToRoF2CastingSlot(EQEmu::spells::CastingSlot slot)
|
||||
static inline spells::CastingSlot ServerToRoF2CastingSlot(EQ::spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
case EQ::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
case EQ::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
case EQ::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
case EQ::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
case EQ::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
case EQ::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
case EQ::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
case EQ::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
case EQ::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Gem10:
|
||||
case EQ::spells::CastingSlot::Gem10:
|
||||
return spells::CastingSlot::Gem10;
|
||||
case EQEmu::spells::CastingSlot::Gem11:
|
||||
case EQ::spells::CastingSlot::Gem11:
|
||||
return spells::CastingSlot::Gem11;
|
||||
case EQEmu::spells::CastingSlot::Gem12:
|
||||
case EQ::spells::CastingSlot::Gem12:
|
||||
return spells::CastingSlot::Gem12;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
case EQ::spells::CastingSlot::Item:
|
||||
case EQ::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
case EQ::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
case EQ::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::spells::CastingSlot RoF2ToServerCastingSlot(spells::CastingSlot slot)
|
||||
static inline EQ::spells::CastingSlot RoF2ToServerCastingSlot(spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
return EQ::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
return EQ::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
return EQ::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
return EQ::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
return EQ::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
return EQ::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
return EQ::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
return EQ::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
return EQ::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Gem10:
|
||||
return EQEmu::spells::CastingSlot::Gem10;
|
||||
return EQ::spells::CastingSlot::Gem10;
|
||||
case spells::CastingSlot::Gem11:
|
||||
return EQEmu::spells::CastingSlot::Gem11;
|
||||
return EQ::spells::CastingSlot::Gem11;
|
||||
case spells::CastingSlot::Gem12:
|
||||
return EQEmu::spells::CastingSlot::Gem12;
|
||||
return EQ::spells::CastingSlot::Gem12;
|
||||
case spells::CastingSlot::Discipline:
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
case spells::CastingSlot::Item:
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
return EQ::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
return EQ::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6391,12 +6391,12 @@ namespace RoF2
|
||||
static inline int ServerToRoF2BuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
|
||||
if (index >= EQ::spells::LONG_BUFFS + EQ::spells::SHORT_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS - EQ::spells::SHORT_BUFFS +
|
||||
spells::LONG_BUFFS + spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= EQEmu::spells::LONG_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
if (index >= EQ::spells::LONG_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
@@ -6405,11 +6405,11 @@ namespace RoF2
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
|
||||
EQEmu::spells::SHORT_BUFFS;
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQ::spells::LONG_BUFFS +
|
||||
EQ::spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= spells::LONG_BUFFS)
|
||||
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
|
||||
return index - spells::LONG_BUFFS + EQ::spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace RoF2
|
||||
protected:
|
||||
|
||||
virtual std::string Describe() const;
|
||||
virtual const EQEmu::versions::ClientVersion ClientVersion() const;
|
||||
virtual const EQ::versions::ClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "ss_declare.h"
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace RoF2
|
||||
const int16 INULL = 0;
|
||||
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetInventoryRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = false;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace RoF2
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetInvTypeRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
@@ -118,7 +118,7 @@ namespace RoF2
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetInvSlotRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
@@ -196,7 +196,7 @@ namespace RoF2
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetInvBagRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
@@ -208,7 +208,7 @@ namespace RoF2
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetInvAugRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
@@ -220,7 +220,7 @@ namespace RoF2
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetItemRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
//enum Unknown : int { // looks like item class..but, RoF has it too - nothing in UF-
|
||||
// Unknown1 = 0,
|
||||
@@ -249,7 +249,7 @@ namespace RoF2
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetProfileRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
@@ -261,11 +261,11 @@ namespace RoF2
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetConstantsRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
const EQEmu::expansions::Expansion EXPANSION = EQEmu::expansions::Expansion::RoF;
|
||||
const uint32 EXPANSION_BIT = EQEmu::expansions::bitRoF;
|
||||
const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskRoF;
|
||||
const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::RoF;
|
||||
const uint32 EXPANSION_BIT = EQ::expansions::bitRoF;
|
||||
const uint32 EXPANSIONS_MASK = EQ::expansions::maskRoF;
|
||||
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
@@ -274,21 +274,21 @@ namespace RoF2
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetBehaviorRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::Skill2HPiercing;
|
||||
const size_t LastUsableSkill = EQ::skills::Skill2HPiercing;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::RoF2; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
|
||||
@@ -190,7 +190,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
Tint_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -222,7 +222,7 @@ struct Texture_Struct
|
||||
// Texture_Struct Primary;
|
||||
// Texture_Struct Secondary;
|
||||
// };
|
||||
// Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
// Texture_Struct Slot[EQ::textures::TextureCount];
|
||||
// };
|
||||
//
|
||||
// TextureProfile();
|
||||
@@ -1113,7 +1113,7 @@ union
|
||||
/*00184*/ Texture_Struct equipment[22]; // Total Slots
|
||||
};
|
||||
/*00624*/ uint32 equip2_count; // Seen 9
|
||||
/*00628*/ Texture_Struct equipment2[EQEmu::textures::materialCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00628*/ Texture_Struct equipment2[EQ::textures::materialCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00808*/ uint32 tint_count; // Seen 9
|
||||
/*00812*/ TintProfile item_tint; // RR GG BB 00
|
||||
/*00848*/ uint32 tint_count2; // Seen 9
|
||||
|
||||
+15
-15
@@ -31,7 +31,7 @@ namespace RoF
|
||||
const int16 INULL = 0;
|
||||
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetInventoryRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = false;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace RoF
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetInvTypeRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
@@ -116,7 +116,7 @@ namespace RoF
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetInvSlotRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
@@ -194,7 +194,7 @@ namespace RoF
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetInvBagRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
@@ -206,7 +206,7 @@ namespace RoF
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetInvAugRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
@@ -218,7 +218,7 @@ namespace RoF
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetItemRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
@@ -240,7 +240,7 @@ namespace RoF
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetProfileRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
@@ -252,11 +252,11 @@ namespace RoF
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetConstantsRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
const EQEmu::expansions::Expansion EXPANSION = EQEmu::expansions::Expansion::RoF;
|
||||
const uint32 EXPANSION_BIT = EQEmu::expansions::bitRoF;
|
||||
const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskRoF;
|
||||
const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::RoF;
|
||||
const uint32 EXPANSION_BIT = EQ::expansions::bitRoF;
|
||||
const uint32 EXPANSIONS_MASK = EQ::expansions::maskRoF;
|
||||
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
@@ -265,21 +265,21 @@ namespace RoF
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetBehaviorRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
const size_t LastUsableSkill = EQ::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::RoF; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
|
||||
@@ -190,7 +190,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
Tint_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -222,7 +222,7 @@ struct Texture_Struct
|
||||
// Texture_Struct Primary;
|
||||
// Texture_Struct Secondary;
|
||||
// };
|
||||
// Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
// Texture_Struct Slot[EQ::textures::TextureCount];
|
||||
// };
|
||||
//
|
||||
// TextureProfile();
|
||||
|
||||
+106
-106
@@ -43,7 +43,7 @@ namespace SoD
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline uint32 ServerToSoDSlot(uint32 server_slot);
|
||||
@@ -59,8 +59,8 @@ namespace SoD
|
||||
// client to server say link converter
|
||||
static inline void SoDToServerSayLink(std::string &server_saylink, const std::string &sod_saylink);
|
||||
|
||||
static inline spells::CastingSlot ServerToSoDCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot SoDToServerCastingSlot(spells::CastingSlot slot);
|
||||
static inline spells::CastingSlot ServerToSoDCastingSlot(EQ::spells::CastingSlot slot);
|
||||
static inline EQ::spells::CastingSlot SoDToServerCastingSlot(spells::CastingSlot slot);
|
||||
|
||||
static inline int ServerToSoDBuffSlot(int index);
|
||||
static inline int SoDToServerBuffSlot(int index);
|
||||
@@ -144,9 +144,9 @@ namespace SoD
|
||||
return(r);
|
||||
}
|
||||
|
||||
const EQEmu::versions::ClientVersion Strategy::ClientVersion() const
|
||||
const EQ::versions::ClientVersion Strategy::ClientVersion() const
|
||||
{
|
||||
return EQEmu::versions::ClientVersion::SoD;
|
||||
return EQ::versions::ClientVersion::SoD;
|
||||
}
|
||||
|
||||
#include "ss_define.h"
|
||||
@@ -381,24 +381,24 @@ namespace SoD
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
int item_count = in->size / sizeof(EQEmu::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQEmu::InternalSerializedItem_Struct)) != 0) {
|
||||
int item_count = in->size / sizeof(EQ::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQ::InternalSerializedItem_Struct)) != 0) {
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Wrong size on outbound %s: Got %d, expected multiple of %d",
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQEmu::InternalSerializedItem_Struct));
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQ::InternalSerializedItem_Struct));
|
||||
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* eq = (EQEmu::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
EQ::InternalSerializedItem_Struct* eq = (EQ::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
LogNetcode("SoD::ENCODE(OP_CharInventory) Serialization failed on item slot [{}] during OP_CharInventory. Item skipped", eq->slot_id);
|
||||
|
||||
@@ -1060,14 +1060,14 @@ namespace SoD
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* int_struct = (EQEmu::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
if (ob.tellp() == last_pos) {
|
||||
LogNetcode("SoD::ENCODE(OP_ItemPacket) Serialization failed on item slot [{}]", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -1463,7 +1463,7 @@ namespace SoD
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
for (r = EQ::textures::textureBegin; r < EQ::textures::materialCount; r++) {
|
||||
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||
eq->equipment.Slot[r].Unknown1 = 0;
|
||||
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||
@@ -1493,7 +1493,7 @@ namespace SoD
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
|
||||
if (spells::SPELLBOOK_SIZE <= EQEmu::spells::SPELLBOOK_SIZE) {
|
||||
if (spells::SPELLBOOK_SIZE <= EQ::spells::SPELLBOOK_SIZE) {
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
@@ -1502,14 +1502,14 @@ namespace SoD
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELLBOOK_SIZE; r++) {
|
||||
for (uint32 r = 0; r < EQ::spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
else
|
||||
eq->spell_book[r] = 0xFFFFFFFFU;
|
||||
}
|
||||
// invalidate the rest of the spellbook slots
|
||||
memset(&eq->spell_book[EQEmu::spells::SPELLBOOK_SIZE], 0xFF, (sizeof(uint32) * (spells::SPELLBOOK_SIZE - EQEmu::spells::SPELLBOOK_SIZE)));
|
||||
memset(&eq->spell_book[EQ::spells::SPELLBOOK_SIZE], 0xFF, (sizeof(uint32) * (spells::SPELLBOOK_SIZE - EQ::spells::SPELLBOOK_SIZE)));
|
||||
}
|
||||
|
||||
// OUT(unknown4184[128]);
|
||||
@@ -1553,7 +1553,7 @@ namespace SoD
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indices converge
|
||||
for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQ::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1562,7 +1562,7 @@ namespace SoD
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indices diverge, with a client bias
|
||||
for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQ::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1574,13 +1574,13 @@ namespace SoD
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indices converge
|
||||
for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (r = 0; r < EQ::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indices diverge, with a client bias
|
||||
for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (r = EQ::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1923,7 +1923,7 @@ namespace SoD
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
for (int equip_index = EQ::textures::textureBegin; equip_index < EQ::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
@@ -2484,7 +2484,7 @@ namespace SoD
|
||||
float SpawnSize = emu->size;
|
||||
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
||||
{
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQ::textures::materialCount);
|
||||
|
||||
if (emu->size == 0)
|
||||
{
|
||||
@@ -2681,7 +2681,7 @@ namespace SoD
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -2708,13 +2708,13 @@ namespace SoD
|
||||
{
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; k++) {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQ::textures::materialCount);
|
||||
}
|
||||
if (strlen(emu->title))
|
||||
{
|
||||
@@ -3146,7 +3146,7 @@ namespace SoD
|
||||
|
||||
for (int i = 0; i < spells::SPELL_GEM_COUNT; ++i)
|
||||
emu->spell[i] = eq->spell[i];
|
||||
for (int i = spells::SPELL_GEM_COUNT; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
for (int i = spells::SPELL_GEM_COUNT; i < EQ::spells::SPELL_GEM_COUNT; ++i)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@@ -3440,9 +3440,9 @@ namespace SoD
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
SoD::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -3633,7 +3633,7 @@ namespace SoD
|
||||
|
||||
// Done to hack older clients to label expendable fishing poles as such
|
||||
// July 28th, 2018 patch
|
||||
if (item->ItemType == EQEmu::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
if (item->ItemType == EQ::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
itbs.expendablearrow = 1;
|
||||
}
|
||||
|
||||
@@ -3757,30 +3757,30 @@ namespace SoD
|
||||
|
||||
ob.write((const char*)&iqbs, sizeof(SoD::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
EQEmu::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
EQ::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
uint32 subitem_count = 0;
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
// moved outside of loop since it is not modified within that scope
|
||||
int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID;
|
||||
int16 SubSlotNumber = EQ::invbag::SLOT_INVALID;
|
||||
|
||||
if (slot_id_in <= EQEmu::invslot::slotGeneral8 && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::slotGeneral9)
|
||||
SubSlotNumber = EQEmu::invbag::SLOT_INVALID;
|
||||
else if (slot_id_in == EQEmu::invslot::slotCursor)
|
||||
SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
if (slot_id_in <= EQ::invslot::slotGeneral8 && slot_id_in >= EQ::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQ::invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQ::invslot::GENERAL_END && slot_id_in >= EQ::invslot::slotGeneral9)
|
||||
SubSlotNumber = EQ::invbag::SLOT_INVALID;
|
||||
else if (slot_id_in == EQ::invslot::slotCursor)
|
||||
SubSlotNumber = EQ::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQ::invslot::BANK_END && slot_id_in >= EQ::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQ::invslot::SHARED_BANK_END && slot_id_in >= EQ::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::SHARED_BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now
|
||||
|
||||
if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (SubSlotNumber != EQ::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQ::invbag::SLOT_BEGIN; index <= EQ::invbag::SLOT_END; ++index) {
|
||||
EQ::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
@@ -3799,59 +3799,59 @@ namespace SoD
|
||||
{
|
||||
uint32 SoDSlot = invslot::SLOT_INVALID;
|
||||
|
||||
if (serverSlot <= EQEmu::invslot::slotGeneral8) {
|
||||
if (serverSlot <= EQ::invslot::slotGeneral8) {
|
||||
SoDSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::CORPSE_END && serverSlot >= EQEmu::invslot::slotCursor) {
|
||||
else if (serverSlot <= EQ::invslot::CORPSE_END && serverSlot >= EQ::invslot::slotCursor) {
|
||||
SoDSlot = serverSlot - 2;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::GENERAL_BAGS_8_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::GENERAL_BAGS_8_END && serverSlot >= EQ::invbag::GENERAL_BAGS_BEGIN) {
|
||||
SoDSlot = serverSlot + 11;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::CURSOR_BAG_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::CURSOR_BAG_END && serverSlot >= EQ::invbag::CURSOR_BAG_BEGIN) {
|
||||
SoDSlot = serverSlot - 9;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::TRIBUTE_END && serverSlot >= EQ::invslot::TRIBUTE_BEGIN) {
|
||||
SoDSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::GUILD_TRIBUTE_END && serverSlot >= EQ::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
SoDSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
else if (serverSlot == EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
SoDSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::BANK_END && serverSlot >= EQ::invslot::BANK_BEGIN) {
|
||||
SoDSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::BANK_BAGS_END && serverSlot >= EQ::invbag::BANK_BAGS_BEGIN) {
|
||||
SoDSlot = serverSlot + 1;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::SHARED_BANK_END && serverSlot >= EQ::invslot::SHARED_BANK_BEGIN) {
|
||||
SoDSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQ::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
SoDSlot = serverSlot + 1;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::TRADE_END && serverSlot >= EQ::invslot::TRADE_BEGIN) {
|
||||
SoDSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::TRADE_BAGS_END && serverSlot >= EQ::invbag::TRADE_BAGS_BEGIN) {
|
||||
SoDSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::WORLD_END && serverSlot >= EQ::invslot::WORLD_BEGIN) {
|
||||
SoDSlot = serverSlot;
|
||||
}
|
||||
|
||||
@@ -3864,11 +3864,11 @@ namespace SoD
|
||||
{
|
||||
uint32 SoDSlot = invslot::SLOT_INVALID;
|
||||
|
||||
if (server_corpse_slot <= EQEmu::invslot::slotGeneral8 && server_corpse_slot >= EQEmu::invslot::slotGeneral1) {
|
||||
if (server_corpse_slot <= EQ::invslot::slotGeneral8 && server_corpse_slot >= EQ::invslot::slotGeneral1) {
|
||||
SoDSlot = server_corpse_slot;
|
||||
}
|
||||
|
||||
else if (server_corpse_slot <= EQEmu::invslot::CORPSE_END && server_corpse_slot >= EQEmu::invslot::slotCursor) {
|
||||
else if (server_corpse_slot <= EQ::invslot::CORPSE_END && server_corpse_slot >= EQ::invslot::slotCursor) {
|
||||
SoDSlot = server_corpse_slot - 2;
|
||||
}
|
||||
|
||||
@@ -3879,7 +3879,7 @@ namespace SoD
|
||||
|
||||
static inline uint32 SoDToServerSlot(uint32 sod_slot)
|
||||
{
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (sod_slot <= invslot::slotGeneral8) {
|
||||
server_slot = sod_slot;
|
||||
@@ -3944,7 +3944,7 @@ namespace SoD
|
||||
|
||||
static inline uint32 SoDToServerCorpseSlot(uint32 sod_corpse_slot)
|
||||
{
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (sod_corpse_slot <= invslot::slotGeneral8 && sod_corpse_slot >= invslot::slotGeneral1) {
|
||||
server_slot = sod_corpse_slot;
|
||||
@@ -3961,7 +3961,7 @@ namespace SoD
|
||||
|
||||
static inline void ServerToSoDSayLink(std::string &sod_saylink, const std::string &server_saylink)
|
||||
{
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQ::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) {
|
||||
sod_saylink = server_saylink;
|
||||
return;
|
||||
}
|
||||
@@ -3970,7 +3970,7 @@ namespace SoD
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
if (segments[segment_iter].length() <= EQ::constants::SAY_LINK_BODY_SIZE) {
|
||||
sod_saylink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -4001,7 +4001,7 @@ namespace SoD
|
||||
|
||||
static inline void SoDToServerSayLink(std::string &server_saylink, const std::string &sod_saylink)
|
||||
{
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sod_saylink.find('\x12') == std::string::npos)) {
|
||||
if ((EQ::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sod_saylink.find('\x12') == std::string::npos)) {
|
||||
server_saylink = sod_saylink;
|
||||
return;
|
||||
}
|
||||
@@ -4035,84 +4035,84 @@ namespace SoD
|
||||
}
|
||||
}
|
||||
|
||||
static inline spells::CastingSlot ServerToSoDCastingSlot(EQEmu::spells::CastingSlot slot)
|
||||
static inline spells::CastingSlot ServerToSoDCastingSlot(EQ::spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
case EQ::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
case EQ::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
case EQ::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
case EQ::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
case EQ::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
case EQ::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
case EQ::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
case EQ::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
case EQ::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Gem10:
|
||||
case EQ::spells::CastingSlot::Gem10:
|
||||
return spells::CastingSlot::Gem10;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
case EQ::spells::CastingSlot::Item:
|
||||
case EQ::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
case EQ::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
case EQ::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::spells::CastingSlot SoDToServerCastingSlot(spells::CastingSlot slot)
|
||||
static inline EQ::spells::CastingSlot SoDToServerCastingSlot(spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
return EQ::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
return EQ::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
return EQ::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
return EQ::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
return EQ::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
return EQ::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
return EQ::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
return EQ::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
return EQ::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Gem10:
|
||||
return EQEmu::spells::CastingSlot::Gem10;
|
||||
return EQ::spells::CastingSlot::Gem10;
|
||||
case spells::CastingSlot::Discipline:
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
case spells::CastingSlot::Item:
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
return EQ::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
return EQ::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int ServerToSoDBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
|
||||
if (index >= EQ::spells::LONG_BUFFS + EQ::spells::SHORT_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS - EQ::spells::SHORT_BUFFS +
|
||||
spells::LONG_BUFFS + spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= EQEmu::spells::LONG_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
if (index >= EQ::spells::LONG_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
@@ -4121,11 +4121,11 @@ namespace SoD
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
|
||||
EQEmu::spells::SHORT_BUFFS;
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQ::spells::LONG_BUFFS +
|
||||
EQ::spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= spells::LONG_BUFFS)
|
||||
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
|
||||
return index - spells::LONG_BUFFS + EQ::spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace SoD
|
||||
protected:
|
||||
|
||||
virtual std::string Describe() const;
|
||||
virtual const EQEmu::versions::ClientVersion ClientVersion() const;
|
||||
virtual const EQ::versions::ClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "ss_declare.h"
|
||||
|
||||
+15
-15
@@ -31,7 +31,7 @@ namespace SoD
|
||||
const int16 INULL = 0;
|
||||
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetInventoryRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace SoD
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetInvTypeRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
@@ -106,7 +106,7 @@ namespace SoD
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetInvSlotRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
@@ -205,7 +205,7 @@ namespace SoD
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetInvBagRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
@@ -237,7 +237,7 @@ namespace SoD
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetInvAugRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
@@ -249,7 +249,7 @@ namespace SoD
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetItemRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
@@ -267,7 +267,7 @@ namespace SoD
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetProfileRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
@@ -279,11 +279,11 @@ namespace SoD
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetConstantsRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
const EQEmu::expansions::Expansion EXPANSION = EQEmu::expansions::Expansion::SoD;
|
||||
const uint32 EXPANSION_BIT = EQEmu::expansions::bitSoD;
|
||||
const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskSoD;
|
||||
const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::SoD;
|
||||
const uint32 EXPANSION_BIT = EQ::expansions::bitSoD;
|
||||
const uint32 EXPANSIONS_MASK = EQ::expansions::maskSoD;
|
||||
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
@@ -292,21 +292,21 @@ namespace SoD
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetBehaviorRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
const size_t LastUsableSkill = EQ::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::SoD; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
|
||||
@@ -149,7 +149,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
Tint_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
Texture_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -195,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
||||
/*0000*/ uint8 Beard; //
|
||||
/*0001*/ uint8 HairColor; //
|
||||
/*0000*/ uint8 Face; //
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
/*0000*/ CharSelectEquip Equip[EQ::textures::materialCount];
|
||||
/*0000*/ uint32 PrimaryIDFile; //
|
||||
/*0000*/ uint32 SecondaryIDFile; //
|
||||
/*0000*/ uint8 Unknown15; // 0xff
|
||||
|
||||
+106
-106
@@ -43,7 +43,7 @@ namespace SoF
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline uint32 ServerToSoFSlot(uint32 server_slot);
|
||||
@@ -59,8 +59,8 @@ namespace SoF
|
||||
// client to server say link converter
|
||||
static inline void SoFToServerSayLink(std::string &server_saylink, const std::string &sof_saylink);
|
||||
|
||||
static inline spells::CastingSlot ServerToSoFCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot SoFToServerCastingSlot(spells::CastingSlot slot, uint32 item_location);
|
||||
static inline spells::CastingSlot ServerToSoFCastingSlot(EQ::spells::CastingSlot slot);
|
||||
static inline EQ::spells::CastingSlot SoFToServerCastingSlot(spells::CastingSlot slot, uint32 item_location);
|
||||
|
||||
static inline int ServerToSoFBuffSlot(int index);
|
||||
static inline int SoFToServerBuffSlot(int index);
|
||||
@@ -142,9 +142,9 @@ namespace SoF
|
||||
return(r);
|
||||
}
|
||||
|
||||
const EQEmu::versions::ClientVersion Strategy::ClientVersion() const
|
||||
const EQ::versions::ClientVersion Strategy::ClientVersion() const
|
||||
{
|
||||
return EQEmu::versions::ClientVersion::SoF;
|
||||
return EQ::versions::ClientVersion::SoF;
|
||||
}
|
||||
|
||||
#include "ss_define.h"
|
||||
@@ -361,24 +361,24 @@ namespace SoF
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
int item_count = in->size / sizeof(EQEmu::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQEmu::InternalSerializedItem_Struct)) != 0) {
|
||||
int item_count = in->size / sizeof(EQ::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQ::InternalSerializedItem_Struct)) != 0) {
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Wrong size on outbound %s: Got %d, expected multiple of %d",
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQEmu::InternalSerializedItem_Struct));
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQ::InternalSerializedItem_Struct));
|
||||
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* eq = (EQEmu::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
EQ::InternalSerializedItem_Struct* eq = (EQ::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
LogNetcode("SoF::ENCODE(OP_CharInventory) Serialization failed on item slot [{}] during OP_CharInventory. Item skipped", eq->slot_id);
|
||||
|
||||
@@ -855,14 +855,14 @@ namespace SoF
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* int_struct = (EQEmu::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
if (ob.tellp() == last_pos) {
|
||||
LogNetcode("SoF::ENCODE(OP_ItemPacket) Serialization failed on item slot [{}]", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -956,7 +956,7 @@ namespace SoF
|
||||
|
||||
// Since HT/LoH are translated up, we need to translate down only for memSpellSpellbar case
|
||||
if (emu->scribing == 3)
|
||||
eq->slot = static_cast<uint32>(ServerToSoFCastingSlot(static_cast<EQEmu::spells::CastingSlot>(emu->slot)));
|
||||
eq->slot = static_cast<uint32>(ServerToSoFCastingSlot(static_cast<EQ::spells::CastingSlot>(emu->slot)));
|
||||
else
|
||||
OUT(slot);
|
||||
OUT(spell_id);
|
||||
@@ -1130,7 +1130,7 @@ namespace SoF
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
for (r = EQ::textures::textureBegin; r < EQ::textures::materialCount; r++) {
|
||||
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||
eq->equipment.Slot[r].Unknown1 = 0;
|
||||
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||
@@ -1160,7 +1160,7 @@ namespace SoF
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
|
||||
if (spells::SPELLBOOK_SIZE <= EQEmu::spells::SPELLBOOK_SIZE) {
|
||||
if (spells::SPELLBOOK_SIZE <= EQ::spells::SPELLBOOK_SIZE) {
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
@@ -1169,14 +1169,14 @@ namespace SoF
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELLBOOK_SIZE; r++) {
|
||||
for (uint32 r = 0; r < EQ::spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
else
|
||||
eq->spell_book[r] = 0xFFFFFFFFU;
|
||||
}
|
||||
// invalidate the rest of the spellbook slots
|
||||
memset(&eq->spell_book[EQEmu::spells::SPELLBOOK_SIZE], 0xFF, (sizeof(uint32) * (spells::SPELLBOOK_SIZE - EQEmu::spells::SPELLBOOK_SIZE)));
|
||||
memset(&eq->spell_book[EQ::spells::SPELLBOOK_SIZE], 0xFF, (sizeof(uint32) * (spells::SPELLBOOK_SIZE - EQ::spells::SPELLBOOK_SIZE)));
|
||||
}
|
||||
|
||||
// OUT(unknown4184[128]);
|
||||
@@ -1223,7 +1223,7 @@ namespace SoF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indices converge
|
||||
for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQ::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1232,7 +1232,7 @@ namespace SoF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indices diverge, with a client bias
|
||||
for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQ::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1244,13 +1244,13 @@ namespace SoF
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indices converge
|
||||
for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (r = 0; r < EQ::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indices diverge, with a client bias
|
||||
for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (r = EQ::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1593,7 +1593,7 @@ namespace SoF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
for (int equip_index = EQ::textures::textureBegin; equip_index < EQ::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
@@ -2015,7 +2015,7 @@ namespace SoF
|
||||
eq->deity = emu->deity;
|
||||
eq->drakkin_heritage = emu->drakkin_heritage;
|
||||
eq->gender = emu->gender;
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; k++) {
|
||||
eq->equipment.Slot[k].Material = emu->equipment.Slot[k].Material;
|
||||
eq->equipment.Slot[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
eq->equipment.Slot[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
@@ -2081,7 +2081,7 @@ namespace SoF
|
||||
strcpy(eq->name, emu->name);
|
||||
eq->petOwnerId = emu->petOwnerId;
|
||||
eq->pvp = 0; // 0 = non-pvp colored name, 1 = red pvp name
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; k++) {
|
||||
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||
}
|
||||
eq->anon = emu->anon;
|
||||
@@ -2300,7 +2300,7 @@ namespace SoF
|
||||
DECODE_LENGTH_EXACT(structs::BugReport_Struct);
|
||||
SETUP_DIRECT_DECODE(BugReport_Struct, structs::BugReport_Struct);
|
||||
|
||||
emu->category_id = EQEmu::bug::CategoryNameToCategoryID(eq->category_name);
|
||||
emu->category_id = EQ::bug::CategoryNameToCategoryID(eq->category_name);
|
||||
memcpy(emu->category_name, eq, sizeof(structs::BugReport_Struct));
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@@ -2556,7 +2556,7 @@ namespace SoF
|
||||
|
||||
for (int i = 0; i < spells::SPELL_GEM_COUNT; ++i)
|
||||
IN(spell[i]);
|
||||
for (int i = spells::SPELL_GEM_COUNT; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
for (int i = spells::SPELL_GEM_COUNT; i < EQ::spells::SPELL_GEM_COUNT; ++i)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
|
||||
IN(unknown);
|
||||
@@ -2838,9 +2838,9 @@ namespace SoF
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
SoF::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -3030,7 +3030,7 @@ namespace SoF
|
||||
|
||||
// Done to hack older clients to label expendable fishing poles as such
|
||||
// July 28th, 2018 patch
|
||||
if (item->ItemType == EQEmu::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
if (item->ItemType == EQ::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
itbs.expendablearrow = 1;
|
||||
}
|
||||
|
||||
@@ -3153,30 +3153,30 @@ namespace SoF
|
||||
|
||||
ob.write((const char*)&iqbs, sizeof(SoF::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
EQEmu::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
EQ::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
uint32 subitem_count = 0;
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
// moved outside of loop since it is not modified within that scope
|
||||
int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID;
|
||||
int16 SubSlotNumber = EQ::invbag::SLOT_INVALID;
|
||||
|
||||
if (slot_id_in <= EQEmu::invslot::slotGeneral8 && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::slotGeneral9)
|
||||
SubSlotNumber = EQEmu::invbag::SLOT_INVALID;
|
||||
else if (slot_id_in == EQEmu::invslot::slotCursor)
|
||||
SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
if (slot_id_in <= EQ::invslot::slotGeneral8 && slot_id_in >= EQ::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQ::invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQ::invslot::GENERAL_END && slot_id_in >= EQ::invslot::slotGeneral9)
|
||||
SubSlotNumber = EQ::invbag::SLOT_INVALID;
|
||||
else if (slot_id_in == EQ::invslot::slotCursor)
|
||||
SubSlotNumber = EQ::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQ::invslot::BANK_END && slot_id_in >= EQ::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQ::invslot::SHARED_BANK_END && slot_id_in >= EQ::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::SHARED_BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now
|
||||
|
||||
if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (SubSlotNumber != EQ::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQ::invbag::SLOT_BEGIN; index <= EQ::invbag::SLOT_END; ++index) {
|
||||
EQ::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
@@ -3195,59 +3195,59 @@ namespace SoF
|
||||
{
|
||||
uint32 sof_slot = invslot::SLOT_INVALID;
|
||||
|
||||
if (server_slot <= EQEmu::invslot::slotGeneral8) {
|
||||
if (server_slot <= EQ::invslot::slotGeneral8) {
|
||||
sof_slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::CORPSE_END && server_slot >= EQEmu::invslot::slotCursor) {
|
||||
else if (server_slot <= EQ::invslot::CORPSE_END && server_slot >= EQ::invslot::slotCursor) {
|
||||
sof_slot = server_slot - 2;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::GENERAL_BAGS_8_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::GENERAL_BAGS_8_END && server_slot >= EQ::invbag::GENERAL_BAGS_BEGIN) {
|
||||
sof_slot = server_slot + 11;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::CURSOR_BAG_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::CURSOR_BAG_END && server_slot >= EQ::invbag::CURSOR_BAG_BEGIN) {
|
||||
sof_slot = server_slot - 9;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::TRIBUTE_END && server_slot >= EQEmu::invslot::TRIBUTE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::TRIBUTE_END && server_slot >= EQ::invslot::TRIBUTE_BEGIN) {
|
||||
sof_slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::GUILD_TRIBUTE_END && server_slot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::GUILD_TRIBUTE_END && server_slot >= EQ::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
sof_slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
else if (server_slot == EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
sof_slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::BANK_END && server_slot >= EQ::invslot::BANK_BEGIN) {
|
||||
sof_slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::BANK_BAGS_END && server_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::BANK_BAGS_END && server_slot >= EQ::invbag::BANK_BAGS_BEGIN) {
|
||||
sof_slot = server_slot + 1;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::SHARED_BANK_END && server_slot >= EQEmu::invslot::SHARED_BANK_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::SHARED_BANK_END && server_slot >= EQ::invslot::SHARED_BANK_BEGIN) {
|
||||
sof_slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::SHARED_BANK_BAGS_END && server_slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::SHARED_BANK_BAGS_END && server_slot >= EQ::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
sof_slot = server_slot + 1;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::TRADE_END && server_slot >= EQEmu::invslot::TRADE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::TRADE_END && server_slot >= EQ::invslot::TRADE_BEGIN) {
|
||||
sof_slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invbag::TRADE_BAGS_END && server_slot >= EQEmu::invbag::TRADE_BAGS_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::TRADE_BAGS_END && server_slot >= EQ::invbag::TRADE_BAGS_BEGIN) {
|
||||
sof_slot = server_slot;
|
||||
}
|
||||
|
||||
else if (server_slot <= EQEmu::invslot::WORLD_END && server_slot >= EQEmu::invslot::WORLD_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::WORLD_END && server_slot >= EQ::invslot::WORLD_BEGIN) {
|
||||
sof_slot = server_slot;
|
||||
}
|
||||
|
||||
@@ -3260,11 +3260,11 @@ namespace SoF
|
||||
{
|
||||
uint32 SoFSlot = invslot::SLOT_INVALID;
|
||||
|
||||
if (server_corpse_slot <= EQEmu::invslot::slotGeneral8 && server_corpse_slot >= EQEmu::invslot::slotGeneral1) {
|
||||
if (server_corpse_slot <= EQ::invslot::slotGeneral8 && server_corpse_slot >= EQ::invslot::slotGeneral1) {
|
||||
SoFSlot = server_corpse_slot;
|
||||
}
|
||||
|
||||
else if (server_corpse_slot <= EQEmu::invslot::CORPSE_END && server_corpse_slot >= EQEmu::invslot::slotCursor) {
|
||||
else if (server_corpse_slot <= EQ::invslot::CORPSE_END && server_corpse_slot >= EQ::invslot::slotCursor) {
|
||||
SoFSlot = server_corpse_slot - 2;
|
||||
}
|
||||
|
||||
@@ -3279,7 +3279,7 @@ namespace SoF
|
||||
|
||||
static inline uint32 SoFToServerSlot(uint32 sof_slot)
|
||||
{
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (sof_slot <= invslot::slotGeneral8) {
|
||||
server_slot = sof_slot;
|
||||
@@ -3344,7 +3344,7 @@ namespace SoF
|
||||
|
||||
static inline uint32 SoFToServerCorpseSlot(uint32 sof_corpse_slot)
|
||||
{
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (sof_corpse_slot <= invslot::slotGeneral8 && sof_corpse_slot >= invslot::slotGeneral1) {
|
||||
server_slot = sof_corpse_slot;
|
||||
@@ -3365,7 +3365,7 @@ namespace SoF
|
||||
|
||||
static inline void ServerToSoFSayLink(std::string &sof_saylink, const std::string &server_saylink)
|
||||
{
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQ::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) {
|
||||
sof_saylink = server_saylink;
|
||||
return;
|
||||
}
|
||||
@@ -3374,7 +3374,7 @@ namespace SoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
if (segments[segment_iter].length() <= EQ::constants::SAY_LINK_BODY_SIZE) {
|
||||
sof_saylink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -3405,7 +3405,7 @@ namespace SoF
|
||||
|
||||
static inline void SoFToServerSayLink(std::string &server_saylink, const std::string &sof_saylink)
|
||||
{
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sof_saylink.find('\x12') == std::string::npos)) {
|
||||
if ((EQ::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sof_saylink.find('\x12') == std::string::npos)) {
|
||||
server_saylink = sof_saylink;
|
||||
return;
|
||||
}
|
||||
@@ -3439,84 +3439,84 @@ namespace SoF
|
||||
}
|
||||
}
|
||||
|
||||
static inline spells::CastingSlot ServerToSoFCastingSlot(EQEmu::spells::CastingSlot slot) {
|
||||
static inline spells::CastingSlot ServerToSoFCastingSlot(EQ::spells::CastingSlot slot) {
|
||||
switch (slot) {
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
case EQ::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
case EQ::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
case EQ::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
case EQ::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
case EQ::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
case EQ::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
case EQ::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
case EQ::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
case EQ::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQ::spells::CastingSlot::Item:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
case EQ::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::PotionBelt;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
case EQ::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
case EQ::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::spells::CastingSlot SoFToServerCastingSlot(spells::CastingSlot slot, uint32 item_location) {
|
||||
static inline EQ::spells::CastingSlot SoFToServerCastingSlot(spells::CastingSlot slot, uint32 item_location) {
|
||||
switch (slot) {
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
return EQ::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
return EQ::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
return EQ::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
return EQ::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
return EQ::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
return EQ::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
return EQ::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
return EQ::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
return EQ::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Ability:
|
||||
return EQEmu::spells::CastingSlot::Ability;
|
||||
return EQ::spells::CastingSlot::Ability;
|
||||
// Tit uses 10 for item and discipline casting, but items have a valid location
|
||||
case spells::CastingSlot::Item:
|
||||
if (item_location == INVALID_INDEX)
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
else
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
return EQ::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::PotionBelt:
|
||||
return EQEmu::spells::CastingSlot::PotionBelt;
|
||||
return EQ::spells::CastingSlot::PotionBelt;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
return EQ::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int ServerToSoFBuffSlot(int index) {
|
||||
// we're a disc
|
||||
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
|
||||
if (index >= EQ::spells::LONG_BUFFS + EQ::spells::SHORT_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS - EQ::spells::SHORT_BUFFS +
|
||||
spells::LONG_BUFFS + spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= EQEmu::spells::LONG_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
if (index >= EQ::spells::LONG_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
@@ -3525,11 +3525,11 @@ namespace SoF
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
|
||||
EQEmu::spells::SHORT_BUFFS;
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQ::spells::LONG_BUFFS +
|
||||
EQ::spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= spells::LONG_BUFFS)
|
||||
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
|
||||
return index - spells::LONG_BUFFS + EQ::spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace SoF
|
||||
protected:
|
||||
|
||||
virtual std::string Describe() const;
|
||||
virtual const EQEmu::versions::ClientVersion ClientVersion() const;
|
||||
virtual const EQ::versions::ClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "ss_declare.h"
|
||||
|
||||
+15
-15
@@ -31,7 +31,7 @@ namespace SoF
|
||||
const int16 INULL = 0;
|
||||
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetInventoryRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace SoF
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetInvTypeRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
@@ -106,7 +106,7 @@ namespace SoF
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetInvSlotRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
@@ -205,7 +205,7 @@ namespace SoF
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetInvBagRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
@@ -237,7 +237,7 @@ namespace SoF
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetInvAugRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
@@ -249,7 +249,7 @@ namespace SoF
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetItemRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
@@ -267,7 +267,7 @@ namespace SoF
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetProfileRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
@@ -279,11 +279,11 @@ namespace SoF
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetConstantsRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
const EQEmu::expansions::Expansion EXPANSION = EQEmu::expansions::Expansion::SoF;
|
||||
const uint32 EXPANSION_BIT = EQEmu::expansions::bitSoF;
|
||||
const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskSoF;
|
||||
const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::SoF;
|
||||
const uint32 EXPANSION_BIT = EQ::expansions::bitSoF;
|
||||
const uint32 EXPANSIONS_MASK = EQ::expansions::maskSoF;
|
||||
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
@@ -292,21 +292,21 @@ namespace SoF
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetBehaviorRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
const bool CoinHasWeight = true;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
const size_t LastUsableSkill = EQ::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::SoF; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
|
||||
@@ -168,7 +168,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
Tint_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -197,7 +197,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
Texture_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -214,7 +214,7 @@ struct CharacterSelectEntry_Struct
|
||||
/*0000*/ uint8 Beard; //
|
||||
/*0001*/ uint8 HairColor; //
|
||||
/*0000*/ uint8 Face; //
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
/*0000*/ CharSelectEquip Equip[EQ::textures::materialCount];
|
||||
/*0000*/ uint32 PrimaryIDFile; //
|
||||
/*0000*/ uint32 SecondaryIDFile; //
|
||||
/*0000*/ uint8 Unknown15; // 0xff
|
||||
|
||||
+111
-111
@@ -42,7 +42,7 @@ namespace Titanium
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth);
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline int16 ServerToTitaniumSlot(uint32 server_slot);
|
||||
@@ -58,8 +58,8 @@ namespace Titanium
|
||||
// client to server say link converter
|
||||
static inline void TitaniumToServerSayLink(std::string &server_saylink, const std::string &titanium_saylink);
|
||||
|
||||
static inline spells::CastingSlot ServerToTitaniumCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot TitaniumToServerCastingSlot(spells::CastingSlot slot, uint32 item_location);
|
||||
static inline spells::CastingSlot ServerToTitaniumCastingSlot(EQ::spells::CastingSlot slot);
|
||||
static inline EQ::spells::CastingSlot TitaniumToServerCastingSlot(spells::CastingSlot slot, uint32 item_location);
|
||||
|
||||
static inline int ServerToTitaniumBuffSlot(int index);
|
||||
static inline int TitaniumToServerBuffSlot(int index);
|
||||
@@ -143,9 +143,9 @@ namespace Titanium
|
||||
return(r);
|
||||
}
|
||||
|
||||
const EQEmu::versions::ClientVersion Strategy::ClientVersion() const
|
||||
const EQ::versions::ClientVersion Strategy::ClientVersion() const
|
||||
{
|
||||
return EQEmu::versions::ClientVersion::Titanium;
|
||||
return EQ::versions::ClientVersion::Titanium;
|
||||
}
|
||||
|
||||
#include "ss_define.h"
|
||||
@@ -320,22 +320,22 @@ namespace Titanium
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
int itemcount = in->size / sizeof(EQEmu::InternalSerializedItem_Struct);
|
||||
if (itemcount == 0 || (in->size % sizeof(EQEmu::InternalSerializedItem_Struct)) != 0) {
|
||||
int itemcount = in->size / sizeof(EQ::InternalSerializedItem_Struct);
|
||||
if (itemcount == 0 || (in->size % sizeof(EQ::InternalSerializedItem_Struct)) != 0) {
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Wrong size on outbound %s: Got %d, expected multiple of %d",
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQEmu::InternalSerializedItem_Struct));
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQ::InternalSerializedItem_Struct));
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* eq = (EQEmu::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
EQ::InternalSerializedItem_Struct* eq = (EQ::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
|
||||
//do the transform...
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
for (int r = 0; r < itemcount; r++, eq++) {
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, ServerToTitaniumSlot(eq->slot_id), 0);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)eq->inst, ServerToTitaniumSlot(eq->slot_id), 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
LogNetcode("Titanium::ENCODE(OP_CharInventory) Serialization failed on item slot [{}] during OP_CharInventory. Item skipped", eq->slot_id);
|
||||
|
||||
@@ -796,14 +796,14 @@ namespace Titanium
|
||||
OUT(TargetID);
|
||||
OUT(playerid);
|
||||
|
||||
for (int i = EQEmu::invslot::slotCharm; i <= EQEmu::invslot::slotWaist; ++i) {
|
||||
for (int i = EQ::invslot::slotCharm; i <= EQ::invslot::slotWaist; ++i) {
|
||||
strn0cpy(eq->itemnames[i], emu->itemnames[i], sizeof(eq->itemnames[i]));
|
||||
OUT(itemicons[i]);
|
||||
}
|
||||
|
||||
// move ammo down to last element in titanium array
|
||||
strn0cpy(eq->itemnames[invslot::slotAmmo], emu->itemnames[EQEmu::invslot::slotAmmo], sizeof(eq->itemnames[invslot::slotAmmo]));
|
||||
eq->itemicons[invslot::slotAmmo] = emu->itemicons[EQEmu::invslot::slotAmmo];
|
||||
strn0cpy(eq->itemnames[invslot::slotAmmo], emu->itemnames[EQ::invslot::slotAmmo], sizeof(eq->itemnames[invslot::slotAmmo]));
|
||||
eq->itemicons[invslot::slotAmmo] = emu->itemicons[EQ::invslot::slotAmmo];
|
||||
|
||||
strn0cpy(eq->text, emu->text, sizeof(eq->text));
|
||||
|
||||
@@ -832,14 +832,14 @@ namespace Titanium
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* int_struct = (EQEmu::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, ServerToTitaniumSlot(int_struct->slot_id), 0);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)int_struct->inst, ServerToTitaniumSlot(int_struct->slot_id), 0);
|
||||
if (ob.tellp() == last_pos) {
|
||||
LogNetcode("Titanium::ENCODE(OP_ItemPacket) Serialization failed on item slot [{}]", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -909,7 +909,7 @@ namespace Titanium
|
||||
|
||||
// Since HT/LoH are translated up, we need to translate down only for memSpellSpellbar case
|
||||
if (emu->scribing == 3)
|
||||
eq->slot = static_cast<uint32>(ServerToTitaniumCastingSlot(static_cast<EQEmu::spells::CastingSlot>(emu->slot)));
|
||||
eq->slot = static_cast<uint32>(ServerToTitaniumCastingSlot(static_cast<EQ::spells::CastingSlot>(emu->slot)));
|
||||
else
|
||||
OUT(slot);
|
||||
OUT(spell_id);
|
||||
@@ -1009,7 +1009,7 @@ namespace Titanium
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
for (r = EQ::textures::textureBegin; r < EQ::textures::materialCount; r++) {
|
||||
OUT(item_material.Slot[r].Material);
|
||||
OUT(item_tint.Slot[r].Color);
|
||||
}
|
||||
@@ -1032,7 +1032,7 @@ namespace Titanium
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
|
||||
if (spells::SPELLBOOK_SIZE <= EQEmu::spells::SPELLBOOK_SIZE) {
|
||||
if (spells::SPELLBOOK_SIZE <= EQ::spells::SPELLBOOK_SIZE) {
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
@@ -1041,14 +1041,14 @@ namespace Titanium
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELLBOOK_SIZE; r++) {
|
||||
for (uint32 r = 0; r < EQ::spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
else
|
||||
eq->spell_book[r] = 0xFFFFFFFFU;
|
||||
}
|
||||
// invalidate the rest of the spellbook slots
|
||||
memset(&eq->spell_book[EQEmu::spells::SPELLBOOK_SIZE], 0xFF, (sizeof(uint32) * (spells::SPELLBOOK_SIZE - EQEmu::spells::SPELLBOOK_SIZE)));
|
||||
memset(&eq->spell_book[EQ::spells::SPELLBOOK_SIZE], 0xFF, (sizeof(uint32) * (spells::SPELLBOOK_SIZE - EQ::spells::SPELLBOOK_SIZE)));
|
||||
}
|
||||
|
||||
// OUT(unknown4184[448]);
|
||||
@@ -1092,7 +1092,7 @@ namespace Titanium
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indices converge
|
||||
for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQ::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1101,7 +1101,7 @@ namespace Titanium
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indices diverge, with a client bias
|
||||
for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQ::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1113,13 +1113,13 @@ namespace Titanium
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indices converge
|
||||
for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (r = 0; r < EQ::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indices diverge, with a client bias
|
||||
for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (r = EQ::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1349,14 +1349,14 @@ namespace Titanium
|
||||
if (eq->Race[char_index] > 473)
|
||||
eq->Race[char_index] = 1;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
for (int index = 0; index < EQ::textures::materialCount; ++index) {
|
||||
eq->CS_Colors[char_index].Slot[index].Color = emu_cse->Equip[index].Color;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = emu_cse->BeardColor;
|
||||
eq->HairStyle[char_index] = emu_cse->HairStyle;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
for (int index = 0; index < EQ::textures::materialCount; ++index) {
|
||||
eq->Equip[char_index].Slot[index].Material = emu_cse->Equip[index].Material;
|
||||
}
|
||||
|
||||
@@ -1386,14 +1386,14 @@ namespace Titanium
|
||||
for (; char_index < 10; ++char_index) {
|
||||
eq->Race[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
for (int index = 0; index < EQ::textures::materialCount; ++index) {
|
||||
eq->CS_Colors[char_index].Slot[index].Color = 0;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = 0;
|
||||
eq->HairStyle[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
for (int index = 0; index < EQ::textures::materialCount; ++index) {
|
||||
eq->Equip[char_index].Slot[index].Material = 0;
|
||||
}
|
||||
|
||||
@@ -1717,7 +1717,7 @@ namespace Titanium
|
||||
eq->petOwnerId = emu->petOwnerId;
|
||||
eq->guildrank = emu->guildrank;
|
||||
// eq->unknown0194[3] = emu->unknown0194[3];
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; k++) {
|
||||
eq->equipment.Slot[k].Material = emu->equipment.Slot[k].Material;
|
||||
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||
}
|
||||
@@ -1830,7 +1830,7 @@ namespace Titanium
|
||||
DECODE_LENGTH_EXACT(structs::BugReport_Struct);
|
||||
SETUP_DIRECT_DECODE(BugReport_Struct, structs::BugReport_Struct);
|
||||
|
||||
emu->category_id = EQEmu::bug::CategoryNameToCategoryID(eq->category_name);
|
||||
emu->category_id = EQ::bug::CategoryNameToCategoryID(eq->category_name);
|
||||
memcpy(emu->category_name, eq, sizeof(structs::BugReport_Struct));
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@@ -1993,12 +1993,12 @@ namespace Titanium
|
||||
}
|
||||
|
||||
// move ammo up to last element in server array
|
||||
strn0cpy(emu->itemnames[EQEmu::invslot::slotAmmo], eq->itemnames[invslot::slotAmmo], sizeof(emu->itemnames[EQEmu::invslot::slotAmmo]));
|
||||
emu->itemicons[EQEmu::invslot::slotAmmo] = eq->itemicons[invslot::slotAmmo];
|
||||
strn0cpy(emu->itemnames[EQ::invslot::slotAmmo], eq->itemnames[invslot::slotAmmo], sizeof(emu->itemnames[EQ::invslot::slotAmmo]));
|
||||
emu->itemicons[EQ::invslot::slotAmmo] = eq->itemicons[invslot::slotAmmo];
|
||||
|
||||
// nullify power source element in server array
|
||||
strn0cpy(emu->itemnames[EQEmu::invslot::slotPowerSource], "", sizeof(emu->itemnames[EQEmu::invslot::slotPowerSource]));
|
||||
emu->itemicons[EQEmu::invslot::slotPowerSource] = 0xFFFFFFFF;
|
||||
strn0cpy(emu->itemnames[EQ::invslot::slotPowerSource], "", sizeof(emu->itemnames[EQ::invslot::slotPowerSource]));
|
||||
emu->itemicons[EQ::invslot::slotPowerSource] = 0xFFFFFFFF;
|
||||
|
||||
strn0cpy(emu->text, eq->text, sizeof(emu->text));
|
||||
|
||||
@@ -2053,7 +2053,7 @@ namespace Titanium
|
||||
|
||||
for (int i = 0; i < spells::SPELL_GEM_COUNT; ++i)
|
||||
IN(spell[i]);
|
||||
for (int i = spells::SPELL_GEM_COUNT; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
for (int i = spells::SPELL_GEM_COUNT; i < EQ::spells::SPELL_GEM_COUNT; ++i)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
|
||||
IN(unknown);
|
||||
@@ -2273,9 +2273,9 @@ namespace Titanium
|
||||
}
|
||||
|
||||
// file scope helper methods
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth) {
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth) {
|
||||
const char *protection = "\\\\\\\\\\";
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
ob << StringFormat(
|
||||
"%.*s%s",
|
||||
@@ -2293,7 +2293,7 @@ namespace Titanium
|
||||
ob << '|' << itoa((!inst->GetMerchantSlot() ? inst->GetSerialNumber()
|
||||
: inst->GetMerchantSlot())); // merchant serial number
|
||||
ob << '|' << itoa(inst->GetRecastTimestamp()); // recast timestamp
|
||||
ob << '|' << itoa(((inst->IsStackable() ? ((inst->GetItem()->ItemType == EQEmu::item::ItemTypePotion) ? 1 : 0)
|
||||
ob << '|' << itoa(((inst->IsStackable() ? ((inst->GetItem()->ItemType == EQ::item::ItemTypePotion) ? 1 : 0)
|
||||
: inst->GetCharges()))); // charge count
|
||||
ob << '|' << itoa((inst->IsAttuned() ? 1 : 0)); // inst attuned
|
||||
ob << '|' << itoa(0); // unknown
|
||||
@@ -2502,10 +2502,10 @@ namespace Titanium
|
||||
ob << StringFormat("%.*s\"", depth, protection); // Quotes (and protection, if needed) around static data
|
||||
|
||||
// Sub data
|
||||
for (int index = EQEmu::invbag::SLOT_BEGIN; index <= invbag::SLOT_END; ++index) {
|
||||
for (int index = EQ::invbag::SLOT_BEGIN; index <= invbag::SLOT_END; ++index) {
|
||||
ob << '|';
|
||||
|
||||
EQEmu::ItemInstance *sub = inst->GetItem(index);
|
||||
EQ::ItemInstance *sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
@@ -2525,59 +2525,59 @@ namespace Titanium
|
||||
static inline int16 ServerToTitaniumSlot(uint32 server_slot) {
|
||||
int16 titanium_slot = invslot::SLOT_INVALID;
|
||||
|
||||
if (server_slot <= EQEmu::invslot::slotWaist) {
|
||||
if (server_slot <= EQ::invslot::slotWaist) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot == EQEmu::invslot::slotAmmo) {
|
||||
else if (server_slot == EQ::invslot::slotAmmo) {
|
||||
titanium_slot = server_slot - 1;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invslot::slotGeneral8 && server_slot >= EQEmu::invslot::slotGeneral1) {
|
||||
else if (server_slot <= EQ::invslot::slotGeneral8 && server_slot >= EQ::invslot::slotGeneral1) {
|
||||
titanium_slot = server_slot - 1;
|
||||
}
|
||||
else if (server_slot <= (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotWaist) &&
|
||||
server_slot >= EQEmu::invslot::slotCursor) {
|
||||
else if (server_slot <= (EQ::invslot::POSSESSIONS_COUNT + EQ::invslot::slotWaist) &&
|
||||
server_slot >= EQ::invslot::slotCursor) {
|
||||
titanium_slot = server_slot - 3;
|
||||
}
|
||||
else if (server_slot == (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotAmmo)) {
|
||||
else if (server_slot == (EQ::invslot::POSSESSIONS_COUNT + EQ::invslot::slotAmmo)) {
|
||||
titanium_slot = server_slot - 4;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invbag::GENERAL_BAGS_8_END &&
|
||||
server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::GENERAL_BAGS_8_END &&
|
||||
server_slot >= EQ::invbag::GENERAL_BAGS_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::CURSOR_BAG_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::CURSOR_BAG_END && server_slot >= EQ::invbag::CURSOR_BAG_BEGIN) {
|
||||
titanium_slot = server_slot - 20;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invslot::TRIBUTE_END && server_slot >= EQEmu::invslot::TRIBUTE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::TRIBUTE_END && server_slot >= EQ::invslot::TRIBUTE_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invslot::GUILD_TRIBUTE_END &&
|
||||
server_slot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::GUILD_TRIBUTE_END &&
|
||||
server_slot >= EQ::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
else if (server_slot == EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::BANK_END && server_slot >= EQ::invslot::BANK_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invbag::BANK_BAGS_16_END && server_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::BANK_BAGS_16_END && server_slot >= EQ::invbag::BANK_BAGS_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invslot::SHARED_BANK_END && server_slot >= EQEmu::invslot::SHARED_BANK_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::SHARED_BANK_END && server_slot >= EQ::invslot::SHARED_BANK_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invbag::SHARED_BANK_BAGS_END &&
|
||||
server_slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::SHARED_BANK_BAGS_END &&
|
||||
server_slot >= EQ::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invslot::TRADE_END && server_slot >= EQEmu::invslot::TRADE_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::TRADE_END && server_slot >= EQ::invslot::TRADE_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invbag::TRADE_BAGS_END && server_slot >= EQEmu::invbag::TRADE_BAGS_BEGIN) {
|
||||
else if (server_slot <= EQ::invbag::TRADE_BAGS_END && server_slot >= EQ::invbag::TRADE_BAGS_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
else if (server_slot <= EQEmu::invslot::WORLD_END && server_slot >= EQEmu::invslot::WORLD_BEGIN) {
|
||||
else if (server_slot <= EQ::invslot::WORLD_END && server_slot >= EQ::invslot::WORLD_BEGIN) {
|
||||
titanium_slot = server_slot;
|
||||
}
|
||||
|
||||
@@ -2590,16 +2590,16 @@ namespace Titanium
|
||||
static inline int16 ServerToTitaniumCorpseSlot(uint32 server_corpse_slot) {
|
||||
int16 titanium_slot = invslot::SLOT_INVALID;
|
||||
|
||||
if (server_corpse_slot <= EQEmu::invslot::slotGeneral8 && server_corpse_slot >= EQEmu::invslot::slotGeneral1) {
|
||||
if (server_corpse_slot <= EQ::invslot::slotGeneral8 && server_corpse_slot >= EQ::invslot::slotGeneral1) {
|
||||
titanium_slot = server_corpse_slot - 1;
|
||||
}
|
||||
|
||||
else if (server_corpse_slot <= (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotWaist) &&
|
||||
server_corpse_slot >= EQEmu::invslot::slotCursor) {
|
||||
else if (server_corpse_slot <= (EQ::invslot::POSSESSIONS_COUNT + EQ::invslot::slotWaist) &&
|
||||
server_corpse_slot >= EQ::invslot::slotCursor) {
|
||||
titanium_slot = server_corpse_slot - 3;
|
||||
}
|
||||
|
||||
else if (server_corpse_slot == (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotAmmo)) {
|
||||
else if (server_corpse_slot == (EQ::invslot::POSSESSIONS_COUNT + EQ::invslot::slotAmmo)) {
|
||||
titanium_slot = server_corpse_slot - 4;
|
||||
}
|
||||
|
||||
@@ -2613,7 +2613,7 @@ namespace Titanium
|
||||
}
|
||||
|
||||
static inline uint32 TitaniumToServerSlot(int16 titanium_slot) {
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (titanium_slot <= invslot::slotWaist) {
|
||||
server_slot = titanium_slot;
|
||||
@@ -2675,7 +2675,7 @@ namespace Titanium
|
||||
|
||||
static inline uint32 TitaniumToServerCorpseSlot(int16 titanium_corpse_slot)
|
||||
{
|
||||
uint32 server_slot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (titanium_corpse_slot <= invslot::slotGeneral8 && titanium_corpse_slot >= invslot::slotGeneral1) {
|
||||
server_slot = titanium_corpse_slot + 1;
|
||||
@@ -2696,7 +2696,7 @@ namespace Titanium
|
||||
|
||||
static inline void ServerToTitaniumSayLink(std::string &titanium_saylink, const std::string &server_saylink)
|
||||
{
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQ::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) {
|
||||
titanium_saylink = server_saylink;
|
||||
return;
|
||||
}
|
||||
@@ -2705,7 +2705,7 @@ namespace Titanium
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
if (segments[segment_iter].length() <= EQ::constants::SAY_LINK_BODY_SIZE) {
|
||||
titanium_saylink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -2736,7 +2736,7 @@ namespace Titanium
|
||||
|
||||
static inline void TitaniumToServerSayLink(std::string &server_saylink, const std::string &titanium_saylink)
|
||||
{
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (titanium_saylink.find('\x12') == std::string::npos)) {
|
||||
if ((EQ::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (titanium_saylink.find('\x12') == std::string::npos)) {
|
||||
server_saylink = titanium_saylink;
|
||||
return;
|
||||
}
|
||||
@@ -2772,85 +2772,85 @@ namespace Titanium
|
||||
}
|
||||
}
|
||||
|
||||
static inline spells::CastingSlot ServerToTitaniumCastingSlot(EQEmu::spells::CastingSlot slot) {
|
||||
static inline spells::CastingSlot ServerToTitaniumCastingSlot(EQ::spells::CastingSlot slot) {
|
||||
switch (slot) {
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
case EQ::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
case EQ::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
case EQ::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
case EQ::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
case EQ::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
case EQ::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
case EQ::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
case EQ::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
case EQ::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQ::spells::CastingSlot::Item:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
case EQ::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::PotionBelt;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
case EQ::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
case EQ::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::spells::CastingSlot TitaniumToServerCastingSlot(spells::CastingSlot slot, uint32 item_location) {
|
||||
static inline EQ::spells::CastingSlot TitaniumToServerCastingSlot(spells::CastingSlot slot, uint32 item_location) {
|
||||
switch (slot) {
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
return EQ::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
return EQ::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
return EQ::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
return EQ::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
return EQ::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
return EQ::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
return EQ::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
return EQ::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
return EQ::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Ability:
|
||||
return EQEmu::spells::CastingSlot::Ability;
|
||||
return EQ::spells::CastingSlot::Ability;
|
||||
// Tit uses 10 for item and discipline casting, but items have a valid location
|
||||
case spells::CastingSlot::Item:
|
||||
if (item_location == INVALID_INDEX)
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
else
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
return EQ::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::PotionBelt:
|
||||
return EQEmu::spells::CastingSlot::PotionBelt;
|
||||
return EQ::spells::CastingSlot::PotionBelt;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
return EQ::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int ServerToTitaniumBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
|
||||
if (index >= EQ::spells::LONG_BUFFS + EQ::spells::SHORT_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS - EQ::spells::SHORT_BUFFS +
|
||||
spells::LONG_BUFFS + spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= EQEmu::spells::LONG_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
if (index >= EQ::spells::LONG_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
@@ -2859,11 +2859,11 @@ namespace Titanium
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
|
||||
EQEmu::spells::SHORT_BUFFS;
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQ::spells::LONG_BUFFS +
|
||||
EQ::spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= spells::LONG_BUFFS)
|
||||
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
|
||||
return index - spells::LONG_BUFFS + EQ::spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Titanium
|
||||
protected:
|
||||
|
||||
virtual std::string Describe() const;
|
||||
virtual const EQEmu::versions::ClientVersion ClientVersion() const;
|
||||
virtual const EQ::versions::ClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "ss_declare.h"
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Titanium
|
||||
const int16 INULL = 0;
|
||||
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetInventoryRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Titanium
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetInvTypeRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
@@ -106,7 +106,7 @@ namespace Titanium
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetInvSlotRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
@@ -204,7 +204,7 @@ namespace Titanium
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetInvBagRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
@@ -236,7 +236,7 @@ namespace Titanium
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetInvAugRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
@@ -248,7 +248,7 @@ namespace Titanium
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetItemRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
@@ -266,7 +266,7 @@ namespace Titanium
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetProfileRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 4; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
@@ -278,11 +278,11 @@ namespace Titanium
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetConstantsRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
const EQEmu::expansions::Expansion EXPANSION = EQEmu::expansions::Expansion::DoD; // Someone had this as PoR in another section...
|
||||
const uint32 EXPANSION_BIT = EQEmu::expansions::bitDoD;
|
||||
const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskDoD;
|
||||
const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::DoD; // Someone had this as PoR in another section...
|
||||
const uint32 EXPANSION_BIT = EQ::expansions::bitDoD;
|
||||
const uint32 EXPANSIONS_MASK = EQ::expansions::maskDoD;
|
||||
|
||||
const size_t CHARACTER_CREATION_LIMIT = 8; // Hard-coded in client - DO NOT ALTER
|
||||
|
||||
@@ -291,21 +291,21 @@ namespace Titanium
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetBehaviorRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
const bool CoinHasWeight = true;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillFrenzy;
|
||||
const size_t LastUsableSkill = EQ::skills::SkillFrenzy;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::Titanium; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
|
||||
@@ -161,7 +161,7 @@ struct TintProfile {
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
Tint_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -184,7 +184,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
Texture_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
|
||||
+111
-111
@@ -43,7 +43,7 @@ namespace UF
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline uint32 ServerToUFSlot(uint32 serverSlot);
|
||||
@@ -59,8 +59,8 @@ namespace UF
|
||||
// client to server say link converter
|
||||
static inline void UFToServerSayLink(std::string& serverSayLink, const std::string& ufSayLink);
|
||||
|
||||
static inline spells::CastingSlot ServerToUFCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot UFToServerCastingSlot(spells::CastingSlot slot);
|
||||
static inline spells::CastingSlot ServerToUFCastingSlot(EQ::spells::CastingSlot slot);
|
||||
static inline EQ::spells::CastingSlot UFToServerCastingSlot(spells::CastingSlot slot);
|
||||
|
||||
static inline int ServerToUFBuffSlot(int index);
|
||||
static inline int UFToServerBuffSlot(int index);
|
||||
@@ -144,9 +144,9 @@ namespace UF
|
||||
return(r);
|
||||
}
|
||||
|
||||
const EQEmu::versions::ClientVersion Strategy::ClientVersion() const
|
||||
const EQ::versions::ClientVersion Strategy::ClientVersion() const
|
||||
{
|
||||
return EQEmu::versions::ClientVersion::UF;
|
||||
return EQ::versions::ClientVersion::UF;
|
||||
}
|
||||
|
||||
#include "ss_define.h"
|
||||
@@ -501,24 +501,24 @@ namespace UF
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
int item_count = in->size / sizeof(EQEmu::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQEmu::InternalSerializedItem_Struct)) != 0) {
|
||||
int item_count = in->size / sizeof(EQ::InternalSerializedItem_Struct);
|
||||
if (!item_count || (in->size % sizeof(EQ::InternalSerializedItem_Struct)) != 0) {
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Wrong size on outbound %s: Got %d, expected multiple of %d",
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQEmu::InternalSerializedItem_Struct));
|
||||
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(EQ::InternalSerializedItem_Struct));
|
||||
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* eq = (EQEmu::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
EQ::InternalSerializedItem_Struct* eq = (EQ::InternalSerializedItem_Struct*)in->pBuffer;
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
LogNetcode("UF::ENCODE(OP_CharInventory) Serialization failed on item slot [{}] during OP_CharInventory. Item skipped", eq->slot_id);
|
||||
|
||||
@@ -1268,14 +1268,14 @@ namespace UF
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
EQEmu::InternalSerializedItem_Struct* int_struct = (EQEmu::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
EQEmu::OutBuffer ob;
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
EQ::OutBuffer ob;
|
||||
EQ::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
if (ob.tellp() == last_pos) {
|
||||
LogNetcode("UF::ENCODE(OP_ItemPacket) Serialization failed on item slot [{}]", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -1693,7 +1693,7 @@ namespace UF
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
for (r = EQ::textures::textureBegin; r < EQ::textures::materialCount; r++) {
|
||||
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||
eq->equipment.Slot[r].Unknown1 = 0;
|
||||
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||
@@ -1725,7 +1725,7 @@ namespace UF
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
|
||||
if (spells::SPELLBOOK_SIZE <= EQEmu::spells::SPELLBOOK_SIZE) {
|
||||
if (spells::SPELLBOOK_SIZE <= EQ::spells::SPELLBOOK_SIZE) {
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
@@ -1734,14 +1734,14 @@ namespace UF
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELLBOOK_SIZE; r++) {
|
||||
for (uint32 r = 0; r < EQ::spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
else
|
||||
eq->spell_book[r] = 0xFFFFFFFFU;
|
||||
}
|
||||
// invalidate the rest of the spellbook slots
|
||||
memset(&eq->spell_book[EQEmu::spells::SPELLBOOK_SIZE], 0xFF, (sizeof(uint32) * (spells::SPELLBOOK_SIZE - EQEmu::spells::SPELLBOOK_SIZE)));
|
||||
memset(&eq->spell_book[EQ::spells::SPELLBOOK_SIZE], 0xFF, (sizeof(uint32) * (spells::SPELLBOOK_SIZE - EQ::spells::SPELLBOOK_SIZE)));
|
||||
}
|
||||
|
||||
// OUT(unknown4184[128]);
|
||||
@@ -1797,7 +1797,7 @@ namespace UF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indices converge
|
||||
for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQ::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1806,7 +1806,7 @@ namespace UF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indices diverge, with a client bias
|
||||
for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQ::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1818,13 +1818,13 @@ namespace UF
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indices converge
|
||||
for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (r = 0; r < EQ::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indices diverge, with a client bias
|
||||
for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
for (r = EQ::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -2196,7 +2196,7 @@ namespace UF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
for (int equip_index = EQ::textures::textureBegin; equip_index < EQ::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
@@ -2755,7 +2755,7 @@ namespace UF
|
||||
float SpawnSize = emu->size;
|
||||
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
||||
{
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQ::textures::materialCount);
|
||||
|
||||
if (emu->size == 0)
|
||||
{
|
||||
@@ -2954,7 +2954,7 @@ namespace UF
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -2990,7 +2990,7 @@ namespace UF
|
||||
{
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
for (k = EQ::textures::textureBegin; k < EQ::textures::materialCount; k++) {
|
||||
if (emu->equipment.Slot[k].Material > 99999) {
|
||||
Equipment[k].Material = 63;
|
||||
} else {
|
||||
@@ -3000,7 +3000,7 @@ namespace UF
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQ::textures::materialCount);
|
||||
}
|
||||
if (strlen(emu->title))
|
||||
{
|
||||
@@ -3498,7 +3498,7 @@ namespace UF
|
||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||
|
||||
for (unsigned int i = 0; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
for (unsigned int i = 0; i < EQ::spells::SPELL_GEM_COUNT; ++i)
|
||||
if (eq->spell[i] == 0)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
else
|
||||
@@ -3737,9 +3737,9 @@ namespace UF
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
UF::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -3783,7 +3783,7 @@ namespace UF
|
||||
int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
|
||||
uint16 ornaIcon = 0;
|
||||
if (inst->GetOrnamentationAug(ornamentationAugtype)) {
|
||||
const EQEmu::ItemData *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
|
||||
const EQ::ItemData *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
|
||||
ornaIcon = aug_weap->Icon;
|
||||
|
||||
ob.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
|
||||
@@ -3968,7 +3968,7 @@ namespace UF
|
||||
|
||||
// Done to hack older clients to label expendable fishing poles as such
|
||||
// July 28th, 2018 patch
|
||||
if (item->ItemType == EQEmu::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
if (item->ItemType == EQ::item::ItemTypeFishingPole && item->SubType == 0) {
|
||||
itbs.expendablearrow = 1;
|
||||
}
|
||||
|
||||
@@ -4116,30 +4116,30 @@ namespace UF
|
||||
|
||||
ob.write((const char*)&iqbs, sizeof(UF::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
EQEmu::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
EQ::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
uint32 subitem_count = 0;
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
// moved outside of loop since it is not modified within that scope
|
||||
int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID;
|
||||
int16 SubSlotNumber = EQ::invbag::SLOT_INVALID;
|
||||
|
||||
if (slot_id_in <= EQEmu::invslot::slotGeneral8 && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::slotGeneral9)
|
||||
SubSlotNumber = EQEmu::invbag::SLOT_INVALID;
|
||||
else if (slot_id_in == EQEmu::invslot::slotCursor)
|
||||
SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT);
|
||||
if (slot_id_in <= EQ::invslot::slotGeneral8 && slot_id_in >= EQ::invslot::GENERAL_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQ::invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQ::invslot::GENERAL_END && slot_id_in >= EQ::invslot::slotGeneral9)
|
||||
SubSlotNumber = EQ::invbag::SLOT_INVALID;
|
||||
else if (slot_id_in == EQ::invslot::slotCursor)
|
||||
SubSlotNumber = EQ::invbag::CURSOR_BAG_BEGIN;
|
||||
else if (slot_id_in <= EQ::invslot::BANK_END && slot_id_in >= EQ::invslot::BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else if (slot_id_in <= EQ::invslot::SHARED_BANK_END && slot_id_in >= EQ::invslot::SHARED_BANK_BEGIN)
|
||||
SubSlotNumber = EQ::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQ::invslot::SHARED_BANK_BEGIN) * EQ::invbag::SLOT_COUNT);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now
|
||||
|
||||
if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (SubSlotNumber != EQ::invbag::SLOT_INVALID) {
|
||||
for (uint32 index = EQ::invbag::SLOT_BEGIN; index <= EQ::invbag::SLOT_END; ++index) {
|
||||
EQ::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
@@ -4158,59 +4158,59 @@ namespace UF
|
||||
{
|
||||
uint32 UFSlot = invslot::SLOT_INVALID;
|
||||
|
||||
if (serverSlot <= EQEmu::invslot::slotGeneral8) {
|
||||
if (serverSlot <= EQ::invslot::slotGeneral8) {
|
||||
UFSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::CORPSE_END && serverSlot >= EQEmu::invslot::slotCursor) {
|
||||
else if (serverSlot <= EQ::invslot::CORPSE_END && serverSlot >= EQ::invslot::slotCursor) {
|
||||
UFSlot = serverSlot - 2;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::GENERAL_BAGS_8_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::GENERAL_BAGS_8_END && serverSlot >= EQ::invbag::GENERAL_BAGS_BEGIN) {
|
||||
UFSlot = serverSlot + 11;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::CURSOR_BAG_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::CURSOR_BAG_END && serverSlot >= EQ::invbag::CURSOR_BAG_BEGIN) {
|
||||
UFSlot = serverSlot - 9;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::TRIBUTE_END && serverSlot >= EQ::invslot::TRIBUTE_BEGIN) {
|
||||
UFSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::GUILD_TRIBUTE_END && serverSlot >= EQ::invslot::GUILD_TRIBUTE_BEGIN) {
|
||||
UFSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
else if (serverSlot == EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
|
||||
UFSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::BANK_END && serverSlot >= EQ::invslot::BANK_BEGIN) {
|
||||
UFSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::BANK_BAGS_END && serverSlot >= EQ::invbag::BANK_BAGS_BEGIN) {
|
||||
UFSlot = serverSlot + 1;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::SHARED_BANK_END && serverSlot >= EQ::invslot::SHARED_BANK_BEGIN) {
|
||||
UFSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQ::invbag::SHARED_BANK_BAGS_BEGIN) {
|
||||
UFSlot = serverSlot + 1;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::TRADE_END && serverSlot >= EQ::invslot::TRADE_BEGIN) {
|
||||
UFSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) {
|
||||
else if (serverSlot <= EQ::invbag::TRADE_BAGS_END && serverSlot >= EQ::invbag::TRADE_BAGS_BEGIN) {
|
||||
UFSlot = serverSlot;
|
||||
}
|
||||
|
||||
else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) {
|
||||
else if (serverSlot <= EQ::invslot::WORLD_END && serverSlot >= EQ::invslot::WORLD_BEGIN) {
|
||||
UFSlot = serverSlot;
|
||||
}
|
||||
|
||||
@@ -4223,11 +4223,11 @@ namespace UF
|
||||
{
|
||||
uint32 UFSlot = invslot::SLOT_INVALID;
|
||||
|
||||
if (serverCorpseSlot <= EQEmu::invslot::slotGeneral8 && serverCorpseSlot >= EQEmu::invslot::slotGeneral1) {
|
||||
if (serverCorpseSlot <= EQ::invslot::slotGeneral8 && serverCorpseSlot >= EQ::invslot::slotGeneral1) {
|
||||
UFSlot = serverCorpseSlot;
|
||||
}
|
||||
|
||||
else if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::slotCursor) {
|
||||
else if (serverCorpseSlot <= EQ::invslot::CORPSE_END && serverCorpseSlot >= EQ::invslot::slotCursor) {
|
||||
UFSlot = serverCorpseSlot - 2;
|
||||
}
|
||||
|
||||
@@ -4238,7 +4238,7 @@ namespace UF
|
||||
|
||||
static inline uint32 UFToServerSlot(uint32 ufSlot)
|
||||
{
|
||||
uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (ufSlot <= invslot::slotGeneral8) {
|
||||
ServerSlot = ufSlot;
|
||||
@@ -4303,7 +4303,7 @@ namespace UF
|
||||
|
||||
static inline uint32 UFToServerCorpseSlot(uint32 ufCorpseSlot)
|
||||
{
|
||||
uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID;
|
||||
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
if (ufCorpseSlot <= invslot::slotGeneral8 && ufCorpseSlot >= invslot::slotGeneral1) {
|
||||
ServerSlot = ufCorpseSlot;
|
||||
@@ -4320,7 +4320,7 @@ namespace UF
|
||||
|
||||
static inline void ServerToUFSayLink(std::string& ufSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQ::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
ufSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -4329,7 +4329,7 @@ namespace UF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
if (segments[segment_iter].length() <= EQ::constants::SAY_LINK_BODY_SIZE) {
|
||||
ufSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -4360,7 +4360,7 @@ namespace UF
|
||||
|
||||
static inline void UFToServerSayLink(std::string& serverSayLink, const std::string& ufSayLink)
|
||||
{
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (ufSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQ::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (ufSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = ufSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -4394,92 +4394,92 @@ namespace UF
|
||||
}
|
||||
}
|
||||
|
||||
static inline spells::CastingSlot ServerToUFCastingSlot(EQEmu::spells::CastingSlot slot)
|
||||
static inline spells::CastingSlot ServerToUFCastingSlot(EQ::spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
case EQ::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
case EQ::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
case EQ::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
case EQ::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
case EQ::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
case EQ::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
case EQ::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
case EQ::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
case EQ::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Gem10:
|
||||
case EQ::spells::CastingSlot::Gem10:
|
||||
return spells::CastingSlot::Gem10;
|
||||
case EQEmu::spells::CastingSlot::Gem11:
|
||||
case EQ::spells::CastingSlot::Gem11:
|
||||
return spells::CastingSlot::Gem11;
|
||||
case EQEmu::spells::CastingSlot::Gem12:
|
||||
case EQ::spells::CastingSlot::Gem12:
|
||||
return spells::CastingSlot::Gem12;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
case EQ::spells::CastingSlot::Item:
|
||||
case EQ::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
case EQ::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
case EQ::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::spells::CastingSlot UFToServerCastingSlot(spells::CastingSlot slot)
|
||||
static inline EQ::spells::CastingSlot UFToServerCastingSlot(spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
return EQ::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
return EQ::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
return EQ::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
return EQ::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
return EQ::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
return EQ::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
return EQ::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
return EQ::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
return EQ::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Gem10:
|
||||
return EQEmu::spells::CastingSlot::Gem10;
|
||||
return EQ::spells::CastingSlot::Gem10;
|
||||
case spells::CastingSlot::Gem11:
|
||||
return EQEmu::spells::CastingSlot::Gem11;
|
||||
return EQ::spells::CastingSlot::Gem11;
|
||||
case spells::CastingSlot::Gem12:
|
||||
return EQEmu::spells::CastingSlot::Gem12;
|
||||
return EQ::spells::CastingSlot::Gem12;
|
||||
case spells::CastingSlot::Discipline:
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
case spells::CastingSlot::Item:
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
return EQ::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
return EQ::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
return EQ::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int ServerToUFBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
|
||||
if (index >= EQ::spells::LONG_BUFFS + EQ::spells::SHORT_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS - EQ::spells::SHORT_BUFFS +
|
||||
spells::LONG_BUFFS + spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= EQEmu::spells::LONG_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
if (index >= EQ::spells::LONG_BUFFS)
|
||||
return index - EQ::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
@@ -4488,11 +4488,11 @@ namespace UF
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
|
||||
EQEmu::spells::SHORT_BUFFS;
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQ::spells::LONG_BUFFS +
|
||||
EQ::spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= spells::LONG_BUFFS)
|
||||
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
|
||||
return index - spells::LONG_BUFFS + EQ::spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ namespace UF
|
||||
protected:
|
||||
|
||||
virtual std::string Describe() const;
|
||||
virtual const EQEmu::versions::ClientVersion ClientVersion() const;
|
||||
virtual const EQ::versions::ClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "ss_declare.h"
|
||||
|
||||
+15
-15
@@ -31,7 +31,7 @@ namespace UF
|
||||
const int16 INULL = 0;
|
||||
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetInventoryRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace UF
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetInvTypeRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
@@ -106,7 +106,7 @@ namespace UF
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetInvSlotRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
@@ -205,7 +205,7 @@ namespace UF
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetInvBagRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
@@ -237,7 +237,7 @@ namespace UF
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetInvAugRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
@@ -249,7 +249,7 @@ namespace UF
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetItemRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
@@ -268,7 +268,7 @@ namespace UF
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetProfileRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
@@ -280,11 +280,11 @@ namespace UF
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetConstantsRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
const EQEmu::expansions::Expansion EXPANSION = EQEmu::expansions::Expansion::UF;
|
||||
const uint32 EXPANSION_BIT = EQEmu::expansions::bitUF;
|
||||
const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskUF;
|
||||
const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::UF;
|
||||
const uint32 EXPANSION_BIT = EQ::expansions::bitUF;
|
||||
const uint32 EXPANSIONS_MASK = EQ::expansions::maskUF;
|
||||
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
@@ -293,21 +293,21 @@ namespace UF
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetBehaviorRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
const size_t LastUsableSkill = EQ::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::UF; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
|
||||
@@ -149,7 +149,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
Tint_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
Texture_Struct Slot[EQ::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -195,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
||||
/*0000*/ uint8 Beard; //
|
||||
/*0001*/ uint8 HairColor; //
|
||||
/*0000*/ uint8 Face; //
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
/*0000*/ CharSelectEquip Equip[EQ::textures::materialCount];
|
||||
/*0000*/ uint32 PrimaryIDFile; //
|
||||
/*0000*/ uint32 SecondaryIDFile; //
|
||||
/*0000*/ uint8 Unknown15; // 0xff
|
||||
|
||||
Reference in New Issue
Block a user