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)

Reply
 
Thread Tools Display Modes
  #1  
Old 10-08-2006, 06:06 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default Haste/Slow not working on NPCs

I think I've found the issue with this, slow / haste will not apply until the NPC changes targets.

Code:
void NPC::SetTarget(Mob* mob) {
	if(mob == target)		//dont bother if they are allready our target
		return;
	
	if (mob) {
		SetAttackTimer();
	} else {
		ranged_timer.Disable();
		attack_timer.Disable();
		attack_dw_timer.Disable();
	}
	target = mob;
}
the attack timer is only set when a NPC changes targets but a player's attack timer is set to change when he/she recalculates their item bonuses which happens whenever their calcbonuses goes off, which is why haste and slows seem to affect them perfectly but have hit and miss results with mobs.

Change Mob::CalcBonuses() to
Code:
void Mob::CalcBonuses()
{	
	CalcSpellBonuses(&spellbonuses);
	
	CalcMaxHP();
	CalcMaxMana();
	SetAttackTimer();
	rooted = FindType(SE_Root);
}
This issue isn't directly related to the first but I found it while testing the first out so.. if you snare something for more than 100% it will blink to you, this isn't an issue for anyone but a bard with a decent instrument mod(which was the character I was testing with). Using a 18 mod from singing short sword and Largo's Absonant Binding I'm able to get something like a -117% move speed, which then makes them run faster than the speed of light.

in Mob::_GetMovementSpeed()
find:
Code:
	int movemod = spellbonuses.movementspeed + itembonuses.movementspeed + mod;
	if (movemod != 0)
		speed_mod += float(movemod) / 100.0f;
and change it to
Code:
	int movemod = spellbonuses.movementspeed + itembonuses.movementspeed + mod;
	if(movemod < -85) //cap it at moving very very slow
		movemod = -85;

	if (movemod != 0)
		speed_mod += float(movemod) / 100.0f;
Reply With Quote
  #2  
Old 11-03-2006, 10:11 AM
Rhodan
Hill Giant
 
Join Date: Oct 2006
Posts: 179
Default

Was this noticed? I'm playing with 878 and none of my shaman's slows appear to work. I set up a level 50 shammy and cast the level 36(?) spell on a newbie mob - no change in attack speed.
Reply With Quote
  #3  
Old 11-03-2006, 12:44 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

This should be fixed, though I changed how haste was calculated the other day, I'll have a look at it tonight to make sure I didn't mess anything up.
Reply With Quote
  #4  
Old 11-03-2006, 01:21 PM
jeffpuff
Fire Beetle
 
Join Date: Jul 2006
Posts: 20
Default

I can verify slow was fixed for a while, but stopped working as of .878 I have not tested .882 yet, the 11/02 post.
Reply With Quote
  #5  
Old 11-03-2006, 05:00 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Doesn't work as of the latest source, looking for the cause atm. Haste works but slow doesn't.. never saw anything like this when I was first testing haste changes, obviously something was fubared in the process.
Reply With Quote
  #6  
Old 11-03-2006, 06:40 PM
Rhodan
Hill Giant
 
Join Date: Oct 2006
Posts: 179
Default

Gremlins, they sneak up on ya.
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 01:00 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