Moved buff definitions into 'spells' lookup

This commit is contained in:
Uleat 2019-01-20 20:04:07 -05:00
parent 585c6322bf
commit f690c64f9e
19 changed files with 219 additions and 218 deletions

View File

@ -203,14 +203,6 @@ namespace EQEmu
const size_t SAY_LINK_CLOSER_SIZE = 1;
const size_t SAY_LINK_MAXIMUM_SIZE = (SAY_LINK_OPENER_SIZE + SAY_LINK_BODY_SIZE + SAY_LINK_TEXT_SIZE + SAY_LINK_CLOSER_SIZE);
const int LongBuffs = RoF2::constants::LongBuffs;
const int ShortBuffs = RoF2::constants::ShortBuffs;
const int DiscBuffs = RoF2::constants::DiscBuffs;
const int TotalBuffs = RoF2::constants::TotalBuffs;
const int NPCBuffs = RoF2::constants::NPCBuffs;
const int PetBuffs = RoF2::constants::PetBuffs;
const int MercBuffs = RoF2::constants::MercBuffs;
} /*constants*/
namespace profile {
@ -254,6 +246,14 @@ namespace EQEmu
using SoD::spells::SPELLBOOK_SIZE;
using UF::spells::SPELL_GEM_COUNT; // RoF+ clients define more than UF client..but, they are not valid beyond UF
using RoF2::spells::LONG_BUFFS;
using RoF2::spells::SHORT_BUFFS;
using RoF2::spells::DISC_BUFFS;
using RoF2::spells::TOTAL_BUFFS;
using RoF2::spells::NPC_BUFFS;
using RoF2::spells::PET_BUFFS;
using RoF2::spells::MERC_BUFFS;
} // namespace spells
namespace bug {

View File

@ -47,13 +47,6 @@ static const EQEmu::constants::LookupEntry constants_static_lookup_entries[EQEmu
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL
),
/*[ClientVersion::Client62] =*/
@ -62,13 +55,6 @@ static const EQEmu::constants::LookupEntry constants_static_lookup_entries[EQEmu
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL
),
/*[ClientVersion::Titanium] =*/
@ -77,14 +63,7 @@ static const EQEmu::constants::LookupEntry constants_static_lookup_entries[EQEmu
Titanium::constants::EXPANSION_BIT,
Titanium::constants::EXPANSIONS_MASK,
Titanium::constants::CHARACTER_CREATION_LIMIT,
Titanium::constants::SAY_LINK_BODY_SIZE,
Titanium::constants::LongBuffs,
Titanium::constants::ShortBuffs,
Titanium::constants::DiscBuffs,
Titanium::constants::TotalBuffs,
Titanium::constants::NPCBuffs,
Titanium::constants::PetBuffs,
Titanium::constants::MercBuffs
Titanium::constants::SAY_LINK_BODY_SIZE
),
/*[ClientVersion::SoF] =*/
EQEmu::constants::LookupEntry(
@ -92,14 +71,7 @@ static const EQEmu::constants::LookupEntry constants_static_lookup_entries[EQEmu
SoF::constants::EXPANSION_BIT,
SoF::constants::EXPANSIONS_MASK,
SoF::constants::CHARACTER_CREATION_LIMIT,
SoF::constants::SAY_LINK_BODY_SIZE,
SoF::constants::LongBuffs,
SoF::constants::ShortBuffs,
SoF::constants::DiscBuffs,
SoF::constants::TotalBuffs,
SoF::constants::NPCBuffs,
SoF::constants::PetBuffs,
SoF::constants::MercBuffs
SoF::constants::SAY_LINK_BODY_SIZE
),
/*[ClientVersion::SoD] =*/
EQEmu::constants::LookupEntry(
@ -107,14 +79,7 @@ static const EQEmu::constants::LookupEntry constants_static_lookup_entries[EQEmu
SoD::constants::EXPANSION_BIT,
SoD::constants::EXPANSIONS_MASK,
SoD::constants::CHARACTER_CREATION_LIMIT,
SoD::constants::SAY_LINK_BODY_SIZE,
SoD::constants::LongBuffs,
SoD::constants::ShortBuffs,
SoD::constants::DiscBuffs,
SoD::constants::TotalBuffs,
SoD::constants::NPCBuffs,
SoD::constants::PetBuffs,
SoD::constants::MercBuffs
SoD::constants::SAY_LINK_BODY_SIZE
),
/*[ClientVersion::UF] =*/
EQEmu::constants::LookupEntry(
@ -122,14 +87,7 @@ static const EQEmu::constants::LookupEntry constants_static_lookup_entries[EQEmu
UF::constants::EXPANSION_BIT,
UF::constants::EXPANSIONS_MASK,
UF::constants::CHARACTER_CREATION_LIMIT,
UF::constants::SAY_LINK_BODY_SIZE,
UF::constants::LongBuffs,
UF::constants::ShortBuffs,
UF::constants::DiscBuffs,
UF::constants::TotalBuffs,
UF::constants::NPCBuffs,
UF::constants::PetBuffs,
UF::constants::MercBuffs
UF::constants::SAY_LINK_BODY_SIZE
),
/*[ClientVersion::RoF] =*/
EQEmu::constants::LookupEntry(
@ -137,14 +95,7 @@ static const EQEmu::constants::LookupEntry constants_static_lookup_entries[EQEmu
RoF::constants::EXPANSION_BIT,
RoF::constants::EXPANSIONS_MASK,
RoF::constants::CHARACTER_CREATION_LIMIT,
RoF::constants::SAY_LINK_BODY_SIZE,
RoF::constants::LongBuffs,
RoF::constants::ShortBuffs,
RoF::constants::DiscBuffs,
RoF::constants::TotalBuffs,
RoF::constants::NPCBuffs,
RoF::constants::PetBuffs,
RoF::constants::MercBuffs
RoF::constants::SAY_LINK_BODY_SIZE
),
/*[ClientVersion::RoF2] =*/
EQEmu::constants::LookupEntry(
@ -152,14 +103,7 @@ static const EQEmu::constants::LookupEntry constants_static_lookup_entries[EQEmu
RoF2::constants::EXPANSION_BIT,
RoF2::constants::EXPANSIONS_MASK,
RoF2::constants::CHARACTER_CREATION_LIMIT,
RoF2::constants::SAY_LINK_BODY_SIZE,
RoF2::constants::LongBuffs,
RoF2::constants::ShortBuffs,
RoF2::constants::DiscBuffs,
RoF2::constants::TotalBuffs,
RoF2::constants::NPCBuffs,
RoF2::constants::PetBuffs,
RoF2::constants::MercBuffs
RoF2::constants::SAY_LINK_BODY_SIZE
)
};
@ -1133,12 +1077,26 @@ static const EQEmu::spells::LookupEntry spells_static_lookup_entries[EQEmu::vers
{
/*[ClientVersion::Unknown] =*/
EQEmu::spells::LookupEntry(
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL,
ClientUnknown::INULL
),
/*[ClientVersion::Client62] =*/
EQEmu::spells::LookupEntry(
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL,
Client62::INULL
@ -1147,37 +1105,79 @@ static const EQEmu::spells::LookupEntry spells_static_lookup_entries[EQEmu::vers
EQEmu::spells::LookupEntry(
Titanium::spells::SPELL_ID_MAX,
Titanium::spells::SPELLBOOK_SIZE,
Titanium::spells::SPELL_GEM_COUNT
Titanium::spells::SPELL_GEM_COUNT,
Titanium::spells::LONG_BUFFS,
Titanium::spells::SHORT_BUFFS,
Titanium::spells::DISC_BUFFS,
Titanium::spells::TOTAL_BUFFS,
Titanium::spells::NPC_BUFFS,
Titanium::spells::PET_BUFFS,
Titanium::spells::MERC_BUFFS
),
/*[ClientVersion::SoF] =*/
EQEmu::spells::LookupEntry(
SoF::spells::SPELL_ID_MAX,
SoF::spells::SPELLBOOK_SIZE,
SoF::spells::SPELL_GEM_COUNT
SoF::spells::SPELL_GEM_COUNT,
SoF::spells::LONG_BUFFS,
SoF::spells::SHORT_BUFFS,
SoF::spells::DISC_BUFFS,
SoF::spells::TOTAL_BUFFS,
SoF::spells::NPC_BUFFS,
SoF::spells::PET_BUFFS,
SoF::spells::MERC_BUFFS
),
/*[ClientVersion::SoD] =*/
EQEmu::spells::LookupEntry(
SoD::spells::SPELL_ID_MAX,
SoD::spells::SPELLBOOK_SIZE,
SoD::spells::SPELL_GEM_COUNT
SoD::spells::SPELL_GEM_COUNT,
SoD::spells::LONG_BUFFS,
SoD::spells::SHORT_BUFFS,
SoD::spells::DISC_BUFFS,
SoD::spells::TOTAL_BUFFS,
SoD::spells::NPC_BUFFS,
SoD::spells::PET_BUFFS,
SoD::spells::MERC_BUFFS
),
/*[ClientVersion::UF] =*/
EQEmu::spells::LookupEntry(
UF::spells::SPELL_ID_MAX,
SoD::spells::SPELLBOOK_SIZE,
UF::spells::SPELL_GEM_COUNT
UF::spells::SPELL_GEM_COUNT,
UF::spells::LONG_BUFFS,
UF::spells::SHORT_BUFFS,
UF::spells::DISC_BUFFS,
UF::spells::TOTAL_BUFFS,
UF::spells::NPC_BUFFS,
UF::spells::PET_BUFFS,
UF::spells::MERC_BUFFS
),
/*[ClientVersion::RoF] =*/
EQEmu::spells::LookupEntry(
RoF::spells::SPELL_ID_MAX,
SoD::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
RoF::spells::LONG_BUFFS,
RoF::spells::SHORT_BUFFS,
RoF::spells::DISC_BUFFS,
RoF::spells::TOTAL_BUFFS,
RoF::spells::NPC_BUFFS,
RoF::spells::PET_BUFFS,
RoF::spells::MERC_BUFFS
),
/*[ClientVersion::RoF2] =*/
EQEmu::spells::LookupEntry(
RoF2::spells::SPELL_ID_MAX,
SoD::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
RoF2::spells::LONG_BUFFS,
RoF2::spells::SHORT_BUFFS,
RoF2::spells::DISC_BUFFS,
RoF2::spells::TOTAL_BUFFS,
RoF2::spells::NPC_BUFFS,
RoF2::spells::PET_BUFFS,
RoF2::spells::MERC_BUFFS
)
};

View File

@ -42,41 +42,20 @@ namespace EQEmu
uint32 ExpansionsMask;
int16 CharacterCreationLimit;
size_t SayLinkBodySize;
int LongBuffs;
int ShortBuffs;
int DiscBuffs;
int TotalBuffs;
int NPCBuffs;
int PetBuffs;
int MercBuffs;
LookupEntry(const LookupEntry *lookup_entry) { }
LookupEntry(
EQEmu::expansions::Expansion Expansion,
uint32 ExpansionBit,
uint32 ExpansionsMask,
int16 CharacterCreationLimit,
size_t SayLinkBodySize,
int LongBuffs,
int ShortBuffs,
int DiscBuffs,
int TotalBuffs,
int NPCBuffs,
int PetBuffs,
int MercBuffs
size_t SayLinkBodySize
) :
Expansion(Expansion),
ExpansionBit(ExpansionBit),
ExpansionsMask(ExpansionsMask),
CharacterCreationLimit(CharacterCreationLimit),
SayLinkBodySize(SayLinkBodySize),
LongBuffs(LongBuffs),
ShortBuffs(ShortBuffs),
DiscBuffs(DiscBuffs),
TotalBuffs(TotalBuffs),
NPCBuffs(NPCBuffs),
PetBuffs(PetBuffs),
MercBuffs(MercBuffs)
SayLinkBodySize(SayLinkBodySize)
{ }
};
@ -210,16 +189,38 @@ namespace EQEmu
int SpellIdMax;
int SpellbookSize;
int SpellGemCount;
int LongBuffs;
int ShortBuffs;
int DiscBuffs;
int TotalBuffs;
int NPCBuffs;
int PetBuffs;
int MercBuffs;
LookupEntry(const LookupEntry *lookup_entry) { }
LookupEntry(
int SpellIdMax,
int SpellbookSize,
int SpellGemCount
int SpellGemCount,
int LongBuffs,
int ShortBuffs,
int DiscBuffs,
int TotalBuffs,
int NPCBuffs,
int PetBuffs,
int MercBuffs
) :
SpellIdMax(SpellIdMax),
SpellbookSize(SpellbookSize),
SpellGemCount(SpellGemCount)
SpellGemCount(SpellGemCount),
LongBuffs(LongBuffs),
ShortBuffs(ShortBuffs),
DiscBuffs(DiscBuffs),
TotalBuffs(TotalBuffs),
NPCBuffs(NPCBuffs),
PetBuffs(PetBuffs),
MercBuffs(MercBuffs)
{ }
};

View File

@ -6169,12 +6169,12 @@ namespace RoF
static inline int ServerToRoFBuffSlot(int index)
{
// we're a disc
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
constants::LongBuffs + constants::ShortBuffs;
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
spells::LONG_BUFFS + spells::SHORT_BUFFS;
// we're a song
if (index >= EQEmu::constants::LongBuffs)
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
if (index >= EQEmu::spells::LONG_BUFFS)
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}
@ -6182,12 +6182,12 @@ namespace RoF
static inline int RoFToServerBuffSlot(int index)
{
// we're a disc
if (index >= constants::LongBuffs + constants::ShortBuffs)
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
EQEmu::constants::ShortBuffs;
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
EQEmu::spells::SHORT_BUFFS;
// we're a song
if (index >= constants::LongBuffs)
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
if (index >= spells::LONG_BUFFS)
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}

View File

@ -6424,12 +6424,12 @@ namespace RoF2
static inline int ServerToRoF2BuffSlot(int index)
{
// we're a disc
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
constants::LongBuffs + constants::ShortBuffs;
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
spells::LONG_BUFFS + spells::SHORT_BUFFS;
// we're a song
if (index >= EQEmu::constants::LongBuffs)
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
if (index >= EQEmu::spells::LONG_BUFFS)
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}
@ -6437,12 +6437,12 @@ namespace RoF2
static inline int RoF2ToServerBuffSlot(int index)
{
// we're a disc
if (index >= constants::LongBuffs + constants::ShortBuffs)
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
EQEmu::constants::ShortBuffs;
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
EQEmu::spells::SHORT_BUFFS;
// we're a song
if (index >= constants::LongBuffs)
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
if (index >= spells::LONG_BUFFS)
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}

View File

@ -271,14 +271,6 @@ namespace RoF2
const size_t SAY_LINK_BODY_SIZE = 56;
const int LongBuffs = 42;
const int ShortBuffs = 20;
const int DiscBuffs = 1;
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
const int NPCBuffs = 97;
const int PetBuffs = NPCBuffs;
const int MercBuffs = LongBuffs;
} /*constants*/
namespace behavior {
@ -321,6 +313,14 @@ namespace RoF2
const int SPELLBOOK_SIZE = 720;
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
const int LONG_BUFFS = 42;
const int SHORT_BUFFS = 20;
const int DISC_BUFFS = 1;
const int TOTAL_BUFFS = LONG_BUFFS + SHORT_BUFFS + DISC_BUFFS;
const int NPC_BUFFS = 97;
const int PET_BUFFS = NPC_BUFFS;
const int MERC_BUFFS = LONG_BUFFS;
} /*spells*/
}; /*RoF2*/

View File

@ -262,14 +262,6 @@ namespace RoF
const size_t SAY_LINK_BODY_SIZE = 55;
const int LongBuffs = 42;
const int ShortBuffs = 20;
const int DiscBuffs = 1;
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
const int NPCBuffs = 97;
const int PetBuffs = NPCBuffs;
const int MercBuffs = LongBuffs;
} /*constants*/
namespace behavior {
@ -312,6 +304,14 @@ namespace RoF
const int SPELLBOOK_SIZE = 720;
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
const int LONG_BUFFS = 42;
const int SHORT_BUFFS = 20;
const int DISC_BUFFS = 1;
const int TOTAL_BUFFS = LONG_BUFFS + SHORT_BUFFS + DISC_BUFFS;
const int NPC_BUFFS = 97;
const int PET_BUFFS = NPC_BUFFS;
const int MERC_BUFFS = LONG_BUFFS;
} /*spells*/
}; /*RoF*/

View File

@ -4093,12 +4093,12 @@ namespace SoD
static inline int ServerToSoDBuffSlot(int index)
{
// we're a disc
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
constants::LongBuffs + constants::ShortBuffs;
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
spells::LONG_BUFFS + spells::SHORT_BUFFS;
// we're a song
if (index >= EQEmu::constants::LongBuffs)
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
if (index >= EQEmu::spells::LONG_BUFFS)
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}
@ -4106,12 +4106,12 @@ namespace SoD
static inline int SoDToServerBuffSlot(int index)
{
// we're a disc
if (index >= constants::LongBuffs + constants::ShortBuffs)
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
EQEmu::constants::ShortBuffs;
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
EQEmu::spells::SHORT_BUFFS;
// we're a song
if (index >= constants::LongBuffs)
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
if (index >= spells::LONG_BUFFS)
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}

View File

@ -289,14 +289,6 @@ namespace SoD
const size_t SAY_LINK_BODY_SIZE = 50;
const int LongBuffs = 25;
const int ShortBuffs = 15;
const int DiscBuffs = 1;
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
const int NPCBuffs = 85;
const int PetBuffs = NPCBuffs;
const int MercBuffs = LongBuffs;
} /*constants*/
namespace behavior {
@ -337,6 +329,14 @@ namespace SoD
const int SPELLBOOK_SIZE = 480;
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
const int LONG_BUFFS = 25;
const int SHORT_BUFFS = 15;
const int DISC_BUFFS = 1;
const int TOTAL_BUFFS = LONG_BUFFS + SHORT_BUFFS + DISC_BUFFS;
const int NPC_BUFFS = 85;
const int PET_BUFFS = NPC_BUFFS;
const int MERC_BUFFS = LONG_BUFFS;
} /*spells*/
}; /*SoD*/

