mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 11:12:25 +00:00
Port up AA sympathetic procs
This commit is contained in:
parent
121af489c4
commit
335470d3db
@ -5202,33 +5202,29 @@ uint16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) {
|
|||||||
|
|
||||||
/*Note: At present, ff designing custom AA to have a sympathetic proc effect, only use one focus
|
/*Note: At present, ff designing custom AA to have a sympathetic proc effect, only use one focus
|
||||||
effect within the aa_effects data for each AA*[No live AA's use this effect to my knowledge]*/
|
effect within the aa_effects data for each AA*[No live AA's use this effect to my knowledge]*/
|
||||||
if (aabonuses.FocusEffects[type]){
|
if (aabonuses.FocusEffects[type]) {
|
||||||
|
for (const auto &aa : aa_ranks) {
|
||||||
|
if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS)
|
||||||
|
break;
|
||||||
|
|
||||||
uint32 aa_AA = 0;
|
auto ability = zone->GetAlternateAdvancementAbility(aa.first);
|
||||||
uint32 aa_value = 0;
|
if (!ability)
|
||||||
|
continue;
|
||||||
|
|
||||||
//aa old
|
auto rank = ability->GetRankByPointsSpent(aa.second.first);
|
||||||
//for (int i = 0; i < MAX_PP_AA_ARRAY; i++)
|
if (!rank || rank->effects.empty())
|
||||||
//{
|
continue;
|
||||||
// aa_AA = this->aa[i]->AA;
|
|
||||||
// aa_value = this->aa[i]->value;
|
proc_spellid = CalcAAFocus(type, *rank, spell_id);
|
||||||
// if (aa_AA < 1 || aa_value < 1)
|
if (IsValidSpell(proc_spellid)) {
|
||||||
// continue;
|
ProcChance = GetSympatheticProcChances(spell_id, rank->effects[0].base1);
|
||||||
//
|
if (zone->random.Roll(ProcChance))
|
||||||
// if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS)
|
SympatheticProcList.push_back(proc_spellid);
|
||||||
// continue;
|
}
|
||||||
//
|
}
|
||||||
// proc_spellid = CalcAAFocus(type, aa_AA, spell_id);
|
|
||||||
//
|
|
||||||
// if (IsValidSpell(proc_spellid)){
|
|
||||||
// ProcChance = GetSympatheticProcChances(spell_id, GetAABase1(aa_AA, 1));
|
|
||||||
// if(zone->random.Roll(ProcChance))
|
|
||||||
// SympatheticProcList.push_back(proc_spellid);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SympatheticProcList.size() > 0)
|
if (!SympatheticProcList.empty())
|
||||||
{
|
{
|
||||||
uint8 random = zone->random.Int(0, SympatheticProcList.size()-1);
|
uint8 random = zone->random.Int(0, SympatheticProcList.size()-1);
|
||||||
int FinalSympatheticProc = SympatheticProcList[random];
|
int FinalSympatheticProc = SympatheticProcList[random];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user