mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 05:16:37 +00:00
Merge branch 'master' into shared_tasks
This commit is contained in:
+3
-3
@@ -7021,9 +7021,9 @@ void Bot::CalcRestState() {
|
||||
}
|
||||
}
|
||||
|
||||
RestRegenHP = 6 * (GetMaxHP() / RuleI(Character, RestRegenHP));
|
||||
RestRegenMana = 6 * (GetMaxMana() / RuleI(Character, RestRegenMana));
|
||||
RestRegenEndurance = 6 * (GetMaxEndurance() / RuleI(Character, RestRegenEnd));
|
||||
RestRegenHP = 6 * (GetMaxHP() / zone->newzone_data.FastRegenHP);
|
||||
RestRegenMana = 6 * (GetMaxMana() / zone->newzone_data.FastRegenMana);
|
||||
RestRegenEndurance = 6 * (GetMaxEndurance() / zone->newzone_data.FastRegenEndurance);
|
||||
}
|
||||
|
||||
int32 Bot::LevelRegen() {
|
||||
|
||||
@@ -290,9 +290,8 @@ int32 Client::CalcHPRegen(bool bCombat)
|
||||
// another check for IsClient && !(base + item_regen) && Cur_HP <= 0 do --base; do later
|
||||
|
||||
if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) {
|
||||
auto fast_mod = RuleI(Character, RestRegenHP); // TODO: this is actually zone based
|
||||
auto max_hp = GetMaxHP();
|
||||
int fast_regen = 6 * (max_hp / fast_mod);
|
||||
int fast_regen = 6 * (max_hp / zone->newzone_data.FastRegenHP);
|
||||
if (base < fast_regen) // weird, but what the client is doing
|
||||
base = fast_regen;
|
||||
}
|
||||
@@ -1296,9 +1295,8 @@ int32 Client::CalcManaRegen(bool bCombat)
|
||||
regen = regen * 100.0f * AreaManaRegen * 0.01f + 0.5f;
|
||||
|
||||
if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) {
|
||||
auto fast_mod = RuleI(Character, RestRegenMana); // TODO: this is actually zone based
|
||||
auto max_mana = GetMaxMana();
|
||||
int fast_regen = 6 * (max_mana / fast_mod);
|
||||
int fast_regen = 6 * (max_mana / zone->newzone_data.FastRegenMana);
|
||||
if (regen < fast_regen) // weird, but what the client is doing
|
||||
regen = fast_regen;
|
||||
}
|
||||
@@ -2264,9 +2262,8 @@ int32 Client::CalcEnduranceRegen(bool bCombat)
|
||||
|
||||
int regen = base;
|
||||
if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) {
|
||||
auto fast_mod = RuleI(Character, RestRegenEnd); // TODO: this is actually zone based
|
||||
auto max_end = GetMaxEndurance();
|
||||
int fast_regen = 6 * (max_end / fast_mod);
|
||||
int fast_regen = 6 * (max_end / zone->newzone_data.FastRegenEndurance);
|
||||
if (aa_regen < fast_regen) // weird, but what the client is doing
|
||||
aa_regen = fast_regen;
|
||||
}
|
||||
|
||||
+3
-3
@@ -1174,11 +1174,11 @@ void Merc::CalcRestState() {
|
||||
}
|
||||
}
|
||||
|
||||
RestRegenHP = 6 * (GetMaxHP() / RuleI(Character, RestRegenHP));
|
||||
RestRegenHP = 6 * (GetMaxHP() / zone->newzone_data.FastRegenHP);
|
||||
|
||||
RestRegenMana = 6 * (GetMaxMana() / RuleI(Character, RestRegenMana));
|
||||
RestRegenMana = 6 * (GetMaxMana() / zone->newzone_data.FastRegenMana);
|
||||
|
||||
RestRegenEndurance = 6 * (GetMaxEndurance() / RuleI(Character, RestRegenEnd));
|
||||
RestRegenEndurance = 6 * (GetMaxEndurance() / zone->newzone_data.FastRegenEndurance);
|
||||
}
|
||||
|
||||
bool Merc::HasSkill(EQEmu::skills::SkillType skill_id) const {
|
||||
|
||||
+1
-1
@@ -1194,7 +1194,7 @@ void Mob::AI_Process() {
|
||||
// NPCs will forget people after 10 mins of not interacting with them or out of range
|
||||
// both of these maybe zone specific, hardcoded for now
|
||||
if (hate_list_cleanup_timer.Check()) {
|
||||
hate_list.RemoveStaleEntries(600000, 600.0f);
|
||||
hate_list.RemoveStaleEntries(600000, static_cast<float>(zone->newzone_data.NPCAggroMaxDist));
|
||||
if (hate_list.IsHateListEmpty()) {
|
||||
AI_Event_NoLongerEngaged();
|
||||
zone->DelAggroMob();
|
||||
|
||||
+10
-1
@@ -143,7 +143,11 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct
|
||||
"snow_duration2, " // 53
|
||||
"snow_duration3, " // 54
|
||||
"snow_duration4, " // 55
|
||||
"gravity " // 56
|
||||
"gravity, " // 56
|
||||
"fast_regen_hp, " // 57
|
||||
"fast_regen_mana, " // 58
|
||||
"fast_regen_endurance, " // 59
|
||||
"npc_max_aggro_dist " // 60
|
||||
"FROM zone WHERE zoneidnumber = %i AND version = %i",
|
||||
zoneid, instance_id);
|
||||
auto results = QueryDatabase(query);
|
||||
@@ -188,6 +192,11 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct
|
||||
Log(Logs::General, Logs::Debug, "Zone Gravity is %f", zone_data->gravity);
|
||||
allow_mercs = true;
|
||||
|
||||
zone_data->FastRegenHP = atoi(row[57]);
|
||||
zone_data->FastRegenMana = atoi(row[58]);
|
||||
zone_data->FastRegenEndurance = atoi(row[59]);
|
||||
zone_data->NPCAggroMaxDist = atoi(row[60]);
|
||||
|
||||
int bindable = 0;
|
||||
bindable = atoi(row[31]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user