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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-31-2009, 03:02 PM
drakelord
Hill Giant
 
Join Date: Nov 2002
Location: NC, USA
Posts: 182
Default Rune spells preventing stun

From what I remember on EQ Live, if a caster had a Rune spell casted on them to absorb damage, and an enemy that was attacking them used a melee based stun skill such as Bash, it would not stun the caster unless the damage exceeded the rune amount.

This is currently not the case on the emulator.

Replace in attack.cpp, under the common damage functions
Code:
		if ((skill_used == BASH || skill_used == KICK && (attacker && attacker->GetLevel() >= 55)) && GetLevel() < 56) {
			int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
			if(this->GetBaseRace() == OGRE && this->IsClient() && !attacker->BehindMob(this, attacker->GetX(), attacker->GetY())) {
				mlog(COMBAT__HITS, "Stun Resisted. Ogres are immune to frontal melee stuns.");
			} else {
				if(stun_resist <= 0 || MakeRandomInt(0,99) >= stun_resist) {
					mlog(COMBAT__HITS, "Stunned. We had %d percent resist chance.");
					Stun(0);
				} else {
					mlog(COMBAT__HITS, "Stun Resisted. We had %dpercent resist chance.");
				}
			}
		}
With

Code:
		if (damage > 0 && ((skill_used == BASH || skill_used == KICK && (attacker && attacker->GetLevel() >= 55)) && GetLevel() < 56)) {
			int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
			if(this->GetBaseRace() == OGRE && this->IsClient() && !attacker->BehindMob(this, attacker->GetX(), attacker->GetY())) {
				mlog(COMBAT__HITS, "Stun Resisted. Ogres are immune to frontal melee stuns.");
			} else {
				if(stun_resist <= 0 || MakeRandomInt(0,99) >= stun_resist) {
					mlog(COMBAT__HITS, "Stunned. We had %d percent resist chance.");
					Stun(0);
				} else {
					mlog(COMBAT__HITS, "Stun Resisted. We had %dpercent resist chance.");
				}
			}
		}
This code takes advantage of the fact that the rune effects are taken into account to reduce the damage before this is called under the common damage functions.
__________________
Hmm.
Reply With Quote
  #2  
Old 09-27-2009, 12:39 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Added to revision 995.
Reply With Quote
Reply


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 11:23 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3