Warlocks UI.

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Warlocks UI.

Postby geshi » Sat Aug 21, 2010 2:22 am

Hey, It seems with the latest SVN and the latest DB that warlocks are not being penalised for using the UI like they should :damm: even though the DB values are correct and the code looks like it should work ! !
Code: Select all
if (Caster is GamePlayer && (Caster as GamePlayer).CharacterClass.ID == (int)eCharacterClass.Warlock && m_spell.IsSecondary)
         {
            GameSpellEffect affect = SpellHandler.FindEffectOnTarget(Caster, "Uninterruptable");
            if (affect != null)
            {
               int nerf = (int)(affect.Spell.Value);
               effectiveness *= (1 - (nerf * 0.01));
            }
         }

Has anyone got any ideas as to why does not seem to be working? Spell Value in the DB is 60 by the way :x
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Warlocks UI.

Postby Tolakram » Sat Aug 21, 2010 10:46 am

What is spell.value?

effectiveness *= (1 - (nerf * 0.01));

so lets say effectiveness starts at 1.0

1.0 *= (1 - (200 * .01))

1.0 *= -1

- 1.0

in ApplyEffectOnTarget:

Code: Select all
         if (m_spellLine.KeyName == GlobalSpellsLines.Item_Effects || m_spellLine.KeyName == GlobalSpellsLines.Combat_Styles_Effect || m_spellLine.KeyName == GlobalSpellsLines.Potions_Effects || m_spellLine.KeyName == Specs.Savagery || m_spellLine.KeyName == GlobalSpellsLines.Character_Abilities || m_spellLine.KeyName == "OffensiveProc")
            effectiveness = 1.0; // TODO player.PlayerEffectiveness
         if (effectiveness <= 0)
            return; // no effect


So place a log.Debug statement in there and see why or if effectiveness is being ignored. Also make sure effectiveness is the value that's expected. That's how I would do it. I've been programming for over 20 years but I still spit out debug info to make sure something I coded works as intended. Apparently there are some, much younger than me, who feel like they don't need to test things .... which is probably why there are so many things to fix. :mrgreen:

If you could test this and tell us the results it would be very helpful.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: Warlocks UI.

Postby geshi » Sat Aug 21, 2010 1:18 pm

Ok Tola !
Code: Select all
if (Caster is GamePlayer && (Caster as GamePlayer).CharacterClass.ID == (int)eCharacterClass.Warlock && m_spell.IsSecondary)
         {
                Console.WriteLine("Player is warlock");
            GameSpellEffect affect = SpellHandler.FindEffectOnTarget(Caster, "Uninterruptable");
            if (affect != null)
            {
                    log.Debug("Player is warlock and he has the effect Uninterruptable");
               int nerf = (int)(affect.Spell.Value);
                    log.Debug("Spell Value is " + affect.Spell.Value);
                    log.Debug("Effectivness before applying the nerf was " + effectiveness);
               effectiveness *= (1 - (nerf * 0.01));
                    log.Debug("Effectivness after applying the nerf was " + effectiveness);
 
            }
         }


Thats the debugging I have added so far but the only message it writes is "Player is warlock" so I'm guessing the effect Uninterruptable isn't actually on the player or something.. not sure, I'll do some more investigating !

Edit: Wooot I have found the problem (I think!) If you cast UI and then PBAOE Instantly then you will not have the Uninterruptable effect, if you cast UI first then wait a few seconds and then cast PBAOE then you have the effect and it writes all the message I have added !
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest