Added deity and race checking to AAs, doubled over the sanity check code and found a mistake, added code to make boats move smoother after loading into oot 50 times and seeing it skip every time.

This commit is contained in:
KimLS
2015-06-12 02:56:51 -07:00
parent afaa9ee6c9
commit e5d1e98793
5 changed files with 72 additions and 49 deletions
+8 -6
View File
@@ -18,6 +18,7 @@
#include "../common/global_define.h"
#include "../common/types.h"
#include "masterentity.h"
#include "aa_ability.h"
AA::Rank *AA::Ability::GetMaxRank() {
@@ -53,16 +54,17 @@ AA::Rank *AA::Ability::GetRankByPointsSpent(int current_level) {
return current;
}
int AA::Ability::GetMaxLevel(bool force_calc) {
if(!force_calc)
return max_level;
max_level = 0;
int AA::Ability::GetMaxLevel(Mob *who) {
int max_level = 0;
Rank *current = first;
while(current) {
if(!who->CanUseAlternateAdvancementRank(current)) {
return max_level;
}
max_level++;
current = current->next;
}
return max_level;
}