mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Expansions] Expansion settings tweaks (#3556)
* Expansion tweaks testing on PEQ * Update zoning.cpp * Update aa.cpp * Update aa.cpp * Tweak
This commit is contained in:
parent
b5d23389ee
commit
c0cf9bb5aa
@ -288,7 +288,8 @@ RULE_BOOL(World, GMAccountIPList, false, "Check IP list against GM accounts. Thi
|
||||
RULE_INT(World, MinGMAntiHackStatus, 1, "Minimum status to check against AntiHack list")
|
||||
RULE_INT(World, SoFStartZoneID, -1, "Sets the Starting Zone for SoF Clients separate from Titanium Clients (-1 is disabled)")
|
||||
RULE_INT(World, TitaniumStartZoneID, -1, "Sets the Starting Zone for Titanium Clients (-1 is disabled). Replaces the old method")
|
||||
RULE_INT(World, ExpansionSettings, 16383, "Sets the expansion settings for the server, This is sent on login to world and affects client expansion settings. Defaults to all expansions enabled up to TSS, value is bitmask")
|
||||
RULE_INT(World, ExpansionSettings, 16383, "Sets the expansion settings bitmask for the server, This is sent on login to world and affects client expansion settings. Defaults to all expansions enabled up to TSS, value is bitmask")
|
||||
RULE_INT(World, CharacterSelectExpansionSettings, -1, "Sets the expansion settings bitmask for character select if you wish to override. -1 is off")
|
||||
RULE_BOOL(World, UseClientBasedExpansionSettings, true, "If true it will overrule World, ExpansionSettings and set someone's expansion based on the client they're using")
|
||||
RULE_INT(World, PVPSettings, 0, "Sets the PVP settings for the server. 1=Rallos Zek RuleSet, 2=Tallon/Vallon Zek Ruleset, 4=Sullon Zek Ruleset, 6=Discord Ruleset, anything above 6 is the Discord Ruleset without the no-drop restrictions removed. NOTE: edit IsAttackAllowed in Zone-table to accomodate for these rules")
|
||||
RULE_INT(World, PVPMinLevel, 0, "Minimum level to pvp")
|
||||
|
||||
@ -208,11 +208,14 @@ void Client::SendExpansionInfo() {
|
||||
auto outapp = new EQApplicationPacket(OP_ExpansionInfo, sizeof(ExpansionInfo_Struct));
|
||||
ExpansionInfo_Struct *eis = (ExpansionInfo_Struct*)outapp->pBuffer;
|
||||
|
||||
if (RuleB(World, UseClientBasedExpansionSettings)) {
|
||||
if (RuleI(World, CharacterSelectExpansionSettings) != -1) {
|
||||
eis->Expansions = RuleI(World, CharacterSelectExpansionSettings);
|
||||
}
|
||||
else if (RuleB(World, UseClientBasedExpansionSettings)) {
|
||||
eis->Expansions = EQ::expansions::ConvertClientVersionToExpansionsMask(eqs->ClientVersion());
|
||||
}
|
||||
else {
|
||||
eis->Expansions = (RuleI(World, ExpansionSettings) & EQ::expansions::ConvertClientVersionToExpansionsMask(eqs->ClientVersion()));
|
||||
eis->Expansions = RuleI(World, ExpansionSettings);
|
||||
}
|
||||
|
||||
QueuePacket(outapp);
|
||||
|
||||
@ -1701,9 +1701,7 @@ bool Mob::CanPurchaseAlternateAdvancementRank(AA::Rank *rank, bool check_price,
|
||||
}
|
||||
|
||||
void Zone::LoadAlternateAdvancement() {
|
||||
if(!content_db.LoadAlternateAdvancementAbilities(aa_abilities,
|
||||
aa_ranks))
|
||||
{
|
||||
if (!content_db.LoadAlternateAdvancementAbilities(aa_abilities, aa_ranks)) {
|
||||
aa_abilities.clear();
|
||||
aa_ranks.clear();
|
||||
LogInfo("Failed to load Alternate Advancement Data");
|
||||
|
||||
@ -385,6 +385,7 @@ public:
|
||||
inline PetInfo* GetPetInfo(uint16 pet) { return (pet==1)?&m_suspendedminion:&m_petinfo; }
|
||||
inline InspectMessage_Struct& GetInspectMessage() { return m_inspect_message; }
|
||||
inline const InspectMessage_Struct& GetInspectMessage() const { return m_inspect_message; }
|
||||
void ReloadExpansionProfileSetting();
|
||||
|
||||
void SetPetCommandState(int button, int state);
|
||||
|
||||
|
||||
@ -1445,12 +1445,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
if (m_pp.ldon_points_tak < 0 || m_pp.ldon_points_tak > 2000000000) { m_pp.ldon_points_tak = 0; }
|
||||
if (m_pp.ldon_points_available < 0 || m_pp.ldon_points_available > 2000000000) { m_pp.ldon_points_available = 0; }
|
||||
|
||||
if (RuleB(World, UseClientBasedExpansionSettings)) {
|
||||
m_pp.expansions = EQ::expansions::ConvertClientVersionToExpansionsMask(ClientVersion());
|
||||
}
|
||||
else {
|
||||
m_pp.expansions = (RuleI(World, ExpansionSettings) & EQ::expansions::ConvertClientVersionToExpansionsMask(ClientVersion()));
|
||||
}
|
||||
ReloadExpansionProfileSetting();
|
||||
|
||||
if (!database.LoadAlternateAdvancement(this)) {
|
||||
LogError("Error loading AA points for [{}]", GetName());
|
||||
@ -16483,3 +16478,13 @@ void Client::RecordStats()
|
||||
CharacterStatsRecordRepository::InsertOne(database, r);
|
||||
}
|
||||
}
|
||||
|
||||
void Client::ReloadExpansionProfileSetting()
|
||||
{
|
||||
if (RuleB(World, UseClientBasedExpansionSettings)) {
|
||||
m_pp.expansions = EQ::expansions::ConvertClientVersionToExpansionsMask(ClientVersion());
|
||||
}
|
||||
else {
|
||||
m_pp.expansions = RuleI(World, ExpansionSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5647,6 +5647,8 @@ void EntityList::StopMobAI()
|
||||
|
||||
void EntityList::SendAlternateAdvancementStats() {
|
||||
for (auto &c : client_list) {
|
||||
c.second->Message(Chat::White, "Reloading AA");
|
||||
c.second->ReloadExpansionProfileSetting();
|
||||
c.second->SendClearPlayerAA();
|
||||
c.second->SendAlternateAdvancementTable();
|
||||
c.second->SendAlternateAdvancementStats();
|
||||
|
||||
@ -341,9 +341,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
//TODO: ADVENTURE ENTRANCE CHECK
|
||||
|
||||
/**
|
||||
* Expansion check
|
||||
*/
|
||||
// Expansion checks and routing
|
||||
if (content_service.GetCurrentExpansion() >= Expansion::Classic && !GetGM()) {
|
||||
bool meets_zone_expansion_check = false;
|
||||
|
||||
@ -367,6 +365,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
if (content_service.GetCurrentExpansion() >= Expansion::Classic && GetGM()) {
|
||||
LogInfo("[{}] Bypassing Expansion zone checks because GM status is set", GetCleanName());
|
||||
Message(Chat::Yellow, "Bypassing Expansion zone checks because GM status is set");
|
||||
}
|
||||
|
||||
if (zoning_message == ZoningMessage::ZoneSuccess) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user