mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-21 02:58:27 +00:00
Implemented spell Target Type (45) 'Target Rings' on Underfoot.
Thanks to Lecht for figuring out op code side of it.
This commit is contained in:
+11
-3
@@ -764,8 +764,14 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_
|
||||
continue;
|
||||
if (curmob == caster && !affect_caster) //watch for caster too
|
||||
continue;
|
||||
|
||||
dist_targ = center->DistNoRoot(*curmob);
|
||||
|
||||
if (spells[spell_id].targettype == ST_Ring){
|
||||
dist_targ = curmob->DistNoRoot(caster->GetTargetRingX(), caster->GetTargetRingY(),caster->GetTargetRingZ());
|
||||
}
|
||||
else if (center){
|
||||
dist_targ = center->DistNoRoot(*curmob);
|
||||
}
|
||||
|
||||
if (dist_targ > dist2) //make sure they are in range
|
||||
continue;
|
||||
if (dist_targ < min_range2) //make sure they are in range
|
||||
@@ -787,7 +793,9 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_
|
||||
if (bad) {
|
||||
if (!caster->IsAttackAllowed(curmob, true))
|
||||
continue;
|
||||
if (!center->CheckLosFN(curmob))
|
||||
if (center && !center->CheckLosFN(curmob))
|
||||
continue;
|
||||
if (!center && !caster->CheckLosFN(caster->GetTargetRingX(), caster->GetTargetRingY(),caster->GetTargetRingZ(), curmob->GetSize()))
|
||||
continue;
|
||||
} else { // check to stop casting beneficial ae buffs (to wit: bard songs) on enemies...
|
||||
// This does not check faction for beneficial AE buffs..only agro and attackable.
|
||||
|
||||
Reference in New Issue
Block a user