diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-03-27 21:43:59 +0100 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-03-27 21:43:59 +0100 |
| commit | 8c44259fae2980598980a7935a3f3941130a5a10 (patch) | |
| tree | 467b1561656e3e0d8b2e90d88b5db2953e7383ea /src/server/scripts/Kalimdor | |
| parent | 30894c2badd08827c3bc8b57d8092d7226545e3b (diff) | |
Core/Misc: Fix some static analysis issues
Fix uninitialized values, most of which are false positives, always initialized before being accessed.
Add some asserts and additional NULL checks as sanity checks. Use SpellMgr::EnsureSpellInfo() if the spell id is valid and always supposed to return a valid not-NULL SpellInfo* .
Diffstat (limited to 'src/server/scripts/Kalimdor')
| -rw-r--r-- | src/server/scripts/Kalimdor/zone_silithus.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index b002bbe8a48..24d557222eb 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -649,11 +649,11 @@ public: Unit* mob = NULL; for (uint8 i = 0; i < 4; ++i) { - mob = player->FindNearestCreature(entries[i], 50, me); + mob = player->FindNearestCreature(entries[i], 50); while (mob) { mob->RemoveFromWorld(); - mob = player->FindNearestCreature(15423, 50, me); + mob = player->FindNearestCreature(15423, 50); } } break; @@ -1021,7 +1021,7 @@ public: { if (quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD) { - if (Creature* trigger = go->FindNearestCreature(15454, 100, player)) + if (Creature* trigger = go->FindNearestCreature(15454, 100)) { Unit* Merithra = trigger->SummonCreature(15378, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); Unit* Caelestrasz = trigger->SummonCreature(15379, -8032.767f, 1533.148f, 2.61f, 1.5f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); |
