Jump to content

Recommended Posts

No idea what happent there. I was healing HOL norm on my druid at the trash mobs before Volkhan (just after both stairs up) Druid just stopped working and stood there untill i noticed to restart it. Latest profile attached

[N] 16:14:00 - [Path-Finding] Path Count: 3
[F] 16:14:01 - [Spell] Cast Rejuvenation (Rejuvenation)
[F] 16:14:02 - [Spell] Cast Nourish (Nourish)
[N] 16:14:04 - [Path-Finding] Path Count: 2
[F] 16:14:05 - [Spell] Cast Nourish (Nourish)
[N] 16:14:06 - [Path-Finding] Path Count: 2
[F] 16:14:08 - [Spell] Cast Regrowth (Regrowth)
[E] 16:14:25 - Sequence contains no elements

[F] 16:14:25 - 'Restoration Druid' Stopped
[N] 16:14:29 - [Path-Finding] Path Count: 3
[F] 16:15:31 - Stop 'Restoration Druid'
[D] 16:15:31 - GroupLoot => dispose
16:15:31 - [Party] Stopped

 

Druid healing in 3.3.5a ported from 6.x by BetterSister (19).cs

Googling around trying to find the reason i found using .First() can cause this instead i should use FirstOrDefault(). I changed all .First() to .FirstOrDefault()

Doing more googling:

Quote

use First() when I know or expect the sequence to have at least one element. In other words, when it is an exceptional occurrence when the sequence is empty.

Use FirstOrDefault() when you know that you will need to check whether there was an element or not. In other words, when it is legal for the sequence to be empty. You should not rely on exception handling for the check. (It is bad practice and might hurt performance).

Finally, the difference between First() and Take() is that First() returns the element itself, while Take() returns a sequence of elements that contains exactly one element. (If you pass 1 as the parameter).

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...