Rename Larion -> Laurion; later we'll rename the branch too. Make sure to update your patch file name.

This commit is contained in:
KimLS 2024-11-25 20:25:09 -08:00
parent 4e53f5464f
commit 11636225b1
20 changed files with 298 additions and 298 deletions

View File

@ -112,8 +112,8 @@ SET(common_sources
net/websocket_server.cpp net/websocket_server.cpp
net/websocket_server_connection.cpp net/websocket_server_connection.cpp
patches/patches.cpp patches/patches.cpp
patches/larion.cpp patches/laurion.cpp
patches/larion_limits.cpp patches/laurion_limits.cpp
patches/sod.cpp patches/sod.cpp
patches/sod_limits.cpp patches/sod_limits.cpp
patches/sof.cpp patches/sof.cpp
@ -657,10 +657,10 @@ SET(common_headers
net/websocket_server.h net/websocket_server.h
net/websocket_server_connection.h net/websocket_server_connection.h
patches/patches.h patches/patches.h
patches/larion.h patches/laurion.h
patches/larion_limits.h patches/laurion_limits.h
patches/larion_ops.h patches/laurion_ops.h
patches/larion_structs.h patches/laurion_structs.h
patches/sod.h patches/sod.h
patches/sod_limits.h patches/sod_limits.h
patches/sod_ops.h patches/sod_ops.h
@ -747,10 +747,10 @@ SOURCE_GROUP(Net FILES
SOURCE_GROUP(Patches FILES SOURCE_GROUP(Patches FILES
patches/patches.h patches/patches.h
patches/larion.h patches/laurion.h
patches/larion_limits.h patches/laurion_limits.h
patches/larion_ops.h patches/laurion_ops.h
patches/larion_structs.h patches/laurion_structs.h
patches/sod.h patches/sod.h
patches/sod_limits.h patches/sod_limits.h
patches/sod_ops.h patches/sod_ops.h
@ -779,8 +779,8 @@ SOURCE_GROUP(Patches FILES
patches/uf_ops.h patches/uf_ops.h
patches/uf_structs.h patches/uf_structs.h
patches/patches.cpp patches/patches.cpp
patches/larion.cpp patches/laurion.cpp
patches/larion_limits.cpp patches/laurion_limits.cpp
patches/sod.cpp patches/sod.cpp
patches/sod_limits.cpp patches/sod_limits.cpp
patches/sof.cpp patches/sof.cpp

View File

@ -56,8 +56,8 @@ const char* EQ::versions::ClientVersionName(ClientVersion client_version)
return "RoF"; return "RoF";
case ClientVersion::RoF2: case ClientVersion::RoF2:
return "RoF2"; return "RoF2";
case ClientVersion::Larion: case ClientVersion::Laurion:
return "Larion"; return "Laurion";
default: default:
return "Invalid Version"; return "Invalid Version";
}; };
@ -78,8 +78,8 @@ uint32 EQ::versions::ConvertClientVersionToClientVersionBit(ClientVersion client
return bitRoF; return bitRoF;
case ClientVersion::RoF2: case ClientVersion::RoF2:
return bitRoF2; return bitRoF2;
case ClientVersion::Larion: case ClientVersion::Laurion:
return bitLarion; return bitLaurion;
default: default:
return bitUnknown; return bitUnknown;
} }
@ -100,8 +100,8 @@ EQ::versions::ClientVersion EQ::versions::ConvertClientVersionBitToClientVersion
return ClientVersion::RoF; return ClientVersion::RoF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF2) - 1)) : case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF2) - 1)) :
return ClientVersion::RoF2; return ClientVersion::RoF2;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Larion) - 1)): case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Laurion) - 1)):
return ClientVersion::Larion; return ClientVersion::Laurion;
default: default:
return ClientVersion::Unknown; return ClientVersion::Unknown;
} }
@ -190,8 +190,8 @@ const char* EQ::versions::MobVersionName(MobVersion mob_version)
return "RoF"; return "RoF";
case MobVersion::RoF2: case MobVersion::RoF2:
return "RoF2"; return "RoF2";
case MobVersion::Larion: case MobVersion::Laurion:
return "Larion"; return "Laurion";
case MobVersion::NPC: case MobVersion::NPC:
return "NPC"; return "NPC";
case MobVersion::NPCMerchant: case MobVersion::NPCMerchant:
@ -220,8 +220,8 @@ const char* EQ::versions::MobVersionName(MobVersion mob_version)
return "Offline RoF"; return "Offline RoF";
case MobVersion::OfflineRoF2: case MobVersion::OfflineRoF2:
return "Offline RoF2"; return "Offline RoF2";
case MobVersion::OfflineLarion: case MobVersion::OfflineLaurion:
return "Offline Larion"; return "Offline Laurion";
default: default:
return "Invalid Version"; return "Invalid Version";
}; };
@ -245,8 +245,8 @@ EQ::versions::ClientVersion EQ::versions::ConvertMobVersionToClientVersion(MobVe
return ClientVersion::RoF; return ClientVersion::RoF;
case MobVersion::RoF2: case MobVersion::RoF2:
return ClientVersion::RoF2; return ClientVersion::RoF2;
case MobVersion::Larion: case MobVersion::Laurion:
return ClientVersion::Larion; return ClientVersion::Laurion;
default: default:
return ClientVersion::Unknown; return ClientVersion::Unknown;
} }
@ -270,8 +270,8 @@ EQ::versions::MobVersion EQ::versions::ConvertClientVersionToMobVersion(ClientVe
return MobVersion::RoF; return MobVersion::RoF;
case ClientVersion::RoF2: case ClientVersion::RoF2:
return MobVersion::RoF2; return MobVersion::RoF2;
case ClientVersion::Larion: case ClientVersion::Laurion:
return MobVersion::Larion; return MobVersion::Laurion;
default: default:
return MobVersion::Unknown; return MobVersion::Unknown;
} }
@ -292,8 +292,8 @@ EQ::versions::MobVersion EQ::versions::ConvertPCMobVersionToOfflinePCMobVersion(
return MobVersion::OfflineRoF; return MobVersion::OfflineRoF;
case MobVersion::RoF2: case MobVersion::RoF2:
return MobVersion::OfflineRoF2; return MobVersion::OfflineRoF2;
case MobVersion::Larion: case MobVersion::Laurion:
return MobVersion::OfflineLarion; return MobVersion::OfflineLaurion;
default: default:
return MobVersion::Unknown; return MobVersion::Unknown;
} }
@ -314,8 +314,8 @@ EQ::versions::MobVersion EQ::versions::ConvertOfflinePCMobVersionToPCMobVersion(
return MobVersion::RoF; return MobVersion::RoF;
case MobVersion::OfflineRoF2: case MobVersion::OfflineRoF2:
return MobVersion::RoF2; return MobVersion::RoF2;
case MobVersion::OfflineLarion: case MobVersion::OfflineLaurion:
return MobVersion::Larion; return MobVersion::Laurion;
default: default:
return MobVersion::Unknown; return MobVersion::Unknown;
} }
@ -336,8 +336,8 @@ EQ::versions::ClientVersion EQ::versions::ConvertOfflinePCMobVersionToClientVers
return ClientVersion::RoF; return ClientVersion::RoF;
case MobVersion::OfflineRoF2: case MobVersion::OfflineRoF2:
return ClientVersion::RoF2; return ClientVersion::RoF2;
case MobVersion::OfflineLarion: case MobVersion::OfflineLaurion:
return ClientVersion::Larion; return ClientVersion::Laurion;
default: default:
return ClientVersion::Unknown; return ClientVersion::Unknown;
} }
@ -358,8 +358,8 @@ EQ::versions::MobVersion EQ::versions::ConvertClientVersionToOfflinePCMobVersion
return MobVersion::OfflineRoF; return MobVersion::OfflineRoF;
case ClientVersion::RoF2: case ClientVersion::RoF2:
return MobVersion::OfflineRoF2; return MobVersion::OfflineRoF2;
case ClientVersion::Larion: case ClientVersion::Laurion:
return MobVersion::OfflineLarion; return MobVersion::OfflineLaurion;
default: default:
return MobVersion::Unknown; return MobVersion::Unknown;
} }

View File

