Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 05-02-2013, 06:02 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Quote:
Originally Posted by wtbmacestun View Post
the code for boots making kick magic is in Mob::getweapondamage. Should i still put it in client::attack?
The code for checking if a target requires magic to hit and if the weapon being used to try and hit it is magic is in Mob::GetWeaponDamage, but the code that passes that "weapon" into the function is elsewhere. In the case of kick and bash it is in Client::DoClassAttacks. I would look at that code, and the code for bash/slam, make sure you understand it, then try and add it for the hands slot if they have no weapon.

Here's an example of where it might work in Client::Attack. I didn't test it, and it might break other things. The new code is at the bottom, the rest is for context.
Code:
	/// Now figure out damage
	int damage = 0;
	uint8 mylevel = GetLevel() ? GetLevel() : 1;
	uint32 hate = 0;
	if (weapon) hate = weapon->GetItem()->Damage + weapon->GetItem()->ElemDmgAmt;
	int weapon_damage = GetWeaponDamage(other, weapon, &hate);

	// If no weapon and no damage, maybe it's a magic immune mob.  Check using the gloves to see if that helps.
	if(!weapon && weapon_damage < 1)
	{
		weapon_damage = GetWeaponDamage(other, GetInv().GetItem(SLOT_HANDS));
	}
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 02:46 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