From 77f050b653e77ea1cde5b3aea90f1f4513f77186 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 21 Jun 2015 01:25:34 -0700 Subject: [PATCH] setaapts command will now let you have up to 5k AA points, from 200. Removed the need to specify a prev_id in alternate_abilities table it can deduce that by itself. --- zone/aa.cpp | 21 ++++++++++++--------- zone/command.cpp | 4 ++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/zone/aa.cpp b/zone/aa.cpp index 0c31034c7..974ccef13 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -1520,7 +1520,9 @@ void Zone::LoadAlternateAdvancement() { //process these ranks AA::Rank *current = ability.second->first; int i = 1; + int prev_id = -1; while(current) { + current->prev_id = prev_id; current->prev = GetAlternateAdvancementRank(current->prev_id); current->next = GetAlternateAdvancementRank(current->next_id); current->base_ability = ability.second.get(); @@ -1531,11 +1533,11 @@ void Zone::LoadAlternateAdvancement() { //check prereqs here for(auto &prev_prereq : current->prev->prereqs) { - // //if prev has an aa we dont have set - // // then set it here too - // //if prev has an aa we have and the count is different - // // then set to whichever is highest - // + //if prev has an aa we dont have set + // then set it here too + //if prev has an aa we have + // then set to whichever is highest + auto iter = current->prereqs.find(prev_prereq.first); if(iter == current->prereqs.end()) { //not found @@ -1557,6 +1559,7 @@ void Zone::LoadAlternateAdvancement() { } i++; + prev_id = current->id; current = current->next; } } @@ -1602,7 +1605,7 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_mapspell = atoi(row[7]); rank->spell_type = atoi(row[8]); rank->recast_time = atoi(row[9]); - rank->prev_id = atoi(row[10]); - rank->next_id = atoi(row[11]); - rank->expansion = atoi(row[12]); + rank->next_id = atoi(row[10]); + rank->expansion = atoi(row[11]); rank->base_ability = nullptr; rank->total_cost = 0; + rank->prev_id = -1; rank->next = nullptr; rank->prev = nullptr; diff --git a/zone/command.cpp b/zone/command.cpp index 59f4bfa8a..7114244b3 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -5554,8 +5554,8 @@ void command_setaapts(Client *c, const Seperator *sep) if(sep->arg[1][0] == '\0' || sep->arg[2][0] == '\0') c->Message(0, "Usage: #setaapts "); - else if(atoi(sep->arg[2]) <= 0 || atoi(sep->arg[2]) > 200) - c->Message(0, "You must have a number greater than 0 for points and no more than 200."); + else if(atoi(sep->arg[2]) <= 0 || atoi(sep->arg[2]) > 5000) + c->Message(0, "You must have a number greater than 0 for points and no more than 5000."); else if(!strcasecmp(sep->arg[1], "group")) { t->GetPP().group_leadership_points = atoi(sep->arg[2]); t->GetPP().group_leadership_exp = 0;