This code looks to be current (checked the repo), but this is on my server, so double check me.
When someone tried #picklock on a trapped LDoN chest that is pickable, they sometimes set off the trap. Thing is, it does nothing.
This code below is the original from spells.cpp around line 2928, It gets called in the process of the trap firing. It does not specify true for the isspell argument to IsAttackAlllowed causing the LDoN check therein to diosallow the trap from firing.
Code:
if(IsDetrimentalSpell(spell_id) && !IsAttackAllowed(spelltar) && !IsResurrectionEffects(spell_id)) {^M
if(!IsClient() || !CastToClient()->GetGM()) {^M
Message_StringID(MT_Shout, SPELL_NO_HOLD);^M
return false;^M
}^M
So, I just added true. The traps fire fine now, as this series does not exit the function by returning false.
Code:
// Added true to IssAttackAllowed to specify spell - Noudess
if(IsDetrimentalSpell(spell_id) && !IsAttackAllowed(spelltar,true) && !IsResurrectionEffects(spell_id)) {^M
if(!IsClient() || !CastToClient()->GetGM()) {^M
Message_StringID(MT_Shout, SPELL_NO_HOLD);^M
return false;^M
}^M
}^M
This lead me to a new problem, which is the database I am using only uses a handful of spells for LDoN traps, all of which are very high and kill off players in low end LDoN templates. I also added on my server a new formula to the spell_effect and changes the spells to use it. The new formula scales the effects down using (75/caster_level). It seems good at tier 1 adventures now. Damn near killed a bard with no HP buffs.
I didn't figure you'd want that code, since i also required db changes, and the above fix at least makes traps fire.