Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-16-2009, 10:01 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

There has been a bit of discussion about this over at PEQ's forums in this thread if you're interested in following it. In the meantime, Derision added a bit of a fix to the problem in revision 519, but it still needs more work.
Reply With Quote
  #2  
Old 05-16-2009, 12:31 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

well your guys broke soemthing =)
cuase i played my Sk back in January and everything was procing just fine =P
Reply With Quote
  #3  
Old 05-22-2009, 05:26 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

so any update on fixes for broken procs?

I just took rangers call of the sky and during 15 min it didn't proc even once.
at same time i took a regular weapon with proc- and it proced many many times

running Rev 535 btw
Reply With Quote
  #4  
Old 05-26-2009, 11:00 AM
warhawk
Sarnak
 
Join Date: Mar 2008
Posts: 47
Default

Can confirm that Call of sky is not working. not one proc in 30 mins. This is on the Grand creation.
Reply With Quote
  #5  
Old 06-03-2009, 04:06 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

From what I can gather after looking through the source, we didn't used to take into account the chance the spell had to proc, which I believe is what Wolftousen was trying to correct (and for the most part did). That's what iChance is for in Mob:AddProcToWeapon():
Code:
bool Mob::AddProcToWeapon(int16 spell_id, bool bPerma, int16 iChance) {
	if(spell_id == SPELL_UNKNOWN)
		return(false);

	int i;
	if (bPerma) {
 		for (i = 0; i < MAX_PROCS; i++) {
			if (PermaProcs[i].spellID == SPELL_UNKNOWN) {
				PermaProcs[i].spellID = spell_id;
				PermaProcs[i].chance = iChance;
				PermaProcs[i].pTimer = NULL;
				mlog(SPELLS__PROCS, "Added permanent proc spell %d with chance %d to slot %d", spell_id, iChance, i);

				return true;
			}
		}
		mlog(SPELLS__PROCS, "Too many perma procs for %s", GetName());
    } else {
		for (i = 0; i < MAX_PROCS; i++) {
			if (SpellProcs[i].spellID == SPELL_UNKNOWN) {
				SpellProcs[i].spellID = spell_id;
				SpellProcs[i].chance = iChance;
				SpellProcs[i].pTimer = NULL;
				mlog(SPELLS__PROCS, "Added spell-granted proc spell %d with chance %d to slot %d", spell_id, iChance, i);
				return true;
			}
		}
		mlog(SPELLS__PROCS, "Too many procs for %s", GetName());
	}
    return false;
}
However, I don't think there's any need to change the calculation for the chance to proc, just make sure we're taking it into account:
zone/attack.cpp
Code:
		if (SpellProcs[i].spellID != SPELL_UNKNOWN) {
			int chance = ProcChance * (SpellProcs[i].chance);
			if(MakeRandomInt(0, 100) < chance) {
				mlog(COMBAT__PROCS, "Spell proc %d procing spell %d (%d percent chance)", i, SpellProcs[i].spellID, chance);
				ExecWeaponProc(SpellProcs[i].spellID, on);
			} else {
				mlog(COMBAT__PROCS, "Spell proc %d failed to proc %d (%d percent chance)", i, SpellProcs[i].spellID, chance);
			}
		}
The biggest problem we're running into now is the default for SpellProcs[i].chance for several spells is 0, so we're multiplying by 0. What we should probably be doing is adding a percentage if it's not zero.

From the PEQ Forums:
Quote:
This will fix any proc that comes from a buff/spell. CD has the new fix for it that will make these procs account for the PROC_RATE_MOD you find in a lot of their discriptions (this was previously not being taken into account). So for BL pets, they will proc 1.5x as much as a normal character with their stats would with that proc (BL pet buffs have a mod of 150...), spirit of puma willl proc 4x more, etc...
If that's the case, we should be able to change this in zone/attack.cpp:
Code:
		int16 spid = SpellProcs[i].spellID;
		if (spid != SPELL_UNKNOWN) {
			int8 spc = SpellProcs[i].chance;
			int chance = ProcChance;
			if (spc > 0) {
				chance = ProcChance * spc / 100;
				mlog(COMBAT__PROCS, "Proc mod on spell proc %d (spell %d): adjusting chance from %d to %d (%d mod)", i, spid, ProcChance, chance, spc);
			}
			if(MakeRandomInt(0, 100) < chance) {
				mlog(COMBAT__PROCS, "Spell proc %d procing spell %d (%d percent chance)", i, spid, chance);
				ExecWeaponProc(spid, on);
			} else {
				mlog(COMBAT__PROCS, "Spell proc %d failed to proc %d (%d percent chance)", i, spid, chance);
			}
		}
That way if it's 0 or negative, we don't mess with it, and if it's 400, we're multiplying by 4.

On a side note, there's a potential issue that could break this when zoning. From zone/client_packet.cpp:
Code:
                case SE_WeaponProc:
					{
					AddProcToWeapon(GetProcID(buffs[j1].spellid, x1), false, 100+spells[buffs[j1].spellid].base2[x1]);
					break;
					}
We should just be able to remove the 100+, and it should be good to go:
Code:
                case SE_WeaponProc:
					{
					AddProcToWeapon(GetProcID(buffs[j1].spellid, x1), false, spells[buffs[j1].spellid].base2[x1]);
					break;
					}
I don't have a server up right now to compile & test, so if someone wants to give this a shot, feel free.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #6  
Old 06-04-2009, 04:01 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I actually took a bit to rework procs a few days back but my changelog note wasn't very clear. They *should* work correctly now.
Reply With Quote
  #7  
Old 06-06-2009, 08:23 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I did some checking, and it looks like we may be adding too much to the modifier from the spell:
Code:
[COMBAT__PROCS] Xamlagar: Proc chance 0.11 (0.07 from bonuses)
[COMBAT__PROCS] Xamlagar: Spell proc 0 failed to proc 3129 (10.7125 percent base + 100 percent spell mod = 10 percent chance)
[COMBAT__PROCS] Xamlagar: Spell proc 1 procing spell 6908 (10.7125 percent base + 500 percent spell mod = 53 percent chance)
[COMBAT__PROCS] Xamlagar: Proc chance 0.11 (0.07 from bonuses)
The first one is Call of Sky, which has a modifier of 0 (so it should be 100%). The second is Spirit of the Puma, which has a modifier of 400 (so it should be 400%).

I'm just not really sure if it would be better to put the check in Mob:TryWeaponProc() or Mob:AddProcToWeapon() rather than Mob:SpellEffect().
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:12 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3