View File

@ -3491,12 +3491,12 @@ namespace SoF
static inline int ServerToSoFBuffSlot(int index) {
// we're a disc
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
constants::LongBuffs + constants::ShortBuffs;
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
spells::LONG_BUFFS + spells::SHORT_BUFFS;
// we're a song
if (index >= EQEmu::constants::LongBuffs)
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
if (index >= EQEmu::spells::LONG_BUFFS)
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}
@ -3504,12 +3504,12 @@ namespace SoF
static inline int SoFToServerBuffSlot(int index)
{
// we're a disc
if (index >= constants::LongBuffs + constants::ShortBuffs)
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
EQEmu::constants::ShortBuffs;
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
EQEmu::spells::SHORT_BUFFS;
// we're a song
if (index >= constants::LongBuffs)
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
if (index >= spells::LONG_BUFFS)
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}

View File

@ -289,14 +289,6 @@ namespace SoF
const size_t SAY_LINK_BODY_SIZE = 50;
const int LongBuffs = 25;
const int ShortBuffs = 15;
const int DiscBuffs = 1;
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
const int NPCBuffs = 60;
const int PetBuffs = 30;
const int MercBuffs = 0;
} /*constants*/
namespace behavior {
@ -338,6 +330,14 @@ namespace SoF
const int SPELLBOOK_SIZE = 480;
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
const int LONG_BUFFS = 25;
const int SHORT_BUFFS = 15;
const int DISC_BUFFS = 1;
const int TOTAL_BUFFS = LONG_BUFFS + SHORT_BUFFS + DISC_BUFFS;
const int NPC_BUFFS = 60;
const int PET_BUFFS = 30;
const int MERC_BUFFS = 0;
} /*spells*/
}; /*SoF*/