@ -37,7 +37,7 @@ namespace EQ
UF, // Build: 'Jun 8 2010 16:44:32' UF, // Build: 'Jun 8 2010 16:44:32'
RoF, // Build: 'Dec 10 2012 17:35:44' RoF, // Build: 'Dec 10 2012 17:35:44'
RoF2, // Build: 'May 10 2013 23:30:08' RoF2, // Build: 'May 10 2013 23:30:08'
Larion Laurion
}; };
enum ClientVersionBitmask : uint32 { enum ClientVersionBitmask : uint32 {
@ -49,7 +49,7 @@ namespace EQ
bitUF = 0x00000010, bitUF = 0x00000010,
bitRoF = 0x00000020, bitRoF = 0x00000020,
bitRoF2 = 0x00000040, bitRoF2 = 0x00000040,
bitLarion = 0x00000080, bitLaurion = 0x00000080,
maskUnknown = 0x00000000, maskUnknown = 0x00000000,
maskTitaniumAndEarlier = 0x00000003, maskTitaniumAndEarlier = 0x00000003,
maskSoFAndEarlier = 0x00000007, maskSoFAndEarlier = 0x00000007,
@ -61,11 +61,11 @@ namespace EQ
maskUFAndLater = 0xFFFFFFF0, maskUFAndLater = 0xFFFFFFF0,
maskRoFAndLater = 0xFFFFFFE0, maskRoFAndLater = 0xFFFFFFE0,
maskRoF2AndLater = 0xFFFFFFC0, maskRoF2AndLater = 0xFFFFFFC0,
maskLarionAndLater = 0xFFFFFF80, maskLaurionAndLater = 0xFFFFFF80,
maskAllClients = 0xFFFFFFFF maskAllClients = 0xFFFFFFFF
}; };
const ClientVersion LastClientVersion = ClientVersion::Larion; const ClientVersion LastClientVersion = ClientVersion::Laurion;
const size_t ClientVersionCount = (static_cast<size_t>(LastClientVersion) + 1); const size_t ClientVersionCount = (static_cast<size_t>(LastClientVersion) + 1);
bool IsValidClientVersion(ClientVersion client_version); bool IsValidClientVersion(ClientVersion client_version);
@ -83,7 +83,7 @@ namespace EQ
UF, UF,
RoF, RoF,
RoF2, RoF2,
Larion, Laurion,
NPC, NPC,
NPCMerchant, NPCMerchant,
Merc, Merc,
@ -98,13 +98,13 @@ namespace EQ
OfflineUF, OfflineUF,
OfflineRoF, OfflineRoF,
OfflineRoF2, OfflineRoF2,
OfflineLarion OfflineLaurion
}; };
const MobVersion LastMobVersion = MobVersion::OfflineLarion; const MobVersion LastMobVersion = MobVersion::OfflineLaurion;
const MobVersion LastPCMobVersion = MobVersion::Larion; const MobVersion LastPCMobVersion = MobVersion::Laurion;
const MobVersion LastNonPCMobVersion = MobVersion::BotPet; const MobVersion LastNonPCMobVersion = MobVersion::BotPet;
const MobVersion LastOfflinePCMobVersion = MobVersion::OfflineLarion; const MobVersion LastOfflinePCMobVersion = MobVersion::OfflineLaurion;
const size_t MobVersionCount = (static_cast<size_t>(LastMobVersion) + 1); const size_t MobVersionCount = (static_cast<size_t>(LastMobVersion) + 1);
bool IsValidMobVersion(MobVersion mob_version); bool IsValidMobVersion(MobVersion mob_version);

View File

@ -105,13 +105,13 @@ static const EQ::constants::LookupEntry constants_static_lookup_entries[EQ::vers
RoF2::constants::CHARACTER_CREATION_LIMIT, RoF2::constants::CHARACTER_CREATION_LIMIT,
RoF2::constants::SAY_LINK_BODY_SIZE RoF2::constants::SAY_LINK_BODY_SIZE
), ),
/*[ClientVersion::Larion] =*/ /*[ClientVersion::Laurion] =*/
EQ::constants::LookupEntry( EQ::constants::LookupEntry(
Larion::constants::EXPANSION, Laurion::constants::EXPANSION,
Larion::constants::EXPANSION_BIT, Laurion::constants::EXPANSION_BIT,
Larion::constants::EXPANSIONS_MASK, Laurion::constants::EXPANSIONS_MASK,
Larion::constants::CHARACTER_CREATION_LIMIT, Laurion::constants::CHARACTER_CREATION_LIMIT,
Larion::constants::SAY_LINK_BODY_SIZE Laurion::constants::SAY_LINK_BODY_SIZE
) )
}; };
@ -1273,18 +1273,18 @@ static const EQ::spells::LookupEntry spells_static_lookup_entries[EQ::versions::
RoF2::spells::PET_BUFFS, RoF2::spells::PET_BUFFS,
RoF2::spells::MERC_BUFFS RoF2::spells::MERC_BUFFS
), ),
/*[ClientVersion::Larion] =*/ /*[ClientVersion::Laurion] =*/
EQ::spells::LookupEntry( EQ::spells::LookupEntry(
Larion::spells::SPELL_ID_MAX, Laurion::spells::SPELL_ID_MAX,
Larion::spells::SPELLBOOK_SIZE, Laurion::spells::SPELLBOOK_SIZE,
UF::spells::SPELL_GEM_COUNT, // client translators are setup to allow the max value a client supports..however, the top 4 indices are not valid in this case UF::spells::SPELL_GEM_COUNT, // client translators are setup to allow the max value a client supports..however, the top 4 indices are not valid in this case
Larion::spells::LONG_BUFFS, Laurion::spells::LONG_BUFFS,
Larion::spells::SHORT_BUFFS, Laurion::spells::SHORT_BUFFS,
Larion::spells::DISC_BUFFS, Laurion::spells::DISC_BUFFS,
Larion::spells::TOTAL_BUFFS, Laurion::spells::TOTAL_BUFFS,
Larion::spells::NPC_BUFFS, Laurion::spells::NPC_BUFFS,
Larion::spells::PET_BUFFS, Laurion::spells::PET_BUFFS,
Larion::spells::MERC_BUFFS Laurion::spells::MERC_BUFFS
) )
}; };

View File

