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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2013, 11:52 PM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default Hands not magic with gloves

Boots are making kick magic but gloves will not make hands magic. Anyone know how to fix this?
Reply With Quote
  #2  
Old 05-02-2013, 12:01 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Change Client::Attack to pass what's in the gloves slot as the weapon when there is no primary or secondary weapon.
Reply With Quote
  #3  
Old 05-02-2013, 09:14 AM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default

the code for boots making kick magic is in Mob::getweapondamage. Should i still put it in client::attack?
Reply With Quote
  #4  
Old 05-02-2013, 10:22 AM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default

I tried adding this in at line 783 but wont compile. Ive tried multiple different things but I cant get it work right.

Code:
else if(InventorySlot(12)->(database.GetItem()->Magic))
                  {
                   dmg = 1;
                  }
Whenever I compile it I get.

Code:
2>..\..\zone\attack.cpp(783): error C2059: syntax error : '('
2>..\..\zone\attack.cpp(784): error C2143: syntax error : missing ';' before '{'
2>..\..\zone\attack.cpp(785): error C2227: left of '->dmg' must point to class/struct/union/generic type
2>          type is 'InventorySlot'
2>..\..\zone\attack.cpp(787): error C2181: illegal else without matching if
2>..\..\zone\attack.cpp(797): error C2227: left of '->Damage' must point to class/struct/union/generic type
2>          type is ''unknown-type''

I see that dmg should be pointing to something but I am not sure what it should be pointing to.
Reply With Quote
  #5  
Old 05-02-2013, 12:01 PM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default

Correct me if I am wrong, but because Client::Attack is a bool that only says when you can attack... aka true or false.
Reply With Quote
  #6  
Old 05-02-2013, 12:11 PM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default

I tried this at line 927 but i need some help with the code

Code:
			else if(weapon_item == NULL && SLOT_HANDS() == ItemAttribMagic){
				dmg = 1;
How do I say that my SLOT_HANDS = a magic item?

Edit:

I also tried

Code:
			else if(weapon_item == NULL && SLOT_HANDS()->Magic){
				dmg = 1;
and that didnt work.
Reply With Quote
  #7  
Old 05-02-2013, 06:02 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
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
  #8  
Old 05-02-2013, 06:10 PM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default

ok thanks for the reply ill test it out
Reply With Quote
  #9  
Old 05-02-2013, 06:25 PM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default

works with magic gloves and not non magic gloves.

Thank you very much sir!

Edit: I posted this fix on another website giving you the credit for fixing it lerxst2112
Reply With Quote
Reply


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 01:32 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3