Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2009, 08:43 AM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default Berserker Rage Volley Fix

File: zone/spell_effects.cpp
Line: 275

From:

Code:
if(spells[spell_id].skill == ARCHERY || spells[spell_id].skill == THROWING)
{
To:

Code:
//Wolftousen Rage Volley will bypass spell code and work like a normal throwing attack with 100% chance to hit
//check to see if Rage Volley is being cast and that we are a client since mobs do not use this spell
if(spell_id == 6754 && caster->IsClient())
{
	//do a normal throwing attack instead of a"magic" attack to apply proper bonuses
	caster->ThrowingAttack(caster->GetTarget());
	break;
}
else if(spells[spell_id].skill == ARCHERY || spells[spell_id].skill == THROWING)
{
Description: This is to get Rage Volley working properly. It subverts the normal spell attack and uses the ThrowingAttack function to apply proper bonuses and chance to hit. There is also something you need to do to the ChanceToHit function to insure that Rage Volley works properly in this manner: http://www.eqemulator.net/forums/showthread.php?t=27640
Reply With Quote
  #2  
Old 03-07-2009, 09:06 AM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default

Bah, scratch this for now, just realized that the ThrowingAttack function checks the attack timer. Will need a way around it if the discipline is to work this way.
Reply With Quote
  #3  
Old 03-07-2009, 09:15 AM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default

Or add the following to -

File: zone/special_attack.cpp
Line: 897

From:
Code:
DeleteItemInInventory(ammo_slot, 1, true);
CheckIncreaseSkill(THROWING);
To:
Code:
if(!isCasting() || CastingSpellID() != 6754) //if we are casting Rage Volley Discipline, we do not use up ammo and do not skill up
{
	DeleteItemInInventory(ammo_slot, 1, true);
	
	CheckIncreaseSkill(THROWING);
}
And

File: zone/special_attack.cpp
Line: 759

From:

Code:
if((attack_timer.Enabled() && !attack_timer.Check(false)) || (ranged_timer.Enabled() && !ranged_timer.Check())) {
	mlog(COMBAT__RANGED, "Throwing attack canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
	Message(0, "Error: Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
	return;
}
To:

Code:
if(!isCasting() || CastingSpellID() != 6754) //if we are casting Rage Volley Discipline, ignore the throwing attack timer
{
	if((attack_timer.Enabled() && !attack_timer.Check(false)) || (ranged_timer.Enabled() && !ranged_timer.Check())) {
		mlog(COMBAT__RANGED, "Throwing attack canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
		Message(0, "Error: Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
		return;
	}
}
Reply With Quote
  #4  
Old 03-07-2009, 09:30 AM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default

Also need to change this, Rage Volley never showed a resist message on live, it only ever showed miss messages (this may be able to be fixed in the spells_en.txt, i dunno though):

File: zone/spells.cpp
Line: 2,433

From:

Code:
if(IsResistableSpell(spell_id))
To:

Code:
if(spell_id != 6754 && IsResistableSpell(spell_id)) //Rage Volley is not resistable
Reply With Quote
  #5  
Old 03-07-2009, 04:06 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Just a recommendation, but it would be better to use IsEffectInSpell(spellid, effect) than hard coding the spell ID, in case it changes or there is a newer, similar spell down the line (or if someone wants to create a custom spell). You might even want to add a new function to both check if it's the skill attack (SE_SkillAttack) & return what skill is being used.

On a side note, it's awesome that you've been putting all of this work into adding & fixing AAs. I started working on making AAs more like spells as far as how they're calculated (every time we run CalcBonuses()), but ran into a roadblock because we would have to run ~1600 queries to the database every time we calculate bonuses (see Client::CalcAABonuses()). The alternative is to load AAs into shared memory, but I haven't had a chance to jump into that within the past several months. If we can do that, then we just have to modify the StatBonuses struct to incorporate the new effects. Then, when we run the checks in the code, it would look something like this:
Code:
int bonus = itembonuses.AC + spellbonuses.AC + aabonuses.AC
Then, once we have all of the AA & spell effects in (the ones that aren't currently), new AAs are just a matter of adding to the database.

In the long run, I think it would be better if we can get this happening, since we're going to have to go back & make changes to all of the AAs we're putting in now once we do this (but going forward, it will be a lot easier).
__________________
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 03-08-2009, 02:58 AM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default

Right, I was just trying to get the ability working in anyway possible before going into more depth with messing around with things. This code is so disorganized and uncommented it took me forever just to locate and follow the path that the Rage Volley Disc took, this quick "hack" was a way to see if it would start working right. I hadn't downloaded the latest SVN when I put this stuff in so I'm going back through and updating line numbers now. (Rage Volley isn't an AA btw if you thought it was)

I know Rage Volley is just the 1st of several Volley abilities, again, just a quick "hack" to get the ability working properly until a better solution can be done.

Adjusted line numbers for latest SVN.

File: zone/spells.cpp
Line: 2,433 should be 2,724

File: zone/special_attacks.cpp
Line: 897 should be 1,057
Line: 759 should be 934

File: zone/spell_effects.cpp
Line: 275 should be 2,233
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 06:01 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