@ -29,7 +29,7 @@
#include "../common/patches/uf_limits.h" #include "../common/patches/uf_limits.h"
#include "../common/patches/rof_limits.h" #include "../common/patches/rof_limits.h"
#include "../common/patches/rof2_limits.h" #include "../common/patches/rof2_limits.h"
#include "../common/patches/larion_limits.h" #include "../common/patches/laurion_limits.h"
namespace EQ namespace EQ
{ {

View File

@ -20,7 +20,7 @@
#include "../global_define.h" #include "../global_define.h"
#include "../eqemu_config.h" #include "../eqemu_config.h"
#include "../eqemu_logsys.h" #include "../eqemu_logsys.h"
#include "larion.h" #include "laurion.h"
#include "../opcodemgr.h" #include "../opcodemgr.h"
#include "../eq_stream_ident.h" #include "../eq_stream_ident.h"
@ -30,7 +30,7 @@
#include "../misc_functions.h" #include "../misc_functions.h"
#include "../strings.h" #include "../strings.h"
#include "../inventory_profile.h" #include "../inventory_profile.h"
#include "larion_structs.h" #include "laurion_structs.h"
#include "../rulesys.h" #include "../rulesys.h"
#include "../path_manager.h" #include "../path_manager.h"
#include "../classes.h" #include "../classes.h"
@ -43,25 +43,25 @@
#include <cassert> #include <cassert>
#include <cinttypes> #include <cinttypes>
namespace Larion namespace Laurion
{ {
static const char* name = "Larion"; static const char* name = "Laurion";
static OpcodeManager* opcodes = nullptr; static OpcodeManager* opcodes = nullptr;
static Strategy struct_strategy; static Strategy struct_strategy;
void SerializeItem(SerializeBuffer &buffer, const EQ::ItemInstance* inst, int16 slot_id, uint8 depth, ItemPacketType packet_type); void SerializeItem(SerializeBuffer &buffer, const EQ::ItemInstance* inst, int16 slot_id, uint8 depth, ItemPacketType packet_type);
// server to client inventory location converters // server to client inventory location converters
static inline structs::InventorySlot_Struct ServerToLarionSlot(uint32 server_slot); static inline structs::InventorySlot_Struct ServerToLaurionSlot(uint32 server_slot);
static inline structs::InventorySlot_Struct ServerToLarionCorpseSlot(uint32 server_corpse_slot); static inline structs::InventorySlot_Struct ServerToLaurionCorpseSlot(uint32 server_corpse_slot);
static inline uint32 ServerToLarionCorpseMainSlot(uint32 server_corpse_slot); static inline uint32 ServerToLaurionCorpseMainSlot(uint32 server_corpse_slot);
static inline structs::TypelessInventorySlot_Struct ServerToLarionTypelessSlot(uint32 server_slot, int16 server_type); static inline structs::TypelessInventorySlot_Struct ServerToLaurionTypelessSlot(uint32 server_slot, int16 server_type);
// client to server inventory location converters // client to server inventory location converters
static inline uint32 LarionToServerSlot(structs::InventorySlot_Struct larion_slot); static inline uint32 LaurionToServerSlot(structs::InventorySlot_Struct laurion_slot);
static inline uint32 LarionToServerCorpseSlot(structs::InventorySlot_Struct larion_corpse_slot); static inline uint32 LaurionToServerCorpseSlot(structs::InventorySlot_Struct laurion_corpse_slot);
static inline uint32 LarionToServerCorpseMainSlot(uint32 larion_corpse_slot); static inline uint32 LaurionToServerCorpseMainSlot(uint32 laurion_corpse_slot);
static inline uint32 LarionToServerTypelessSlot(structs::TypelessInventorySlot_Struct larion_slot, int16 larion_type); static inline uint32 LaurionToServerTypelessSlot(structs::TypelessInventorySlot_Struct laurion_slot, int16 laurion_type);
void Register(EQStreamIdentifier& into) void Register(EQStreamIdentifier& into)
{ {
@ -120,7 +120,7 @@ namespace Larion
{ {
//all opcodes default to passthrough. //all opcodes default to passthrough.
#include "ss_register.h" #include "ss_register.h"
#include "larion_ops.h" #include "laurion_ops.h"
} }
std::string Strategy::Describe() const std::string Strategy::Describe() const
@ -133,7 +133,7 @@ namespace Larion
const EQ::versions::ClientVersion Strategy::ClientVersion() const const EQ::versions::ClientVersion Strategy::ClientVersion() const
{ {
return EQ::versions::ClientVersion::Larion; return EQ::versions::ClientVersion::Laurion;
} }
#include "ss_define.h" #include "ss_define.h"
@ -514,7 +514,7 @@ namespace Larion
if (sas->type != AppearanceType::Size) if (sas->type != AppearanceType::Size)
{ {
//larion struct is different than rof2's but the idea is the same //laurion struct is different than rof2's but the idea is the same
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;
@ -2714,7 +2714,7 @@ namespace Larion
int r; int r;
for (r = 0; r < 29; r++) { for (r = 0; r < 29; r++) {
// Size 68 in Larion // Size 68 in Laurion
IN(filters[r]); IN(filters[r]);
} }
@ -3328,10 +3328,10 @@ namespace Larion
structs::InventorySlot_Struct slot_id{}; structs::InventorySlot_Struct slot_id{};
switch (packet_type) { switch (packet_type) {
case ItemPacketLoot: case ItemPacketLoot:
slot_id = ServerToLarionCorpseSlot(slot_id_in); slot_id = ServerToLaurionCorpseSlot(slot_id_in);
break; break;
default: default:
slot_id = ServerToLarionSlot(slot_id_in); slot_id = ServerToLaurionSlot(slot_id_in);
break; break;
} }
@ -3499,156 +3499,156 @@ namespace Larion
buffer.WriteInt32(0); //unsupported atm buffer.WriteInt32(0); //unsupported atm
} }
static inline structs::InventorySlot_Struct ServerToLarionSlot(uint32 server_slot) static inline structs::InventorySlot_Struct ServerToLaurionSlot(uint32 server_slot)
{ {
structs::InventorySlot_Struct LarionSlot; structs::InventorySlot_Struct LaurionSlot;
LarionSlot.Type = invtype::TYPE_INVALID; LaurionSlot.Type = invtype::TYPE_INVALID;
LarionSlot.Slot = invslot::SLOT_INVALID; LaurionSlot.Slot = invslot::SLOT_INVALID;
LarionSlot.SubIndex = invbag::SLOT_INVALID; LaurionSlot.SubIndex = invbag::SLOT_INVALID;
LarionSlot.AugIndex = invaug::SOCKET_INVALID; LaurionSlot.AugIndex = invaug::SOCKET_INVALID;
uint32 TempSlot = EQ::invslot::SLOT_INVALID; uint32 TempSlot = EQ::invslot::SLOT_INVALID;
if (server_slot < EQ::invtype::POSSESSIONS_SIZE) { if (server_slot < EQ::invtype::POSSESSIONS_SIZE) {
LarionSlot.Type = invtype::typePossessions; LaurionSlot.Type = invtype::typePossessions;
LarionSlot.Slot = server_slot; LaurionSlot.Slot = server_slot;
} }
else if (server_slot <= EQ::invbag::CURSOR_BAG_END && server_slot >= EQ::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; TempSlot = server_slot - EQ::invbag::GENERAL_BAGS_BEGIN;
LarionSlot.Type = invtype::typePossessions; LaurionSlot.Type = invtype::typePossessions;
LarionSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQ::invbag::SLOT_COUNT); LaurionSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQ::invbag::SLOT_COUNT);
LarionSlot.SubIndex = TempSlot - ((LarionSlot.Slot - invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT); LaurionSlot.SubIndex = TempSlot - ((LaurionSlot.Slot - invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
} }
else if (server_slot <= EQ::invslot::TRIBUTE_END && server_slot >= EQ::invslot::TRIBUTE_BEGIN) { else if (server_slot <= EQ::invslot::TRIBUTE_END && server_slot >= EQ::invslot::TRIBUTE_BEGIN) {
LarionSlot.Type = invtype::typeTribute; LaurionSlot.Type = invtype::typeTribute;
LarionSlot.Slot = server_slot - EQ::invslot::TRIBUTE_BEGIN; LaurionSlot.Slot = server_slot - EQ::invslot::TRIBUTE_BEGIN;
} }
else if (server_slot <= EQ::invslot::GUILD_TRIBUTE_END && server_slot >= EQ::invslot::GUILD_TRIBUTE_BEGIN) { else if (server_slot <= EQ::invslot::GUILD_TRIBUTE_END && server_slot >= EQ::invslot::GUILD_TRIBUTE_BEGIN) {
LarionSlot.Type = invtype::typeGuildTribute; LaurionSlot.Type = invtype::typeGuildTribute;
LarionSlot.Slot = server_slot - EQ::invslot::GUILD_TRIBUTE_BEGIN; LaurionSlot.Slot = server_slot - EQ::invslot::GUILD_TRIBUTE_BEGIN;
} }
else if (server_slot == EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { else if (server_slot == EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
LarionSlot.Type = invtype::typeWorld; LaurionSlot.Type = invtype::typeWorld;
} }
else if (server_slot <= EQ::invslot::BANK_END && server_slot >= EQ::invslot::BANK_BEGIN) { else if (server_slot <= EQ::invslot::BANK_END && server_slot >= EQ::invslot::BANK_BEGIN) {
LarionSlot.Type = invtype::typeBank; LaurionSlot.Type = invtype::typeBank;
LarionSlot.Slot = server_slot - EQ::invslot::BANK_BEGIN; LaurionSlot.Slot = server_slot - EQ::invslot::BANK_BEGIN;
} }
else if (server_slot <= EQ::invbag::BANK_BAGS_END && server_slot >= EQ::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; TempSlot = server_slot - EQ::invbag::BANK_BAGS_BEGIN;
LarionSlot.Type = invtype::typeBank; LaurionSlot.Type = invtype::typeBank;
LarionSlot.Slot = TempSlot / EQ::invbag::SLOT_COUNT; LaurionSlot.Slot = TempSlot / EQ::invbag::SLOT_COUNT;
LarionSlot.SubIndex = TempSlot - (LarionSlot.Slot * EQ::invbag::SLOT_COUNT); LaurionSlot.SubIndex = TempSlot - (LaurionSlot.Slot * EQ::invbag::SLOT_COUNT);
} }
else if (server_slot <= EQ::invslot::SHARED_BANK_END && server_slot >= EQ::invslot::SHARED_BANK_BEGIN) { else if (server_slot <= EQ::invslot::SHARED_BANK_END && server_slot >= EQ::invslot::SHARED_BANK_BEGIN) {
LarionSlot.Type = invtype::typeSharedBank; LaurionSlot.Type = invtype::typeSharedBank;
LarionSlot.Slot = server_slot - EQ::invslot::SHARED_BANK_BEGIN; LaurionSlot.Slot = server_slot - EQ::invslot::SHARED_BANK_BEGIN;
} }
else if (server_slot <= EQ::invbag::SHARED_BANK_BAGS_END && server_slot >= EQ::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; TempSlot = server_slot - EQ::invbag::SHARED_BANK_BAGS_BEGIN;
LarionSlot.Type = invtype::typeSharedBank; LaurionSlot.Type = invtype::typeSharedBank;
LarionSlot.Slot = TempSlot / EQ::invbag::SLOT_COUNT; LaurionSlot.Slot = TempSlot / EQ::invbag::SLOT_COUNT;
LarionSlot.SubIndex = TempSlot - (LarionSlot.Slot * EQ::invbag::SLOT_COUNT); LaurionSlot.SubIndex = TempSlot - (LaurionSlot.Slot * EQ::invbag::SLOT_COUNT);
} }
else if (server_slot <= EQ::invslot::TRADE_END && server_slot >= EQ::invslot::TRADE_BEGIN) { else if (server_slot <= EQ::invslot::TRADE_END && server_slot >= EQ::invslot::TRADE_BEGIN) {
LarionSlot.Type = invtype::typeTrade; LaurionSlot.Type = invtype::typeTrade;
LarionSlot.Slot = server_slot - EQ::invslot::TRADE_BEGIN; LaurionSlot.Slot = server_slot - EQ::invslot::TRADE_BEGIN;
} }
else if (server_slot <= EQ::invbag::TRADE_BAGS_END && server_slot >= EQ::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; TempSlot = server_slot - EQ::invbag::TRADE_BAGS_BEGIN;
LarionSlot.Type = invtype::typeTrade; LaurionSlot.Type = invtype::typeTrade;
LarionSlot.Slot = TempSlot / EQ::invbag::SLOT_COUNT; LaurionSlot.Slot = TempSlot / EQ::invbag::SLOT_COUNT;
LarionSlot.SubIndex = TempSlot - (LarionSlot.Slot * EQ::invbag::SLOT_COUNT); LaurionSlot.SubIndex = TempSlot - (LaurionSlot.Slot * EQ::invbag::SLOT_COUNT);
} }
else if (server_slot <= EQ::invslot::WORLD_END && server_slot >= EQ::invslot::WORLD_BEGIN) { else if (server_slot <= EQ::invslot::WORLD_END && server_slot >= EQ::invslot::WORLD_BEGIN) {
LarionSlot.Type = invtype::typeWorld; LaurionSlot.Type = invtype::typeWorld;
LarionSlot.Slot = server_slot - EQ::invslot::WORLD_BEGIN; LaurionSlot.Slot = server_slot - EQ::invslot::WORLD_BEGIN;
} }
Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to Larion Slot [%i, %i, %i, %i]", Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to Laurion Slot [%i, %i, %i, %i]",
server_slot, LarionSlot.Type, LarionSlot.Slot, LarionSlot.SubIndex, LarionSlot.AugIndex); server_slot, LaurionSlot.Type, LaurionSlot.Slot, LaurionSlot.SubIndex, LaurionSlot.AugIndex);
return LarionSlot; return LaurionSlot;
} }
static inline structs::InventorySlot_Struct ServerToLarionCorpseSlot(uint32 server_corpse_slot) static inline structs::InventorySlot_Struct ServerToLaurionCorpseSlot(uint32 server_corpse_slot)
{ {
structs::InventorySlot_Struct LarionSlot; structs::InventorySlot_Struct LaurionSlot;
LarionSlot.Type = invtype::TYPE_INVALID; LaurionSlot.Type = invtype::TYPE_INVALID;
LarionSlot.Slot = ServerToLarionCorpseMainSlot(server_corpse_slot); LaurionSlot.Slot = ServerToLaurionCorpseMainSlot(server_corpse_slot);
LarionSlot.SubIndex = invbag::SLOT_INVALID; LaurionSlot.SubIndex = invbag::SLOT_INVALID;
LarionSlot.AugIndex = invaug::SOCKET_INVALID; LaurionSlot.AugIndex = invaug::SOCKET_INVALID;
if (LarionSlot.Slot != invslot::SLOT_INVALID) if (LaurionSlot.Slot != invslot::SLOT_INVALID)
LarionSlot.Type = invtype::typeCorpse; LaurionSlot.Type = invtype::typeCorpse;
Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to Larion Corpse Slot [%i, %i, %i, %i]", Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to Laurion Corpse Slot [%i, %i, %i, %i]",
server_corpse_slot, LarionSlot.Type, LarionSlot.Slot, LarionSlot.SubIndex, LarionSlot.AugIndex); server_corpse_slot, LaurionSlot.Type, LaurionSlot.Slot, LaurionSlot.SubIndex, LaurionSlot.AugIndex);
return LarionSlot; return LaurionSlot;
} }
static inline uint32 ServerToLarionCorpseMainSlot(uint32 server_corpse_slot) static inline uint32 ServerToLaurionCorpseMainSlot(uint32 server_corpse_slot)
{ {
uint32 LarionSlot = invslot::SLOT_INVALID; uint32 LaurionSlot = invslot::SLOT_INVALID;
if (server_corpse_slot <= EQ::invslot::CORPSE_END && server_corpse_slot >= EQ::invslot::CORPSE_BEGIN) { if (server_corpse_slot <= EQ::invslot::CORPSE_END && server_corpse_slot >= EQ::invslot::CORPSE_BEGIN) {
LarionSlot = server_corpse_slot; LaurionSlot = server_corpse_slot;
} }
LogNetcode("Convert Server Corpse Slot [{}] to Larion Corpse Main Slot [{}]", server_corpse_slot, LarionSlot); LogNetcode("Convert Server Corpse Slot [{}] to Laurion Corpse Main Slot [{}]", server_corpse_slot, LaurionSlot);
return LarionSlot; return LaurionSlot;
} }
static inline structs::TypelessInventorySlot_Struct ServerToLarionTypelessSlot(uint32 server_slot, int16 server_type) static inline structs::TypelessInventorySlot_Struct ServerToLaurionTypelessSlot(uint32 server_slot, int16 server_type)
{ {
structs::TypelessInventorySlot_Struct LarionSlot; structs::TypelessInventorySlot_Struct LaurionSlot;
LarionSlot.Slot = invslot::SLOT_INVALID; LaurionSlot.Slot = invslot::SLOT_INVALID;
LarionSlot.SubIndex = invbag::SLOT_INVALID; LaurionSlot.SubIndex = invbag::SLOT_INVALID;
LarionSlot.AugIndex = invaug::SOCKET_INVALID; LaurionSlot.AugIndex = invaug::SOCKET_INVALID;
uint32 TempSlot = EQ::invslot::SLOT_INVALID; uint32 TempSlot = EQ::invslot::SLOT_INVALID;
if (server_type == EQ::invtype::typePossessions) { if (server_type == EQ::invtype::typePossessions) {
if (server_slot < EQ::invtype::POSSESSIONS_SIZE) { if (server_slot < EQ::invtype::POSSESSIONS_SIZE) {
LarionSlot.Slot = server_slot; LaurionSlot.Slot = server_slot;
} }
else if (server_slot <= EQ::invbag::CURSOR_BAG_END && server_slot >= EQ::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; TempSlot = server_slot - EQ::invbag::GENERAL_BAGS_BEGIN;
LarionSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQ::invbag::SLOT_COUNT); LaurionSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQ::invbag::SLOT_COUNT);
LarionSlot.SubIndex = TempSlot - ((LarionSlot.Slot - invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT); LaurionSlot.SubIndex = TempSlot - ((LaurionSlot.Slot - invslot::GENERAL_BEGIN) * EQ::invbag::SLOT_COUNT);
} }
} }
Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to Larion Typeless Slot [%i, %i, %i] (implied type: %i)", Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to Laurion Typeless Slot [%i, %i, %i] (implied type: %i)",
server_slot, LarionSlot.Slot, LarionSlot.SubIndex, LarionSlot.AugIndex, server_type); server_slot, LaurionSlot.Slot, LaurionSlot.SubIndex, LaurionSlot.AugIndex, server_type);
return LarionSlot; return LaurionSlot;
} }
static inline uint32 LarionToServerSlot(structs::InventorySlot_Struct larion_slot) static inline uint32 LaurionToServerSlot(structs::InventorySlot_Struct laurion_slot)
{ {
if (larion_slot.AugIndex < invaug::SOCKET_INVALID || larion_slot.AugIndex >= invaug::SOCKET_COUNT) { if (laurion_slot.AugIndex < invaug::SOCKET_INVALID || laurion_slot.AugIndex >= invaug::SOCKET_COUNT) {
Log(Logs::Detail, Logs::Netcode, "Convert Larion Slot [%i, %i, %i, %i] to Server Slot %i", Log(Logs::Detail, Logs::Netcode, "Convert Laurion Slot [%i, %i, %i, %i] to Server Slot %i",
larion_slot.Type, larion_slot.Slot, larion_slot.SubIndex, larion_slot.AugIndex, EQ::invslot::SLOT_INVALID); laurion_slot.Type, laurion_slot.Slot, laurion_slot.SubIndex, laurion_slot.AugIndex, EQ::invslot::SLOT_INVALID);
return EQ::invslot::SLOT_INVALID; return EQ::invslot::SLOT_INVALID;
} }
@ -3656,101 +3656,101 @@ namespace Larion
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 (larion_slot.Type) { switch (laurion_slot.Type) {
case invtype::typePossessions: { case invtype::typePossessions: {
if (larion_slot.Slot >= invslot::POSSESSIONS_BEGIN && larion_slot.Slot <= invslot::POSSESSIONS_END) { if (laurion_slot.Slot >= invslot::POSSESSIONS_BEGIN && laurion_slot.Slot <= invslot::POSSESSIONS_END) {
if (larion_slot.SubIndex == invbag::SLOT_INVALID) { if (laurion_slot.SubIndex == invbag::SLOT_INVALID) {
server_slot = larion_slot.Slot; server_slot = laurion_slot.Slot;
} }
else if (larion_slot.SubIndex >= invbag::SLOT_BEGIN && larion_slot.SubIndex <= invbag::SLOT_END) { else if (laurion_slot.SubIndex >= invbag::SLOT_BEGIN && laurion_slot.SubIndex <= invbag::SLOT_END) {
if (larion_slot.Slot < invslot::GENERAL_BEGIN) if (laurion_slot.Slot < invslot::GENERAL_BEGIN)
return EQ::invslot::SLOT_INVALID; return EQ::invslot::SLOT_INVALID;
temp_slot = (larion_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; temp_slot = (laurion_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
server_slot = EQ::invbag::GENERAL_BAGS_BEGIN + temp_slot + larion_slot.SubIndex; server_slot = EQ::invbag::GENERAL_BAGS_BEGIN + temp_slot + laurion_slot.SubIndex;
} }
} }
break; break;
} }
case invtype::typeBank: { case invtype::typeBank: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::BANK_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::BANK_SIZE) {
if (larion_slot.SubIndex == invbag::SLOT_INVALID) { if (laurion_slot.SubIndex == invbag::SLOT_INVALID) {
server_slot = EQ::invslot::BANK_BEGIN + larion_slot.Slot; server_slot = EQ::invslot::BANK_BEGIN + laurion_slot.Slot;
} }
else if (larion_slot.SubIndex >= invbag::SLOT_BEGIN && larion_slot.SubIndex <= invbag::SLOT_END) { else if (laurion_slot.SubIndex >= invbag::SLOT_BEGIN && laurion_slot.SubIndex <= invbag::SLOT_END) {
temp_slot = larion_slot.Slot * invbag::SLOT_COUNT; temp_slot = laurion_slot.Slot * invbag::SLOT_COUNT;
server_slot = EQ::invbag::BANK_BAGS_BEGIN + temp_slot + larion_slot.SubIndex; server_slot = EQ::invbag::BANK_BAGS_BEGIN + temp_slot + laurion_slot.SubIndex;
} }
} }
break; break;
} }
case invtype::typeSharedBank: { case invtype::typeSharedBank: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::SHARED_BANK_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::SHARED_BANK_SIZE) {
if (larion_slot.SubIndex == invbag::SLOT_INVALID) { if (laurion_slot.SubIndex == invbag::SLOT_INVALID) {
server_slot = EQ::invslot::SHARED_BANK_BEGIN + larion_slot.Slot; server_slot = EQ::invslot::SHARED_BANK_BEGIN + laurion_slot.Slot;
} }
else if (larion_slot.SubIndex >= invbag::SLOT_BEGIN && larion_slot.SubIndex <= invbag::SLOT_END) { else if (laurion_slot.SubIndex >= invbag::SLOT_BEGIN && laurion_slot.SubIndex <= invbag::SLOT_END) {
temp_slot = larion_slot.Slot * invbag::SLOT_COUNT; temp_slot = laurion_slot.Slot * invbag::SLOT_COUNT;
server_slot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + larion_slot.SubIndex; server_slot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + laurion_slot.SubIndex;
} }
} }
break; break;
} }
case invtype::typeTrade: { case invtype::typeTrade: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::TRADE_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::TRADE_SIZE) {
if (larion_slot.SubIndex == invbag::SLOT_INVALID) { if (laurion_slot.SubIndex == invbag::SLOT_INVALID) {
server_slot = EQ::invslot::TRADE_BEGIN + larion_slot.Slot; server_slot = EQ::invslot::TRADE_BEGIN + laurion_slot.Slot;
} }
else if (larion_slot.SubIndex >= invbag::SLOT_BEGIN && larion_slot.SubIndex <= invbag::SLOT_END) { else if (laurion_slot.SubIndex >= invbag::SLOT_BEGIN && laurion_slot.SubIndex <= invbag::SLOT_END) {
temp_slot = larion_slot.Slot * invbag::SLOT_COUNT; temp_slot = laurion_slot.Slot * invbag::SLOT_COUNT;
server_slot = EQ::invbag::TRADE_BAGS_BEGIN + temp_slot + larion_slot.SubIndex; server_slot = EQ::invbag::TRADE_BAGS_BEGIN + temp_slot + laurion_slot.SubIndex;
} }
} }
break; break;
} }
case invtype::typeWorld: { case invtype::typeWorld: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::WORLD_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::WORLD_SIZE) {
server_slot = EQ::invslot::WORLD_BEGIN + larion_slot.Slot; server_slot = EQ::invslot::WORLD_BEGIN + laurion_slot.Slot;
} }
else if (larion_slot.Slot == invslot::SLOT_INVALID) { else if (laurion_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 (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::LIMBO_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::LIMBO_SIZE) {
server_slot = EQ::invslot::slotCursor; server_slot = EQ::invslot::slotCursor;
} }
break; break;
} }
case invtype::typeTribute: { case invtype::typeTribute: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::TRIBUTE_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::TRIBUTE_SIZE) {
server_slot = EQ::invslot::TRIBUTE_BEGIN + larion_slot.Slot; server_slot = EQ::invslot::TRIBUTE_BEGIN + laurion_slot.Slot;
} }
break; break;
} }
case invtype::typeGuildTribute: { case invtype::typeGuildTribute: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
server_slot = EQ::invslot::GUILD_TRIBUTE_BEGIN + larion_slot.Slot; server_slot = EQ::invslot::GUILD_TRIBUTE_BEGIN + laurion_slot.Slot;
} }
break; break;
} }
case invtype::typeCorpse: { case invtype::typeCorpse: {
if (larion_slot.Slot >= invslot::CORPSE_BEGIN && larion_slot.Slot <= invslot::CORPSE_END) { if (laurion_slot.Slot >= invslot::CORPSE_BEGIN && laurion_slot.Slot <= invslot::CORPSE_END) {
server_slot = larion_slot.Slot; server_slot = laurion_slot.Slot;
} }
break; break;
@ -3761,48 +3761,48 @@ namespace Larion
} }
} }
Log(Logs::Detail, Logs::Netcode, "Convert Larion Slot [%i, %i, %i, %i] to Server Slot %i", Log(Logs::Detail, Logs::Netcode, "Convert Laurion Slot [%i, %i, %i, %i] to Server Slot %i",
larion_slot.Type, larion_slot.Slot, larion_slot.SubIndex, larion_slot.AugIndex, server_slot); laurion_slot.Type, laurion_slot.Slot, laurion_slot.SubIndex, laurion_slot.AugIndex, server_slot);
return server_slot; return server_slot;
} }
static inline uint32 LarionToServerCorpseSlot(structs::InventorySlot_Struct larion_corpse_slot) static inline uint32 LaurionToServerCorpseSlot(structs::InventorySlot_Struct laurion_corpse_slot)
{ {
uint32 ServerSlot = EQ::invslot::SLOT_INVALID; uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
if (larion_corpse_slot.Type != invtype::typeCorpse || larion_corpse_slot.SubIndex != invbag::SLOT_INVALID || larion_corpse_slot.AugIndex != invaug::SOCKET_INVALID) { if (laurion_corpse_slot.Type != invtype::typeCorpse || laurion_corpse_slot.SubIndex != invbag::SLOT_INVALID || laurion_corpse_slot.AugIndex != invaug::SOCKET_INVALID) {
ServerSlot = EQ::invslot::SLOT_INVALID; ServerSlot = EQ::invslot::SLOT_INVALID;
} }
else { else {
ServerSlot = LarionToServerCorpseMainSlot(larion_corpse_slot.Slot); ServerSlot = LaurionToServerCorpseMainSlot(laurion_corpse_slot.Slot);
} }
Log(Logs::Detail, Logs::Netcode, "Convert Larion Slot [%i, %i, %i, %i] to Server Slot %i", Log(Logs::Detail, Logs::Netcode, "Convert Laurion Slot [%i, %i, %i, %i] to Server Slot %i",
larion_corpse_slot.Type, larion_corpse_slot.Slot, larion_corpse_slot.SubIndex, larion_corpse_slot.AugIndex, ServerSlot); laurion_corpse_slot.Type, laurion_corpse_slot.Slot, laurion_corpse_slot.SubIndex, laurion_corpse_slot.AugIndex, ServerSlot);
return ServerSlot; return ServerSlot;
} }
static inline uint32 LarionToServerCorpseMainSlot(uint32 larion_corpse_slot) static inline uint32 LaurionToServerCorpseMainSlot(uint32 laurion_corpse_slot)
{ {
uint32 ServerSlot = EQ::invslot::SLOT_INVALID; uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
if (larion_corpse_slot <= invslot::CORPSE_END && larion_corpse_slot >= invslot::CORPSE_BEGIN) { if (laurion_corpse_slot <= invslot::CORPSE_END && laurion_corpse_slot >= invslot::CORPSE_BEGIN) {
ServerSlot = larion_corpse_slot; ServerSlot = laurion_corpse_slot;
} }
LogNetcode("Convert Larion Corpse Main Slot [{}] to Server Corpse Slot [{}]", larion_corpse_slot, ServerSlot); LogNetcode("Convert Laurion Corpse Main Slot [{}] to Server Corpse Slot [{}]", laurion_corpse_slot, ServerSlot);
return ServerSlot; return ServerSlot;
} }
static inline uint32 LarionToServerTypelessSlot(structs::TypelessInventorySlot_Struct larion_slot, int16 larion_type) static inline uint32 LaurionToServerTypelessSlot(structs::TypelessInventorySlot_Struct laurion_slot, int16 laurion_type)
{ {
if (larion_slot.AugIndex < invaug::SOCKET_INVALID || larion_slot.AugIndex >= invaug::SOCKET_COUNT) { if (laurion_slot.AugIndex < invaug::SOCKET_INVALID || laurion_slot.AugIndex >= invaug::SOCKET_COUNT) {
Log(Logs::Detail, Logs::Netcode, "Convert Larion Typeless Slot [%i, %i, %i] (implied type: %i) to Server Slot %i", Log(Logs::Detail, Logs::Netcode, "Convert Laurion Typeless Slot [%i, %i, %i] (implied type: %i) to Server Slot %i",
larion_slot.Slot, larion_slot.SubIndex, larion_slot.AugIndex, larion_type, EQ::invslot::SLOT_INVALID); laurion_slot.Slot, laurion_slot.SubIndex, laurion_slot.AugIndex, laurion_type, EQ::invslot::SLOT_INVALID);
return EQ::invslot::SLOT_INVALID; return EQ::invslot::SLOT_INVALID;
} }
@ -3810,101 +3810,101 @@ namespace Larion
uint32 ServerSlot = EQ::invslot::SLOT_INVALID; uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
uint32 TempSlot = invslot::SLOT_INVALID; uint32 TempSlot = invslot::SLOT_INVALID;
switch (larion_type) { switch (laurion_type) {
case invtype::typePossessions: { case invtype::typePossessions: {
if (larion_slot.Slot >= invslot::POSSESSIONS_BEGIN && larion_slot.Slot <= invslot::POSSESSIONS_END) { if (laurion_slot.Slot >= invslot::POSSESSIONS_BEGIN && laurion_slot.Slot <= invslot::POSSESSIONS_END) {
if (larion_slot.SubIndex == invbag::SLOT_INVALID) { if (laurion_slot.SubIndex == invbag::SLOT_INVALID) {
ServerSlot = larion_slot.Slot; ServerSlot = laurion_slot.Slot;
} }
else if (larion_slot.SubIndex >= invbag::SLOT_BEGIN && larion_slot.SubIndex <= invbag::SLOT_END) { else if (laurion_slot.SubIndex >= invbag::SLOT_BEGIN && laurion_slot.SubIndex <= invbag::SLOT_END) {
if (larion_slot.Slot < invslot::GENERAL_BEGIN) if (laurion_slot.Slot < invslot::GENERAL_BEGIN)
return EQ::invslot::SLOT_INVALID; return EQ::invslot::SLOT_INVALID;
TempSlot = (larion_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; TempSlot = (laurion_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT;
ServerSlot = EQ::invbag::GENERAL_BAGS_BEGIN + TempSlot + larion_slot.SubIndex; ServerSlot = EQ::invbag::GENERAL_BAGS_BEGIN + TempSlot + laurion_slot.SubIndex;
} }
} }
break; break;
} }
case invtype::typeBank: { case invtype::typeBank: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::BANK_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::BANK_SIZE) {
if (larion_slot.SubIndex == invbag::SLOT_INVALID) { if (laurion_slot.SubIndex == invbag::SLOT_INVALID) {
ServerSlot = EQ::invslot::BANK_BEGIN + larion_slot.Slot; ServerSlot = EQ::invslot::BANK_BEGIN + laurion_slot.Slot;
} }
else if (larion_slot.SubIndex >= invbag::SLOT_BEGIN && larion_slot.SubIndex <= invbag::SLOT_END) { else if (laurion_slot.SubIndex >= invbag::SLOT_BEGIN && laurion_slot.SubIndex <= invbag::SLOT_END) {
TempSlot = larion_slot.Slot * invbag::SLOT_COUNT; TempSlot = laurion_slot.Slot * invbag::SLOT_COUNT;
ServerSlot = EQ::invbag::BANK_BAGS_BEGIN + TempSlot + larion_slot.SubIndex; ServerSlot = EQ::invbag::BANK_BAGS_BEGIN + TempSlot + laurion_slot.SubIndex;
} }
} }
break; break;
} }
case invtype::typeSharedBank: { case invtype::typeSharedBank: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::SHARED_BANK_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::SHARED_BANK_SIZE) {
if (larion_slot.SubIndex == invbag::SLOT_INVALID) { if (laurion_slot.SubIndex == invbag::SLOT_INVALID) {
ServerSlot = EQ::invslot::SHARED_BANK_BEGIN + larion_slot.Slot; ServerSlot = EQ::invslot::SHARED_BANK_BEGIN + laurion_slot.Slot;
} }
else if (larion_slot.SubIndex >= invbag::SLOT_BEGIN && larion_slot.SubIndex <= invbag::SLOT_END) { else if (laurion_slot.SubIndex >= invbag::SLOT_BEGIN && laurion_slot.SubIndex <= invbag::SLOT_END) {
TempSlot = larion_slot.Slot * invbag::SLOT_COUNT; TempSlot = laurion_slot.Slot * invbag::SLOT_COUNT;
ServerSlot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + larion_slot.SubIndex; ServerSlot = EQ::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + laurion_slot.SubIndex;
} }
} }
break; break;
} }
case invtype::typeTrade: { case invtype::typeTrade: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::TRADE_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::TRADE_SIZE) {
if (larion_slot.SubIndex == invbag::SLOT_INVALID) { if (laurion_slot.SubIndex == invbag::SLOT_INVALID) {
ServerSlot = EQ::invslot::TRADE_BEGIN + larion_slot.Slot; ServerSlot = EQ::invslot::TRADE_BEGIN + laurion_slot.Slot;
} }
else if (larion_slot.SubIndex >= invbag::SLOT_BEGIN && larion_slot.SubIndex <= invbag::SLOT_END) { else if (laurion_slot.SubIndex >= invbag::SLOT_BEGIN && laurion_slot.SubIndex <= invbag::SLOT_END) {
TempSlot = larion_slot.Slot * invbag::SLOT_COUNT; TempSlot = laurion_slot.Slot * invbag::SLOT_COUNT;
ServerSlot = EQ::invbag::TRADE_BAGS_BEGIN + TempSlot + larion_slot.SubIndex; ServerSlot = EQ::invbag::TRADE_BAGS_BEGIN + TempSlot + laurion_slot.SubIndex;
} }
} }
break; break;
} }
case invtype::typeWorld: { case invtype::typeWorld: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::WORLD_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::WORLD_SIZE) {
ServerSlot = EQ::invslot::WORLD_BEGIN + larion_slot.Slot; ServerSlot = EQ::invslot::WORLD_BEGIN + laurion_slot.Slot;
} }
else if (larion_slot.Slot == invslot::SLOT_INVALID) { else if (laurion_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 (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::LIMBO_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::LIMBO_SIZE) {
ServerSlot = EQ::invslot::slotCursor; ServerSlot = EQ::invslot::slotCursor;
} }
break; break;
} }
case invtype::typeTribute: { case invtype::typeTribute: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::TRIBUTE_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::TRIBUTE_SIZE) {
ServerSlot = EQ::invslot::TRIBUTE_BEGIN + larion_slot.Slot; ServerSlot = EQ::invslot::TRIBUTE_BEGIN + laurion_slot.Slot;
} }
break; break;
} }
case invtype::typeGuildTribute: { case invtype::typeGuildTribute: {
if (larion_slot.Slot >= invslot::SLOT_BEGIN && larion_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { if (laurion_slot.Slot >= invslot::SLOT_BEGIN && laurion_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) {
ServerSlot = EQ::invslot::GUILD_TRIBUTE_BEGIN + larion_slot.Slot; ServerSlot = EQ::invslot::GUILD_TRIBUTE_BEGIN + laurion_slot.Slot;
} }
break; break;
} }
case invtype::typeCorpse: { case invtype::typeCorpse: {
if (larion_slot.Slot >= invslot::CORPSE_BEGIN && larion_slot.Slot <= invslot::CORPSE_END) { if (laurion_slot.Slot >= invslot::CORPSE_BEGIN && laurion_slot.Slot <= invslot::CORPSE_END) {
ServerSlot = larion_slot.Slot; ServerSlot = laurion_slot.Slot;
} }
break; break;
@ -3915,9 +3915,9 @@ namespace Larion
} }
} }
Log(Logs::Detail, Logs::Netcode, "Convert Larion Typeless Slot [%i, %i, %i] (implied type: %i) to Server Slot %i", Log(Logs::Detail, Logs::Netcode, "Convert Laurion Typeless Slot [%i, %i, %i] (implied type: %i) to Server Slot %i",
larion_slot.Slot, larion_slot.SubIndex, larion_slot.AugIndex, larion_type, ServerSlot); laurion_slot.Slot, laurion_slot.SubIndex, laurion_slot.AugIndex, laurion_type, ServerSlot);
return ServerSlot; return ServerSlot;
} }
} /*Larion*/ } /*Laurion*/

