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
This commit is contained in:
Yehonal
2017-08-22 21:24:22 +02:00
committed by Shauren
parent e56c4f40d4
commit 4ee16fb536

View File

@@ -955,11 +955,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()) \