Fails firing when they shouldn't #29


  • New
  • Defect
  • Waiting
Open
Assigned to mysticalos
  • MysticalOS created this issue Feb 13, 2010
    Author

    Still numerous fails that fire the INSTANT a spell is cast, not after x amount of time like intended design.

    one such example is

        -- Lady Deathwhisper - Death and Decay
        if (spellId == 71001 or spellId == 72108 or spellId == 72109 or spellId == 72110) and is_playerevent then
            if self.LastEvent.Fail_Deathwhisper_DeathNDecay[destName] ~= nil then
                if (timestamp - self.LastEvent.Fail_Deathwhisper_DeathNDecay[destName]) > 4 then
                    self:FailEvent("Fail_Deathwhisper_DeathNDecay", destName, self.FAIL_TYPE_NOTMOVING)
                end
            end
    
            self.LastEvent.Fail_Deathwhisper_DeathNDecay[destName] = timestamp
    
            return
        end
    

    The very instant she throws death and decay down, veryone in it is failled instantly, not after 4 seconds of standing in it..My interpretation is the code is working fine, the way the fail is writen is wrong...All the code says to do is if timestamp >4 for last time event happened to fail person...so if it's second time she casts death and decay that fight, isn't it >4 so it'll fail everyone right away anyways since it was timestamped the last time she cast it at the end instead of beginning?

    Wouldn't this be more sound?

        -- Lady Deathwhisper - Death and Decay
        if (spellId == 71001 or spellId == 72108 or spellId == 72109 or spellId == 72110) and is_playerevent then
            if self.LastEvent.Fail_Deathwhisper_DeathNDecay[destName] ~= nil then
            self.LastEvent.Fail_Deathwhisper_DeathNDecay[destName] = timestamp
                if (timestamp - self.LastEvent.Fail_Deathwhisper_DeathNDecay[destName]) > 3 then
                    self:FailEvent("Fail_Deathwhisper_DeathNDecay", destName, self.FAIL_TYPE_NOTMOVING)
                end
            end
            return
        end
    

    a fail should not happen simply because she cast it on you twice in a fight so it'll just fail you instantly second time since you time stamp it a end of code first time event happened. Numerous fails have this flaw and need to be rewriten to be handled better.

  • MysticalOS added the tags New Defect Feb 13, 2010
  • MysticalOS edited description Feb 13, 2010
  • MysticalOS posted a comment Feb 13, 2010

    or more writen like this

        -- Racorscale Flame
        if (spellId == 64733 or spellId == 64704) and is_playerevent then
            if self.LastEvent.Fail_Racorscale_Flame[destName] == nil then
               self.LastEvent.Fail_Racorscale_Flame[destName] = 0
            end
    
            self.LastEvent.Fail_Racorscale_Flame[destName] = self.LastEvent.Fail_Racorscale_Flame[destName] + 1
    
            if self.LastEvent.Fail_Racorscale_Flame[destName] == 2 then
               self:FailEvent("Fail_Racorscale_Flame", destName, self.FAIL_TYPE_NOTMOVING)
               self.LastEvent.Fail_Racorscale_Flame[destName] = 0
            end
    
            return
        end
    
  • MysticalOS removed a tag Waiting Feb 13, 2010
  • MysticalOS added a tag Replied Feb 13, 2010
  • MysticalOS removed a tag Replied Feb 16, 2010
  • MysticalOS added a tag Accepted Feb 16, 2010
  • MysticalOS self-assigned this issue Feb 16, 2010
  • MysticalOS posted a comment May 8, 2010

    Commited a fix i think will work best. Changing to waiting until i can run more tests on it or get feedback.

  • MysticalOS removed a tag Accepted May 8, 2010
  • MysticalOS added a tag Waiting May 8, 2010
  • MysticalOS removed a tag Accepted May 8, 2010
  • MysticalOS added a tag Waiting May 8, 2010
  • MysticalOS posted a comment May 11, 2010

    none of the logics work not sure why


    Edited May 11, 2010
  • MysticalOS removed a tag Waiting May 11, 2010
  • MysticalOS added a tag Replied May 11, 2010
  • MysticalOS posted a comment May 12, 2010

    so far the new checks seem to be working now. need to test more fights to be sure

  • MysticalOS removed a tag Replied May 13, 2010
  • MysticalOS added a tag Waiting May 13, 2010

To post a comment, please login or register a new account.