mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-27 20:21:30 +00:00
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.
This commit is contained in:
parent
d5098a56e0
commit
77f050b653
21
zone/aa.cpp
21
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_map<int, std
|
||||
Log.Out(Logs::General, Logs::Status, "Loading Alternate Advancement Ability Ranks...");
|
||||
ranks.clear();
|
||||
query = "SELECT id, upper_hotkey_sid, lower_hotkey_sid, title_sid, desc_sid, cost, level_req, spell, spell_type, recast_time, "
|
||||
"prev_id, next_id, expansion FROM aa_ranks";
|
||||
"next_id, expansion FROM aa_ranks";
|
||||
results = QueryDatabase(query);
|
||||
if(results.Success()) {
|
||||
for(auto row = results.begin(); row != results.end(); ++row) {
|
||||
@ -1617,11 +1620,11 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_map<int, std
|
||||
rank->spell = 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;
|
||||
|
||||
|
||||
@ -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 <AA|group|raid> <new AA points value>");
|
||||
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user