mirror of
https://github.com/EQEmu/Server.git
synced 2026-10-07 21:03:35 +00:00
Corrected missing find/replace for steam_latest
This commit is contained in:
1 parent
a6f4438c0d
commit
28e6ef29d4
7 files changed
+129
-129
No files matched your search
+111
-111
@@ -40,7 +40,7 @@ namespace TOB
|
|||||||
|
|
||||||
// SpawnAppearance
|
// SpawnAppearance
|
||||||
static inline uint32 ServerToTOBSpawnAppearanceType(uint32 server_type);
|
static inline uint32 ServerToTOBSpawnAppearanceType(uint32 server_type);
|
||||||
static inline uint32 TOBToServerSpawnAppearanceType(uint32 steam_latest_type);
|
static inline uint32 TOBToServerSpawnAppearanceType(uint32 tob_type);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline structs::InventorySlot_Struct ServerToTOBSlot(uint32 server_slot);
|
static inline structs::InventorySlot_Struct ServerToTOBSlot(uint32 server_slot);
|
||||||
@@ -49,15 +49,15 @@ namespace TOB
|
|||||||
static inline structs::TypelessInventorySlot_Struct ServerToTOBTypelessSlot(uint32 server_slot, int16 server_type);
|
static inline structs::TypelessInventorySlot_Struct ServerToTOBTypelessSlot(uint32 server_slot, int16 server_type);
|
||||||
|
|
||||||
// client to server inventory location converters
|
// client to server inventory location converters
|
||||||
static inline uint32 TOBToServerSlot(structs::InventorySlot_Struct steam_latest_slot);
|
static inline uint32 TOBToServerSlot(structs::InventorySlot_Struct tob_slot);
|
||||||
static inline uint32 TOBToServerCorpseSlot(structs::InventorySlot_Struct steam_latest_corpse_slot);
|
static inline uint32 TOBToServerCorpseSlot(structs::InventorySlot_Struct tob_corpse_slot);
|
||||||
static inline uint32 TOBToServerCorpseMainSlot(uint32 steam_latest_corpse_slot);
|
static inline uint32 TOBToServerCorpseMainSlot(uint32 tob_corpse_slot);
|
||||||
static inline uint32 TOBToServerTypelessSlot(structs::TypelessInventorySlot_Struct steam_latest_slot, int16 steam_latest_type);
|
static inline uint32 TOBToServerTypelessSlot(structs::TypelessInventorySlot_Struct tob_slot, int16 tob_type);
|
||||||
static inline structs::InventorySlot_Struct TOBCastingInventorySlotToInventorySlot(structs::CastSpellInventorySlot_Struct steam_latest_slot);
|
static inline structs::InventorySlot_Struct TOBCastingInventorySlotToInventorySlot(structs::CastSpellInventorySlot_Struct tob_slot);
|
||||||
static inline structs::CastSpellInventorySlot_Struct TOBInventorySlotToCastingInventorySlot(structs::InventorySlot_Struct steam_latest_slot);
|
static inline structs::CastSpellInventorySlot_Struct TOBInventorySlotToCastingInventorySlot(structs::InventorySlot_Struct tob_slot);
|
||||||
|
|
||||||
// Item packet types
|
// Item packet types
|
||||||
static item::ItemPacketType ServerToTOBItemPacketType(ItemPacketType steam_latest_type);
|
static item::ItemPacketType ServerToTOBItemPacketType(ItemPacketType tob_type);
|
||||||
|
|
||||||
// casting slots
|
// casting slots
|
||||||
static inline spells::CastingSlot ServerToTOBCastingSlot(EQ::spells::CastingSlot slot);
|
static inline spells::CastingSlot ServerToTOBCastingSlot(EQ::spells::CastingSlot slot);
|
||||||
@@ -2898,7 +2898,7 @@ namespace TOB
|
|||||||
|
|
||||||
if (sas->type != AppearanceType::Size)
|
if (sas->type != AppearanceType::Size)
|
||||||
{
|
{
|
||||||
//steam_latest struct is different than rof2's but the idea is the same
|
//tob struct is different than rof2's but the idea is the same
|
||||||
//we will probably want to better implement TOB's structure later
|
//we will probably want to better implement TOB's structure later
|
||||||
auto outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(structs::SpawnAppearance_Struct));
|
auto outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(structs::SpawnAppearance_Struct));
|
||||||
structs::SpawnAppearance_Struct *eq = (structs::SpawnAppearance_Struct*)outapp->pBuffer;
|
structs::SpawnAppearance_Struct *eq = (structs::SpawnAppearance_Struct*)outapp->pBuffer;
|
||||||
@@ -4794,8 +4794,8 @@ namespace TOB
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 TOBToServerSpawnAppearanceType(uint32 steam_latest_type) {
|
static inline uint32 TOBToServerSpawnAppearanceType(uint32 tob_type) {
|
||||||
switch (steam_latest_type)
|
switch (tob_type)
|
||||||
{
|
{
|
||||||
case structs::TOBAppearance::WhoLevel:
|
case structs::TOBAppearance::WhoLevel:
|
||||||
return AppearanceType::WhoLevel;
|
return AppearanceType::WhoLevel;
|
||||||
@@ -5012,11 +5012,11 @@ namespace TOB
|
|||||||
return TOBSlot;
|
return TOBSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 TOBToServerSlot(structs::InventorySlot_Struct steam_latest_slot)
|
static inline uint32 TOBToServerSlot(structs::InventorySlot_Struct tob_slot)
|
||||||
{
|
{
|
||||||
if (steam_latest_slot.AugIndex < invaug::SOCKET_INVALID || steam_latest_slot.AugIndex >= invaug::SOCKET_COUNT) {
|
if (tob_slot.AugIndex < invaug::SOCKET_INVALID || tob_slot.AugIndex >= invaug::SOCKET_COUNT) {
|
||||||
Log(Logs::Detail, Logs::Netcode, "Convert TOB Slot [%i, %i, %i, %i] to Server Slot %i",
|
Log(Logs::Detail, Logs::Netcode, "Convert TOB Slot [%i, %i, %i, %i] to Server Slot %i",
|
||||||
steam_latest_slot.Type, steam_latest_slot.Slot, steam_latest_slot.SubIndex, steam_latest_slot.AugIndex, EQ::invslot::SLOT_INVALID);
|
tob_slot.Type, tob_slot.Slot, tob_slot.SubIndex, tob_slot.AugIndex, EQ::invslot::SLOT_INVALID);
|
||||||
|
|
||||||
return EQ::invslot::SLOT_INVALID;
|
return EQ::invslot::SLOT_INVALID;
|
||||||
}
|
}
|
||||||
@@ -5024,110 +5024,110 @@ namespace TOB
|
|||||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||||
uint32 temp_slot = invslot::SLOT_INVALID;
|
uint32 temp_slot = invslot::SLOT_INVALID;
|
||||||
|
|
||||||
switch (steam_latest_slot.Type) {
|
switch (tob_slot.Type) {
|
||||||
case invtype::typePossessions: {
|
case invtype::typePossessions: {
|
||||||
if (steam_latest_slot.Slot >= invslot::POSSESSIONS_BEGIN && steam_latest_slot.Slot <= invslot::POSSESSIONS_END) {
|
if (tob_slot.Slot >= invslot::POSSESSIONS_BEGIN && tob_slot.Slot <= invslot::POSSESSIONS_END) {
|
||||||
if (steam_latest_slot.SubIndex == invbag::SLOT_INVALID) {
|
if (tob_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||||
if (steam_latest_slot.Slot == invslot::slotCursor) {
|
if (tob_slot.Slot == invslot::slotCursor) {
|
||||||
server_slot = EQ::invslot::slotCursor;
|
server_slot = EQ::invslot::slotCursor;
|
||||||
}
|
}
|
||||||
else if(steam_latest_slot.Slot == invslot::slotGeneral11 || steam_latest_slot.Slot == invslot::slotGeneral12)
|
else if(tob_slot.Slot == invslot::slotGeneral11 || tob_slot.Slot == invslot::slotGeneral12)
|
||||||
{
|
{
|
||||||
return EQ::invslot::SLOT_INVALID;
|
return EQ::invslot::SLOT_INVALID;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
server_slot = steam_latest_slot.Slot;
|
server_slot = tob_slot.Slot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.SubIndex >= invbag::SLOT_BEGIN && steam_latest_slot.SubIndex <= invbag::SLOT_END) {
|
else if (tob_slot.SubIndex >= invbag::SLOT_BEGIN && tob_slot.SubIndex <= invbag::SLOT_END) {
|
||||||
if (steam_latest_slot.Slot < invslot::GENERAL_BEGIN)
|
if (tob_slot.Slot < invslot::GENERAL_BEGIN)
|
||||||
return EQ::invslot::SLOT_INVALID;
|
return EQ::invslot::SLOT_INVALID;
|
||||||
|
|
||||||
temp_slot = (steam_latest_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
|
temp_slot = (tob_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
|
||||||
server_slot = EQ::invbag::GENERAL_BAGS_BEGIN + temp_slot + steam_latest_slot.SubIndex;
|
server_slot = EQ::invbag::GENERAL_BAGS_BEGIN + temp_slot + tob_slot.SubIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeBank: {
|
case invtype::typeBank: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::BANK_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::BANK_SIZE) {
|
||||||
if (steam_latest_slot.SubIndex == invbag::SLOT_INVALID) {
|
if (tob_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||||
server_slot = EQ::invslot::BANK_BEGIN + steam_latest_slot.Slot;
|
server_slot = EQ::invslot::BANK_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.SubIndex >= invbag::SLOT_BEGIN && steam_latest_slot.SubIndex <= invbag::SLOT_END) {
|
else if (tob_slot.SubIndex >= invbag::SLOT_BEGIN && tob_slot.SubIndex <= invbag::SLOT_END) {
|
||||||
temp_slot = steam_latest_slot.Slot * invbag::SLOT_COUNT;
|
temp_slot = tob_slot.Slot * invbag::SLOT_COUNT;
|
||||||
server_slot = EQ::invbag::BANK_BAGS_BEGIN + temp_slot + steam_latest_slot.SubIndex;
|
server_slot = EQ::invbag::BANK_BAGS_BEGIN + temp_slot + tob_slot.SubIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeSharedBank: {
|
case invtype::typeSharedBank: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::SHARED_BANK_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::SHARED_BANK_SIZE) {
|
||||||
if (steam_latest_slot.SubIndex == invbag::SLOT_INVALID) {
|
if (tob_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||||
server_slot = EQ::invslot::SHARED_BANK_BEGIN + steam_latest_slot.Slot;
|
server_slot = EQ::invslot::SHARED_BANK_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.SubIndex >= invbag::SLOT_BEGIN && steam_latest_slot.SubIndex <= invbag::SLOT_END) {
|
else if (tob_slot.SubIndex >= invbag::SLOT_BEGIN && tob_slot.SubIndex <= invbag::SLOT_END) {
|
||||||
temp_slot = steam_latest_slot.Slot * invbag::SLOT_COUNT;
|
temp_slot = tob_slot.Slot * invbag::SLOT_COUNT;
|
||||||
server_slot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + steam_latest_slot.SubIndex;
|
server_slot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + tob_slot.SubIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeTrade: {
|
case invtype::typeTrade: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::TRADE_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::TRADE_SIZE) {
|
||||||
if (steam_latest_slot.SubIndex == invbag::SLOT_INVALID) {
|
if (tob_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||||
server_slot = EQ::invslot::TRADE_BEGIN + steam_latest_slot.Slot;
|
server_slot = EQ::invslot::TRADE_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.SubIndex >= invbag::SLOT_BEGIN && steam_latest_slot.SubIndex <= invbag::SLOT_END) {
|
else if (tob_slot.SubIndex >= invbag::SLOT_BEGIN && tob_slot.SubIndex <= invbag::SLOT_END) {
|
||||||
temp_slot = steam_latest_slot.Slot * invbag::SLOT_COUNT;
|
temp_slot = tob_slot.Slot * invbag::SLOT_COUNT;
|
||||||
server_slot = EQ::invbag::TRADE_BAGS_BEGIN + temp_slot + steam_latest_slot.SubIndex;
|
server_slot = EQ::invbag::TRADE_BAGS_BEGIN + temp_slot + tob_slot.SubIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeWorld: {
|
case invtype::typeWorld: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::WORLD_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::WORLD_SIZE) {
|
||||||
server_slot = EQ::invslot::WORLD_BEGIN + steam_latest_slot.Slot;
|
server_slot = EQ::invslot::WORLD_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.Slot == invslot::SLOT_INVALID) {
|
else if (tob_slot.Slot == invslot::SLOT_INVALID) {
|
||||||
server_slot = EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
server_slot = EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeLimbo: {
|
case invtype::typeLimbo: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::LIMBO_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::LIMBO_SIZE) {
|
||||||
server_slot = EQ::invslot::slotCursor;
|
server_slot = EQ::invslot::slotCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeTribute: {
|
case invtype::typeTribute: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::TRIBUTE_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::TRIBUTE_SIZE) {
|
||||||
server_slot = EQ::invslot::TRIBUTE_BEGIN + steam_latest_slot.Slot;
|
server_slot = EQ::invslot::TRIBUTE_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeGuildTribute: {
|
case invtype::typeGuildTribute: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
|
||||||
server_slot = EQ::invslot::GUILD_TRIBUTE_BEGIN + steam_latest_slot.Slot;
|
server_slot = EQ::invslot::GUILD_TRIBUTE_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeCorpse: {
|
case invtype::typeCorpse: {
|
||||||
if (steam_latest_slot.Slot >= invslot::CORPSE_BEGIN && steam_latest_slot.Slot <= invslot::CORPSE_END) {
|
if (tob_slot.Slot >= invslot::CORPSE_BEGIN && tob_slot.Slot <= invslot::CORPSE_END) {
|
||||||
server_slot = steam_latest_slot.Slot;
|
server_slot = tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -5139,47 +5139,47 @@ namespace TOB
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log(Logs::Detail, Logs::Netcode, "Convert TOB Slot [%i, %i, %i, %i] to Server Slot %i",
|
Log(Logs::Detail, Logs::Netcode, "Convert TOB Slot [%i, %i, %i, %i] to Server Slot %i",
|
||||||
steam_latest_slot.Type, steam_latest_slot.Slot, steam_latest_slot.SubIndex, steam_latest_slot.AugIndex, server_slot);
|
tob_slot.Type, tob_slot.Slot, tob_slot.SubIndex, tob_slot.AugIndex, server_slot);
|
||||||
|
|
||||||
return server_slot;
|
return server_slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 TOBToServerCorpseSlot(structs::InventorySlot_Struct steam_latest_corpse_slot)
|
static inline uint32 TOBToServerCorpseSlot(structs::InventorySlot_Struct tob_corpse_slot)
|
||||||
{
|
{
|
||||||
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||||
|
|
||||||
if (steam_latest_corpse_slot.Type != invtype::typeCorpse || steam_latest_corpse_slot.SubIndex != invbag::SLOT_INVALID || steam_latest_corpse_slot.AugIndex != invaug::SOCKET_INVALID) {
|
if (tob_corpse_slot.Type != invtype::typeCorpse || tob_corpse_slot.SubIndex != invbag::SLOT_INVALID || tob_corpse_slot.AugIndex != invaug::SOCKET_INVALID) {
|
||||||
ServerSlot = EQ::invslot::SLOT_INVALID;
|
ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
ServerSlot = TOBToServerCorpseMainSlot(steam_latest_corpse_slot.Slot);
|
ServerSlot = TOBToServerCorpseMainSlot(tob_corpse_slot.Slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(Logs::Detail, Logs::Netcode, "Convert TOB Slot [%i, %i, %i, %i] to Server Slot %i",
|
Log(Logs::Detail, Logs::Netcode, "Convert TOB Slot [%i, %i, %i, %i] to Server Slot %i",
|
||||||
steam_latest_corpse_slot.Type, steam_latest_corpse_slot.Slot, steam_latest_corpse_slot.SubIndex, steam_latest_corpse_slot.AugIndex, ServerSlot);
|
tob_corpse_slot.Type, tob_corpse_slot.Slot, tob_corpse_slot.SubIndex, tob_corpse_slot.AugIndex, ServerSlot);
|
||||||
|
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 TOBToServerCorpseMainSlot(uint32 steam_latest_corpse_slot)
|
static inline uint32 TOBToServerCorpseMainSlot(uint32 tob_corpse_slot)
|
||||||
{
|
{
|
||||||
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||||
|
|
||||||
if (steam_latest_corpse_slot <= invslot::CORPSE_END && steam_latest_corpse_slot >= invslot::CORPSE_BEGIN) {
|
if (tob_corpse_slot <= invslot::CORPSE_END && tob_corpse_slot >= invslot::CORPSE_BEGIN) {
|
||||||
ServerSlot = steam_latest_corpse_slot;
|
ServerSlot = tob_corpse_slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogNetcode("Convert TOB Corpse Main Slot [{}] to Server Corpse Slot [{}]", steam_latest_corpse_slot, ServerSlot);
|
LogNetcode("Convert TOB Corpse Main Slot [{}] to Server Corpse Slot [{}]", tob_corpse_slot, ServerSlot);
|
||||||
|
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 TOBToServerTypelessSlot(structs::TypelessInventorySlot_Struct steam_latest_slot, int16 steam_latest_type)
|
static inline uint32 TOBToServerTypelessSlot(structs::TypelessInventorySlot_Struct tob_slot, int16 tob_type)
|
||||||
{
|
{
|
||||||
if (steam_latest_slot.AugIndex < invaug::SOCKET_INVALID || steam_latest_slot.AugIndex >= invaug::SOCKET_COUNT) {
|
if (tob_slot.AugIndex < invaug::SOCKET_INVALID || tob_slot.AugIndex >= invaug::SOCKET_COUNT) {
|
||||||
Log(Logs::Detail, Logs::Netcode, "Convert TOB Typeless Slot [%i, %i, %i] (implied type: %i) to Server Slot %i",
|
Log(Logs::Detail, Logs::Netcode, "Convert TOB Typeless Slot [%i, %i, %i] (implied type: %i) to Server Slot %i",
|
||||||
steam_latest_slot.Slot, steam_latest_slot.SubIndex, steam_latest_slot.AugIndex, steam_latest_type, EQ::invslot::SLOT_INVALID);
|
tob_slot.Slot, tob_slot.SubIndex, tob_slot.AugIndex, tob_type, EQ::invslot::SLOT_INVALID);
|
||||||
|
|
||||||
return EQ::invslot::SLOT_INVALID;
|
return EQ::invslot::SLOT_INVALID;
|
||||||
}
|
}
|
||||||
@@ -5187,101 +5187,101 @@ namespace TOB
|
|||||||
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||||
uint32 TempSlot = invslot::SLOT_INVALID;
|
uint32 TempSlot = invslot::SLOT_INVALID;
|
||||||
|
|
||||||
switch (steam_latest_type) {
|
switch (tob_type) {
|
||||||
case invtype::typePossessions: {
|
case invtype::typePossessions: {
|
||||||
if (steam_latest_slot.Slot >= invslot::POSSESSIONS_BEGIN && steam_latest_slot.Slot <= invslot::POSSESSIONS_END) {
|
if (tob_slot.Slot >= invslot::POSSESSIONS_BEGIN && tob_slot.Slot <= invslot::POSSESSIONS_END) {
|
||||||
if (steam_latest_slot.SubIndex == invbag::SLOT_INVALID) {
|
if (tob_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||||
ServerSlot = steam_latest_slot.Slot;
|
ServerSlot = tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.SubIndex >= invbag::SLOT_BEGIN && steam_latest_slot.SubIndex <= invbag::SLOT_END) {
|
else if (tob_slot.SubIndex >= invbag::SLOT_BEGIN && tob_slot.SubIndex <= invbag::SLOT_END) {
|
||||||
if (steam_latest_slot.Slot < invslot::GENERAL_BEGIN)
|
if (tob_slot.Slot < invslot::GENERAL_BEGIN)
|
||||||
return EQ::invslot::SLOT_INVALID;
|
return EQ::invslot::SLOT_INVALID;
|
||||||
|
|
||||||
TempSlot = (steam_latest_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
|
TempSlot = (tob_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
|
||||||
ServerSlot = EQ::invbag::GENERAL_BAGS_BEGIN + TempSlot + steam_latest_slot.SubIndex;
|
ServerSlot = EQ::invbag::GENERAL_BAGS_BEGIN + TempSlot + tob_slot.SubIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeBank: {
|
case invtype::typeBank: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::BANK_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::BANK_SIZE) {
|
||||||
if (steam_latest_slot.SubIndex == invbag::SLOT_INVALID) {
|
if (tob_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||||
ServerSlot = EQ::invslot::BANK_BEGIN + steam_latest_slot.Slot;
|
ServerSlot = EQ::invslot::BANK_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.SubIndex >= invbag::SLOT_BEGIN && steam_latest_slot.SubIndex <= invbag::SLOT_END) {
|
else if (tob_slot.SubIndex >= invbag::SLOT_BEGIN && tob_slot.SubIndex <= invbag::SLOT_END) {
|
||||||
TempSlot = steam_latest_slot.Slot * invbag::SLOT_COUNT;
|
TempSlot = tob_slot.Slot * invbag::SLOT_COUNT;
|
||||||
ServerSlot = EQ::invbag::BANK_BAGS_BEGIN + TempSlot + steam_latest_slot.SubIndex;
|
ServerSlot = EQ::invbag::BANK_BAGS_BEGIN + TempSlot + tob_slot.SubIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeSharedBank: {
|
case invtype::typeSharedBank: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::SHARED_BANK_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::SHARED_BANK_SIZE) {
|
||||||
if (steam_latest_slot.SubIndex == invbag::SLOT_INVALID) {
|
if (tob_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||||
ServerSlot = EQ::invslot::SHARED_BANK_BEGIN + steam_latest_slot.Slot;
|
ServerSlot = EQ::invslot::SHARED_BANK_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.SubIndex >= invbag::SLOT_BEGIN && steam_latest_slot.SubIndex <= invbag::SLOT_END) {
|
else if (tob_slot.SubIndex >= invbag::SLOT_BEGIN && tob_slot.SubIndex <= invbag::SLOT_END) {
|
||||||
TempSlot = steam_latest_slot.Slot * invbag::SLOT_COUNT;
|
TempSlot = tob_slot.Slot * invbag::SLOT_COUNT;
|
||||||
ServerSlot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + steam_latest_slot.SubIndex;
|
ServerSlot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + tob_slot.SubIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeTrade: {
|
case invtype::typeTrade: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::TRADE_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::TRADE_SIZE) {
|
||||||
if (steam_latest_slot.SubIndex == invbag::SLOT_INVALID) {
|
if (tob_slot.SubIndex == invbag::SLOT_INVALID) {
|
||||||
ServerSlot = EQ::invslot::TRADE_BEGIN + steam_latest_slot.Slot;
|
ServerSlot = EQ::invslot::TRADE_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.SubIndex >= invbag::SLOT_BEGIN && steam_latest_slot.SubIndex <= invbag::SLOT_END) {
|
else if (tob_slot.SubIndex >= invbag::SLOT_BEGIN && tob_slot.SubIndex <= invbag::SLOT_END) {
|
||||||
TempSlot = steam_latest_slot.Slot * invbag::SLOT_COUNT;
|
TempSlot = tob_slot.Slot * invbag::SLOT_COUNT;
|
||||||
ServerSlot = EQ::invbag::TRADE_BAGS_BEGIN + TempSlot + steam_latest_slot.SubIndex;
|
ServerSlot = EQ::invbag::TRADE_BAGS_BEGIN + TempSlot + tob_slot.SubIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeWorld: {
|
case invtype::typeWorld: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::WORLD_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::WORLD_SIZE) {
|
||||||
ServerSlot = EQ::invslot::WORLD_BEGIN + steam_latest_slot.Slot;
|
ServerSlot = EQ::invslot::WORLD_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (steam_latest_slot.Slot == invslot::SLOT_INVALID) {
|
else if (tob_slot.Slot == invslot::SLOT_INVALID) {
|
||||||
ServerSlot = EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
ServerSlot = EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeLimbo: {
|
case invtype::typeLimbo: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::LIMBO_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::LIMBO_SIZE) {
|
||||||
ServerSlot = EQ::invslot::slotCursor;
|
ServerSlot = EQ::invslot::slotCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeTribute: {
|
case invtype::typeTribute: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::TRIBUTE_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::TRIBUTE_SIZE) {
|
||||||
ServerSlot = EQ::invslot::TRIBUTE_BEGIN + steam_latest_slot.Slot;
|
ServerSlot = EQ::invslot::TRIBUTE_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeGuildTribute: {
|
case invtype::typeGuildTribute: {
|
||||||
if (steam_latest_slot.Slot >= invslot::SLOT_BEGIN && steam_latest_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
|
if (tob_slot.Slot >= invslot::SLOT_BEGIN && tob_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
|
||||||
ServerSlot = EQ::invslot::GUILD_TRIBUTE_BEGIN + steam_latest_slot.Slot;
|
ServerSlot = EQ::invslot::GUILD_TRIBUTE_BEGIN + tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case invtype::typeCorpse: {
|
case invtype::typeCorpse: {
|
||||||
if (steam_latest_slot.Slot >= invslot::CORPSE_BEGIN && steam_latest_slot.Slot <= invslot::CORPSE_END) {
|
if (tob_slot.Slot >= invslot::CORPSE_BEGIN && tob_slot.Slot <= invslot::CORPSE_END) {
|
||||||
ServerSlot = steam_latest_slot.Slot;
|
ServerSlot = tob_slot.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -5293,26 +5293,26 @@ namespace TOB
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log(Logs::Detail, Logs::Netcode, "Convert TOB Typeless Slot [%i, %i, %i] (implied type: %i) to Server Slot %i",
|
Log(Logs::Detail, Logs::Netcode, "Convert TOB Typeless Slot [%i, %i, %i] (implied type: %i) to Server Slot %i",
|
||||||
steam_latest_slot.Slot, steam_latest_slot.SubIndex, steam_latest_slot.AugIndex, steam_latest_type, ServerSlot);
|
tob_slot.Slot, tob_slot.SubIndex, tob_slot.AugIndex, tob_type, ServerSlot);
|
||||||
|
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline structs::InventorySlot_Struct TOBCastingInventorySlotToInventorySlot(structs::CastSpellInventorySlot_Struct steam_latest_slot) {
|
static inline structs::InventorySlot_Struct TOBCastingInventorySlotToInventorySlot(structs::CastSpellInventorySlot_Struct tob_slot) {
|
||||||
structs::InventorySlot_Struct ret;
|
structs::InventorySlot_Struct ret;
|
||||||
ret.Type = steam_latest_slot.type;
|
ret.Type = tob_slot.type;
|
||||||
ret.Slot = steam_latest_slot.slot;
|
ret.Slot = tob_slot.slot;
|
||||||
ret.SubIndex = steam_latest_slot.sub_index;
|
ret.SubIndex = tob_slot.sub_index;
|
||||||
ret.AugIndex = steam_latest_slot.aug_index;
|
ret.AugIndex = tob_slot.aug_index;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline structs::CastSpellInventorySlot_Struct TOBInventorySlotToCastingInventorySlot(structs::InventorySlot_Struct steam_latest_slot) {
|
static inline structs::CastSpellInventorySlot_Struct TOBInventorySlotToCastingInventorySlot(structs::InventorySlot_Struct tob_slot) {
|
||||||
structs::CastSpellInventorySlot_Struct ret;
|
structs::CastSpellInventorySlot_Struct ret;
|
||||||
ret.type = steam_latest_slot.Type;
|
ret.type = tob_slot.Type;
|
||||||
ret.slot = steam_latest_slot.Slot;
|
ret.slot = tob_slot.Slot;
|
||||||
ret.sub_index = steam_latest_slot.SubIndex;
|
ret.sub_index = tob_slot.SubIndex;
|
||||||
ret.aug_index = steam_latest_slot.AugIndex;
|
ret.aug_index = tob_slot.AugIndex;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ namespace TOB {
|
|||||||
struct EnterWorld_Struct {
|
struct EnterWorld_Struct {
|
||||||
/*000*/ char name[64];
|
/*000*/ char name[64];
|
||||||
/*064*/ int32 unknown1;
|
/*064*/ int32 unknown1;
|
||||||
/*068*/ int32 unknown2; //steam_latest handles these differently so for now im just going to ignore them till i figure it out
|
/*068*/ int32 unknown2; //tob handles these differently so for now im just going to ignore them till i figure it out
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ZoneChange_Struct {
|
struct ZoneChange_Struct {
|
||||||
@@ -1033,6 +1033,6 @@ namespace TOB {
|
|||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
}; //end namespace structs
|
}; //end namespace structs
|
||||||
}; //end namespace steam_latest
|
}; //end namespace tob
|
||||||
|
|
||||||
#endif /*LAURION_STRUCTS_H_*/
|
#endif /*LAURION_STRUCTS_H_*/
|
||||||
@@ -362,7 +362,7 @@ void Client::SendFailedLogin()
|
|||||||
m_stored_username.clear();
|
m_stored_username.clear();
|
||||||
m_stored_password.clear();
|
m_stored_password.clear();
|
||||||
|
|
||||||
if (m_client_version == cv_steam_latest) {
|
if (m_client_version == cv_tob) {
|
||||||
// unencrypted
|
// unencrypted
|
||||||
LoginBaseMessage h{};
|
LoginBaseMessage h{};
|
||||||
h.sequence = m_login_base_message.sequence; // login (3)
|
h.sequence = m_login_base_message.sequence; // login (3)
|
||||||
@@ -496,7 +496,7 @@ void Client::DoSuccessfulLogin(LoginAccountsRepository::LoginAccounts &a)
|
|||||||
m_account_name = a.account_name;
|
m_account_name = a.account_name;
|
||||||
m_loginserver_name = a.source_loginserver;
|
m_loginserver_name = a.source_loginserver;
|
||||||
|
|
||||||
if (m_client_version == cv_steam_latest) {
|
if (m_client_version == cv_tob) {
|
||||||
// unencrypted
|
// unencrypted
|
||||||
LoginBaseMessage h{};
|
LoginBaseMessage h{};
|
||||||
h.sequence = m_login_base_message.sequence;
|
h.sequence = m_login_base_message.sequence;
|
||||||
|
|||||||
@@ -177,31 +177,31 @@ ClientManager::ClientManager()
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
int steam_latest_port = server.config.GetVariableInt("client_configuration", "steam_latest_port", 15900);
|
int tob_port = server.config.GetVariableInt("client_configuration", "tob_port", 15900);
|
||||||
|
|
||||||
EQStreamManagerInterfaceOptions steam_latest_opts(steam_latest_port, false, false);
|
EQStreamManagerInterfaceOptions tob_opts(tob_port, false, false);
|
||||||
|
|
||||||
m_steam_latest_stream = new EQ::Net::EQStreamManager(steam_latest_opts);
|
m_tob_stream = new EQ::Net::EQStreamManager(tob_opts);
|
||||||
m_steam_latest_ops = new RegularOpcodeManager;
|
m_tob_ops = new RegularOpcodeManager;
|
||||||
|
|
||||||
opcodes_path = fmt::format(
|
opcodes_path = fmt::format(
|
||||||
"{}/{}",
|
"{}/{}",
|
||||||
PathManager::Instance()->GetOpcodePath(),
|
PathManager::Instance()->GetOpcodePath(),
|
||||||
"login_opcodes_steam_latest.conf"
|
"login_opcodes_tob.conf"
|
||||||
);
|
);
|
||||||
|
|
||||||
CheckTOBOpcodeFile(opcodes_path);
|
CheckTOBOpcodeFile(opcodes_path);
|
||||||
|
|
||||||
if (!m_steam_latest_ops->LoadOpcodes(opcodes_path.c_str())) {
|
if (!m_tob_ops->LoadOpcodes(opcodes_path.c_str())) {
|
||||||
LogError(
|
LogError(
|
||||||
"ClientManager fatal error: couldn't load opcodes for Steam Latest file [{}]",
|
"ClientManager fatal error: couldn't load opcodes for Steam Latest file [{}]",
|
||||||
server.config.GetVariableString("client_configuration", "steam_latest_opcodes", "login_opcodes.conf")
|
server.config.GetVariableString("client_configuration", "tob_opcodes", "login_opcodes.conf")
|
||||||
);
|
);
|
||||||
|
|
||||||
run_server = false;
|
run_server = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_steam_latest_stream->OnNewConnection(
|
m_tob_stream->OnNewConnection(
|
||||||
[this](std::shared_ptr<EQ::Net::EQStream> stream) {
|
[this](std::shared_ptr<EQ::Net::EQStream> stream) {
|
||||||
LogInfo(
|
LogInfo(
|
||||||
"New Steam Latest client connection from [{}:{}]",
|
"New Steam Latest client connection from [{}:{}]",
|
||||||
@@ -209,8 +209,8 @@ ClientManager::ClientManager()
|
|||||||
stream->GetRemotePort()
|
stream->GetRemotePort()
|
||||||
);
|
);
|
||||||
|
|
||||||
stream->SetOpcodeManager(&m_steam_latest_ops);
|
stream->SetOpcodeManager(&m_tob_ops);
|
||||||
Client *c = new Client(stream, cv_steam_latest);
|
Client *c = new Client(stream, cv_tob);
|
||||||
m_clients.push_back(c);
|
m_clients.push_back(c);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -37,6 +37,6 @@ private:
|
|||||||
EQ::Net::EQStreamManager *m_titanium_stream;
|
EQ::Net::EQStreamManager *m_titanium_stream;
|
||||||
OpcodeManager *m_sod_ops;
|
OpcodeManager *m_sod_ops;
|
||||||
EQ::Net::EQStreamManager *m_sod_stream;
|
EQ::Net::EQStreamManager *m_sod_stream;
|
||||||
OpcodeManager *m_steam_latest_ops;
|
OpcodeManager *m_tob_ops;
|
||||||
EQ::Net::EQStreamManager *m_steam_latest_stream;
|
EQ::Net::EQStreamManager *m_tob_stream;
|
||||||
};
|
};
|
||||||
@@ -126,7 +126,7 @@ struct SystemFingerprint {
|
|||||||
enum LSClientVersion {
|
enum LSClientVersion {
|
||||||
cv_titanium,
|
cv_titanium,
|
||||||
cv_sod,
|
cv_sod,
|
||||||
cv_steam_latest
|
cv_tob
|
||||||
};
|
};
|
||||||
|
|
||||||
enum LSClientStatus {
|
enum LSClientStatus {
|
||||||
|
|||||||
@@ -706,7 +706,7 @@ bool WorldServer::ValidateWorldServerAdminLogin(
|
|||||||
|
|
||||||
void WorldServer::SerializeForClientServerList(SerializeBuffer &out, bool use_local_ip, LSClientVersion version) const
|
void WorldServer::SerializeForClientServerList(SerializeBuffer &out, bool use_local_ip, LSClientVersion version) const
|
||||||
{
|
{
|
||||||
if (version == cv_steam_latest) {
|
if (version == cv_tob) {
|
||||||
if (use_local_ip) {
|
if (use_local_ip) {
|
||||||
out.WriteString(GetLocalIP());
|
out.WriteString(GetLocalIP());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user