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.