mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Some cleanup as well as fix for a certain type of aa proc
This commit is contained in:
+8
-6
@@ -640,14 +640,16 @@ void Client::CalcAABonuses(StatBonuses *newbon)
|
||||
memset(newbon, 0, sizeof(StatBonuses)); // start fresh
|
||||
|
||||
for (const auto &aa : aa_ranks) {
|
||||
auto ability = zone->GetAlternateAdvancementAbility(aa.first);
|
||||
// zone doesn't know about this! bad data some where
|
||||
if (!ability)
|
||||
continue;
|
||||
auto ability_rank = zone->GetAlternateAdvancementAbilityAndRank(aa.first, aa.second.first);
|
||||
auto ability = ability_rank.first;
|
||||
auto rank = ability_rank.second;
|
||||
|
||||
if(!ability) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto rank = ability->GetRankByPointsSpent(aa.second.first);
|
||||
// bad data or no effects
|
||||
if (!rank || rank->effects.empty())
|
||||
if (rank->effects.empty())
|
||||
continue;
|
||||
|
||||
ApplyAABonuses(*rank, newbon);
|
||||
|
||||
Reference in New Issue
Block a user