mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 19:51:29 +00:00
Correct when tanks can be hit by AE Rampage
Tanks will only be hit by AE Rampage if they're the only one on the NPC's hate list. Others on hate list out ranging AE Rampage will also prevent the tank from being hit by AE Rampage.
This commit is contained in:
parent
ffb9323a98
commit
ace81215a1
@ -575,12 +575,19 @@ int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOption
|
||||
if (!target || !caster)
|
||||
return 0;
|
||||
|
||||
// tank will be hit ONLY if they are the only target on the hate list
|
||||
// if there is anyone else on the hate list, the tank will not be hit, even if those others aren't hit either
|
||||
if (list.size() == 1) {
|
||||
caster->ProcessAttackRounds(target, opts);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int hit_count = 0;
|
||||
// This should prevent crashes if something dies (or mainly more than 1 thing goes away)
|
||||
// This is a temp solution until the hate lists can be rewritten to not have that issue
|
||||
std::vector<uint16> id_list;
|
||||
for (auto &h : list) {
|
||||
if (h->entity_on_hatelist && h->entity_on_hatelist != caster &&
|
||||
if (h->entity_on_hatelist && h->entity_on_hatelist != caster && h->entity_on_hatelist != target &&
|
||||
caster->CombatRange(h->entity_on_hatelist))
|
||||
id_list.push_back(h->entity_on_hatelist->GetID());
|
||||
if (count != -1 && id_list.size() > count)
|
||||
|
||||
@ -2255,8 +2255,6 @@ void Mob::AreaRampage(ExtraAttackOptions *opts)
|
||||
m_specialattacks = eSpecialAttacks::AERampage;
|
||||
index_hit = hate_list.AreaRampage(this, GetTarget(), rampage_targets, opts);
|
||||
|
||||
if(index_hit == 0)
|
||||
ProcessAttackRounds(GetTarget(), opts);
|
||||
m_specialattacks = eSpecialAttacks::None;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user