mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Renamed and moved SkillUseTypes enumeration to EQEmu::skills::SkillType; eq_dictionary work
This commit is contained in:
+21
-21
@@ -1279,18 +1279,18 @@ namespace SoF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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 < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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';
|
||||
@@ -1300,13 +1300,13 @@ namespace SoF
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1594,8 +1594,8 @@ namespace SoF
|
||||
eq->CharCount = emu->CharCount;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > consts::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = consts::CHARACTER_CREATION_LIMIT;
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
|
||||
FINISH_ENCODE();
|
||||
return;
|
||||
@@ -1607,7 +1607,7 @@ namespace SoF
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < consts::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -1623,8 +1623,8 @@ namespace SoF
|
||||
eq->CharCount = character_count;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > consts::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = consts::CHARACTER_CREATION_LIMIT;
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
|
||||
emu_ptr = __emu_buffer;
|
||||
emu_ptr += sizeof(CharacterSelect_Struct);
|
||||
@@ -3027,7 +3027,7 @@ namespace SoF
|
||||
isbs.augtype = item->AugType;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < consts::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -3237,7 +3237,7 @@ namespace SoF
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
SoFSlot = inventory::SlotPowerSource;
|
||||
SoFSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
SoFSlot = serverSlot;
|
||||
|
||||
@@ -3254,15 +3254,15 @@ namespace SoF
|
||||
{
|
||||
uint32 ServerSlot = 0;
|
||||
|
||||
if (sofSlot >= inventory::SlotAmmo && sofSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (sofSlot >= invslot::PossessionsAmmo && sofSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot >= consts::GENERAL_BAGS_BEGIN && sofSlot <= consts::CURSOR_BAG_END)
|
||||
else if (sofSlot >= invbag::GeneralBagsBegin && sofSlot <= invbag::CursorBagEnd)
|
||||
ServerSlot = sofSlot - 11;
|
||||
else if (sofSlot >= consts::BANK_BAGS_BEGIN && sofSlot <= consts::BANK_BAGS_END)
|
||||
else if (sofSlot >= invbag::BankBagsBegin && sofSlot <= invbag::BankBagsEnd)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot >= consts::SHARED_BANK_BAGS_BEGIN && sofSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
else if (sofSlot >= invbag::SharedBankBagsBegin && sofSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot == inventory::SlotPowerSource)
|
||||
else if (sofSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = sofSlot;
|
||||
@@ -3278,7 +3278,7 @@ namespace SoF
|
||||
|
||||
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
sofTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -3318,7 +3318,7 @@ namespace SoF
|
||||
|
||||
static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sofTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (sofTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = sofTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -3327,7 +3327,7 @@ namespace SoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= consts::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user