mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Fixed Merc lack of use of heal over time spells (causing excessive healing), fixed pet mitigation/AC issues.
This commit is contained in:
parent
24d4eaf65d
commit
a787a7ce72
@ -562,7 +562,14 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit)
|
||||
}
|
||||
else if(IsNPC())
|
||||
{
|
||||
armor = spellbonuses.AC + itembonuses.AC + (CastToNPC()->GetRawAC() / RuleR(Combat, NPCACFactor)) + 1;
|
||||
armor = CastToNPC()->GetRawAC();
|
||||
|
||||
if(!IsPet())
|
||||
{
|
||||
armor = (armor / RuleR(Combat, NPCACFactor));
|
||||
}
|
||||
|
||||
armor += spellbonuses.AC + itembonuses.AC + 1;
|
||||
}
|
||||
|
||||
if(GetClass() == WIZARD || GetClass() == MAGICIAN || GetClass() == NECROMANCER || GetClass() == ENCHANTER)
|
||||
|
||||
@ -2237,10 +2237,6 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
|
||||
|
||||
if(numToHeal > 2) {
|
||||
selectedMercSpell = GetBestMercSpellForGroupHeal(this);
|
||||
|
||||
if(selectedMercSpell.spellid == 0) {
|
||||
selectedMercSpell = GetBestMercSpellForRegularSingleTargetHeal(this);
|
||||
}
|
||||
}
|
||||
|
||||
if(tar && selectedMercSpell.spellid == 0) {
|
||||
@ -2267,7 +2263,7 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
|
||||
selectedMercSpell = GetBestMercSpellForRegularSingleTargetHeal(this);
|
||||
}
|
||||
}
|
||||
else if (tar->GetHPRatio() < 75) {
|
||||
else if (tar->GetHPRatio() < 80) {
|
||||
selectedMercSpell = GetBestMercSpellForPercentageHeal(this);
|
||||
|
||||
//get regular heal
|
||||
@ -2278,18 +2274,14 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
|
||||
else {
|
||||
//check for heal over time. if not present, try it first
|
||||
if(!tar->FindType(SE_HealOverTime)) {
|
||||
selectedMercSpell = GetBestMercSpellForRegularSingleTargetHeal(this);
|
||||
}
|
||||
selectedMercSpell = GetBestMercSpellForHealOverTime(this);
|
||||
|
||||
//get regular heal
|
||||
if(selectedMercSpell.spellid == 0) {
|
||||
selectedMercSpell = GetBestMercSpellForRegularSingleTargetHeal(this);
|
||||
//get regular heal
|
||||
if(selectedMercSpell.spellid == 0) {
|
||||
selectedMercSpell = GetBestMercSpellForRegularSingleTargetHeal(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(selectedMercSpell.spellid == 0) {
|
||||
selectedMercSpell = GetFirstMercSpellForSingleTargetHeal(this);
|
||||
}
|
||||
}
|
||||
|
||||
if(selectedMercSpell.spellid > 0) {
|
||||
@ -5598,6 +5590,9 @@ void Client::SpawnMercOnZone()
|
||||
GetMercInfo().SuspendedTime = 0;
|
||||
// Get merc, assign it to client & spawn
|
||||
if(database.LoadMercInfo(this)) {
|
||||
if(!CheckCanUnsuspendMerc()){
|
||||
return;
|
||||
}
|
||||
Merc* merc = Merc::LoadMerc(this, &zone->merc_templates[GetMercInfo().MercTemplateID], 0, true);
|
||||
SpawnMerc(merc, false);
|
||||
SendMercTimerPacket(merc->GetID(), 5, GetMercInfo().SuspendedTime, GetMercInfo().MercTimerRemaining, RuleI(Mercs, SuspendIntervalMS));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user