mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
AAs should load from character data now, though will be fucked up if you already had stacked aas.
This commit is contained in:
@@ -4243,7 +4243,7 @@ struct AARankInfo_Struct
|
||||
int32 total_cost;
|
||||
int32 expansion;
|
||||
int32 category;
|
||||
uint8 charges;
|
||||
uint32 charges;
|
||||
uint8 grant_only;
|
||||
uint32 total_effects;
|
||||
uint32 total_prereqs;
|
||||
|
||||
@@ -2466,7 +2466,8 @@ namespace RoF2
|
||||
outapp->WriteUInt32(emu->lastlogin);
|
||||
outapp->WriteUInt32(emu->timePlayedMin);
|
||||
outapp->WriteUInt32(emu->timeentitledonaccount);
|
||||
outapp->WriteUInt32(0x0007ffff); // Expansion bitmask
|
||||
outapp->WriteUInt32(emu->expansions);
|
||||
//outapp->WriteUInt32(0x0007ffff); // Expansion bitmask
|
||||
|
||||
outapp->WriteUInt32(structs::MAX_PP_LANGUAGE);
|
||||
|
||||
|
||||
@@ -1677,8 +1677,8 @@ namespace SoD
|
||||
OUT(copper_bank);
|
||||
OUT(platinum_shared);
|
||||
// OUT(unknown13156[84]);
|
||||
//OUT(expansions);
|
||||
eq->expansions = 16383;
|
||||
OUT(expansions);
|
||||
//eq->expansions = 16383;
|
||||
// OUT(unknown13244[12]);
|
||||
OUT(autosplit);
|
||||
// OUT(unknown13260[16]);
|
||||
|
||||
@@ -1335,8 +1335,8 @@ namespace SoF
|
||||
OUT(copper_bank);
|
||||
OUT(platinum_shared);
|
||||
// OUT(unknown13156[84]);
|
||||
//OUT(expansions);
|
||||
eq->expansions = 16383;
|
||||
OUT(expansions);
|
||||
//eq->expansions = 16383;
|
||||
// OUT(unknown13244[12]);
|
||||
OUT(autosplit);
|
||||
// OUT(unknown13260[16]);
|
||||
|
||||
+12
-67
@@ -1804,15 +1804,13 @@ namespace UF
|
||||
// OUT(unknown00224[48]);
|
||||
//NOTE: new client supports 300 AAs, our internal rep/PP
|
||||
//only supports 240..
|
||||
//for (r = 0; r < MAX_PP_AA_ARRAY; r++) {
|
||||
// OUT(aa_array[r].AA);
|
||||
// OUT(aa_array[r].value);
|
||||
// OUT(aa_array[r].charges);
|
||||
//}
|
||||
// OUT(unknown02220[4]);
|
||||
for (r = 0; r < MAX_PP_AA_ARRAY; r++) {
|
||||
eq->aa_array[r].AA = emu->aa_array[r].AA;
|
||||
eq->aa_array[r].value = emu->aa_array[r].value;
|
||||
eq->aa_array[r].charges = emu->aa_array[r].charges;
|
||||
}
|
||||
|
||||
eq->aa_array[0].AA = 6;
|
||||
eq->aa_array[0].value = 5;
|
||||
// OUT(unknown02220[4]);
|
||||
|
||||
OUT(mana);
|
||||
OUT(cur_hp);
|
||||
@@ -1943,8 +1941,8 @@ namespace UF
|
||||
OUT(copper_bank);
|
||||
OUT(platinum_shared);
|
||||
// OUT(unknown13156[84]);
|
||||
//OUT(expansions);
|
||||
eq->expansions = 0xffff;
|
||||
OUT(expansions);
|
||||
//eq->expansions = 0x1ffff;
|
||||
// OUT(unknown13244[12]);
|
||||
OUT(autosplit);
|
||||
// OUT(unknown13260[16]);
|
||||
@@ -2149,7 +2147,6 @@ namespace UF
|
||||
|
||||
ENCODE(OP_SendAATable)
|
||||
{
|
||||
#if 1
|
||||
EQApplicationPacket *inapp = *p;
|
||||
*p = nullptr;
|
||||
AARankInfo_Struct *emu = (AARankInfo_Struct*)inapp->pBuffer;
|
||||
@@ -2180,8 +2177,8 @@ namespace UF
|
||||
eq->last_id = emu->prev_id;
|
||||
eq->next_id = emu->next_id;
|
||||
eq->cost2 = emu->total_cost;
|
||||
eq->grant_only = emu->grant_only > 0 ? true : false;
|
||||
eq->expendable_charges = emu->charges ? 1 : 0;
|
||||
eq->grant_only = emu->grant_only;
|
||||
eq->expendable_charges = emu->charges;
|
||||
eq->aa_expansion = emu->expansion;
|
||||
eq->special_category = emu->category;
|
||||
eq->total_abilities = emu->total_effects;
|
||||
@@ -2194,65 +2191,13 @@ namespace UF
|
||||
}
|
||||
|
||||
if(emu->total_prereqs > 0) {
|
||||
eq->prereq_skill = -(int)inapp->ReadUInt32();
|
||||
eq->prereq_skill = inapp->ReadUInt32();
|
||||
eq->prereq_minpoints = inapp->ReadUInt32();
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Status, "%s", DumpPacketToString(outapp).c_str());
|
||||
//Log.Out(Logs::General, Logs::Status, "%s", DumpPacketToString(outapp).c_str());
|
||||
dest->FastQueuePacket(&outapp);
|
||||
delete inapp;
|
||||
#else
|
||||
ENCODE_LENGTH_ATLEAST(SendAA_Struct);
|
||||
SETUP_VAR_ENCODE(SendAA_Struct);
|
||||
ALLOC_VAR_ENCODE(structs::SendAA_Struct, sizeof(structs::SendAA_Struct) + emu->total_abilities*sizeof(structs::AA_Ability));
|
||||
|
||||
// Check clientver field to verify this AA should be sent for SoF
|
||||
// clientver 1 is for all clients and 6 is for Underfoot
|
||||
if(emu->clientver <= 6)
|
||||
{
|
||||
OUT(id);
|
||||
eq->unknown004 = 1;
|
||||
//eq->hotkey_sid = (emu->hotkey_sid==4294967295UL)?0:(emu->id - emu->current_level + 1);
|
||||
//eq->hotkey_sid2 = (emu->hotkey_sid2==4294967295UL)?0:(emu->id - emu->current_level + 1);
|
||||
//eq->title_sid = emu->id - emu->current_level + 1;
|
||||
//eq->desc_sid = emu->id - emu->current_level + 1;
|
||||
eq->hotkey_sid = (emu->hotkey_sid == 4294967295UL) ? 0 : (emu->sof_next_skill);
|
||||
eq->hotkey_sid2 = (emu->hotkey_sid2 == 4294967295UL) ? 0 : (emu->sof_next_skill);
|
||||
eq->title_sid = emu->sof_next_skill;
|
||||
eq->desc_sid = emu->sof_next_skill;
|
||||
OUT(class_type);
|
||||
OUT(cost);
|
||||
OUT(seq);
|
||||
OUT(current_level);
|
||||
OUT(prereq_skill);
|
||||
OUT(prereq_minpoints);
|
||||
eq->type = emu->sof_type;
|
||||
OUT(spellid);
|
||||
OUT(spell_type);
|
||||
OUT(spell_refresh);
|
||||
OUT(classes);
|
||||
//OUT(berserker);
|
||||
//eq->max_level = emu->sof_max_level;
|
||||
OUT(max_level);
|
||||
OUT(last_id);
|
||||
OUT(next_id);
|
||||
OUT(cost2);
|
||||
eq->aa_expansion = emu->aa_expansion;
|
||||
eq->special_category = emu->special_category;
|
||||
eq->expendable_charges = emu->special_category == 7 ? 1 : 0; // temp hack, this can actually be any number
|
||||
OUT(total_abilities);
|
||||
unsigned int r;
|
||||
for(r = 0; r < emu->total_abilities; r++) {
|
||||
OUT(abilities[r].skill_id);
|
||||
OUT(abilities[r].base1);
|
||||
OUT(abilities[r].base2);
|
||||
OUT(abilities[r].slot);
|
||||
}
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Status, "%s", DumpPacketToString(__packet).c_str());
|
||||
FINISH_ENCODE();
|
||||
#endif
|
||||
}
|
||||
|
||||
ENCODE(OP_SendCharInfo)
|
||||
|
||||
@@ -139,8 +139,4 @@ protected:
|
||||
std::map<pTimerType, PersistentTimer *> _list;
|
||||
};
|
||||
|
||||
//code prettying macros
|
||||
#define AA_Choose3(val, v1, v2, v3) (val==1?v1:(val==2?v2:v3))
|
||||
#define AA_Choose5(val, v1, v2, v3, v4, v5) (val==1?v1:(val==2?v2:(val==3?v3:(val==4?v4:v5))))
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user