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

Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2009, 12:47 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

This needs a bit of work before it can be committed. ThrowingAttack is a member of Client, not Mob. So, it would look something like:

Client *c=CastToClient();
c->ThrowingAttack(target);

However, I don't agree with that method. To the client, Rage Volley is a spell and it should be treated as such. Even if its effects need to be added manually that would be fine, though I would imagine that is handled by the spell data. The change in spells.cpp is not needed as whether a spell is resistible or not is handled by the spell data. The change to the ammo consumption causes zone to crash, however again the spell data for Rage Volley does not consume an item, so it wouldn't anyway (and testing it without your code proves me correct.) A minor detail, but important isCasting has to be IsCasting. Also, I agree with AndMetal, spellids should only be specified to exempt if the spelltype cannot be used for whatever reason (and I can only think of two situations in the code where this happens.) I would take a look at the spell data: http://lucy.allakhazam.com/spell.htm...54&source=Live and figure out what it handles. You might find you can nail it all in a line or two.
Reply With Quote
  #2  
Old 03-09-2009, 03:35 AM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default

Ok, i understand and also agree. All of this was just a first glance "how can I get this working properly with what is already here" thing. That link to lucy is what i have been using, this code is just all over the place and hard to do things with...

The issue with this spell specifically at the moment is:
1. It is not supposed to be resistable period, I have gotten resist messages with it in game.
2. The attacks it does are supposed to hit 100% of the time
3. The skill mod the spell applies to the characters skill is not applied when calculating damage.
4. The berserker AA damage mods are not taken into account when calculating damage.

Solving #1: I'm not sure about how to do this, in lucy it says UNRESISTABLE, yet when i randomly tried it on an iksar guard outside sebilis I got a resist message with it, though that is the only one I have seen and may be a fluke. Put this off until I see it again or someone else does.

Solving #2: (this is the biggest issue, i've only seen issue #1 a few times on PEQ)
This issue is caused by line 2,290 in zone/spell_effects.cpp. It does a normal CheckHitChance as if it were a regular melee attack and does not take into account any spell accuracy modifiers as far as I can tell after examining the lines of code in CheckHitChance. I don't have experience with other melee classes discs to know whether or not they are unavoidable, so completely omitting this section could be bad. The if statement here that uses wpnD confuses me and seems like it's only purpose is to force a CheckHitChance.

After looking/finding a monk disc that is similar: http://lucy.allakhazam.com/spellraw....52&source=Live I believe that the base2_# that corrisponds to the base# is the hit chance mod and if it is 10000 it is a 100% hit chance.

So to test/fix this we should edit line 2,290 in zone/spell_effects.cpp:
From:
Code:
if(CheckHitChance(caster, spells[spell_id].skill, 13))
To: (i is the EFFECT_COUNT counter the for loop is using)
Code:
if(spells[spell_id].base2[i] == 10000 || CheckHitChance(caster, spells[spell_id].skill, 13))
Solving #3: This can be done by changing line 2,240. This should probably be done for all the damage calcs under the SkillAttack effect, but to see if i'm right just do it for throwing/archery and we'll test with rage volley.

From:
Code:
dam = effect_value + itm->GetItem()->Damage * 2 + (itm->GetItem()->Damage * (GetSkill(spells[spell_id].skill) + GetDEX()) / 225);
To: spells[spell_id].base[i] (i is the EFFECT_COUNT counter the for loop is using)
Code:
dam = effect_value + itm->GetItem()->Damage * 2 + (itm->GetItem()->Damage * (GetSkill(spells[spell_id].skill) + spells[spell_id].base[i] + GetDEX()) / 225);
Solving #4: Easily solved by moving the AA check from throwing attack to ApplyMeleeDamageBonus function like so:

Take lines 1,015 to 1,027 from zone/special_attacks.cpp:
Code:
switch(GetAA(aaThrowingMastery))
{
	case 1:
		MaxDmg = MaxDmg * 115/100;
		break;
	case 2:
		MaxDmg = MaxDmg * 125/100;
		break;
	case 3:
		MaxDmg = MaxDmg * 150/100;
		break;
}
And insert them into zone/attack.cpp at line 4,762 (Don't forget to remove from ThrowingAttack function or else it will get done twice). This will cause both a normal throwing attack and a spell based throwing attack to catch these bonuses.
Reply With Quote
  #3  
Old 03-09-2009, 04:07 AM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default

Almost forgot, when doing the solution for #4, you need to put the switch statement in a if block and test the skill for type THROWING since the ApplyMeleeDamageBonus doesn't know that automatically. This way the damage bonus only gets applied if it is a throwing attack, like it should...

Code:
if(skill == THROWING)
{
	switch(GetAA(aaThrowingMastery))
	{
		case 1:
			MaxDmg = MaxDmg * 115/100;
			break;
		case 2:
			MaxDmg = MaxDmg * 125/100;
			break;
		case 3:
			MaxDmg = MaxDmg * 150/100;
			break;
	}
}
Reply With Quote
  #4  
Old 03-09-2009, 05:23 AM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default

I'm not sure I like the solution to #4 quite yet, but it does get it partially in there. I realize that you want to view Rage Volley and other melee discs as spells, but not wanting to send it down the same path as a melee/ranged attack doesn't work out unless you want to repeat tons of code and make it even more ugly than it already is.

If you go to goberserker.com and ask if base damage bonuses, aa bonuses, item bonuses and spell bonuses apply to Rage Volley, you will get a very load yes. The current way this is set up, you get none of those bonuses period. Discs are Spells that cause modified physical attacks, thus they should always go down the physical attack pipeline and pick up bonuses along the way.

Also, the way it is set up, the min dmg is always 1 for discs that cause attacks. This isn't right either as Volley never hits for 1 on live.

The way this should work (at least for Rage Volley instance) is in SE_SkillAttack, if it is throwing skill, spells[spell_id].base[i] should be added to the mobs throwing skill and spells[spell_id].base2[i] should be added to the mobs throwing skill accuracy. After that, the 4 attacks should take place and then the modifications to the mobs throwing skill and throwing accuracy should be undone.

I thought about pilling all the damage bonuses for all physical attacks into ApplyMeleeDamageBonus function, but that still leaves the issue of min dmg on discs being 1.

I'm going to work on a better solution for #4, but I can tell you now that it is going to go down that same pipeline as a normal melee/ranged attack b/c that is what it does on live.
Reply With Quote
  #5  
Old 03-09-2009, 02:04 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

It looks like the main reason Rage Volley doesn't work is we don't have SE_SkillAttack implemented. If we implement the spell effect, it should, as a result, implement Rage Volley, since all Rage Volley does it attempt 4 round kicks (skill 38) based on the spell info. Everything else, like it being unresistable, should still be handled by the spell code.
__________________
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-09-2009, 02:33 PM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default

It's not that it isn't working. It is working, it just isn't working as intended. it gets to and does SE_SkillAttack in spell_effects.cpp. But, that isn't the end of it b/c of the way SE_SkillAttack is currently functioning, it just needs to be fixed.
Reply With Quote
  #7  
Old 03-09-2009, 03:20 PM
Wolftousen
Sarnak
 
Join Date: Apr 2008
Posts: 49
Default

Also, you are interpreting the spell data wrong... The Skill Attack(3 is the bonus it applies to the skill being used with the spell. The skill being used is specified elseware in the rawdata if you scroll down. This ability does 4 throwing attacks. Zerkers don't get round kick and since this is a zerker only ability it would make no sense for it to use round kick...
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 02:31 PM.


 

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