View File

@ -17,14 +17,14 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef COMMON_LARION_H #ifndef COMMON_LAURION_H
#define COMMON_LARION_H #define COMMON_LAURION_H
#include "../struct_strategy.h" #include "../struct_strategy.h"
class EQStreamIdentifier; class EQStreamIdentifier;
namespace Larion namespace Laurion
{ {
//these are the only public member of this namespace. //these are the only public member of this namespace.
@ -47,9 +47,9 @@ namespace Larion
//magic macro to declare our opcode processors //magic macro to declare our opcode processors
#include "ss_declare.h" #include "ss_declare.h"
#include "larion_ops.h" #include "laurion_ops.h"
}; };
}; /*Larion*/ }; /*Laurion*/
#endif /*COMMON_LARION_H*/ #endif /*COMMON_LAURION_H*/

View File

@ -17,12 +17,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "larion_limits.h" #include "laurion_limits.h"
#include "../strings.h" #include "../strings.h"
int16 Larion::invtype::GetInvTypeSize(int16 inv_type) int16 Laurion::invtype::GetInvTypeSize(int16 inv_type)
{ {
switch (inv_type) { switch (inv_type) {
case invtype::typePossessions: case invtype::typePossessions:
@ -80,7 +80,7 @@ int16 Larion::invtype::GetInvTypeSize(int16 inv_type)
} }
} }
const char* Larion::invtype::GetInvTypeName(int16 inv_type) const char* Laurion::invtype::GetInvTypeName(int16 inv_type)
{ {
switch (inv_type) { switch (inv_type) {
case invtype::TYPE_INVALID: case invtype::TYPE_INVALID:
@ -140,7 +140,7 @@ const char* Larion::invtype::GetInvTypeName(int16 inv_type)
} }
} }
bool Larion::invtype::IsInvTypePersistent(int16 inv_type) bool Laurion::invtype::IsInvTypePersistent(int16 inv_type)
{ {
switch (inv_type) { switch (inv_type) {
case invtype::typePossessions: case invtype::typePossessions:
@ -158,7 +158,7 @@ bool Larion::invtype::IsInvTypePersistent(int16 inv_type)
} }
} }
const char* Larion::invslot::GetInvPossessionsSlotName(int16 inv_slot) const char* Laurion::invslot::GetInvPossessionsSlotName(int16 inv_slot)
{ {
switch (inv_slot) { switch (inv_slot) {
case invslot::SLOT_INVALID: case invslot::SLOT_INVALID:
@ -236,7 +236,7 @@ const char* Larion::invslot::GetInvPossessionsSlotName(int16 inv_slot)
} }
} }
const char* Larion::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot) const char* Laurion::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot)
{ {
if (inv_type == invtype::typePossessions) if (inv_type == invtype::typePossessions)
return invslot::GetInvPossessionsSlotName(inv_slot); return invslot::GetInvPossessionsSlotName(inv_slot);
@ -255,7 +255,7 @@ const char* Larion::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot)
return ret_str.c_str(); return ret_str.c_str();
} }
const char* Larion::invbag::GetInvBagIndexName(int16 bag_index) const char* Laurion::invbag::GetInvBagIndexName(int16 bag_index)
{ {
if (bag_index == invbag::SLOT_INVALID) if (bag_index == invbag::SLOT_INVALID)
return "Invalid Bag"; return "Invalid Bag";
@ -269,7 +269,7 @@ const char* Larion::invbag::GetInvBagIndexName(int16 bag_index)
return ret_str.c_str(); return ret_str.c_str();
} }
const char* Larion::invaug::GetInvAugIndexName(int16 aug_index) const char* Laurion::invaug::GetInvAugIndexName(int16 aug_index)
{ {
if (aug_index == invaug::SOCKET_INVALID) if (aug_index == invaug::SOCKET_INVALID)
return "Invalid Augment"; return "Invalid Augment";

View File

@ -17,20 +17,20 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef COMMON_LARION_LIMITS_H #ifndef COMMON_LAURION_LIMITS_H
#define COMMON_LARION_LIMITS_H #define COMMON_LAURION_LIMITS_H
#include "../types.h" #include "../types.h"
#include "../emu_versions.h" #include "../emu_versions.h"
#include "../skills.h" #include "../skills.h"
namespace Larion namespace Laurion
{ {
const int16 IINVALID = -1; const int16 IINVALID = -1;
const int16 INULL = 0; const int16 INULL = 0;
namespace inventory { namespace inventory {
inline EQ::versions::ClientVersion GetInventoryRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetInventoryRef() { return EQ::versions::ClientVersion::Laurion; }
const bool ConcatenateInvTypeLimbo = false; const bool ConcatenateInvTypeLimbo = false;
@ -42,7 +42,7 @@ namespace Larion
} /*inventory*/ } /*inventory*/
namespace invtype { namespace invtype {
inline EQ::versions::ClientVersion GetInvTypeRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetInvTypeRef() { return EQ::versions::ClientVersion::Laurion; }
namespace enum_ { namespace enum_ {
enum InventoryTypes : int16 { enum InventoryTypes : int16 {
@ -133,7 +133,7 @@ namespace Larion
} /*invtype*/ } /*invtype*/
namespace invslot { namespace invslot {
inline EQ::versions::ClientVersion GetInvSlotRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetInvSlotRef() { return EQ::versions::ClientVersion::Laurion; }
namespace enum_ { namespace enum_ {
enum InventorySlots : int16 { enum InventorySlots : int16 {
@ -212,7 +212,7 @@ namespace Larion
} /*invslot*/ } /*invslot*/
namespace invbag { namespace invbag {
inline EQ::versions::ClientVersion GetInvBagRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetInvBagRef() { return EQ::versions::ClientVersion::Laurion; }
const int16 SLOT_INVALID = IINVALID; const int16 SLOT_INVALID = IINVALID;
const int16 SLOT_BEGIN = INULL; const int16 SLOT_BEGIN = INULL;
@ -224,7 +224,7 @@ namespace Larion
} /*invbag*/ } /*invbag*/
namespace invaug { namespace invaug {
inline EQ::versions::ClientVersion GetInvAugRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetInvAugRef() { return EQ::versions::ClientVersion::Laurion; }
const int16 SOCKET_INVALID = IINVALID; const int16 SOCKET_INVALID = IINVALID;
const int16 SOCKET_BEGIN = INULL; const int16 SOCKET_BEGIN = INULL;
@ -236,7 +236,7 @@ namespace Larion
} /*invaug*/ } /*invaug*/
namespace item { namespace item {
inline EQ::versions::ClientVersion GetItemRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetItemRef() { return EQ::versions::ClientVersion::Laurion; }
//enum Unknown : int { // looks like item class..but, RoF has it too - nothing in UF- //enum Unknown : int { // looks like item class..but, RoF has it too - nothing in UF-
// Unknown1 = 0, // Unknown1 = 0,
@ -265,7 +265,7 @@ namespace Larion
} /*item*/ } /*item*/
namespace profile { namespace profile {
inline EQ::versions::ClientVersion GetProfileRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetProfileRef() { return EQ::versions::ClientVersion::Laurion; }
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
@ -277,7 +277,7 @@ namespace Larion
} /*profile*/ } /*profile*/
namespace constants { namespace constants {
inline EQ::versions::ClientVersion GetConstantsRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetConstantsRef() { return EQ::versions::ClientVersion::Laurion; }
const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::LS; const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::LS;
const uint32 EXPANSION_BIT = EQ::expansions::bitLS; const uint32 EXPANSION_BIT = EQ::expansions::bitLS;
@ -291,21 +291,21 @@ namespace Larion
} /*constants*/ } /*constants*/
namespace behavior { namespace behavior {
inline EQ::versions::ClientVersion GetBehaviorRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetBehaviorRef() { return EQ::versions::ClientVersion::Laurion; }
const bool CoinHasWeight = false; const bool CoinHasWeight = false;
} /*behavior*/ } /*behavior*/
namespace skills { namespace skills {
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::Laurion; }
const size_t LastUsableSkill = EQ::skills::Skill2HPiercing; const size_t LastUsableSkill = EQ::skills::Skill2HPiercing;
} /*skills*/ } /*skills*/
namespace spells { namespace spells {
inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::Larion; } inline EQ::versions::ClientVersion GetSkillsRef() { return EQ::versions::ClientVersion::Laurion; }
enum class CastingSlot : uint32 { enum class CastingSlot : uint32 {
Gem1 = 0, Gem1 = 0,
@ -341,6 +341,6 @@ namespace Larion
} /*spells*/ } /*spells*/
}; /* Larion */ }; /* Laurion */
#endif /*COMMON_LARION_LIMITS_H*/ #endif /*COMMON_LAURION_LIMITS_H*/

View File

@ -1,7 +1,7 @@
#ifndef LARION_STRUCTS_H_ #ifndef LAURION_STRUCTS_H_
#define LARION_STRUCTS_H_ #define LAURION_STRUCTS_H_
namespace Larion { namespace Laurion {
namespace structs { namespace structs {
// constants // constants
static const uint32 MAX_PP_AA_ARRAY = 300; static const uint32 MAX_PP_AA_ARRAY = 300;
@ -351,7 +351,7 @@ namespace Larion {
struct EnterWorld_Struct { struct EnterWorld_Struct {
/*000*/ char name[64]; /*000*/ char name[64];
/*064*/ int32 unknown1; /*064*/ int32 unknown1;
/*068*/ int32 unknown2; //larion handles these differently so for now im just going to ignore them till i figure it out /*068*/ int32 unknown2; //laurion handles these differently so for now im just going to ignore them till i figure it out
}; };
struct ZoneChange_Struct { struct ZoneChange_Struct {
@ -441,6 +441,6 @@ namespace Larion {
#pragma pack() #pragma pack()
}; //end namespace structs }; //end namespace structs
}; //end namespace larion }; //end namespace laurion
#endif /*LARION_STRUCTS_H_*/ #endif /*LAURION_STRUCTS_H_*/

View File

@ -26,7 +26,7 @@
#include "sod.h" #include "sod.h"
#include "rof.h" #include "rof.h"
#include "rof2.h" #include "rof2.h"
#include "larion.h" #include "laurion.h"
void RegisterAllPatches(EQStreamIdentifier &into) void RegisterAllPatches(EQStreamIdentifier &into)
{ {
@ -36,7 +36,7 @@ void RegisterAllPatches(EQStreamIdentifier &into)
UF::Register(into); UF::Register(into);
RoF::Register(into); RoF::Register(into);
RoF2::Register(into); RoF2::Register(into);
Larion::Register(into); Laurion::Register(into);
} }
void ReloadAllPatches() void ReloadAllPatches()
@ -47,5 +47,5 @@ void ReloadAllPatches()
UF::Reload(); UF::Reload();
RoF::Reload(); RoF::Reload();
RoF2::Reload(); RoF2::Reload();
Larion::Reload(); Laurion::Reload();
} }

View File

@ -587,7 +587,7 @@ void Client::SendExpansionPacketData(PlayerLoginReply_Struct& plrs)
int32_t expansion = server.options.GetMaxExpansions(); int32_t expansion = server.options.GetMaxExpansions();
int32_t owned_expansion = (expansion << 1) | 1; int32_t owned_expansion = (expansion << 1) | 1;
if (m_client_version == cv_larion) { if (m_client_version == cv_laurion) {
buf.WriteInt32(0x00); buf.WriteInt32(0x00);
buf.WriteInt32(0x00); buf.WriteInt32(0x00);
buf.WriteInt16(0x00); buf.WriteInt16(0x00);

View File

@ -56,7 +56,7 @@ void CheckSoDOpcodeFile(const std::string& path) {
} }
} }
void CheckLarionOpcodeFile(const std::string& path) { void CheckLaurionOpcodeFile(const std::string& path) {
if (File::Exists(path)) { if (File::Exists(path)) {
return; return;
} }
@ -158,40 +158,40 @@ ClientManager::ClientManager()
} }
); );
int larion_port = server.config.GetVariableInt("client_configuration", "larion_port", 15900); int laurion_port = server.config.GetVariableInt("client_configuration", "laurion_port", 15900);
EQStreamManagerInterfaceOptions larion_opts(larion_port, false, false); EQStreamManagerInterfaceOptions laurion_opts(laurion_port, false, false);
larion_stream = new EQ::Net::EQStreamManager(larion_opts); laurion_stream = new EQ::Net::EQStreamManager(laurion_opts);
larion_ops = new RegularOpcodeManager; laurion_ops = new RegularOpcodeManager;
opcodes_path = fmt::format( opcodes_path = fmt::format(
"{}/{}", "{}/{}",
path.GetOpcodePath(), path.GetOpcodePath(),
"login_opcodes_larion.conf" "login_opcodes_laurion.conf"
); );
CheckLarionOpcodeFile(opcodes_path); CheckLaurionOpcodeFile(opcodes_path);
if (!larion_ops->LoadOpcodes(opcodes_path.c_str())) { if (!laurion_ops->LoadOpcodes(opcodes_path.c_str())) {
LogError( LogError(
"ClientManager fatal error: couldn't load opcodes for Larion file [{0}]", "ClientManager fatal error: couldn't load opcodes for Laurion file [{0}]",
server.config.GetVariableString("client_configuration", "larion_opcodes", "login_opcodes.conf") server.config.GetVariableString("client_configuration", "laurion_opcodes", "login_opcodes.conf")
); );
run_server = false; run_server = false;
} }
larion_stream->OnNewConnection( laurion_stream->OnNewConnection(
[this](std::shared_ptr<EQ::Net::EQStream> stream) { [this](std::shared_ptr<EQ::Net::EQStream> stream) {
LogInfo( LogInfo(
"New Larion client connection from [{0}:{1}]", "New Laurion client connection from [{0}:{1}]",
long2ip(stream->GetRemoteIP()), long2ip(stream->GetRemoteIP()),
stream->GetRemotePort() stream->GetRemotePort()
); );
stream->SetOpcodeManager(&larion_ops); stream->SetOpcodeManager(&laurion_ops);
Client* c = new Client(stream, cv_larion); Client* c = new Client(stream, cv_laurion);
clients.push_back(c); clients.push_back(c);
} }
); );

View File

@ -55,8 +55,8 @@ private:
EQ::Net::EQStreamManager *titanium_stream; EQ::Net::EQStreamManager *titanium_stream;
OpcodeManager *sod_ops; OpcodeManager *sod_ops;
EQ::Net::EQStreamManager *sod_stream; EQ::Net::EQStreamManager *sod_stream;
OpcodeManager *larion_ops; OpcodeManager *laurion_ops;
EQ::Net::EQStreamManager* larion_stream; EQ::Net::EQStreamManager* laurion_stream;
}; };
#endif #endif

View File

@ -84,7 +84,7 @@ struct PlayEverquestResponse_Struct {
enum LSClientVersion { enum LSClientVersion {
cv_titanium, cv_titanium,
cv_sod, cv_sod,
cv_larion cv_laurion
}; };
enum LSClientStatus { enum LSClientStatus {

View File

@ -1020,7 +1020,7 @@ void WorldServer::SerializeForClientServerListLegacy(class SerializeBuffer& out,
out.WriteUInt32(GetPlayersOnline()); out.WriteUInt32(GetPlayersOnline());
} }
void WorldServer::SerializeForClientServerListLarion(class SerializeBuffer& out, bool use_local_ip) const { void WorldServer::SerializeForClientServerListLaurion(class SerializeBuffer& out, bool use_local_ip) const {
if (use_local_ip) { if (use_local_ip) {
out.WriteString(GetLocalIP()); out.WriteString(GetLocalIP());
} }
@ -1067,8 +1067,8 @@ void WorldServer::SerializeForClientServerListLarion(class SerializeBuffer& out,
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_larion) { if (version == cv_laurion) {
SerializeForClientServerListLarion(out, use_local_ip); SerializeForClientServerListLaurion(out, use_local_ip);
} }
else { else {
SerializeForClientServerListLegacy(out, use_local_ip); SerializeForClientServerListLegacy(out, use_local_ip);

View File

@ -151,7 +151,7 @@ public:
bool HandleNewLoginserverInfoUnregisteredAllowed(Database::DbWorldRegistration &world_registration); bool HandleNewLoginserverInfoUnregisteredAllowed(Database::DbWorldRegistration &world_registration);
private: private:
void SerializeForClientServerListLegacy(class SerializeBuffer& out, bool use_local_ip) const; void SerializeForClientServerListLegacy(class SerializeBuffer& out, bool use_local_ip) const;
void SerializeForClientServerListLarion(class SerializeBuffer& out, bool use_local_ip) const; void SerializeForClientServerListLaurion(class SerializeBuffer& out, bool use_local_ip) const;
public: public:
void SerializeForClientServerList(class SerializeBuffer& out, bool use_local_ip, LSClientVersion version) const; void SerializeForClientServerList(class SerializeBuffer& out, bool use_local_ip, LSClientVersion version) const;

View File

@ -543,8 +543,8 @@ void Client::SendZoneInPackets()
if (tmpxp1 != tmpxp2 && tmpxp1 != 0xFFFFFFFF && tmpxp2 != 0xFFFFFFFF) { if (tmpxp1 != tmpxp2 && tmpxp1 != 0xFFFFFFFF && tmpxp2 != 0xFFFFFFFF) {
float tmpxp = (float)((float)m_pp.exp - tmpxp2) / ((float)tmpxp1 - tmpxp2); float tmpxp = (float)((float)m_pp.exp - tmpxp2) / ((float)tmpxp1 - tmpxp2);
//Larion uses a more granular exp bar than other clients //Laurion uses a more granular exp bar than other clients
if (m_ClientVersion >= EQ::versions::ClientVersion::Larion) { if (m_ClientVersion >= EQ::versions::ClientVersion::Laurion) {
eu->exp = (uint32)(100000.0f * tmpxp); eu->exp = (uint32)(100000.0f * tmpxp);
} }
else { else {