Core/Misc: Fix some possible issues detected by static code analysis
This commit is contained in:
1 parent
bb08d429a3
commit
8c013955ac
17 files changed
+35
-38
No files matched your search
@@ -476,12 +476,12 @@ public:
|
||||
}
|
||||
else if (map->IsDungeon())
|
||||
{
|
||||
Map* map = target->GetMap();
|
||||
Map* destMap = target->GetMap();
|
||||
|
||||
if (map->Instanceable() && map->GetInstanceId() != map->GetInstanceId())
|
||||
if (destMap->Instanceable() && destMap->GetInstanceId() != map->GetInstanceId())
|
||||
target->UnbindInstance(map->GetInstanceId(), target->GetDungeonDifficulty(), true);
|
||||
|
||||
// we are in instance, and can summon only player in our group with us as lead
|
||||
// we are in an instance, and can only summon players in our group with us as leader
|
||||
if (!handler->GetSession()->GetPlayer()->GetGroup() || !target->GetGroup() ||
|
||||
(target->GetGroup()->GetLeaderGUID() != handler->GetSession()->GetPlayer()->GetGUID()) ||
|
||||
(handler->GetSession()->GetPlayer()->GetGroup()->GetLeaderGUID() != handler->GetSession()->GetPlayer()->GetGUID()))
|
||||
@@ -2568,7 +2568,7 @@ public:
|
||||
{
|
||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||
// not let dismiss dead pet
|
||||
if (pet && pet->isAlive())
|
||||
if (pet->isAlive())
|
||||
player->RemovePet(pet, PET_SAVE_NOT_IN_SLOT);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user