mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Reintegration of inventory-based EQDictionary references
This commit is contained in:
+11
-11
@@ -1051,18 +1051,18 @@ namespace Titanium
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
OUT(bandoliers[r].Items[k].Icon);
|
||||
OUT_str(bandoliers[r].Items[k].Name);
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
eq->bandoliers[r].Items[k].Icon = 0;
|
||||
eq->bandoliers[r].Items[k].Name[0] = '\0';
|
||||
@@ -1072,13 +1072,13 @@ namespace Titanium
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -2442,7 +2442,7 @@ namespace Titanium
|
||||
ob << StringFormat("%.*s\"", depth, protection); // Quotes (and protection, if needed) around static data
|
||||
|
||||
// Sub data
|
||||
for (int index = EQEmu::inventory::containerBegin; index < invbag::ItemBagSize; ++index) {
|
||||
for (int index = EQEmu::invbag::SLOT_BEGIN; index <= invbag::SLOT_END; ++index) {
|
||||
ob << '|';
|
||||
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
@@ -2490,7 +2490,7 @@ namespace Titanium
|
||||
|
||||
static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
titaniumSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -2499,7 +2499,7 @@ namespace Titanium
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
titaniumSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -2530,7 +2530,7 @@ namespace Titanium
|
||||
|
||||
static inline void TitaniumToServerSayLink(std::string& serverSayLink, const std::string& titaniumSayLink)
|
||||
{
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (titaniumSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (titaniumSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = titaniumSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -2539,7 +2539,7 @@ namespace Titanium
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user