EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   LDoN chest/barrel traps (https://www.eqemulator.org/forums/showthread.php?t=36761)

noudess 04-18-2013 03:06 PM

LDoN chest/barrel traps
 
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.

noudess 04-18-2013 03:08 PM

Oh also, so I notice I had to use #picklock as the pick lock buttons do nothing in LDoNs. I'd be happy to look at that if no one else is. Status on that?


All times are GMT -4. The time now is 03:42 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.