Core/Scripts: FOR_SCRIPTS macro shouldn't return early (#20187)

FOR_SCRIPTS, insteadof FOR_SCRIPTS_RET, shouldn't return
otherwise methods such as void ScriptMgr::OnPlayerEnterMap(Map* map, Player* player) will end prematurely

(cherry picked from commit 4ee16fb536)
This commit is contained in:
Yehonal
2017-08-22 21:24:22 +02:00
committed by Shauren
parent d361de0c27
commit ae4dacfd1d

View File

@@ -1072,11 +1072,9 @@ private:
// Utility macros for looping over scripts.
#define FOR_SCRIPTS(T, C, E) \
if (SCR_REG_LST(T).empty()) \
return; \
\
for (SCR_REG_ITR(T) C = SCR_REG_LST(T).begin(); \
C != SCR_REG_LST(T).end(); ++C)
if (!SCR_REG_LST(T).empty()) \
for (SCR_REG_ITR(T) C = SCR_REG_LST(T).begin(); \
C != SCR_REG_LST(T).end(); ++C)
#define FOR_SCRIPTS_RET(T, C, E, R) \
if (SCR_REG_LST(T).empty()) \