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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 01-03-2008, 04:00 AM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default

Maybe I'm misunderstanding my own code, but I'm reading it as this:
Code:
	if (skill_used == BASH && GetLevel() < 56) {
			int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
			if((stun_resist <= 0 || MakeRandomInt(0,99) >= stun_resist) && ((this->GetBaseRace() != OGRE) || attacker->BehindMob(this, attacker->GetX(), attacker->GetY()))) {
				mlog(COMBAT__HITS, "Stunned. We had %dpercent resist chance.");
				Stun(0);
The stun roll lands. If the target is not an Ogre (not immune to stuns), or if the attacker is behind the target (no race is immune to stuns from melee attacks to the back), then proceed with the stun.

Code:
			} else if (this->GetBaseRace() == OGRE && this->IsClient() && !attacker->BehindMob(this, attacker->GetX(), attacker->GetY())) {
				//Message(15,"Ogres are immune to frontal melee stuns."); //Lieka Edit:  Debug message
				mlog(COMBAT__HITS, "Stun Resisted. Ogres are immune to frontal melee stuns.");
One of the following has happened to get us here:
The stun roll failed or the target is an Ogre.
If the target is an ogre, and the attacker is not behind the ogre (we checked this already in the previous step, but checking it again), then log that the stun was resisted because it was a an attempt at a frontal melee stun on an ogre.

Code:
	} else {
				mlog(COMBAT__HITS, "Stun Resisted. We had %dpercent resist chance.");
			}
		}
This is the catch all, but we should only get here if the stun roll failed, so log that it failed.


Maybe I'm missing something, but I've had the code live on my server for quite a while without any further complaints about Ogres getting stunned.

Dax
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
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 03:14 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