View File

@ -2794,12 +2794,12 @@ namespace Titanium
static inline int ServerToTitaniumBuffSlot(int index)
{
// we're a disc
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
constants::LongBuffs + constants::ShortBuffs;
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
spells::LONG_BUFFS + spells::SHORT_BUFFS;
// we're a song
if (index >= EQEmu::constants::LongBuffs)
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
if (index >= EQEmu::spells::LONG_BUFFS)
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}
@ -2807,12 +2807,12 @@ namespace Titanium
static inline int TitaniumToServerBuffSlot(int index)
{
// we're a disc
if (index >= constants::LongBuffs + constants::ShortBuffs)
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
EQEmu::constants::ShortBuffs;
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
EQEmu::spells::SHORT_BUFFS;
// we're a song
if (index >= constants::LongBuffs)
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
if (index >= spells::LONG_BUFFS)
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}

View File

@ -288,14 +288,6 @@ namespace Titanium
const size_t SAY_LINK_BODY_SIZE = 45;
const int LongBuffs = 25;
const int ShortBuffs = 12;
const int DiscBuffs = 1;
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
const int NPCBuffs = 60;
const int PetBuffs = 30;
const int MercBuffs = 0;
} /*constants*/
namespace behavior {
@ -337,6 +329,14 @@ namespace Titanium
const int SPELLBOOK_SIZE = 400;
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
const int LONG_BUFFS = 25;
const int SHORT_BUFFS = 12;
const int DISC_BUFFS = 1;
const int TOTAL_BUFFS = LONG_BUFFS + SHORT_BUFFS + DISC_BUFFS;
const int NPC_BUFFS = 60;
const int PET_BUFFS = 30;
const int MERC_BUFFS = 0;
} /*spells*/
}; /*Titanium*/

