EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Procs - Level Limit (https://www.eqemulator.org/forums/showthread.php?t=40349)

provocating 01-22-2016 12:29 PM

Procs - Level Limit
 
Found a small bug today. I am not sure if this was something introduced with the newer source or not, no one noticed it with our old source Back in January 2015. Using something like a Throneblade of Ykesha (sp), which is a level 47 proc on lets say a level 41 Necro pet it will proc sometimes. Most of the time you get a "Your pets will is not sufficient", other times it gets right through. I have done multiple parses and with this combination it is around 1/5 times the proc makes it past some check.

provocating 01-22-2016 01:33 PM

Okay dug further into the code. When the weapon is failing proc, it is failing where it should. When the weapon is actually procing, it is here...

This is around line 3845 in attack.cpp

Code:

        if (!rangedattk) {
                        // Perma procs (AAs)
                        if (PermaProcs[i].spellID != SPELL_UNKNOWN) {
                                if (zone->random.Roll(PermaProcs[i].chance)) { // TODO: Do these get spell bonus?
                                        Log.Out(Logs::Detail, Logs::Combat,
                                                        "Permanent proc %d procing spell %d (%d percent chance)",
                                                        i, PermaProcs[i].spellID, PermaProcs[i].chance);
                                        ExecWeaponProc(nullptr, PermaProcs[i].spellID, on);
                                } else {
                                        Log.Out(Logs::Detail, Logs::Combat,
                                                        "Permanent proc %d failed to proc %d (%d percent chance)",
                                                        i, PermaProcs[i].spellID, PermaProcs[i].chance);
                                }
                        }


provocating 01-22-2016 01:46 PM

Here is a hit.

Code:

[Fri Jan 22 10:52:54 2016] [Combat] Proc chance 0.11 (9.75 from bonuses)
[Fri Jan 22 10:52:54 2016] [Combat] Proc chance 0.11 (9.75 from bonuses)
[Fri Jan 22 10:52:54 2016] [Combat] Permanent proc 0 failed to proc 445 (10 percent chance)
[Fri Jan 22 10:52:54 2016] [Combat] Permanent proc 1 procing spell 945 (3 percent chance)
[Fri Jan 22 10:52:54 2016] [Combat] Applying damage 75 done by Zibekn000 with skill 52 and spell 945, avoidable? no, is not a buff tic in slot -2
[Fri Jan 22 10:52:54 2016] a giant skeleton was hit by non-melee for 75 points of damage.
[Fri Jan 22 10:52:54 2016] [Combat] Stunned. We had 0 percent resist chance.
[Fri Jan 22 10:52:54 2016] A giant skeleton has been struck by the force of Ykesha.

And in the same battle, a miss because of level restriction on the item.

Code:

[Fri Jan 22 10:53:15 2016] Zibekn slashes a giant skeleton for 59 points of damage.
[Fri Jan 22 10:53:15 2016] [Combat] Proc chance 0.11 (9.75 from bonuses)
[Fri Jan 22 10:53:15 2016] [Combat] Tried to proc (Throneblade of the Ykesha), but our level (41) is lower than required (46)
[Fri Jan 22 10:53:15 2016] Your pet's will is not sufficient to command its weapon.


Uleat 01-22-2016 01:55 PM

So, spell '945' is proc'ing ok..but, spell '445' is not?

provocating 01-22-2016 01:56 PM

Yep. Still digging into the issue though

Uleat 01-22-2016 01:59 PM

Almost sounds like a required vs recommended level thing.

demonstar55 01-22-2016 02:07 PM

https://github.com/EQEmu/Server/blob...ables.cpp#L332

provocating 01-22-2016 02:18 PM

My line in my source looks just like that? May have to spell it out for me Demonstar.

Uleat 01-22-2016 02:21 PM

That's where the proc is added to the npc.

You could probably add a level check there to eliminate level-based failures.

provocating 01-22-2016 02:30 PM

I think I have it, adding some code in now.

demonstar55 01-22-2016 02:30 PM

It's adding the proc to the "PermaProcs" for some reason. I have no idea why, but it looks like that gives the NPC 2 chances to proc a proc from a weapon.

provocating 01-22-2016 03:11 PM

Quote:

Originally Posted by demonstar55 (Post 246694)
It's adding the proc to the "PermaProcs" for some reason. I have no idea why, but it looks like that gives the NPC 2 chances to proc a proc from a weapon.

I am seeing the exact same thing, there is no reason for it to get that far into the code.

Uleat 01-22-2016 04:54 PM

Are you saying that client pets should not be processing this: https://github.com/EQEmu/Server/blob...ables.cpp#L224


EDIT: What I'm seeing is the possibility of two calls to this function..one with the primary weapon, the other with the secondary weapon.

This would allow a proc from each weapon to be added to the pet's weapon proc list.


EDIT2: There is a log message for debug > '11' here: https://github.com/EQEmu/Server/blob...ables.cpp#L234

provocating 01-22-2016 05:09 PM

Code:

                if (foundslot == MainPrimary) {
                        if (item2->Proc.Effect != 0 && CastToMob()->GetLevel() > item2->Proc.Level) {
                                CastToMob()->AddProcToWeapon(item2->Proc.Effect, true);
                        }


This appears to be working. Is this safe or is there a better way of doing it?

demonstar55 01-22-2016 05:11 PM

Quote:

Originally Posted by provocating (Post 246699)
Code:

                if (foundslot == MainPrimary) {
                        if (item2->Proc.Effect != 0 && CastToMob()->GetLevel() > item2->Proc.Level) {
                                CastToMob()->AddProcToWeapon(item2->Proc.Effect, true);
                        }


This appears to be working. Is this safe or is there a better way of doing it?

Well, the fact that sometimes it was working tells me it's got 2 chances to proc, so the code should probably be removed, but I haven't had time to look over everything.


All times are GMT -4. The time now is 02:53 AM.

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