mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Added 'spells' entry to EQDictionary
This commit is contained in:
@@ -217,7 +217,7 @@ namespace Convert {
|
||||
/*0245*/ uint8 guildbanker;
|
||||
/*0246*/ uint8 unknown0246[6]; //
|
||||
/*0252*/ uint32 intoxication;
|
||||
/*0256*/ uint32 spellSlotRefresh[MAX_PP_REF_MEMSPELL]; //in ms
|
||||
/*0256*/ uint32 spellSlotRefresh[9]; //in ms
|
||||
/*0292*/ uint32 abilitySlotRefresh;
|
||||
/*0296*/ uint8 haircolor; // Player hair color
|
||||
/*0297*/ uint8 beardcolor; // Player beard color
|
||||
@@ -256,9 +256,9 @@ namespace Convert {
|
||||
/*2505*/ uint8 unknown2541[47]; // ?
|
||||
/*2552*/ uint8 languages[MAX_PP_LANGUAGE];
|
||||
/*2580*/ uint8 unknown2616[4];
|
||||
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
|
||||
/*2584*/ uint32 spell_book[480];
|
||||
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
|
||||
/*4632*/ uint32 mem_spells[MAX_PP_REF_MEMSPELL];
|
||||
/*4632*/ uint32 mem_spells[9];
|
||||
/*4668*/ uint8 unknown4704[32]; //
|
||||
/*4700*/ float y; // Player y position
|
||||
/*4704*/ float x; // Player x position
|
||||
@@ -1360,7 +1360,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||
/* Run Spell Convert */
|
||||
first_entry = 0; rquery = "";
|
||||
for (i = 0; i < MAX_PP_REF_SPELLBOOK; i++){
|
||||
for (i = 0; i < 480; i++){
|
||||
if (pp->spell_book[i] > 0 && pp->spell_book[i] != 4294967295 && pp->spell_book[i] < 40000 && pp->spell_book[i] != 1){
|
||||
if (first_entry != 1){
|
||||
rquery = StringFormat("REPLACE INTO `character_spells` (id, slot_id, spell_id) VALUES (%u, %u, %u)", character_id, i, pp->spell_book[i]);
|
||||
@@ -1372,7 +1372,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||
/* Run Max Memmed Spell Convert */
|
||||
first_entry = 0; rquery = "";
|
||||
for (i = 0; i < MAX_PP_REF_MEMSPELL; i++){
|
||||
for (i = 0; i < 9; i++){
|
||||
if (pp->mem_spells[i] > 0 && pp->mem_spells[i] != 65535 && pp->mem_spells[i] != 4294967295){
|
||||
if (first_entry != 1){
|
||||
rquery = StringFormat("REPLACE INTO `character_memmed_spells` (id, slot_id, spell_id) VALUES (%u, %u, %u)", character_id, i, pp->mem_spells[i]);
|
||||
|
||||
+28
-21
@@ -228,6 +228,34 @@ namespace EQEmu
|
||||
|
||||
} // namespace behavior
|
||||
|
||||
namespace spells {
|
||||
enum class CastingSlot : uint32 { // hybrid declaration
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
Gem11 = 10,
|
||||
Gem12 = 11,
|
||||
MaxGems = 12,
|
||||
Ability = 20, // HT/LoH for Tit
|
||||
PotionBelt = 21, // Tit uses a different slot for PB
|
||||
Item = 22,
|
||||
Discipline = 23,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
using RoF2::spells::SPELL_ID_MAX;
|
||||
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
|
||||
|
||||
} // namespace spells
|
||||
|
||||
namespace bug {
|
||||
enum CategoryID : uint32 {
|
||||
catOther = 0,
|
||||
@@ -259,27 +287,6 @@ namespace EQEmu
|
||||
|
||||
} // namespace bug
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
Gem11 = 10,
|
||||
Gem12 = 11,
|
||||
MaxGems = 12,
|
||||
Ability = 20, // HT/LoH for Tit
|
||||
PotionBelt = 21, // Tit uses a different slot for PB
|
||||
Item = 22,
|
||||
Discipline = 23,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
#endif /*COMMON_EMU_CONSTANTS_H*/
|
||||
|
||||
@@ -32,6 +32,7 @@ void EQEmu::InitializeDynamicLookups() {
|
||||
constants::InitializeDynamicLookups();
|
||||
inventory::InitializeDynamicLookups();
|
||||
behavior::InitializeDynamicLookups();
|
||||
spells::InitializeDynamicLookups();
|
||||
|
||||
global_dictionary_init = true;
|
||||
}
|
||||
@@ -1125,3 +1126,92 @@ const EQEmu::behavior::LookupEntry* EQEmu::behavior::StaticLookup(versions::MobV
|
||||
{
|
||||
return &behavior_static_lookup_entries[static_cast<int>(versions::ValidateMobVersion(mob_version))];
|
||||
}
|
||||
|
||||
static std::unique_ptr<EQEmu::spells::LookupEntry> spells_dynamic_gm_lookup_entries[EQEmu::versions::ClientVersionCount];
|
||||
static std::unique_ptr<EQEmu::spells::LookupEntry> spells_dynamic_lookup_entries[EQEmu::versions::ClientVersionCount];
|
||||
static const EQEmu::spells::LookupEntry spells_static_lookup_entries[EQEmu::versions::ClientVersionCount] =
|
||||
{
|
||||
/*[ClientVersion::Unknown] =*/
|
||||
EQEmu::spells::LookupEntry(
|
||||
ClientUnknown::INULL,
|
||||
ClientUnknown::INULL,
|
||||
ClientUnknown::INULL
|
||||
),
|
||||
/*[ClientVersion::Client62] =*/
|
||||
EQEmu::spells::LookupEntry(
|
||||
Client62::INULL,
|
||||
Client62::INULL,
|
||||
Client62::INULL
|
||||
),
|
||||
/*[ClientVersion::Titanium] =*/
|
||||
EQEmu::spells::LookupEntry(
|
||||
Titanium::spells::SPELL_ID_MAX,
|
||||
Titanium::spells::SPELLBOOK_SIZE,
|
||||
Titanium::spells::SPELL_GEM_COUNT
|
||||
),
|
||||
/*[ClientVersion::SoF] =*/
|
||||
EQEmu::spells::LookupEntry(
|
||||
SoF::spells::SPELL_ID_MAX,
|
||||
SoF::spells::SPELLBOOK_SIZE,
|
||||
SoF::spells::SPELL_GEM_COUNT
|
||||
),
|
||||
/*[ClientVersion::SoD] =*/
|
||||
EQEmu::spells::LookupEntry(
|
||||
SoD::spells::SPELL_ID_MAX,
|
||||
SoD::spells::SPELLBOOK_SIZE,
|
||||
SoD::spells::SPELL_GEM_COUNT
|
||||
),
|
||||
/*[ClientVersion::UF] =*/
|
||||
EQEmu::spells::LookupEntry(
|
||||
UF::spells::SPELL_ID_MAX,
|
||||
SoD::spells::SPELLBOOK_SIZE,
|
||||
UF::spells::SPELL_GEM_COUNT
|
||||
),
|
||||
/*[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
|
||||
),
|
||||
/*[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
|
||||
)
|
||||
};
|
||||
|
||||
static bool spells_dictionary_init = false;
|
||||
void EQEmu::spells::InitializeDynamicLookups() {
|
||||
if (spells_dictionary_init == true)
|
||||
return;
|
||||
spells_dictionary_init = true;
|
||||
|
||||
if (RuleB(World, UseClientBasedExpansionSettings))
|
||||
return;
|
||||
|
||||
// use static references for now
|
||||
}
|
||||
|
||||
const EQEmu::spells::LookupEntry* EQEmu::spells::DynamicGMLookup(versions::ClientVersion client_version)
|
||||
{
|
||||
client_version = versions::ValidateClientVersion(client_version);
|
||||
if (spells_dynamic_gm_lookup_entries[static_cast<int>(client_version)])
|
||||
return spells_dynamic_gm_lookup_entries[static_cast<int>(client_version)].get();
|
||||
|
||||
return &spells_static_lookup_entries[static_cast<int>(client_version)];
|
||||
}
|
||||
|
||||
const EQEmu::spells::LookupEntry* EQEmu::spells::DynamicLookup(versions::ClientVersion client_version)
|
||||
{
|
||||
client_version = versions::ValidateClientVersion(client_version);
|
||||
if (spells_dynamic_lookup_entries[static_cast<int>(client_version)])
|
||||
return spells_dynamic_lookup_entries[static_cast<int>(client_version)].get();
|
||||
|
||||
return &spells_static_lookup_entries[static_cast<int>(client_version)];
|
||||
}
|
||||
|
||||
const EQEmu::spells::LookupEntry* EQEmu::spells::StaticLookup(versions::ClientVersion client_version)
|
||||
{
|
||||
return &spells_static_lookup_entries[static_cast<int>(versions::ValidateClientVersion(client_version))];
|
||||
}
|
||||
|
||||
+27
-1
@@ -93,7 +93,7 @@ namespace EQEmu
|
||||
// note: 'PossessionsBitmask' needs to be attuned to the client version with the highest number
|
||||
// of possessions slots and 'InventoryTypeSize[typePossessions]' should reflect the same count
|
||||
// with translators adjusting for valid slot indices. Server-side validations will be performed
|
||||
// against 'PossessionsBitmask' (note: the same applies to Corpse type size and bitmask)
|
||||
// against 'PossessionsBitmask' (note: the same applies to CorpseBitmask..size is not dependent)
|
||||
|
||||
struct InventoryTypeSize_Struct { // should reflect count and naming conventions referenced in emu_constants.h
|
||||
int16 Possessions, Bank, SharedBank;
|
||||
@@ -205,6 +205,32 @@ namespace EQEmu
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace spells {
|
||||
struct LookupEntry {
|
||||
int SpellIdMax;
|
||||
int SpellbookSize;
|
||||
int SpellGemCount;
|
||||
|
||||
LookupEntry(const LookupEntry *lookup_entry) { }
|
||||
LookupEntry(
|
||||
int SpellIdMax,
|
||||
int SpellbookSize,
|
||||
int SpellGemCount
|
||||
) :
|
||||
SpellIdMax(SpellIdMax),
|
||||
SpellbookSize(SpellbookSize),
|
||||
SpellGemCount(SpellGemCount)
|
||||
{ }
|
||||
};
|
||||
|
||||
void InitializeDynamicLookups();
|
||||
|
||||
const LookupEntry* DynamicGMLookup(versions::ClientVersion client_version);
|
||||
const LookupEntry* DynamicLookup(versions::ClientVersion client_version);
|
||||
const LookupEntry* StaticLookup(versions::ClientVersion client_version);
|
||||
|
||||
} /*spells*/
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
namespace ClientUnknown
|
||||
|
||||
@@ -852,10 +852,6 @@ struct SuspendedMinion_Struct
|
||||
** OpCode: 0x006a
|
||||
*/
|
||||
static const uint32 MAX_PP_LANGUAGE = 28;
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Set for all functions
|
||||
static const uint32 MAX_PP_MEMSPELL = static_cast<uint32>(EQEmu::CastingSlot::MaxGems); // Set to latest client so functions can work right -- 12
|
||||
static const uint32 MAX_PP_REF_SPELLBOOK = 480; // Set for Player Profile size retain
|
||||
static const uint32 MAX_PP_REF_MEMSPELL = 9; // Set for Player Profile size retain
|
||||
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
@@ -935,7 +931,7 @@ struct PlayerProfile_Struct
|
||||
/*0245*/ uint8 guildbanker;
|
||||
/*0246*/ uint8 unknown0246[6]; //
|
||||
/*0252*/ uint32 intoxication;
|
||||
/*0256*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; //in ms
|
||||
/*0256*/ uint32 spellSlotRefresh[EQEmu::spells::SPELL_GEM_COUNT]; //in ms
|
||||
/*0292*/ uint32 abilitySlotRefresh;
|
||||
/*0296*/ uint8 haircolor; // Player hair color
|
||||
/*0297*/ uint8 beardcolor; // Player beard color
|
||||
@@ -974,9 +970,9 @@ struct PlayerProfile_Struct
|
||||
/*2505*/ uint8 unknown2541[47]; // ?
|
||||
/*2552*/ uint8 languages[MAX_PP_LANGUAGE];
|
||||
/*2580*/ uint8 unknown2616[4];
|
||||
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
|
||||
/*2584*/ uint32 spell_book[EQEmu::spells::SPELLBOOK_SIZE];
|
||||
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
|
||||
/*4632*/ uint32 mem_spells[MAX_PP_MEMSPELL];
|
||||
/*4632*/ uint32 mem_spells[EQEmu::spells::SPELL_GEM_COUNT];
|
||||
/*4668*/ uint8 unknown4704[32]; //
|
||||
/*4700*/ float y; // Player y position
|
||||
/*4704*/ float x; // Player x position
|
||||
@@ -4373,7 +4369,7 @@ struct AnnoyingZoneUnknown_Struct {
|
||||
};
|
||||
|
||||
struct LoadSpellSet_Struct {
|
||||
uint32 spell[MAX_PP_MEMSPELL]; // 0xFFFFFFFF if no action, slot number if to unmem starting at 0
|
||||
uint32 spell[EQEmu::spells::SPELL_GEM_COUNT]; // 0xFFFFFFFF if no action, slot number if to unmem starting at 0
|
||||
uint32 unknown; //there seems to be an extra field in this packet...
|
||||
};
|
||||
|
||||
|
||||
+77
-77
@@ -65,8 +65,8 @@ namespace RoF
|
||||
// client to server say link converter
|
||||
static inline void RoFToServerSayLink(std::string& serverSayLink, const std::string& rofSayLink);
|
||||
|
||||
static inline CastingSlot ServerToRoFCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot RoFToServerCastingSlot(CastingSlot slot);
|
||||
static inline spells::CastingSlot ServerToRoFCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot RoFToServerCastingSlot(spells::CastingSlot slot);
|
||||
|
||||
static inline int ServerToRoFBuffSlot(int index);
|
||||
static inline int RoFToServerBuffSlot(int index);
|
||||
@@ -502,7 +502,7 @@ namespace RoF
|
||||
ENCODE_LENGTH_EXACT(CastSpell_Struct);
|
||||
SETUP_DIRECT_ENCODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
eq->slot = static_cast<uint32>(ServerToRoFCastingSlot(static_cast<EQEmu::CastingSlot>(emu->slot)));
|
||||
eq->slot = static_cast<uint32>(ServerToRoFCastingSlot(static_cast<EQEmu::spells::CastingSlot>(emu->slot)));
|
||||
|
||||
OUT(spell_id);
|
||||
eq->inventory_slot = ServerToRoFSlot(emu->inventoryslot);
|
||||
@@ -2124,33 +2124,33 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(structs::MAX_PP_SPELLBOOK); // Spellbook slots
|
||||
outapp->WriteUInt32(spells::SPELLBOOK_SIZE); // Spellbook slots
|
||||
|
||||
for (uint32 r = 0; r < MAX_PP_SPELLBOOK; r++)
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELLBOOK_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->spell_book[r]);
|
||||
}
|
||||
// zeroes for the rest of the spellbook slots
|
||||
for (uint32 r = 0; r < structs::MAX_PP_SPELLBOOK - MAX_PP_SPELLBOOK; r++)
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE - EQEmu::spells::SPELLBOOK_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(structs::MAX_PP_MEMSPELL); // Memorised spell slots
|
||||
outapp->WriteUInt32(spells::SPELL_GEM_COUNT); // Memorised spell slots
|
||||
|
||||
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++) // first 12
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELL_GEM_COUNT; r++) // first 12
|
||||
{
|
||||
outapp->WriteUInt32(emu->mem_spells[r]);
|
||||
}
|
||||
// zeroes for the rest of the slots -- the other 4 which don't work at all!
|
||||
for (uint32 r = 0; r < structs::MAX_PP_MEMSPELL - MAX_PP_MEMSPELL; r++)
|
||||
for (uint32 r = 0; r < spells::SPELL_GEM_COUNT - EQEmu::spells::SPELL_GEM_COUNT; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(13); // gem refresh count
|
||||
|
||||
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++)
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELL_GEM_COUNT; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->spellSlotRefresh[r]); // spell gem refresh
|
||||
}
|
||||
@@ -4221,7 +4221,7 @@ namespace RoF
|
||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
emu->slot = static_cast<uint32>(RoFToServerCastingSlot(static_cast<CastingSlot>(eq->slot)));
|
||||
emu->slot = static_cast<uint32>(RoFToServerCastingSlot(static_cast<spells::CastingSlot>(eq->slot)));
|
||||
|
||||
IN(spell_id);
|
||||
emu->inventoryslot = RoFToServerSlot(eq->inventory_slot);
|
||||
@@ -4738,7 +4738,7 @@ namespace RoF
|
||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||
|
||||
for (unsigned int i = 0; i < MAX_PP_MEMSPELL; ++i)
|
||||
for (unsigned int i = 0; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
{
|
||||
if (eq->spell[i] == 0)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
@@ -6087,80 +6087,80 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
|
||||
static inline CastingSlot ServerToRoFCastingSlot(EQEmu::CastingSlot slot)
|
||||
static inline spells::CastingSlot ServerToRoFCastingSlot(EQEmu::spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case EQEmu::CastingSlot::Gem1:
|
||||
return CastingSlot::Gem1;
|
||||
case EQEmu::CastingSlot::Gem2:
|
||||
return CastingSlot::Gem2;
|
||||
case EQEmu::CastingSlot::Gem3:
|
||||
return CastingSlot::Gem3;
|
||||
case EQEmu::CastingSlot::Gem4:
|
||||
return CastingSlot::Gem4;
|
||||
case EQEmu::CastingSlot::Gem5:
|
||||
return CastingSlot::Gem5;
|
||||
case EQEmu::CastingSlot::Gem6:
|
||||
return CastingSlot::Gem6;
|
||||
case EQEmu::CastingSlot::Gem7:
|
||||
return CastingSlot::Gem7;
|
||||
case EQEmu::CastingSlot::Gem8:
|
||||
return CastingSlot::Gem8;
|
||||
case EQEmu::CastingSlot::Gem9:
|
||||
return CastingSlot::Gem9;
|
||||
case EQEmu::CastingSlot::Gem10:
|
||||
return CastingSlot::Gem10;
|
||||
case EQEmu::CastingSlot::Gem11:
|
||||
return CastingSlot::Gem11;
|
||||
case EQEmu::CastingSlot::Gem12:
|
||||
return CastingSlot::Gem12;
|
||||
case EQEmu::CastingSlot::Item:
|
||||
case EQEmu::CastingSlot::PotionBelt:
|
||||
return CastingSlot::Item;
|
||||
case EQEmu::CastingSlot::Discipline:
|
||||
return CastingSlot::Discipline;
|
||||
case EQEmu::CastingSlot::AltAbility:
|
||||
return CastingSlot::AltAbility;
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Gem10:
|
||||
return spells::CastingSlot::Gem10;
|
||||
case EQEmu::spells::CastingSlot::Gem11:
|
||||
return spells::CastingSlot::Gem11;
|
||||
case EQEmu::spells::CastingSlot::Gem12:
|
||||
return spells::CastingSlot::Gem12;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return CastingSlot::Discipline;
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::CastingSlot RoFToServerCastingSlot(CastingSlot slot)
|
||||
static inline EQEmu::spells::CastingSlot RoFToServerCastingSlot(spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case CastingSlot::Gem1:
|
||||
return EQEmu::CastingSlot::Gem1;
|
||||
case CastingSlot::Gem2:
|
||||
return EQEmu::CastingSlot::Gem2;
|
||||
case CastingSlot::Gem3:
|
||||
return EQEmu::CastingSlot::Gem3;
|
||||
case CastingSlot::Gem4:
|
||||
return EQEmu::CastingSlot::Gem4;
|
||||
case CastingSlot::Gem5:
|
||||
return EQEmu::CastingSlot::Gem5;
|
||||
case CastingSlot::Gem6:
|
||||
return EQEmu::CastingSlot::Gem6;
|
||||
case CastingSlot::Gem7:
|
||||
return EQEmu::CastingSlot::Gem7;
|
||||
case CastingSlot::Gem8:
|
||||
return EQEmu::CastingSlot::Gem8;
|
||||
case CastingSlot::Gem9:
|
||||
return EQEmu::CastingSlot::Gem9;
|
||||
case CastingSlot::Gem10:
|
||||
return EQEmu::CastingSlot::Gem10;
|
||||
case CastingSlot::Gem11:
|
||||
return EQEmu::CastingSlot::Gem11;
|
||||
case CastingSlot::Gem12:
|
||||
return EQEmu::CastingSlot::Gem12;
|
||||
case CastingSlot::Discipline:
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
case CastingSlot::Item:
|
||||
return EQEmu::CastingSlot::Item;
|
||||
case CastingSlot::AltAbility:
|
||||
return EQEmu::CastingSlot::AltAbility;
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Gem10:
|
||||
return EQEmu::spells::CastingSlot::Gem10;
|
||||
case spells::CastingSlot::Gem11:
|
||||
return EQEmu::spells::CastingSlot::Gem11;
|
||||
case spells::CastingSlot::Gem12:
|
||||
return EQEmu::spells::CastingSlot::Gem12;
|
||||
case spells::CastingSlot::Discipline:
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
case spells::CastingSlot::Item:
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,24 +50,6 @@ namespace RoF
|
||||
#include "rof_ops.h"
|
||||
};
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
Gem11 = 10,
|
||||
Gem12 = 11,
|
||||
Item = 12,
|
||||
Discipline = 13,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
}; /*RoF*/
|
||||
|
||||
#endif /*COMMON_ROF_H*/
|
||||
|
||||
+77
-77
@@ -65,8 +65,8 @@ namespace RoF2
|
||||
// client to server say link converter
|
||||
static inline void RoF2ToServerSayLink(std::string &server_saylink, const std::string &rof2_saylink);
|
||||
|
||||
static inline CastingSlot ServerToRoF2CastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot RoF2ToServerCastingSlot(CastingSlot slot);
|
||||
static inline spells::CastingSlot ServerToRoF2CastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot RoF2ToServerCastingSlot(spells::CastingSlot slot);
|
||||
|
||||
static inline int ServerToRoF2BuffSlot(int index);
|
||||
static inline int RoF2ToServerBuffSlot(int index);
|
||||
@@ -570,7 +570,7 @@ namespace RoF2
|
||||
ENCODE_LENGTH_EXACT(CastSpell_Struct);
|
||||
SETUP_DIRECT_ENCODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
eq->slot = static_cast<uint32>(ServerToRoF2CastingSlot(static_cast<EQEmu::CastingSlot>(emu->slot)));
|
||||
eq->slot = static_cast<uint32>(ServerToRoF2CastingSlot(static_cast<EQEmu::spells::CastingSlot>(emu->slot)));
|
||||
|
||||
OUT(spell_id);
|
||||
eq->inventory_slot = ServerToRoF2Slot(emu->inventoryslot);
|
||||
@@ -2200,33 +2200,33 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(structs::MAX_PP_SPELLBOOK); // Spellbook slots
|
||||
outapp->WriteUInt32(spells::SPELLBOOK_SIZE); // Spellbook slots
|
||||
|
||||
for (uint32 r = 0; r < MAX_PP_SPELLBOOK; r++)
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELLBOOK_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->spell_book[r]);
|
||||
}
|
||||
// zeroes for the rest of the spellbook slots
|
||||
for (uint32 r = 0; r < structs::MAX_PP_SPELLBOOK - MAX_PP_SPELLBOOK; r++)
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE - EQEmu::spells::SPELLBOOK_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(structs::MAX_PP_MEMSPELL); // Memorised spell slots
|
||||
outapp->WriteUInt32(spells::SPELL_GEM_COUNT); // Memorised spell slots
|
||||
|
||||
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++) // write first 12
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELL_GEM_COUNT; r++) // write first 12
|
||||
{
|
||||
outapp->WriteUInt32(emu->mem_spells[r]);
|
||||
}
|
||||
// zeroes for the rest of the slots the other 4, which actually don't work on the client at all :D
|
||||
for (uint32 r = 0; r < structs::MAX_PP_MEMSPELL - MAX_PP_MEMSPELL; r++)
|
||||
for (uint32 r = 0; r < spells::SPELL_GEM_COUNT - EQEmu::spells::SPELL_GEM_COUNT; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(13); // gem refresh counts
|
||||
|
||||
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++)
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELL_GEM_COUNT; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->spellSlotRefresh[r]); // spell gem refresh
|
||||
}
|
||||
@@ -4460,7 +4460,7 @@ namespace RoF2
|
||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
emu->slot = static_cast<uint32>(RoF2ToServerCastingSlot(static_cast<CastingSlot>(eq->slot)));
|
||||
emu->slot = static_cast<uint32>(RoF2ToServerCastingSlot(static_cast<spells::CastingSlot>(eq->slot)));
|
||||
|
||||
IN(spell_id);
|
||||
emu->inventoryslot = RoF2ToServerSlot(eq->inventory_slot);
|
||||
@@ -4976,7 +4976,7 @@ namespace RoF2
|
||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||
|
||||
for (unsigned int i = 0; i < MAX_PP_MEMSPELL; ++i)
|
||||
for (unsigned int i = 0; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
{
|
||||
if (eq->spell[i] == 0)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
@@ -6342,80 +6342,80 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
|
||||
static inline CastingSlot ServerToRoF2CastingSlot(EQEmu::CastingSlot slot)
|
||||
static inline spells::CastingSlot ServerToRoF2CastingSlot(EQEmu::spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case EQEmu::CastingSlot::Gem1:
|
||||
return CastingSlot::Gem1;
|
||||
case EQEmu::CastingSlot::Gem2:
|
||||
return CastingSlot::Gem2;
|
||||
case EQEmu::CastingSlot::Gem3:
|
||||
return CastingSlot::Gem3;
|
||||
case EQEmu::CastingSlot::Gem4:
|
||||
return CastingSlot::Gem4;
|
||||
case EQEmu::CastingSlot::Gem5:
|
||||
return CastingSlot::Gem5;
|
||||
case EQEmu::CastingSlot::Gem6:
|
||||
return CastingSlot::Gem6;
|
||||
case EQEmu::CastingSlot::Gem7:
|
||||
return CastingSlot::Gem7;
|
||||
case EQEmu::CastingSlot::Gem8:
|
||||
return CastingSlot::Gem8;
|
||||
case EQEmu::CastingSlot::Gem9:
|
||||
return CastingSlot::Gem9;
|
||||
case EQEmu::CastingSlot::Gem10:
|
||||
return CastingSlot::Gem10;
|
||||
case EQEmu::CastingSlot::Gem11:
|
||||
return CastingSlot::Gem11;
|
||||
case EQEmu::CastingSlot::Gem12:
|
||||
return CastingSlot::Gem12;
|
||||
case EQEmu::CastingSlot::Item:
|
||||
case EQEmu::CastingSlot::PotionBelt:
|
||||
return CastingSlot::Item;
|
||||
case EQEmu::CastingSlot::Discipline:
|
||||
return CastingSlot::Discipline;
|
||||
case EQEmu::CastingSlot::AltAbility:
|
||||
return CastingSlot::AltAbility;
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Gem10:
|
||||
return spells::CastingSlot::Gem10;
|
||||
case EQEmu::spells::CastingSlot::Gem11:
|
||||
return spells::CastingSlot::Gem11;
|
||||
case EQEmu::spells::CastingSlot::Gem12:
|
||||
return spells::CastingSlot::Gem12;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return CastingSlot::Discipline;
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::CastingSlot RoF2ToServerCastingSlot(CastingSlot slot)
|
||||
static inline EQEmu::spells::CastingSlot RoF2ToServerCastingSlot(spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case CastingSlot::Gem1:
|
||||
return EQEmu::CastingSlot::Gem1;
|
||||
case CastingSlot::Gem2:
|
||||
return EQEmu::CastingSlot::Gem2;
|
||||
case CastingSlot::Gem3:
|
||||
return EQEmu::CastingSlot::Gem3;
|
||||
case CastingSlot::Gem4:
|
||||
return EQEmu::CastingSlot::Gem4;
|
||||
case CastingSlot::Gem5:
|
||||
return EQEmu::CastingSlot::Gem5;
|
||||
case CastingSlot::Gem6:
|
||||
return EQEmu::CastingSlot::Gem6;
|
||||
case CastingSlot::Gem7:
|
||||
return EQEmu::CastingSlot::Gem7;
|
||||
case CastingSlot::Gem8:
|
||||
return EQEmu::CastingSlot::Gem8;
|
||||
case CastingSlot::Gem9:
|
||||
return EQEmu::CastingSlot::Gem9;
|
||||
case CastingSlot::Gem10:
|
||||
return EQEmu::CastingSlot::Gem10;
|
||||
case CastingSlot::Gem11:
|
||||
return EQEmu::CastingSlot::Gem11;
|
||||
case CastingSlot::Gem12:
|
||||
return EQEmu::CastingSlot::Gem12;
|
||||
case CastingSlot::Discipline:
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
case CastingSlot::Item:
|
||||
return EQEmu::CastingSlot::Item;
|
||||
case CastingSlot::AltAbility:
|
||||
return EQEmu::CastingSlot::AltAbility;
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Gem10:
|
||||
return EQEmu::spells::CastingSlot::Gem10;
|
||||
case spells::CastingSlot::Gem11:
|
||||
return EQEmu::spells::CastingSlot::Gem11;
|
||||
case spells::CastingSlot::Gem12:
|
||||
return EQEmu::spells::CastingSlot::Gem12;
|
||||
case spells::CastingSlot::Discipline:
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
case spells::CastingSlot::Item:
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,24 +50,6 @@ namespace RoF2
|
||||
#include "rof2_ops.h"
|
||||
};
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
Gem11 = 10,
|
||||
Gem12 = 11,
|
||||
Item = 12,
|
||||
Discipline = 13,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
}; /*RoF2*/
|
||||
|
||||
#endif /*COMMON_ROF2_H*/
|
||||
|
||||
@@ -295,6 +295,34 @@ namespace RoF2
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
Gem11 = 10,
|
||||
Gem12 = 11,
|
||||
MaxGems = 16, // fallacy..only 12 slot are useable...
|
||||
Item = 12,
|
||||
Discipline = 13,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
const int SPELL_ID_MAX = 45000;
|
||||
const int SPELLBOOK_SIZE = 720;
|
||||
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
|
||||
|
||||
} /*spells*/
|
||||
|
||||
}; /*RoF2*/
|
||||
|
||||
#endif /*COMMON_ROF2_LIMITS_H*/
|
||||
|
||||
@@ -128,8 +128,7 @@ static const uint32 MAX_NUMBER_GUILDS = 1500;
|
||||
|
||||
// Used primarily in the Player Profile:
|
||||
static const uint32 MAX_PP_LANGUAGE = 32; // was 25
|
||||
static const uint32 MAX_PP_SPELLBOOK = 720; // was 480
|
||||
static const uint32 MAX_PP_MEMSPELL = 16; // was 12
|
||||
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300;
|
||||
@@ -1167,9 +1166,9 @@ union
|
||||
/*06092*/ uint32 timestamp2_count; // Seen 100
|
||||
/*06096*/ uint32 timestamps2[100]; // Unknown Unix Timestamps - maybe Skill related?
|
||||
/*06496*/ uint32 spell_book_count; // Seen 720
|
||||
/*06500*/ uint32 spell_book[MAX_PP_SPELLBOOK]; // List of the Spells in spellbook 720 = 90 pages [2880 bytes]
|
||||
/*06500*/ uint32 spell_book[spells::SPELLBOOK_SIZE]; // List of the Spells in spellbook 720 = 90 pages [2880 bytes]
|
||||
/*09380*/ uint32 mem_spell_count; // Seen 16
|
||||
/*09384*/ int32 mem_spells[MAX_PP_MEMSPELL]; // [16] List of spells memorized - First 12 are set or -1 and last 4 are 0s
|
||||
/*09384*/ int32 mem_spells[spells::SPELL_GEM_COUNT]; // [16] List of spells memorized - First 12 are set or -1 and last 4 are 0s
|
||||
/*09448*/ uint32 unknown16_count; // Seen 13
|
||||
/*09452*/ uint32 unknown_rof16[13]; // Possibly spell or buff related
|
||||
/*09504*/ uint8 unknown_rof17; // Seen 0 or 8
|
||||
|
||||
@@ -286,6 +286,34 @@ namespace RoF
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
Gem11 = 10,
|
||||
Gem12 = 11,
|
||||
MaxGems = 16, // fallacy..only 12 slots are useable
|
||||
Item = 12,
|
||||
Discipline = 13,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
const int SPELL_ID_MAX = 45000;
|
||||
const int SPELLBOOK_SIZE = 720;
|
||||
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
|
||||
|
||||
} /*spells*/
|
||||
|
||||
}; /*RoF*/
|
||||
|
||||
#endif /*COMMON_ROF_LIMITS_H*/
|
||||
|
||||
@@ -128,8 +128,7 @@ static const uint32 MAX_NUMBER_GUILDS = 1500;
|
||||
|
||||
// Used primarily in the Player Profile:
|
||||
static const uint32 MAX_PP_LANGUAGE = 32; // was 25
|
||||
static const uint32 MAX_PP_SPELLBOOK = 720; // was 480
|
||||
static const uint32 MAX_PP_MEMSPELL = 16; // was 12
|
||||
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300;
|
||||
@@ -1108,9 +1107,9 @@ union
|
||||
/*06092*/ uint32 timestamp2_count; // Seen 100
|
||||
/*06096*/ uint32 timestamps2[100]; // Unknown Unix Timestamps - maybe Skill related?
|
||||
/*06496*/ uint32 spell_book_count; // Seen 720
|
||||
/*06500*/ uint32 spell_book[MAX_PP_SPELLBOOK]; // List of the Spells in spellbook 720 = 90 pages [2880 bytes]
|
||||
/*06500*/ uint32 spell_book[spells::SPELLBOOK_SIZE]; // List of the Spells in spellbook 720 = 90 pages [2880 bytes]
|
||||
/*09380*/ uint32 mem_spell_count; // Seen 16
|
||||
/*09384*/ int32 mem_spells[MAX_PP_MEMSPELL]; // [16] List of spells memorized - First 12 are set or -1 and last 4 are 0s
|
||||
/*09384*/ int32 mem_spells[spells::SPELL_GEM_COUNT]; // [16] List of spells memorized - First 12 are set or -1 and last 4 are 0s
|
||||
/*09448*/ uint32 unknown16_count; // Seen 13
|
||||
/*09452*/ uint32 unknown_rof16[13]; // Possibly spell or buff related
|
||||
/*09504*/ uint8 unknown_rof17; // Seen 0 or 8
|
||||
|
||||
+65
-65
@@ -59,8 +59,8 @@ namespace SoD
|
||||
// client to server say link converter
|
||||
static inline void SoDToServerSayLink(std::string &server_saylink, const std::string &sod_saylink);
|
||||
|
||||
static inline CastingSlot ServerToSoDCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot SoDToServerCastingSlot(CastingSlot slot);
|
||||
static inline spells::CastingSlot ServerToSoDCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot SoDToServerCastingSlot(spells::CastingSlot slot);
|
||||
|
||||
static inline int ServerToSoDBuffSlot(int index);
|
||||
static inline int SoDToServerBuffSlot(int index);
|
||||
@@ -1452,7 +1452,7 @@ namespace SoD
|
||||
}
|
||||
OUT(deity);
|
||||
OUT(intoxication);
|
||||
OUT_array(spellSlotRefresh, structs::MAX_PP_MEMSPELL);
|
||||
OUT_array(spellSlotRefresh, spells::SPELL_GEM_COUNT);
|
||||
OUT(abilitySlotRefresh);
|
||||
OUT(points); // Relocation Test
|
||||
// OUT(unknown0166[4]);
|
||||
@@ -1492,9 +1492,9 @@ namespace SoD
|
||||
OUT(WIS);
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
OUT_array(spell_book, structs::MAX_PP_SPELLBOOK);
|
||||
OUT_array(spell_book, spells::SPELLBOOK_SIZE);
|
||||
// OUT(unknown4184[128]);
|
||||
OUT_array(mem_spells, structs::MAX_PP_MEMSPELL);
|
||||
OUT_array(mem_spells, spells::SPELL_GEM_COUNT);
|
||||
// OUT(unknown04396[32]);
|
||||
OUT(platinum);
|
||||
OUT(gold);
|
||||
@@ -2842,7 +2842,7 @@ namespace SoD
|
||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
emu->slot = static_cast<uint32>(SoDToServerCastingSlot(static_cast<CastingSlot>(eq->slot)));
|
||||
emu->slot = static_cast<uint32>(SoDToServerCastingSlot(static_cast<spells::CastingSlot>(eq->slot)));
|
||||
IN(slot);
|
||||
IN(spell_id);
|
||||
emu->inventoryslot = SoDToServerSlot(eq->inventoryslot);
|
||||
@@ -3136,9 +3136,9 @@ namespace SoD
|
||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||
|
||||
for (int i = 0; i < structs::MAX_PP_MEMSPELL; ++i)
|
||||
for (int i = 0; i < spells::SPELL_GEM_COUNT; ++i)
|
||||
emu->spell[i] = eq->spell[i];
|
||||
for (int i = structs::MAX_PP_MEMSPELL; i < MAX_PP_MEMSPELL; ++i)
|
||||
for (int i = spells::SPELL_GEM_COUNT; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@@ -4021,72 +4021,72 @@ namespace SoD
|
||||
}
|
||||
}
|
||||
|
||||
static inline CastingSlot ServerToSoDCastingSlot(EQEmu::CastingSlot slot)
|
||||
static inline spells::CastingSlot ServerToSoDCastingSlot(EQEmu::spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case EQEmu::CastingSlot::Gem1:
|
||||
return CastingSlot::Gem1;
|
||||
case EQEmu::CastingSlot::Gem2:
|
||||
return CastingSlot::Gem2;
|
||||
case EQEmu::CastingSlot::Gem3:
|
||||
return CastingSlot::Gem3;
|
||||
case EQEmu::CastingSlot::Gem4:
|
||||
return CastingSlot::Gem4;
|
||||
case EQEmu::CastingSlot::Gem5:
|
||||
return CastingSlot::Gem5;
|
||||
case EQEmu::CastingSlot::Gem6:
|
||||
return CastingSlot::Gem6;
|
||||
case EQEmu::CastingSlot::Gem7:
|
||||
return CastingSlot::Gem7;
|
||||
case EQEmu::CastingSlot::Gem8:
|
||||
return CastingSlot::Gem8;
|
||||
case EQEmu::CastingSlot::Gem9:
|
||||
return CastingSlot::Gem9;
|
||||
case EQEmu::CastingSlot::Gem10:
|
||||
return CastingSlot::Gem10;
|
||||
case EQEmu::CastingSlot::Item:
|
||||
case EQEmu::CastingSlot::PotionBelt:
|
||||
return CastingSlot::Item;
|
||||
case EQEmu::CastingSlot::Discipline:
|
||||
return CastingSlot::Discipline;
|
||||
case EQEmu::CastingSlot::AltAbility:
|
||||
return CastingSlot::AltAbility;
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Gem10:
|
||||
return spells::CastingSlot::Gem10;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return CastingSlot::Discipline;
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::CastingSlot SoDToServerCastingSlot(CastingSlot slot)
|
||||
static inline EQEmu::spells::CastingSlot SoDToServerCastingSlot(spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case CastingSlot::Gem1:
|
||||
return EQEmu::CastingSlot::Gem1;
|
||||
case CastingSlot::Gem2:
|
||||
return EQEmu::CastingSlot::Gem2;
|
||||
case CastingSlot::Gem3:
|
||||
return EQEmu::CastingSlot::Gem3;
|
||||
case CastingSlot::Gem4:
|
||||
return EQEmu::CastingSlot::Gem4;
|
||||
case CastingSlot::Gem5:
|
||||
return EQEmu::CastingSlot::Gem5;
|
||||
case CastingSlot::Gem6:
|
||||
return EQEmu::CastingSlot::Gem6;
|
||||
case CastingSlot::Gem7:
|
||||
return EQEmu::CastingSlot::Gem7;
|
||||
case CastingSlot::Gem8:
|
||||
return EQEmu::CastingSlot::Gem8;
|
||||
case CastingSlot::Gem9:
|
||||
return EQEmu::CastingSlot::Gem9;
|
||||
case CastingSlot::Gem10:
|
||||
return EQEmu::CastingSlot::Gem10;
|
||||
case CastingSlot::Discipline:
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
case CastingSlot::Item:
|
||||
return EQEmu::CastingSlot::Item;
|
||||
case CastingSlot::AltAbility:
|
||||
return EQEmu::CastingSlot::AltAbility;
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Gem10:
|
||||
return EQEmu::spells::CastingSlot::Gem10;
|
||||
case spells::CastingSlot::Discipline:
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
case spells::CastingSlot::Item:
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,22 +50,6 @@ namespace SoD
|
||||
#include "sod_ops.h"
|
||||
};
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
Item = 10,
|
||||
Discipline = 11,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
}; /*SoD*/
|
||||
|
||||
#endif /*COMMON_SOD_H*/
|
||||
|
||||
@@ -313,6 +313,32 @@ namespace SoD
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
MaxGems = 10,
|
||||
Item = 10,
|
||||
Discipline = 11,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
const int SPELL_ID_MAX = 23000;
|
||||
const int SPELLBOOK_SIZE = 480;
|
||||
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
|
||||
|
||||
} /*spells*/
|
||||
|
||||
}; /*SoD*/
|
||||
|
||||
#endif /*COMMON_SOD_LIMITS_H*/
|
||||
|
||||
@@ -815,8 +815,7 @@ struct BindStruct {
|
||||
** OpCode: 0x006a
|
||||
*/
|
||||
static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
|
||||
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
|
||||
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
|
||||
@@ -885,7 +884,7 @@ struct PlayerProfile_Struct
|
||||
/*00060*/ BindStruct binds[5]; // Bind points (primary is first)
|
||||
/*00160*/ uint32 deity; // deity
|
||||
/*00164*/ uint32 intoxication; // Alcohol level (in ticks till sober?)
|
||||
/*00168*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; // Refresh time (millis) - 4 Octets Each
|
||||
/*00168*/ uint32 spellSlotRefresh[spells::SPELL_GEM_COUNT]; // Refresh time (millis) - 4 Octets Each
|
||||
/*00208*/ uint32 abilitySlotRefresh;
|
||||
/*00212*/ uint8 haircolor; // Player hair color
|
||||
/*00213*/ uint8 beardcolor; // Player beard color
|
||||
@@ -911,9 +910,9 @@ struct PlayerProfile_Struct
|
||||
/*04172*/ uint8 unknown04172[28]; //
|
||||
/*04200*/ uint8 face; // Player face
|
||||
/*04201*/ uint8 unknown02264[147]; // was [175]
|
||||
/*04348*/ uint32 spell_book[MAX_PP_SPELLBOOK]; // List of the Spells in spellbook 480 = 60 pages [1920]
|
||||
/*04348*/ uint32 spell_book[spells::SPELLBOOK_SIZE]; // List of the Spells in spellbook 480 = 60 pages [1920]
|
||||
/*06268*/ uint8 unknown4184[128]; // was [164] Seen -1
|
||||
/*06396*/ uint32 mem_spells[MAX_PP_MEMSPELL]; // List of spells memorized
|
||||
/*06396*/ uint32 mem_spells[spells::SPELL_GEM_COUNT]; // List of spells memorized
|
||||
/*06436*/ uint8 unknown04396[28]; //#### uint8 unknown04396[32]; in Titanium ####[28]
|
||||
/*06464*/ uint32 platinum; // Platinum Pieces on player
|
||||
/*06468*/ uint32 gold; // Gold Pieces on player
|
||||
@@ -3846,7 +3845,7 @@ struct AnnoyingZoneUnknown_Struct {
|
||||
};
|
||||
|
||||
struct LoadSpellSet_Struct {
|
||||
uint32 spell[MAX_PP_MEMSPELL]; // 0xFFFFFFFF if no action, slot number if to unmem starting at 0
|
||||
uint32 spell[spells::SPELL_GEM_COUNT]; // 0xFFFFFFFF if no action, slot number if to unmem starting at 0
|
||||
uint32 unknown; //there seems to be an extra field in this packet...
|
||||
};
|
||||
|
||||
|
||||
+66
-66
@@ -59,8 +59,8 @@ namespace SoF
|
||||
// client to server say link converter
|
||||
static inline void SoFToServerSayLink(std::string &server_saylink, const std::string &sof_saylink);
|
||||
|
||||
static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 item_location);
|
||||
static inline spells::CastingSlot ServerToSoFCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot SoFToServerCastingSlot(spells::CastingSlot slot, uint32 item_location);
|
||||
|
||||
static inline int ServerToSoFBuffSlot(int index);
|
||||
static inline int SoFToServerBuffSlot(int index);
|
||||
@@ -956,7 +956,7 @@ namespace SoF
|
||||
|
||||
// Since HT/LoH are translated up, we need to translate down only for memSpellSpellbar case
|
||||
if (emu->scribing == 3)
|
||||
eq->slot = static_cast<uint32>(ServerToSoFCastingSlot(static_cast<EQEmu::CastingSlot>(emu->slot)));
|
||||
eq->slot = static_cast<uint32>(ServerToSoFCastingSlot(static_cast<EQEmu::spells::CastingSlot>(emu->slot)));
|
||||
else
|
||||
OUT(slot);
|
||||
OUT(spell_id);
|
||||
@@ -1116,7 +1116,7 @@ namespace SoF
|
||||
}
|
||||
OUT(deity);
|
||||
OUT(intoxication);
|
||||
OUT_array(spellSlotRefresh, structs::MAX_PP_MEMSPELL);
|
||||
OUT_array(spellSlotRefresh, spells::SPELL_GEM_COUNT);
|
||||
OUT(abilitySlotRefresh);
|
||||
OUT(points); // Relocation Test
|
||||
// OUT(unknown0166[4]);
|
||||
@@ -1156,9 +1156,9 @@ namespace SoF
|
||||
OUT(WIS);
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
OUT_array(spell_book, structs::MAX_PP_SPELLBOOK);
|
||||
OUT_array(spell_book, spells::SPELLBOOK_SIZE);
|
||||
// OUT(unknown4184[128]);
|
||||
OUT_array(mem_spells, structs::MAX_PP_MEMSPELL);
|
||||
OUT_array(mem_spells, spells::SPELL_GEM_COUNT);
|
||||
// OUT(unknown04396[32]);
|
||||
OUT(platinum);
|
||||
OUT(gold);
|
||||
@@ -2298,7 +2298,7 @@ namespace SoF
|
||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
emu->slot = static_cast<uint32>(SoFToServerCastingSlot(static_cast<CastingSlot>(eq->slot), eq->inventoryslot));
|
||||
emu->slot = static_cast<uint32>(SoFToServerCastingSlot(static_cast<spells::CastingSlot>(eq->slot), eq->inventoryslot));
|
||||
IN(spell_id);
|
||||
emu->inventoryslot = SoFToServerSlot(eq->inventoryslot);
|
||||
IN(target_id);
|
||||
@@ -2540,9 +2540,9 @@ namespace SoF
|
||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||
|
||||
for (int i = 0; i < structs::MAX_PP_MEMSPELL; ++i)
|
||||
for (int i = 0; i < spells::SPELL_GEM_COUNT; ++i)
|
||||
IN(spell[i]);
|
||||
for (int i = structs::MAX_PP_MEMSPELL; i < MAX_PP_MEMSPELL; ++i)
|
||||
for (int i = spells::SPELL_GEM_COUNT; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
|
||||
IN(unknown);
|
||||
@@ -3419,73 +3419,73 @@ namespace SoF
|
||||
}
|
||||
}
|
||||
|
||||
static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot) {
|
||||
static inline spells::CastingSlot ServerToSoFCastingSlot(EQEmu::spells::CastingSlot slot) {
|
||||
switch (slot) {
|
||||
case EQEmu::CastingSlot::Gem1:
|
||||
return CastingSlot::Gem1;
|
||||
case EQEmu::CastingSlot::Gem2:
|
||||
return CastingSlot::Gem2;
|
||||
case EQEmu::CastingSlot::Gem3:
|
||||
return CastingSlot::Gem3;
|
||||
case EQEmu::CastingSlot::Gem4:
|
||||
return CastingSlot::Gem4;
|
||||
case EQEmu::CastingSlot::Gem5:
|
||||
return CastingSlot::Gem5;
|
||||
case EQEmu::CastingSlot::Gem6:
|
||||
return CastingSlot::Gem6;
|
||||
case EQEmu::CastingSlot::Gem7:
|
||||
return CastingSlot::Gem7;
|
||||
case EQEmu::CastingSlot::Gem8:
|
||||
return CastingSlot::Gem8;
|
||||
case EQEmu::CastingSlot::Gem9:
|
||||
return CastingSlot::Gem9;
|
||||
case EQEmu::CastingSlot::Item:
|
||||
return CastingSlot::Item;
|
||||
case EQEmu::CastingSlot::PotionBelt:
|
||||
return CastingSlot::PotionBelt;
|
||||
case EQEmu::CastingSlot::Discipline:
|
||||
return CastingSlot::Discipline;
|
||||
case EQEmu::CastingSlot::AltAbility:
|
||||
return CastingSlot::AltAbility;
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::PotionBelt;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return CastingSlot::Discipline;
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 item_location) {
|
||||
static inline EQEmu::spells::CastingSlot SoFToServerCastingSlot(spells::CastingSlot slot, uint32 item_location) {
|
||||
switch (slot) {
|
||||
case CastingSlot::Gem1:
|
||||
return EQEmu::CastingSlot::Gem1;
|
||||
case CastingSlot::Gem2:
|
||||
return EQEmu::CastingSlot::Gem2;
|
||||
case CastingSlot::Gem3:
|
||||
return EQEmu::CastingSlot::Gem3;
|
||||
case CastingSlot::Gem4:
|
||||
return EQEmu::CastingSlot::Gem4;
|
||||
case CastingSlot::Gem5:
|
||||
return EQEmu::CastingSlot::Gem5;
|
||||
case CastingSlot::Gem6:
|
||||
return EQEmu::CastingSlot::Gem6;
|
||||
case CastingSlot::Gem7:
|
||||
return EQEmu::CastingSlot::Gem7;
|
||||
case CastingSlot::Gem8:
|
||||
return EQEmu::CastingSlot::Gem8;
|
||||
case CastingSlot::Gem9:
|
||||
return EQEmu::CastingSlot::Gem9;
|
||||
case CastingSlot::Ability:
|
||||
return EQEmu::CastingSlot::Ability;
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Ability:
|
||||
return EQEmu::spells::CastingSlot::Ability;
|
||||
// Tit uses 10 for item and discipline casting, but items have a valid location
|
||||
case CastingSlot::Item:
|
||||
case spells::CastingSlot::Item:
|
||||
if (item_location == INVALID_INDEX)
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
else
|
||||
return EQEmu::CastingSlot::Item;
|
||||
case CastingSlot::PotionBelt:
|
||||
return EQEmu::CastingSlot::PotionBelt;
|
||||
case CastingSlot::AltAbility:
|
||||
return EQEmu::CastingSlot::AltAbility;
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::PotionBelt:
|
||||
return EQEmu::spells::CastingSlot::PotionBelt;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,23 +50,6 @@ namespace SoF
|
||||
#include "sof_ops.h"
|
||||
};
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Ability = 9,
|
||||
Item = 10,
|
||||
Discipline = 10,
|
||||
PotionBelt = 11,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
}; /*SoF*/
|
||||
|
||||
#endif /*COMMON_SOF_H*/
|
||||
|
||||
@@ -313,6 +313,33 @@ namespace SoF
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
MaxGems = 9,
|
||||
Ability = 9,
|
||||
Item = 10,
|
||||
Discipline = 10,
|
||||
PotionBelt = 11,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
const int SPELL_ID_MAX = 15999;
|
||||
const int SPELLBOOK_SIZE = 480;
|
||||
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
|
||||
|
||||
} /*spells*/
|
||||
|
||||
}; /*SoF*/
|
||||
|
||||
#endif /*COMMON_SOF_LIMITS_H*/
|
||||
|
||||
@@ -816,8 +816,7 @@ struct BindStruct {
|
||||
** OpCode: 0x006a
|
||||
*/
|
||||
static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
|
||||
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
|
||||
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
|
||||
@@ -886,7 +885,7 @@ struct PlayerProfile_Struct //23576 Octets
|
||||
/*00060*/ BindStruct binds[5]; // Bind points (primary is first)
|
||||
/*00160*/ uint32 deity; // deity
|
||||
/*00164*/ uint32 intoxication; // Alcohol level (in ticks till sober?)
|
||||
/*00168*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; // Refresh time (millis) - 4 Octets Each
|
||||
/*00168*/ uint32 spellSlotRefresh[spells::SPELL_GEM_COUNT]; // Refresh time (millis) - 4 Octets Each
|
||||
/*00208*/ uint32 abilitySlotRefresh;
|
||||
/*00212*/ uint8 haircolor; // Player hair color
|
||||
/*00213*/ uint8 beardcolor; // Player beard color
|
||||
@@ -911,9 +910,9 @@ struct PlayerProfile_Struct //23576 Octets
|
||||
/*04168*/ uint32 WIS; // Wisdom - 46 00 00 00 - 70
|
||||
/*04172*/ uint8 face; // Player face
|
||||
/*04173*/ uint8 unknown02264[147]; // was [139]
|
||||
/*04312*/ uint32 spell_book[MAX_PP_SPELLBOOK]; // List of the Spells in spellbook 480 = 60 pages
|
||||
/*04312*/ uint32 spell_book[spells::SPELLBOOK_SIZE]; // List of the Spells in spellbook 480 = 60 pages
|
||||
/*06232*/ uint8 unknown4184[128]; // was [136]
|
||||
/*06396*/ uint32 mem_spells[MAX_PP_MEMSPELL]; // List of spells memorized
|
||||
/*06396*/ uint32 mem_spells[spells::SPELL_GEM_COUNT]; // List of spells memorized
|
||||
/*06436*/ uint8 unknown04396[28]; //#### uint8 unknown04396[32]; in Titanium ####[28]
|
||||
/*06464*/ uint32 platinum; // Platinum Pieces on player
|
||||
/*06468*/ uint32 gold; // Gold Pieces on player
|
||||
@@ -3769,7 +3768,7 @@ struct AnnoyingZoneUnknown_Struct {
|
||||
};
|
||||
|
||||
struct LoadSpellSet_Struct {
|
||||
uint32 spell[MAX_PP_MEMSPELL];
|
||||
uint32 spell[spells::SPELL_GEM_COUNT];
|
||||
uint32 unknown;
|
||||
};
|
||||
|
||||
|
||||
+66
-66
@@ -58,8 +58,8 @@ namespace Titanium
|
||||
// client to server say link converter
|
||||
static inline void TitaniumToServerSayLink(std::string &server_saylink, const std::string &titanium_saylink);
|
||||
|
||||
static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 item_location);
|
||||
static inline spells::CastingSlot ServerToTitaniumCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot TitaniumToServerCastingSlot(spells::CastingSlot slot, uint32 item_location);
|
||||
|
||||
static inline int ServerToTitaniumBuffSlot(int index);
|
||||
static inline int TitaniumToServerBuffSlot(int index);
|
||||
@@ -890,7 +890,7 @@ namespace Titanium
|
||||
|
||||
// Since HT/LoH are translated up, we need to translate down only for memSpellSpellbar case
|
||||
if (emu->scribing == 3)
|
||||
eq->slot = static_cast<uint32>(ServerToTitaniumCastingSlot(static_cast<EQEmu::CastingSlot>(emu->slot)));
|
||||
eq->slot = static_cast<uint32>(ServerToTitaniumCastingSlot(static_cast<EQEmu::spells::CastingSlot>(emu->slot)));
|
||||
else
|
||||
OUT(slot);
|
||||
OUT(spell_id);
|
||||
@@ -981,7 +981,7 @@ namespace Titanium
|
||||
}
|
||||
OUT(deity);
|
||||
OUT(intoxication);
|
||||
OUT_array(spellSlotRefresh, structs::MAX_PP_MEMSPELL);
|
||||
OUT_array(spellSlotRefresh, spells::SPELL_GEM_COUNT);
|
||||
OUT(abilitySlotRefresh);
|
||||
OUT(haircolor);
|
||||
OUT(beardcolor);
|
||||
@@ -1012,9 +1012,9 @@ namespace Titanium
|
||||
OUT(WIS);
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
OUT_array(spell_book, structs::MAX_PP_SPELLBOOK);
|
||||
OUT_array(spell_book, spells::SPELLBOOK_SIZE);
|
||||
// OUT(unknown4184[448]);
|
||||
OUT_array(mem_spells, structs::MAX_PP_MEMSPELL);
|
||||
OUT_array(mem_spells, spells::SPELL_GEM_COUNT);
|
||||
// OUT(unknown04396[32]);
|
||||
OUT(platinum);
|
||||
OUT(gold);
|
||||
@@ -1815,7 +1815,7 @@ namespace Titanium
|
||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
emu->slot = static_cast<uint32>(TitaniumToServerCastingSlot(static_cast<CastingSlot>(eq->slot), eq->inventoryslot));
|
||||
emu->slot = static_cast<uint32>(TitaniumToServerCastingSlot(static_cast<spells::CastingSlot>(eq->slot), eq->inventoryslot));
|
||||
IN(spell_id);
|
||||
emu->inventoryslot = TitaniumToServerSlot(eq->inventoryslot);
|
||||
IN(target_id);
|
||||
@@ -2003,9 +2003,9 @@ namespace Titanium
|
||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||
|
||||
for (int i = 0; i < structs::MAX_PP_MEMSPELL; ++i)
|
||||
for (int i = 0; i < spells::SPELL_GEM_COUNT; ++i)
|
||||
IN(spell[i]);
|
||||
for (int i = structs::MAX_PP_MEMSPELL; i < MAX_PP_MEMSPELL; ++i)
|
||||
for (int i = spells::SPELL_GEM_COUNT; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
|
||||
IN(unknown);
|
||||
@@ -2721,73 +2721,73 @@ namespace Titanium
|
||||
}
|
||||
}
|
||||
|
||||
static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot) {
|
||||
static inline spells::CastingSlot ServerToTitaniumCastingSlot(EQEmu::spells::CastingSlot slot) {
|
||||
switch (slot) {
|
||||
case EQEmu::CastingSlot::Gem1:
|
||||
return CastingSlot::Gem1;
|
||||
case EQEmu::CastingSlot::Gem2:
|
||||
return CastingSlot::Gem2;
|
||||
case EQEmu::CastingSlot::Gem3:
|
||||
return CastingSlot::Gem3;
|
||||
case EQEmu::CastingSlot::Gem4:
|
||||
return CastingSlot::Gem4;
|
||||
case EQEmu::CastingSlot::Gem5:
|
||||
return CastingSlot::Gem5;
|
||||
case EQEmu::CastingSlot::Gem6:
|
||||
return CastingSlot::Gem6;
|
||||
case EQEmu::CastingSlot::Gem7:
|
||||
return CastingSlot::Gem7;
|
||||
case EQEmu::CastingSlot::Gem8:
|
||||
return CastingSlot::Gem8;
|
||||
case EQEmu::CastingSlot::Gem9:
|
||||
return CastingSlot::Gem9;
|
||||
case EQEmu::CastingSlot::Item:
|
||||
return CastingSlot::Item;
|
||||
case EQEmu::CastingSlot::PotionBelt:
|
||||
return CastingSlot::PotionBelt;
|
||||
case EQEmu::CastingSlot::Discipline:
|
||||
return CastingSlot::Discipline;
|
||||
case EQEmu::CastingSlot::AltAbility:
|
||||
return CastingSlot::AltAbility;
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::PotionBelt;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return CastingSlot::Discipline;
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 item_location) {
|
||||
static inline EQEmu::spells::CastingSlot TitaniumToServerCastingSlot(spells::CastingSlot slot, uint32 item_location) {
|
||||
switch (slot) {
|
||||
case CastingSlot::Gem1:
|
||||
return EQEmu::CastingSlot::Gem1;
|
||||
case CastingSlot::Gem2:
|
||||
return EQEmu::CastingSlot::Gem2;
|
||||
case CastingSlot::Gem3:
|
||||
return EQEmu::CastingSlot::Gem3;
|
||||
case CastingSlot::Gem4:
|
||||
return EQEmu::CastingSlot::Gem4;
|
||||
case CastingSlot::Gem5:
|
||||
return EQEmu::CastingSlot::Gem5;
|
||||
case CastingSlot::Gem6:
|
||||
return EQEmu::CastingSlot::Gem6;
|
||||
case CastingSlot::Gem7:
|
||||
return EQEmu::CastingSlot::Gem7;
|
||||
case CastingSlot::Gem8:
|
||||
return EQEmu::CastingSlot::Gem8;
|
||||
case CastingSlot::Gem9:
|
||||
return EQEmu::CastingSlot::Gem9;
|
||||
case CastingSlot::Ability:
|
||||
return EQEmu::CastingSlot::Ability;
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Ability:
|
||||
return EQEmu::spells::CastingSlot::Ability;
|
||||
// Tit uses 10 for item and discipline casting, but items have a valid location
|
||||
case CastingSlot::Item:
|
||||
case spells::CastingSlot::Item:
|
||||
if (item_location == INVALID_INDEX)
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
else
|
||||
return EQEmu::CastingSlot::Item;
|
||||
case CastingSlot::PotionBelt:
|
||||
return EQEmu::CastingSlot::PotionBelt;
|
||||
case CastingSlot::AltAbility:
|
||||
return EQEmu::CastingSlot::AltAbility;
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::PotionBelt:
|
||||
return EQEmu::spells::CastingSlot::PotionBelt;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,23 +50,6 @@ namespace Titanium
|
||||
#include "titanium_ops.h"
|
||||
};
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Ability = 9,
|
||||
Item = 10,
|
||||
Discipline = 10,
|
||||
PotionBelt = 11,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
}; /*Titanium*/
|
||||
|
||||
#endif /*COMMON_TITANIUM_H*/
|
||||
|
||||
@@ -312,6 +312,33 @@ namespace Titanium
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
MaxGems = 9,
|
||||
Ability = 9,
|
||||
Item = 10,
|
||||
Discipline = 10,
|
||||
PotionBelt = 11,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
const int SPELL_ID_MAX = 9999;
|
||||
const int SPELLBOOK_SIZE = 400;
|
||||
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
|
||||
|
||||
} /*spells*/
|
||||
|
||||
}; /*Titanium*/
|
||||
|
||||
#endif /*COMMON_TITANIUM_LIMITS_H*/
|
||||
|
||||
@@ -754,8 +754,7 @@ struct BindStruct {
|
||||
** OpCode: 0x006a
|
||||
*/
|
||||
static const uint32 MAX_PP_LANGUAGE = 28;
|
||||
static const uint32 MAX_PP_SPELLBOOK = 400;
|
||||
static const uint32 MAX_PP_MEMSPELL = 9;
|
||||
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 240;
|
||||
@@ -824,7 +823,7 @@ struct PlayerProfile_Struct
|
||||
/*00024*/ BindStruct binds[5]; // Bind points (primary is first)
|
||||
/*00124*/ uint32 deity; // deity
|
||||
/*00128*/ uint32 intoxication; // Alcohol level (in ticks till sober?)
|
||||
/*00132*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; // Refresh time (millis)
|
||||
/*00132*/ uint32 spellSlotRefresh[spells::SPELL_GEM_COUNT]; // Refresh time (millis)
|
||||
/*00168*/ uint32 abilitySlotRefresh;
|
||||
/*00172*/ uint8 haircolor; // Player hair color
|
||||
/*00173*/ uint8 beardcolor; // Player beard color
|
||||
@@ -849,9 +848,9 @@ struct PlayerProfile_Struct
|
||||
/*02260*/ uint32 WIS; // Wisdom
|
||||
/*02264*/ uint8 face; // Player face
|
||||
/*02265*/ uint8 unknown02264[47];
|
||||
/*02312*/ uint32 spell_book[MAX_PP_SPELLBOOK]; // List of the Spells in spellbook
|
||||
/*02312*/ uint32 spell_book[spells::SPELLBOOK_SIZE]; // List of the Spells in spellbook
|
||||
/*03912*/ uint8 unknown4184[448]; // all 0xff after last spell
|
||||
/*04360*/ uint32 mem_spells[MAX_PP_MEMSPELL]; // List of spells memorized
|
||||
/*04360*/ uint32 mem_spells[spells::SPELL_GEM_COUNT]; // List of spells memorized
|
||||
/*04396*/ uint8 unknown04396[32];
|
||||
/*04428*/ uint32 platinum; // Platinum Pieces on player
|
||||
/*04432*/ uint32 gold; // Gold Pieces on player
|
||||
@@ -3271,7 +3270,7 @@ struct AnnoyingZoneUnknown_Struct {
|
||||
};
|
||||
|
||||
struct LoadSpellSet_Struct {
|
||||
uint32 spell[MAX_PP_MEMSPELL];
|
||||
uint32 spell[spells::SPELL_GEM_COUNT];
|
||||
uint32 unknown;
|
||||
};
|
||||
|
||||
|
||||
+72
-72
@@ -59,8 +59,8 @@ namespace UF
|
||||
// client to server say link converter
|
||||
static inline void UFToServerSayLink(std::string& serverSayLink, const std::string& ufSayLink);
|
||||
|
||||
static inline CastingSlot ServerToUFCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot UFToServerCastingSlot(CastingSlot slot);
|
||||
static inline spells::CastingSlot ServerToUFCastingSlot(EQEmu::spells::CastingSlot slot);
|
||||
static inline EQEmu::spells::CastingSlot UFToServerCastingSlot(spells::CastingSlot slot);
|
||||
|
||||
static inline int ServerToUFBuffSlot(int index);
|
||||
static inline int UFToServerBuffSlot(int index);
|
||||
@@ -1682,7 +1682,7 @@ namespace UF
|
||||
}
|
||||
OUT(deity);
|
||||
OUT(intoxication);
|
||||
OUT_array(spellSlotRefresh, structs::MAX_PP_MEMSPELL);
|
||||
OUT_array(spellSlotRefresh, spells::SPELL_GEM_COUNT);
|
||||
OUT(abilitySlotRefresh);
|
||||
OUT(points); // Relocation Test
|
||||
// OUT(unknown0166[4]);
|
||||
@@ -1724,10 +1724,10 @@ namespace UF
|
||||
OUT(WIS);
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
memset(eq->spell_book, 0xFF, sizeof(uint32)* structs::MAX_PP_SPELLBOOK);
|
||||
memset(eq->spell_book, 0xFF, sizeof(uint32)* spells::SPELLBOOK_SIZE);
|
||||
OUT_array(spell_book, 480U);
|
||||
// OUT(unknown4184[128]);
|
||||
OUT_array(mem_spells, structs::MAX_PP_MEMSPELL);
|
||||
OUT_array(mem_spells, spells::SPELL_GEM_COUNT);
|
||||
// OUT(unknown04396[32]);
|
||||
OUT(platinum);
|
||||
OUT(gold);
|
||||
@@ -3142,7 +3142,7 @@ namespace UF
|
||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||
|
||||
emu->slot = static_cast<uint32>(UFToServerCastingSlot(static_cast<CastingSlot>(eq->slot)));
|
||||
emu->slot = static_cast<uint32>(UFToServerCastingSlot(static_cast<spells::CastingSlot>(eq->slot)));
|
||||
|
||||
IN(spell_id);
|
||||
emu->inventoryslot = UFToServerSlot(eq->inventoryslot);
|
||||
@@ -3491,7 +3491,7 @@ namespace UF
|
||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||
|
||||
for (unsigned int i = 0; i < MAX_PP_MEMSPELL; ++i)
|
||||
for (unsigned int i = 0; i < EQEmu::spells::SPELL_GEM_COUNT; ++i)
|
||||
if (eq->spell[i] == 0)
|
||||
emu->spell[i] = 0xFFFFFFFF;
|
||||
else
|
||||
@@ -4380,80 +4380,80 @@ namespace UF
|
||||
}
|
||||
}
|
||||
|
||||
static inline CastingSlot ServerToUFCastingSlot(EQEmu::CastingSlot slot)
|
||||
static inline spells::CastingSlot ServerToUFCastingSlot(EQEmu::spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case EQEmu::CastingSlot::Gem1:
|
||||
return CastingSlot::Gem1;
|
||||
case EQEmu::CastingSlot::Gem2:
|
||||
return CastingSlot::Gem2;
|
||||
case EQEmu::CastingSlot::Gem3:
|
||||
return CastingSlot::Gem3;
|
||||
case EQEmu::CastingSlot::Gem4:
|
||||
return CastingSlot::Gem4;
|
||||
case EQEmu::CastingSlot::Gem5:
|
||||
return CastingSlot::Gem5;
|
||||
case EQEmu::CastingSlot::Gem6:
|
||||
return CastingSlot::Gem6;
|
||||
case EQEmu::CastingSlot::Gem7:
|
||||
return CastingSlot::Gem7;
|
||||
case EQEmu::CastingSlot::Gem8:
|
||||
return CastingSlot::Gem8;
|
||||
case EQEmu::CastingSlot::Gem9:
|
||||
return CastingSlot::Gem9;
|
||||
case EQEmu::CastingSlot::Gem10:
|
||||
return CastingSlot::Gem10;
|
||||
case EQEmu::CastingSlot::Gem11:
|
||||
return CastingSlot::Gem11;
|
||||
case EQEmu::CastingSlot::Gem12:
|
||||
return CastingSlot::Gem12;
|
||||
case EQEmu::CastingSlot::Item:
|
||||
case EQEmu::CastingSlot::PotionBelt:
|
||||
return CastingSlot::Item;
|
||||
case EQEmu::CastingSlot::Discipline:
|
||||
return CastingSlot::Discipline;
|
||||
case EQEmu::CastingSlot::AltAbility:
|
||||
return CastingSlot::AltAbility;
|
||||
case EQEmu::spells::CastingSlot::Gem1:
|
||||
return spells::CastingSlot::Gem1;
|
||||
case EQEmu::spells::CastingSlot::Gem2:
|
||||
return spells::CastingSlot::Gem2;
|
||||
case EQEmu::spells::CastingSlot::Gem3:
|
||||
return spells::CastingSlot::Gem3;
|
||||
case EQEmu::spells::CastingSlot::Gem4:
|
||||
return spells::CastingSlot::Gem4;
|
||||
case EQEmu::spells::CastingSlot::Gem5:
|
||||
return spells::CastingSlot::Gem5;
|
||||
case EQEmu::spells::CastingSlot::Gem6:
|
||||
return spells::CastingSlot::Gem6;
|
||||
case EQEmu::spells::CastingSlot::Gem7:
|
||||
return spells::CastingSlot::Gem7;
|
||||
case EQEmu::spells::CastingSlot::Gem8:
|
||||
return spells::CastingSlot::Gem8;
|
||||
case EQEmu::spells::CastingSlot::Gem9:
|
||||
return spells::CastingSlot::Gem9;
|
||||
case EQEmu::spells::CastingSlot::Gem10:
|
||||
return spells::CastingSlot::Gem10;
|
||||
case EQEmu::spells::CastingSlot::Gem11:
|
||||
return spells::CastingSlot::Gem11;
|
||||
case EQEmu::spells::CastingSlot::Gem12:
|
||||
return spells::CastingSlot::Gem12;
|
||||
case EQEmu::spells::CastingSlot::Item:
|
||||
case EQEmu::spells::CastingSlot::PotionBelt:
|
||||
return spells::CastingSlot::Item;
|
||||
case EQEmu::spells::CastingSlot::Discipline:
|
||||
return spells::CastingSlot::Discipline;
|
||||
case EQEmu::spells::CastingSlot::AltAbility:
|
||||
return spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return CastingSlot::Discipline;
|
||||
return spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline EQEmu::CastingSlot UFToServerCastingSlot(CastingSlot slot)
|
||||
static inline EQEmu::spells::CastingSlot UFToServerCastingSlot(spells::CastingSlot slot)
|
||||
{
|
||||
switch (slot) {
|
||||
case CastingSlot::Gem1:
|
||||
return EQEmu::CastingSlot::Gem1;
|
||||
case CastingSlot::Gem2:
|
||||
return EQEmu::CastingSlot::Gem2;
|
||||
case CastingSlot::Gem3:
|
||||
return EQEmu::CastingSlot::Gem3;
|
||||
case CastingSlot::Gem4:
|
||||
return EQEmu::CastingSlot::Gem4;
|
||||
case CastingSlot::Gem5:
|
||||
return EQEmu::CastingSlot::Gem5;
|
||||
case CastingSlot::Gem6:
|
||||
return EQEmu::CastingSlot::Gem6;
|
||||
case CastingSlot::Gem7:
|
||||
return EQEmu::CastingSlot::Gem7;
|
||||
case CastingSlot::Gem8:
|
||||
return EQEmu::CastingSlot::Gem8;
|
||||
case CastingSlot::Gem9:
|
||||
return EQEmu::CastingSlot::Gem9;
|
||||
case CastingSlot::Gem10:
|
||||
return EQEmu::CastingSlot::Gem10;
|
||||
case CastingSlot::Gem11:
|
||||
return EQEmu::CastingSlot::Gem11;
|
||||
case CastingSlot::Gem12:
|
||||
return EQEmu::CastingSlot::Gem12;
|
||||
case CastingSlot::Discipline:
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
case CastingSlot::Item:
|
||||
return EQEmu::CastingSlot::Item;
|
||||
case CastingSlot::AltAbility:
|
||||
return EQEmu::CastingSlot::AltAbility;
|
||||
case spells::CastingSlot::Gem1:
|
||||
return EQEmu::spells::CastingSlot::Gem1;
|
||||
case spells::CastingSlot::Gem2:
|
||||
return EQEmu::spells::CastingSlot::Gem2;
|
||||
case spells::CastingSlot::Gem3:
|
||||
return EQEmu::spells::CastingSlot::Gem3;
|
||||
case spells::CastingSlot::Gem4:
|
||||
return EQEmu::spells::CastingSlot::Gem4;
|
||||
case spells::CastingSlot::Gem5:
|
||||
return EQEmu::spells::CastingSlot::Gem5;
|
||||
case spells::CastingSlot::Gem6:
|
||||
return EQEmu::spells::CastingSlot::Gem6;
|
||||
case spells::CastingSlot::Gem7:
|
||||
return EQEmu::spells::CastingSlot::Gem7;
|
||||
case spells::CastingSlot::Gem8:
|
||||
return EQEmu::spells::CastingSlot::Gem8;
|
||||
case spells::CastingSlot::Gem9:
|
||||
return EQEmu::spells::CastingSlot::Gem9;
|
||||
case spells::CastingSlot::Gem10:
|
||||
return EQEmu::spells::CastingSlot::Gem10;
|
||||
case spells::CastingSlot::Gem11:
|
||||
return EQEmu::spells::CastingSlot::Gem11;
|
||||
case spells::CastingSlot::Gem12:
|
||||
return EQEmu::spells::CastingSlot::Gem12;
|
||||
case spells::CastingSlot::Discipline:
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
case spells::CastingSlot::Item:
|
||||
return EQEmu::spells::CastingSlot::Item;
|
||||
case spells::CastingSlot::AltAbility:
|
||||
return EQEmu::spells::CastingSlot::AltAbility;
|
||||
default: // we shouldn't have any issues with other slots ... just return something
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
return EQEmu::spells::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,24 +50,6 @@ namespace UF
|
||||
#include "uf_ops.h"
|
||||
};
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
Gem11 = 10,
|
||||
Gem12 = 11,
|
||||
Item = 12,
|
||||
Discipline = 13,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
}; /*UF*/
|
||||
|
||||
#endif /*COMMON_UF_H*/
|
||||
|
||||
@@ -314,6 +314,34 @@ namespace UF
|
||||
|
||||
} /*skills*/
|
||||
|
||||
namespace spells {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
Gem3 = 2,
|
||||
Gem4 = 3,
|
||||
Gem5 = 4,
|
||||
Gem6 = 5,
|
||||
Gem7 = 6,
|
||||
Gem8 = 7,
|
||||
Gem9 = 8,
|
||||
Gem10 = 9,
|
||||
Gem11 = 10,
|
||||
Gem12 = 11,
|
||||
MaxGems = 12,
|
||||
Item = 12,
|
||||
Discipline = 13,
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
const int SPELL_ID_MAX = 28000;
|
||||
const int SPELLBOOK_SIZE = 720;
|
||||
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
|
||||
|
||||
} /*spells*/
|
||||
|
||||
}; /*UF*/
|
||||
|
||||
#endif /*COMMON_UF_LIMITS_H*/
|
||||
|
||||
@@ -845,8 +845,7 @@ struct BindStruct {
|
||||
** OpCode: 0x006a
|
||||
*/
|
||||
static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||
static const uint32 MAX_PP_SPELLBOOK = 720; // Confirmed 60 pages on Underfoot now
|
||||
static const uint32 MAX_PP_MEMSPELL = 12; //was 9 now 10 on Underfoot
|
||||
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
|
||||
@@ -916,7 +915,7 @@ struct PlayerProfile_Struct
|
||||
/*00060*/ BindStruct binds[5]; // Bind points (primary is first)
|
||||
/*00160*/ uint32 deity; // deity
|
||||
/*00164*/ uint32 intoxication; // Alcohol level (in ticks till sober?)
|
||||
/*00168*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; // Refresh time (millis) - 4 Octets Each
|
||||
/*00168*/ uint32 spellSlotRefresh[spells::SPELL_GEM_COUNT]; // Refresh time (millis) - 4 Octets Each
|
||||
/*00208*/ uint8 unknown00208[6]; // Seen 00 00 00 00 00 00 00 00 00 00 00 00 02 01
|
||||
/*00222*/ uint32 abilitySlotRefresh;
|
||||
/*00226*/ uint8 haircolor; // Player hair color
|
||||
@@ -943,8 +942,8 @@ struct PlayerProfile_Struct
|
||||
/*04188*/ uint8 unknown04188[28]; //
|
||||
/*04216*/ uint8 face; // Player face - Actually uint32?
|
||||
/*04217*/ uint8 unknown04217[147]; // was [175]
|
||||
/*04364*/ uint32 spell_book[MAX_PP_SPELLBOOK]; // List of the Spells in spellbook 720 = 90 pages [2880] was [1920]
|
||||
/*07244*/ uint32 mem_spells[MAX_PP_MEMSPELL]; // List of spells memorized
|
||||
/*04364*/ uint32 spell_book[spells::SPELLBOOK_SIZE]; // List of the Spells in spellbook 720 = 90 pages [2880] was [1920]
|
||||
/*07244*/ uint32 mem_spells[spells::SPELL_GEM_COUNT]; // List of spells memorized
|
||||
/*07284*/ uint8 unknown07284[20]; //#### uint8 unknown04396[32]; in Titanium ####[28]
|
||||
/*07312*/ uint32 platinum; // Platinum Pieces on player
|
||||
/*07316*/ uint32 gold; // Gold Pieces on player
|
||||
@@ -3907,7 +3906,7 @@ struct AnnoyingZoneUnknown_Struct {
|
||||
};
|
||||
|
||||
struct LoadSpellSet_Struct {
|
||||
uint8 spell[MAX_PP_MEMSPELL]; // 0 if no action
|
||||
uint8 spell[spells::SPELL_GEM_COUNT]; // 0 if no action
|
||||
uint32 unknown; // there seems to be an extra field in this packet...
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user