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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-16-2008, 06:57 PM
renoofturks1
Sarnak
 
Join Date: Jan 2008
Posts: 60
Default

Yes, there is a 1handed bonus, which we already have calculated correctly in the file. The whole finished product would resemble....
Replacing lines 1935 through 1971

Code:
int Mob::GetWeaponDamageBonus(const Item_Struct* Weapon)
{
	// Kaiyodo - Calculate the damage bonus for a weapon on the main hand
	if (GetLevel() < 28)
		return(0);
	
	// Check we're on of the classes that gets a damage bonus
	if (!IsWarriorClass())
		return 0;
	
	int BasicBonus = ((GetLevel() - 25) / 3) + 1;
	
	if(!Weapon)
		return(BasicBonus);
	
	// If we have no weapon, or only a single handed weapon, just return the default
	// damage bonus of (Level - 25) / 3
	if (Weapon->ItemClass == ItemClassCommon)
		return BasicBonus;
	
	if ((Weapon->ItemType == ItemType1HS) || (Weapon->ItemType == ItemTypePierce) || (Weapon->ItemType == ItemType1HB))
		return BasicBonus;

	//begin Reno's untested code
        if (Weapon->Delay <=27)
	        return (BasicBonus + 1);
        if (Weapon->Delay <=39)
	        return (BasicBonus + ((GetLevel()-27)/4));
        if (Weapon->Delay <= 41)
	        return (BasicBonus + ((GetLevel()-27)/4) + 1);
        if (Weapon->Delay >= 42)
	        if (GetLevel() > 54)
		        int levelint = 1;
	        if (GetLevel() > 56)
		        levelint += 1;
	        if (GetLevel() > 58)
		        levelint += 1;
	        if (GetLevel() > 59)
		        levelint += 1;
	        if (GetLevel() > 66)
		        levelint += 1;
	        if (GetLevel() > 71)
		        levelint += 1;
	        if (Weapon->Delay > 42)
		        int delayint = 1;
	        if (Weapon->Delay >44)
		        delayint += 1;

	        return (((Weapon->Delay-37)/3) +  ((GetLevel()-25)/ 5) + ((Weapon->Delay * (GetLevel()-50 + levelint))/40) + delayint + BasicBonus);
}
Reply With Quote
  #2  
Old 09-16-2008, 08:09 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

I see no harm in merging this into TGC when it comes back up. The worst that can happen is 2H players will own until I pull it out. Thanks Reno, nice to see you here! The only thing I am going to change is adding a 2H check to your changes, otherwise all weapons will return true and get the 2H bonus.

Last edited by cavedude; 09-17-2008 at 04:13 AM..
Reply With Quote
  #3  
Old 09-16-2008, 08:13 PM
renoofturks1
Sarnak
 
Join Date: Jan 2008
Posts: 60
Default

Yes, I broke down and went to the EQEmu boards! I couldn't remember my login it's been so long, had to make a new account. I am testing it right now CD, Give me a bit and I'll let ya know how it works out...

As for the the 2h check, I assumed taht the previous 1h check would suffice to weed out the 1 hander's and saw no need for extra code, if avoidable.
Reply With Quote
  #4  
Old 09-16-2008, 08:22 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

You're right, it returns BasicBonus; so 1 handers won't check the delay statements. I just always like to make absolutely sure what we want to happen does happen.
Reply With Quote
  #5  
Old 09-16-2008, 08:26 PM
renoofturks1
Sarnak
 
Join Date: Jan 2008
Posts: 60
Default

Understandable, I'll see how it works out. I have a feeling I need to change the order that Damage Bonus is applied within the combat routine also, as it should be un-affected by AC and it currently is, I think.
Reply With Quote
  #6  
Old 09-16-2008, 08:55 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

You forgot to define delayint and levelint. Just add:

int delayint;
int levelint;

before your first if statement.
Reply With Quote
  #7  
Old 09-16-2008, 08:59 PM
renoofturks1
Sarnak
 
Join Date: Jan 2008
Posts: 60
Default

Aye, I tried to define them as they became needed. I see now, this wouldn't work. I'll have a revised tested version shortly here.
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:52 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