Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-09-2008, 06:09 PM
cybernine186
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default Calculating Bonus Damage

I am trying to determine the formula for calculating bonus damage on all weapons.

I have looked through the code and the only thing I can find is this code below. However say when I use "A Weighted Axe" with a delay of 150 and a character level of 50 the calculation works according to lucy. Now the problem is if I change the level of the character to 60 it does not calculate out right. This is the information I get when I use this formula to calculate out the following levels. (The formula I used rounded down all fractions)

LEVEL || Bonus Dmg

50 || 52
53 || 54
55 || 56
60 || 58


Example: A Weighted Axe for a lvl 50 character
(0 + (((50 - 25) / 3) + 1) + ((50 - 27) / 4) + ((150 - 34) / 3)) = 52

Example: A Weighted Axe for a lvl 60 character
(0 + (((60 - 25) / 3) + 1) + ((60 - 27) / 4) + ((150 - 34) / 3)) = 58


Is the EMU Server just using there own formula of calculating the bonus damage of a weapon or am I not doing something right?

Any information is greatly appreciated.


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;
	
	// Things get more complicated with 2 handers, the bonus is based on the delay of
	// the weapon as well as a number stored inside the weapon.
	int WeaponBonus = 0;	// How do you find this out?
	
	// Data for this, again, from www.monkly-business.com
	if (Weapon->Delay <= 27)
		return (WeaponBonus + BasicBonus + 1);
	if (Weapon->Delay <= 39)
		return (WeaponBonus + BasicBonus + ((GetLevel()-27) / 4));
	if (Weapon->Delay <= 42)
		return (WeaponBonus + BasicBonus + ((GetLevel()-27) / 4) + 1);
	// Weapon must be > 42 delay
	return (WeaponBonus + BasicBonus + ((GetLevel()-27) / 4) + ((Weapon->Delay-34) / 3));
}
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 11:22 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