Fix database connection pointer bucket consistency

This commit is contained in:
Akkadius 2021-02-28 19:31:46 -06:00
parent 66f89416d5
commit 450c748299
8 changed files with 14 additions and 14 deletions

View File

@ -1906,7 +1906,7 @@ void Client::SetClassStartingSkills(PlayerProfile_Struct *pp)
i == EQ::skills::SkillAlcoholTolerance || i == EQ::skills::SkillBindWound)
continue;
pp->skills[i] = database.GetSkillCap(pp->class_, (EQ::skills::SkillType)i, 1);
pp->skills[i] = content_db.GetSkillCap(pp->class_, (EQ::skills::SkillType)i, 1);
}
}

View File

@ -1338,7 +1338,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
}
LogInfo("Loading skill caps");
if (!database.LoadSkillCaps(hotfix_name)) {
if (!content_db.LoadSkillCaps(hotfix_name)) {
LogInfo("Error: Could not load skill cap data. But ignoring");
}

View File

@ -1591,7 +1591,7 @@ uint16 Bot::GetPrimarySkillValue() {
}
uint16 Bot::MaxSkill(EQ::skills::SkillType skillid, uint16 class_, uint16 level) const {
return(database.GetSkillCap(class_, skillid, level));
return(content_db.GetSkillCap(class_, skillid, level));
}
uint32 Bot::GetTotalATK() {
@ -9082,7 +9082,7 @@ void Bot::CalcBotStats(bool showtext) {
SetLevel(GetBotOwner()->GetLevel());
for (int sindex = 0; sindex <= EQ::skills::HIGHEST_SKILL; ++sindex) {
skills[sindex] = database.GetSkillCap(GetClass(), (EQ::skills::SkillType)sindex, GetLevel());
skills[sindex] = content_db.GetSkillCap(GetClass(), (EQ::skills::SkillType)sindex, GetLevel());
}
taunt_timer.Start(1000);

View File

@ -2505,7 +2505,7 @@ bool Client::CanHaveSkill(EQ::skills::SkillType skill_id) const {
if (ClientVersion() < EQ::versions::ClientVersion::RoF2 && class_ == BERSERKER && skill_id == EQ::skills::Skill1HPiercing)
skill_id = EQ::skills::Skill2HPiercing;
return(database.GetSkillCap(GetClass(), skill_id, RuleI(Character, MaxLevel)) > 0);
return(content_db.GetSkillCap(GetClass(), skill_id, RuleI(Character, MaxLevel)) > 0);
//if you don't have it by max level, then odds are you never will?
}
@ -2513,7 +2513,7 @@ uint16 Client::MaxSkill(EQ::skills::SkillType skillid, uint16 class_, uint16 lev
if (ClientVersion() < EQ::versions::ClientVersion::RoF2 && class_ == BERSERKER && skillid == EQ::skills::Skill1HPiercing)
skillid = EQ::skills::Skill2HPiercing;
return(database.GetSkillCap(class_, skillid, level));
return(content_db.GetSkillCap(class_, skillid, level));
}
uint8 Client::SkillTrainLevel(EQ::skills::SkillType skillid, uint16 class_)
@ -2521,7 +2521,7 @@ uint8 Client::SkillTrainLevel(EQ::skills::SkillType skillid, uint16 class_)
if (ClientVersion() < EQ::versions::ClientVersion::RoF2 && class_ == BERSERKER && skillid == EQ::skills::Skill1HPiercing)
skillid = EQ::skills::Skill2HPiercing;
return(database.GetTrainLevel(class_, skillid, RuleI(Character, MaxLevel)));
return(content_db.GetTrainLevel(class_, skillid, RuleI(Character, MaxLevel)));
}
uint16 Client::GetMaxSkillAfterSpecializationRules(EQ::skills::SkillType skillid, uint16 maxSkill)

View File

@ -12552,7 +12552,7 @@ void command_max_all_skills(Client *c, const Seperator *sep)
}
else
{
int max_skill_level = database.GetSkillCap(c->GetClass(), (EQ::skills::SkillType)i, c->GetLevel());
int max_skill_level = content_db.GetSkillCap(c->GetClass(), (EQ::skills::SkillType)i, c->GetLevel());
c->SetSkill((EQ::skills::SkillType)i, max_skill_level);
}
}

View File

@ -318,7 +318,7 @@ int main(int argc, char** argv) {
return 1;
}
LogInfo("Loading skill caps");
if (!database.LoadSkillCaps(std::string(hotfix_name))) {
if (!content_db.LoadSkillCaps(std::string(hotfix_name))) {
LogError("Loading skill caps failed!");
return 1;
}

View File

@ -74,7 +74,7 @@ Merc::Merc(const NPCType* d, float x, float y, float z, float heading)
int r;
for (r = 0; r <= EQ::skills::HIGHEST_SKILL; r++) {
skills[r] = database.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, GetLevel());
skills[r] = content_db.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, GetLevel());
}
size = d->size;
@ -1180,12 +1180,12 @@ bool Merc::HasSkill(EQ::skills::SkillType skill_id) const {
}
bool Merc::CanHaveSkill(EQ::skills::SkillType skill_id) const {
return(database.GetSkillCap(GetClass(), skill_id, RuleI(Character, MaxLevel)) > 0);
return(content_db.GetSkillCap(GetClass(), skill_id, RuleI(Character, MaxLevel)) > 0);
//if you don't have it by max level, then odds are you never will?
}
uint16 Merc::MaxSkill(EQ::skills::SkillType skillid, uint16 class_, uint16 level) const {
return(database.GetSkillCap(class_, skillid, level));
return(content_db.GetSkillCap(class_, skillid, level));
}
void Merc::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {

View File

@ -309,7 +309,7 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
//give NPCs skill values...
int r;
for (r = 0; r <= EQ::skills::HIGHEST_SKILL; r++) {
skills[r] = database.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, moblevel);
skills[r] = content_db.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, moblevel);
}
// some overrides -- really we need to be able to set skills for mobs in the DB
// There are some known low level SHM/BST pets that do not follow this, which supports
@ -3322,7 +3322,7 @@ void NPC::RecalculateSkills()
{
int r;
for (r = 0; r <= EQ::skills::HIGHEST_SKILL; r++) {
skills[r] = database.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, level);
skills[r] = content_db.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, level);
}
// some overrides -- really we need to be able to set skills for mobs in the DB