View File

@ -4460,12 +4460,12 @@ namespace UF
static inline int ServerToUFBuffSlot(int index)
{
// we're a disc
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
constants::LongBuffs + constants::ShortBuffs;
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
spells::LONG_BUFFS + spells::SHORT_BUFFS;
// we're a song
if (index >= EQEmu::constants::LongBuffs)
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
if (index >= EQEmu::spells::LONG_BUFFS)
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}
@ -4473,12 +4473,12 @@ namespace UF
static inline int UFToServerBuffSlot(int index)
{
// we're a disc
if (index >= constants::LongBuffs + constants::ShortBuffs)
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
EQEmu::constants::ShortBuffs;
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
EQEmu::spells::SHORT_BUFFS;
// we're a song
if (index >= constants::LongBuffs)
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
if (index >= spells::LONG_BUFFS)
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
// we're a normal buff
return index; // as long as we guard against bad slots server side, we should be fine
}

View File

@ -290,14 +290,6 @@ namespace UF
const size_t SAY_LINK_BODY_SIZE = 50;
const int LongBuffs = 30;
const int ShortBuffs = 20;
const int DiscBuffs = 1;
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
const int NPCBuffs = 85;
const int PetBuffs = NPCBuffs;
const int MercBuffs = LongBuffs;
} /*constants*/
namespace behavior {
@ -340,6 +332,14 @@ namespace UF
const int SPELLBOOK_SIZE = 720;
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
const int LONG_BUFFS = 30;
const int SHORT_BUFFS = 20;
const int DISC_BUFFS = 1;
const int TOTAL_BUFFS = LONG_BUFFS + SHORT_BUFFS + DISC_BUFFS;
const int NPC_BUFFS = 85;
const int PET_BUFFS = NPC_BUFFS;
const int MERC_BUFFS = LONG_BUFFS;
} /*spells*/
}; /*UF*/

