mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Merge branch 'master' into feature/global-base-scaling
This commit is contained in:
+10
-1
@@ -263,6 +263,16 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
PendingSacrifice = false;
|
||||
controlling_boat_id = 0;
|
||||
|
||||
if (!RuleB(Character, PerCharacterQglobalMaxLevel) && !RuleB(Character, PerCharacterBucketMaxLevel)) {
|
||||
SetClientMaxLevel(0);
|
||||
} else if (RuleB(Character, PerCharacterQglobalMaxLevel)) {
|
||||
int client_max_level = GetCharMaxLevelFromQGlobal();
|
||||
SetClientMaxLevel(client_max_level);
|
||||
} else if (RuleB(Character, PerCharacterBucketMaxLevel)) {
|
||||
int client_max_level = GetCharMaxLevelFromBucket();
|
||||
SetClientMaxLevel(client_max_level);
|
||||
}
|
||||
|
||||
KarmaUpdateTimer = new Timer(RuleI(Chat, KarmaUpdateIntervalMS));
|
||||
GlobalChatLimiterTimer = new Timer(RuleI(Chat, IntervalDurationMS));
|
||||
AttemptedMessages = 0;
|
||||
@@ -1971,7 +1981,6 @@ void Client::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
// ns->spawn.pvp = GetPVP(false) ? 1 : 0;
|
||||
ns->spawn.show_name = true;
|
||||
|
||||
|
||||
strcpy(ns->spawn.title, m_pp.title);
|
||||
strcpy(ns->spawn.suffix, m_pp.suffix);
|
||||
|
||||
|
||||
+5
-1
@@ -703,7 +703,9 @@ public:
|
||||
void SendGuildJoin(GuildJoin_Struct* gj);
|
||||
void RefreshGuildInfo();
|
||||
|
||||
|
||||
int GetClientMaxLevel() const { return client_max_level; }
|
||||
void SetClientMaxLevel(int max_level) { client_max_level = max_level; }
|
||||
|
||||
void CheckManaEndUpdate();
|
||||
void SendManaUpdate();
|
||||
void SendEnduranceUpdate();
|
||||
@@ -1652,6 +1654,8 @@ private:
|
||||
void InterrogateInventory_(bool errorcheck, Client* requester, int16 head, int16 index, const EQEmu::ItemInstance* inst, const EQEmu::ItemInstance* parent, bool log, bool silent, bool &error, int depth);
|
||||
bool InterrogateInventory_error(int16 head, int16 index, const EQEmu::ItemInstance* inst, const EQEmu::ItemInstance* parent, int depth);
|
||||
|
||||
int client_max_level;
|
||||
|
||||
#ifdef BOTS
|
||||
struct BotOwnerOptions {
|
||||
bool death_marquee;
|
||||
|
||||
@@ -1420,6 +1420,15 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
drakkin_tattoo = m_pp.drakkin_tattoo;
|
||||
drakkin_details = m_pp.drakkin_details;
|
||||
|
||||
// Max Level for Character:PerCharacterQglobalMaxLevel and Character:PerCharacterBucketMaxLevel
|
||||
int client_max_level = 0;
|
||||
if (RuleB(Character, PerCharacterQglobalMaxLevel)) {
|
||||
client_max_level = GetCharMaxLevelFromQGlobal();
|
||||
} else if (RuleB(Character, PerCharacterBucketMaxLevel)) {
|
||||
client_max_level = GetCharMaxLevelFromBucket();
|
||||
}
|
||||
SetClientMaxLevel(client_max_level);
|
||||
|
||||
// we know our class now, so we might have to fix our consume timer!
|
||||
if (class_ == MONK)
|
||||
consume_food_timer.SetTimer(CONSUMPTION_MNK_TIMER);
|
||||
|
||||
+9
-23
@@ -684,26 +684,12 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
||||
}
|
||||
}
|
||||
|
||||
if(RuleB(Character, PerCharacterQglobalMaxLevel)){
|
||||
uint32 MaxLevel = GetCharMaxLevelFromQGlobal();
|
||||
if(MaxLevel){
|
||||
if(GetLevel() >= MaxLevel){
|
||||
uint32 expneeded = GetEXPForLevel(MaxLevel);
|
||||
if(set_exp > expneeded) {
|
||||
set_exp = expneeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(RuleB(Character, PerCharacterBucketMaxLevel)){
|
||||
uint32 MaxLevel = GetCharMaxLevelFromBucket();
|
||||
if(MaxLevel){
|
||||
if(GetLevel() >= MaxLevel){
|
||||
uint32 expneeded = GetEXPForLevel(MaxLevel);
|
||||
if(set_exp > expneeded) {
|
||||
set_exp = expneeded;
|
||||
}
|
||||
if (GetClientMaxLevel() > 0) {
|
||||
int client_max_level = GetClientMaxLevel();
|
||||
if (GetLevel() >= client_max_level) {
|
||||
uint32 expneeded = GetEXPForLevel(client_max_level);
|
||||
if(set_exp > expneeded) {
|
||||
set_exp = expneeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1142,7 +1128,7 @@ uint32 Client::GetCharMaxLevelFromQGlobal() {
|
||||
++gcount;
|
||||
}
|
||||
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 Client::GetCharMaxLevelFromBucket() {
|
||||
@@ -1151,14 +1137,14 @@ uint32 Client::GetCharMaxLevelFromBucket() {
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log(Logs::General, Logs::Error, "Data bucket for CharMaxLevel for char ID %i failed.", char_id);
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (results.RowCount() > 0) {
|
||||
auto row = results.begin();
|
||||
return atoi(row[0]);
|
||||
}
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 Client::GetRequiredAAExperience() {
|
||||
|
||||
Reference in New Issue
Block a user