mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
[Bug Fix] Spells - Self Only (Yellow) cast when non group member is targeted (#4503)
* [Bug Fix] Spells - Self Only (Yellow) cast when non group member is targeted When using a Yellow gem invis spell, it should cast on yourself regardless of the targetted entity. * Update spells.cpp --------- Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
This commit is contained in:
parent
178129443f
commit
8f86cb353e
@ -821,14 +821,12 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
|
||||
}
|
||||
|
||||
if (!spell_target) {
|
||||
if (IsGroupSpell(spell_id)){
|
||||
if (IsGroupSpell(spell_id)) {
|
||||
return true;
|
||||
}
|
||||
else if (spells[spell_id].target_type == ST_Self) {
|
||||
} else if (spells[spell_id].target_type == ST_Self) {
|
||||
spell_target = this;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (IsGroupSpell(spell_id) && spell_target != this) {
|
||||
ignore_on_casting = true;
|
||||
}
|
||||
@ -942,7 +940,13 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
|
||||
/*
|
||||
Requires target to be in same group or same raid in order to apply invisible.
|
||||
*/
|
||||
if (check_on_casting && RuleB(Spells, InvisRequiresGroup) && IsInvisibleSpell(spell_id)) {
|
||||
if (
|
||||
check_on_casting &&
|
||||
spells[spell_id].target_type != ST_Self &&
|
||||
GetTarget() != this &&
|
||||
RuleB(Spells, InvisRequiresGroup) &&
|
||||
IsInvisibleSpell(spell_id)
|
||||
) {
|
||||
if (IsClient() && spell_target && spell_target->IsClient()) {
|
||||
if (spell_target && spell_target->GetID() != GetID()) {
|
||||
bool cast_failed = true;
|
||||
@ -954,8 +958,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
|
||||
(target_group->GetID() == my_group->GetID())) {
|
||||
cast_failed = false;
|
||||
}
|
||||
}
|
||||
else if (spell_target->IsRaidGrouped()) {
|
||||
} else if (spell_target->IsRaidGrouped()) {
|
||||
Raid *target_raid = spell_target->GetRaid();
|
||||
Raid *my_raid = GetRaid();
|
||||
if (target_raid &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user