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

Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2008, 10:58 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I also just added a minor change to my own source that I think should be ok to add to the official source. Basically, it is just a minor change to allow recast timers for NPC spells to be longer than 1000 seconds. I am not sure why there is a limitation on it right now, but I set mine to 10000, which seems like a more reasonable limit. I doubt there would be many cases where a spell shouldn't be recast more than once every 3 hours, lol.

The way it is currently set, you can't set recast delay for longer than about 16 minutes, which is a little restrictive in certain cases.

I marked the single change in RED below. All it is, is changing 1000 to 10000.

zone\MobAI.cpp
Code:
void NPC::AI_Event_SpellCastFinished(bool iCastSucceeded, int8 slot) {
	if (slot == 1) {
		int32 recovery_time = 0;
		if (iCastSucceeded) {
			if (casting_spell_AIindex < MAX_AISPELLS) {
					recovery_time += spells[AIspells[casting_spell_AIindex].spellid].recovery_time;
					if (AIspells[casting_spell_AIindex].recast_delay >= 0){
						if (AIspells[casting_spell_AIindex].recast_delay <10000)
							AIspells[casting_spell_AIindex].time_cancast = Timer::GetCurrentTime() + (AIspells[casting_spell_AIindex].recast_delay*1000);
}
					else
						AIspells[casting_spell_AIindex].time_cancast = Timer::GetCurrentTime() + spells[AIspells[casting_spell_AIindex].spellid].recast_time;
			}
			if (!IsEngaged())
				recovery_time += RandomTimer(2000, 3000);
			if (recovery_time < AIautocastspell_timer->GetSetAtTrigger())
				recovery_time = AIautocastspell_timer->GetSetAtTrigger();
			AIautocastspell_timer->Start(recovery_time, false);
		}
		else
			AIautocastspell_timer->Start(800, false);
		casting_spell_AIindex = MAX_AISPELLS;
	}
}
If there is a reason not to change this in the source, that is fine with me. I can set it myself each time. But, I figured there wasn't any reason to have it limited to 1000 in the first place. And, this is useful for setting discs in spell lists for NPCs.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 08-06-2008, 09:37 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

I think the changelog for 1120 will need this bit of SQL added to it:

Code:
INSERT INTO rule_values VALUES (0, 'Character:SkillUpModifier', 100);
Else the rule won't be in the table. Though I think it still has a default that it uses if there's no rule value listed.

Correct me if I'm wrong =)
Reply With Quote
  #3  
Old 08-06-2008, 02:27 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Not required but nice to have for people who like to modify rules via sql.
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 07:12 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