mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Get factions fully moved over [skip ci]
This commit is contained in:
parent
dae20afcba
commit
63eca22aac
@ -61,7 +61,7 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo
|
||||
} else if(my_primary < 0) {
|
||||
strcpy(namebuf, "(Special faction)");
|
||||
} else {
|
||||
if(!database.GetFactionName(my_primary, namebuf, sizeof(namebuf)))
|
||||
if(!content_db.GetFactionName(my_primary, namebuf, sizeof(namebuf)))
|
||||
strcpy(namebuf, "(Unknown)");
|
||||
}
|
||||
towho->Message(Chat::White, ".. I am on faction %s (%d)\n", namebuf, my_primary);
|
||||
@ -170,7 +170,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
||||
towho->Message(Chat::White, "...%s is on special faction %d", mob->GetName(), mob_primary);
|
||||
} else {
|
||||
char namebuf[256];
|
||||
if(!database.GetFactionName(mob_primary, namebuf, sizeof(namebuf)))
|
||||
if(!content_db.GetFactionName(mob_primary, namebuf, sizeof(namebuf)))
|
||||
strcpy(namebuf, "(Unknown)");
|
||||
std::list<struct NPCFaction*>::iterator cur,end;
|
||||
cur = faction_list.begin();
|
||||
|
||||
@ -6849,7 +6849,7 @@ void Client::SendStatsWindow(Client* client, bool use_window)
|
||||
for (auto iter = item_faction_bonuses.begin(); iter != item_faction_bonuses.end(); ++iter) {
|
||||
memset(&faction_buf, 0, sizeof(faction_buf));
|
||||
|
||||
if(!database.GetFactionName((int32)((*iter).first), faction_buf, sizeof(faction_buf)))
|
||||
if(!content_db.GetFactionName((int32)((*iter).first), faction_buf, sizeof(faction_buf)))
|
||||
strcpy(faction_buf, "Not in DB");
|
||||
|
||||
if((*iter).second > 0) {
|
||||
@ -7816,7 +7816,7 @@ FACTION_VALUE Client::GetFactionLevel(uint32 char_id, uint32 npc_id, uint32 p_ra
|
||||
if(pFaction > 0)
|
||||
{
|
||||
//Get the faction data from the database
|
||||
if(database.GetFactionData(&fmods, p_class, p_race, p_deity, pFaction))
|
||||
if(content_db.GetFactionData(&fmods, p_class, p_race, p_deity, pFaction))
|
||||
{
|
||||
//Get the players current faction with pFaction
|
||||
tmpFactionValue = GetCharacterFactionLevel(pFaction);
|
||||
@ -7867,8 +7867,7 @@ void Client::SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, ui
|
||||
// Find out starting faction for this faction
|
||||
// It needs to be used to adj max and min personal
|
||||
// The range is still the same, 1200-3000(4200), but adjusted for base
|
||||
database.GetFactionData(&fm, GetClass(), GetFactionRace(), GetDeity(),
|
||||
faction_id[i]);
|
||||
content_db.GetFactionData(&fm, GetClass(), GetFactionRace(), GetDeity(), faction_id[i]);
|
||||
|
||||
if (quest)
|
||||
{
|
||||
@ -7917,7 +7916,7 @@ void Client::SetFactionLevel2(uint32 char_id, int32 faction_id, uint8 char_class
|
||||
// Find out starting faction for this faction
|
||||
// It needs to be used to adj max and min personal
|
||||
// The range is still the same, 1200-3000(4200), but adjusted for base
|
||||
database.GetFactionData(&fm, GetClass(), GetFactionRace(), GetDeity(),
|
||||
content_db.GetFactionData(&fm, GetClass(), GetFactionRace(), GetDeity(),
|
||||
faction_id);
|
||||
|
||||
// Adjust the amount you can go up or down so the resulting range
|
||||
@ -8018,7 +8017,7 @@ return;
|
||||
int32 Client::GetModCharacterFactionLevel(int32 faction_id) {
|
||||
int32 Modded = GetCharacterFactionLevel(faction_id);
|
||||
FactionMods fm;
|
||||
if (database.GetFactionData(&fm, GetClass(), GetFactionRace(), GetDeity(), faction_id))
|
||||
if (content_db.GetFactionData(&fm, GetClass(), GetFactionRace(), GetDeity(), faction_id))
|
||||
{
|
||||
Modded += fm.base + fm.class_mod + fm.race_mod + fm.deity_mod;
|
||||
|
||||
@ -8039,7 +8038,7 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
|
||||
|
||||
// If a faction is involved, get the data.
|
||||
if (primaryfaction > 0) {
|
||||
if (database.GetFactionData(&fmod, GetClass(), GetFactionRace(), GetDeity(), primaryfaction)) {
|
||||
if (content_db.GetFactionData(&fmod, GetClass(), GetFactionRace(), GetDeity(), primaryfaction)) {
|
||||
tmpFactionValue = GetCharacterFactionLevel(primaryfaction);
|
||||
lowestvalue = std::min(std::min(tmpFactionValue, fmod.deity_mod),
|
||||
std::min(fmod.class_mod, fmod.race_mod));
|
||||
|
||||
@ -322,7 +322,7 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
LogInfo("Loading npc faction lists");
|
||||
if (!database.LoadNPCFactionLists(hotfix_name)) {
|
||||
if (!content_db.LoadNPCFactionLists(hotfix_name)) {
|
||||
LogError("Loading npcs faction lists failed!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user