[SOLVED] Iterating through players

Hi people!

Today I was updating old scripts but Im stuck at one point since Trinity has changed a little bit.

https://paste2.org/OJpeHIyA

I’m trying to update this part but itr->second->GetPlayer() does not exist in this context anymore and I dont really know what to do.

Thanks for your time and answers.

Hmm, looks like it does tho:
master: https://github.com/TrinityCore/TrinityCore/blob/master/src/server/game/Texts/CreatureTextMgr.h#L234

3.3.5; https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Texts/CreatureTextMgr.h#L241

maybe you should post the error message. You probably have not included Player.h or WorldSession.h or something lke that