FeenixServerProject / Wrath_3.3.5_Issue_tracker

The official issue tracker for Wrath 3.3.5
4 stars 4 forks source link

Chain Heal not jumping to additional targets when they are full life. #202

Closed Carpet123 closed 7 years ago

Carpet123 commented 7 years ago

I've noticed since starting the server as a resto shaman that the chain heal does not jump to targets if they are full life, which is not how it is supposed to work. Even if the raid members are full life it is suppose to jump. This means that trying to spread the Ancestral Healing buff to targets slightly harder and also means that Val'anyr, Hammer of Ancient Kings for resto shaman is alot worse.

HelloKitty commented 7 years ago

@Carpet123 Are you saying this behavior occurs when the initial chain target is full health or if there are no other targets around with a health deficit?

Carpet123 commented 7 years ago

@HelloKitty It occurs if there are no other targets around with a health deficit.

HelloKitty commented 7 years ago

I need to see some information that indicates chain heal should actually bounce to full HP targets. I'm unsure of the expected behavior.

Secondly, @Carpet123 I have identified why chain heal type spells do not select a target if there are nearby targets with no hp deficit.

It can be gathered from this target selection code in Spell.cpp's Spell::SearchChainTargets:

if (isChainHeal)
        {
            uint32 maxHPDeficit = 0;
            for (std::list<WorldObject*>::iterator itr = tempTargets.begin(); itr != tempTargets.end(); ++itr)
            {
                if (Unit* unit = (*itr)->ToUnit())
                {
                    uint32 deficit = unit->GetMaxHealth() - unit->GetHealth();
                    if ((deficit > maxHPDeficit || foundItr == tempTargets.end()) && target->IsWithinDist(unit, jumpRadius) && target->IsWithinLOSInMap(unit, ObjectIgnoreFlags::IGNORE_M2))
                    {
                        foundItr = itr;
                        maxHPDeficit = deficit;
                    }
                }
            }
        }

It later breaks out with no target if the foundItr is the end of the iterator.

If there is only ever a deficit of 0 nearby then it will select no targets, from what I can gather. The logic for selecting lowest deficit players would need to be changed. Though the expected behavior that you are describing needs to be verified.

Carpet123 commented 7 years ago

@HelloKitty I might be in the wrong actually now that I've actually properly looked into Chain Heal. I've Just went by how it works on several other servers, and chain heal has behaved that way on all that I've played. But however when I was looking into Chain Heal how it's supposed to actually work this could be how it's meant to be working as it was on retail. Thanks for showing code too

HelloKitty commented 7 years ago

@Carpet123 Hmmm, well if you find anything from back in the day describing that behavior let me know. It could be changed. I'm personally unsure how it's suppose to work. It's possible that the servers you play on are not up-to-date with TC. Though what I'm looking at is from 2016 Nov so maybe it has changed since then too.

Carpet123 commented 7 years ago

@HelloKitty Personally now that I took the time to properly investigate on how it was meant to work it's leaning towards this is the correct way that chain heal is actually supposed to work. I probably might of wanted to look into it more before but considering how chain heal worked here was different than on so many other servers, I most likely just assumed that this is how it was meant to work without actually having to question myself whether it was or not. Thank you for taking the time to look into this, I will look into more about chain heal in next couple days to completely confirm on how it's meant to work. You can most likely just close this issue for now.