EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Titanium Necro FD Fix (https://www.eqemulator.org/forums/showthread.php?t=20783)

unicorn97211 06-12-2006 04:12 PM

Titanium Necro FD Fix
 
Currently if you feign and the mob has one of your dots active on it, every tick the mob will add you back to his hate list even though you are FD. This took care of it for me....

In attack.cpp->Mob->CommonDamage change
Code:

        if(attacker && damage != -5) {        //no hate if we are completely immune, just laugh it off
                sint32 hate = 0;
                if (attack_skill == ARCHERY)
                        hate = 1;        // almost no aggro for archery
                else if(damage < 1)
                        hate = 1;
                else if(spell_id != SPELL_UNKNOWN)
                        hate = (damage+1) / 2;        // half aggro for spells
                else
                        hate = damage; // normal aggro for everything else
               
                mlog(COMBAT__HITS, "Generating hate %d towards %s", hate, attacker->GetName());
                // now add done damage to the hate list
                AddToHateList(attacker, hate, damage, true, false, iBuffTic);
        }

to

Code:

        if(attacker && damage != -5) {        //no hate if we are completely immune, just laugh it off
                sint32 hate = 0;
                if (attack_skill == ARCHERY)
                        hate = 1;        // almost no aggro for archery
                else if(damage < 1)
                        hate = 1;
                else if(spell_id != SPELL_UNKNOWN)
                        hate = (damage+1) / 2;        // half aggro for spells
                else
                        hate = damage; // normal aggro for everything else
               
                // EverHood 6/12/06
                if(attacker->IsClient()){
                        // check if attacker is feigned
                        if(attacker->CastToClient()->GetFeigned()){
                                hate = -1; // no hate for feigned attackers
                        }
                }
               
                if(hate != -1){
                        // attacker generated some hate so
                        // add damage done by attacker to the hate list
                        mlog(COMBAT__HITS, "Generating hate %d towards %s", hate, attacker->GetName());
                        AddToHateList(attacker, hate, damage, true, false, iBuffTic);
                }

        }

Let me know if this works for anyone else or if it causes any problems my limited testing didn't reveal.

Gameross 06-13-2006 09:28 AM

That's how it's supposed to work I believe...thus you just have to wait for the DOT to pass before standing.

unicorn97211 06-13-2006 10:06 AM

Quote:

Originally Posted by Gameross
That's how it's supposed to work I believe...thus you just have to wait for the DOT to pass before standing.

If you use this code fix, then yes it will work that way. If you do not add this fix, a necro/sk will be attacked while still feigned if a DoT is active on the mob.

If you want to recreate this bug:

1. Make a necro high enough level to have DoTs to cast.
2. Cast any given DoT on a mob.
3. Feign Death.

You'll notice that while you are feigned, the next tick of the DoT, the mob will resume attacking you even though you have not stood up.

There are two other bugs with Feign Death that I'm currently trying to fix.

1) Pets suicide when you feign. I currently have disabled this but I need to do more testing to see what the side effects are.

2) Feign Memory is adding me back to the hate list immediately after feigning. This does not happen consistantly. It seems to be a timing issue where Feign Memory is being checked in Process before I have finished feigning sometimes.

I played a necro on live for over 5 years, I know exactly what should be expected when I FD which is why I'm trying to fix these issues because they drive me nuts!

Gameross 06-13-2006 03:39 PM

Oh, I misunderstood the issue. If the mob attacks you on a tick after a successful FD, then that is broken.

As for pets beaming up, ya, I hate that. I have played a SK on emu and of course that happens for them too.

Sony made that change because necros were just AFKing FD with pet up and collection faction. So they changed it so pets would disappear after 2 minutes of being FD.

They then changed the code so pets don't agro mobs on their own anymore(much much much needed change!), but they never changed the disappearing pet back like they should. But then, of course, they never fix a kludge they've made when they finally come up with a better method.

To that, I say, Emu should just not have pets disappear at all when one FDs. It was a kludge fix Sony made and it's not always good to emulate everything Sony does.

vales 06-13-2006 05:22 PM

That's awesome work! :) *bookmarks the topic*

If this and the lull line works, then nothing would be stopping us from doing and actual raid, lol. I'll compile the code a bit later, though. I'll wait to see if you have anything else to add to it. :p Thanks again for the insight.

fathernitwit 06-18-2006 06:30 AM

thanks for this fix, I got the dot fix in... im not 100% convinced that you should never ever get aggro if you are feigned, but I will accept it for now. I also disabled the pet killing on feign death thing by default, its now an option in features.h


All times are GMT -4. The time now is 07:18 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.