Remove instant save spell effect in Client::TriggerSpellSave, we can only save in Client::Process too dangerous otherwise to conflict with spell targets

This commit is contained in:
Emagi 2022-12-27 19:52:34 -05:00
parent 7870d9f25d
commit 883951dc61

View file

@ -11391,24 +11391,6 @@ void Client::TriggerSpellSave()
save_spell_state_time_bucket = 0;
save_spell_state_timer.Start(interval, true);
}
else
{
int32 elapsed_time = save_spell_state_timer.GetElapsedTime();
save_spell_state_time_bucket += elapsed_time;
int32 save_wait_cap = rule_manager.GetGlobalRule(R_Spells, PlayerSpellSaveStateCap)->GetInt32();
// default to not have some bogus value in the rule
if(save_wait_cap < interval)
save_wait_cap = interval+1;
if(save_spell_state_time_bucket >= save_wait_cap)
{
// save immediately and disable timer
GetPlayer()->SaveSpellEffects();
save_spell_state_timer.Disable();
}
}
MSaveSpellStateMutex.unlock();
}