diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-08-30 20:56:41 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-08-30 20:56:41 +0200 |
| commit | 87e105c81836b46e2a307031bf0083fcc7f75f8b (patch) | |
| tree | 24d46a1715c1e7ccfc5a2ef2d7d1b4088fa4703a /src/server/scripts/Commands | |
| parent | 7776016106e748fee8cb3e052ec3c8e575e84a55 (diff) | |
Core: Fix warning
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_quest.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 2ecb05db713..20515eb0921 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -205,14 +205,16 @@ public: for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) { int32 creature = quest->RequiredNpcOrGo[i]; - uint32 creaturecount = quest->RequiredNpcOrGoCount[i]; + uint32 creatureCount = quest->RequiredNpcOrGoCount[i]; if (creature > 0) - if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creature)) - for (uint16 z = 0; z < creaturecount; ++z) - player->KilledMonster(cInfo, 0); + { + if (CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(creature)) + for (uint16 z = 0; z < creatureCount; ++z) + player->KilledMonster(creatureInfo, 0); + } else if (creature < 0) - for (uint16 z = 0; z < creaturecount; ++z) + for (uint16 z = 0; z < creatureCount; ++z) player->KillCreditGO(creature, 0); } |
