[Spells] AE Duration effect (Rains) will now work with Target Ring and PBAE spells. (#2000)

* done

* Update beacon.cpp

* [Spells] AE Duration effect (Rains) will now work with Target Ring and PBAE spells.

Mackals suggestions implemented.
This commit is contained in:
KayenEQ
2022-02-16 10:12:13 -05:00
committed by GitHub
parent 8ec80644ee
commit ba3c19ad0b
5 changed files with 47 additions and 19 deletions
+7 -4
View File
@@ -52,10 +52,10 @@ extern Zone* zone;
// if lifetime is 0 this is a permanent beacon.. not sure if that'll be
// useful for anything
Beacon::Beacon(Mob *at_mob, int lifetime)
Beacon::Beacon(const glm::vec4 &in_pos, int lifetime)
:Mob
(
nullptr, nullptr, 0, 0, 0, INVISIBLE_MAN, 0, BT_NoTarget, 0, 0, 0, 0, 0, at_mob->GetPosition(), 0, 0, 0,
nullptr, nullptr, 0, 0, 0, INVISIBLE_MAN, 0, BT_NoTarget, 0, 0, 0, 0, 0, in_pos, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, EQ::TintProfile(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false
),
remove_timer(lifetime),
@@ -121,16 +121,19 @@ bool Beacon::Process()
void Beacon::AELocationSpell(Mob *caster, uint16 cast_spell_id, int16 resist_adjust)
{
if(!IsValidSpell(cast_spell_id) || !caster)
if (!IsValidSpell(cast_spell_id) || !caster) {
return;
}
caster_id = caster->GetID();
spell_id = cast_spell_id;
this->resist_adjust = resist_adjust;
spell_iterations = spells[spell_id].aoe_duration / 2500;
spell_iterations = spell_iterations < 1 ? 1 : spell_iterations; // at least 1
if (spells[spell_id].aoe_max_targets)
if (spells[spell_id].aoe_max_targets) {
max_targets = spells[spell_id].aoe_max_targets;
}
spell_timer.Start(2500);
spell_timer.Trigger();
}