View File

@ -557,10 +557,10 @@ public:
virtual int GetCurrentBuffSlots() const;
virtual int GetCurrentSongSlots() const;
virtual int GetCurrentDiscSlots() const { return 1; }
virtual int GetMaxBuffSlots() const { return EQEmu::constants::LongBuffs; }
virtual int GetMaxSongSlots() const { return EQEmu::constants::ShortBuffs; }
virtual int GetMaxDiscSlots() const { return EQEmu::constants::DiscBuffs; }
virtual int GetMaxTotalSlots() const { return EQEmu::constants::TotalBuffs; }
virtual int GetMaxBuffSlots() const { return EQEmu::spells::LONG_BUFFS; }
virtual int GetMaxSongSlots() const { return EQEmu::spells::SHORT_BUFFS; }
virtual int GetMaxDiscSlots() const { return EQEmu::spells::DISC_BUFFS; }
virtual int GetMaxTotalSlots() const { return EQEmu::spells::TOTAL_BUFFS; }
virtual uint32 GetFirstBuffSlot(bool disc, bool song);
virtual uint32 GetLastBuffSlot(bool disc, bool song);
virtual void InitializeBuffSlots();

View File

@ -1538,7 +1538,7 @@ protected:
glm::vec3 m_TargetRing;
// we might want to do this differently, we gotta do max NPC buffs ... which is 97
uint32 m_spellHitsLeft[EQEmu::constants::TotalBuffs]; // Used to track which spells will have their numhits incremented when spell finishes casting
uint32 m_spellHitsLeft[EQEmu::spells::TOTAL_BUFFS]; // Used to track which spells will have their numhits incremented when spell finishes casting
GravityBehavior flymode;
bool m_targetable;
int QGVarDuration(const char *fmt);

View File

@ -5619,12 +5619,12 @@ int Client::GetCurrentBuffSlots() const
numbuffs++;
if (GetLevel() > 74)
numbuffs++;
return EQEmu::ClampUpper(numbuffs, EQEmu::constants::StaticLookup(m_ClientVersion)->LongBuffs);
return EQEmu::ClampUpper(numbuffs, EQEmu::spells::StaticLookup(m_ClientVersion)->LongBuffs);
}
int Client::GetCurrentSongSlots() const
{
return EQEmu::constants::StaticLookup(m_ClientVersion)->ShortBuffs; // AAs dont affect this
return EQEmu::spells::StaticLookup(m_ClientVersion)->ShortBuffs; // AAs dont affect this
}
void Client::InitializeBuffSlots()

View File

@ -3646,7 +3646,7 @@ void ZoneDatabase::LoadBuffs(Client *client)
}
// We load up to the most our client supports
max_slots = EQEmu::constants::StaticLookup(client->ClientVersion())->LongBuffs;
max_slots = EQEmu::spells::StaticLookup(client->ClientVersion())->LongBuffs;
for (int index = 0; index < max_slots; ++index) {
if (!IsValidSpell(buffs[index].spellid))
continue;