diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-09-14 20:58:05 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-09-14 20:58:17 +0200 |
commit | 7d26a2ccd46bd8475c1dad90d7bb9480c3089314 (patch) | |
tree | 53c071f6b84c0f9d288d98f026ca79710c7ebd3f | |
parent | 50e38d65343cb0d661f0a798869124c6a9011dda (diff) |
Scripts/Commands: Fix ".npc info" immune mask output
Fix ".npc info" showing wrong immune mask list
Fixes #12358
-rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 79a707f1377..00e5fc22d92 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -761,8 +761,8 @@ public: handler->PSendSysMessage(npcFlagTexts[i].Name, npcFlagTexts[i].Value); handler->PSendSysMessage(LANG_NPCINFO_MECHANIC_IMMUNE, mechanicImmuneMask); - for (uint8 i = 0; i < MAX_MECHANIC; ++i) - if ((mechanicImmuneMask << 1) & mechanicImmunes[i].Value) + for (uint8 i = 1; i < MAX_MECHANIC; ++i) + if (mechanicImmuneMask & (1 << (mechanicImmunes[i].Value - 1))) handler->PSendSysMessage("%s (0x%X)", mechanicImmunes[i].Name, mechanicImmunes[i].Value); return true; |