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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-11-2010, 09:26 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default COMMITTED: Stun Resist

This seemed to be functioning incorrectly, it didnt have a message associated with it and it seemed to restrict players from being stunned by a bash if they are over level 55(which doesnt happen on live, otherwise there would be no point in stun resist on gear on any expansion in last 10 years). Also it now works for the AA stun resist.

attack
Code:
Index: attack.cpp
===================================================================
--- attack.cpp	(revision 1620)
+++ attack.cpp	(working copy)
@@ -3249,8 +3287,10 @@
 		}
     	
     	//check stun chances if bashing
-		if (damage > 0 && ((skill_used == BASH || skill_used == KICK && (attacker && attacker->GetLevel() >= 55)) && GetLevel() < 56)) {
+		if (damage > 0 && ((skill_used == BASH || skill_used == KICK && (attacker && attacker->GetLevel() >= 55)))) {
 			int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
+			if(IsClient())
+				stun_resist += aabonuses.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 {
@@ -3258,6 +3298,8 @@
 					mlog(COMBAT__HITS, "Stunned. We had %d percent resist chance.");
 					Stun(0);
 				} else {
+					if(IsClient())
+						this->Message(0,"You shake off the stun effect!");
 					mlog(COMBAT__HITS, "Stun Resisted. We had %dpercent resist chance.");
 				}
 			}
bonuses
Code:
Index: bonuses.cpp
===================================================================
--- bonuses.cpp	(revision 1620)
+++ bonuses.cpp	(working copy)
@@ -659,6 +659,9 @@
 			case SE_TotalHP:
 				newbon->HP += base1;
 				break;
+			case SE_StunResist:
+				newbon->StunResist += base1;
+				break;
 		}
 	}
spell effects
Code:
Index: spell_effects.cpp
===================================================================
--- spell_effects.cpp	(revision 1620)
+++ spell_effects.cpp	(working copy)
@@ -652,7 +652,19 @@
 				}
 				else
 				{
-					Stun(effect_value);
+					int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
+					if(IsClient())
+						stun_resist += aabonuses.StunResist;
+					if(stun_resist <= 0 || MakeRandomInt(0,99) >= stun_resist) {
+						mlog(COMBAT__HITS, "Stunned. We had %d percent resist chance.");
+						Stun(effect_value);
+					} 
+					else {
+						if(IsClient())
+							this->Message(0,"You shake off the stun effect!");
+						mlog(COMBAT__HITS, "Stun Resisted. We had %dpercent resist chance.");
+					}
+					
 				}
 				break;
 			}
Reply With Quote
 


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 05:08 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