Merge pull request #317 from sogladev/crashfix-on-login

naxx40: fixes a client crash when logging out and back in
This commit is contained in:
ZhengPeiRu21
2024-08-04 14:49:55 -06:00
committed by GitHub

View File

@@ -1482,7 +1482,6 @@ public:
return; return;
// Cast on player Naxxramas Entry Flag Trigger DND - Classic (spellID: 29296) // Cast on player Naxxramas Entry Flag Trigger DND - Classic (spellID: 29296)
player->CastSpell(player, 29296, true);
if (player->GetQuestStatus(NAXX40_ENTRANCE_FLAG) != QUEST_STATUS_REWARDED) if (player->GetQuestStatus(NAXX40_ENTRANCE_FLAG) != QUEST_STATUS_REWARDED)
{ {
// Mark player as having entered // Mark player as having entered
@@ -1490,6 +1489,8 @@ public:
player->AddQuest(quest, nullptr); player->AddQuest(quest, nullptr);
player->CompleteQuest(NAXX40_ENTRANCE_FLAG); player->CompleteQuest(NAXX40_ENTRANCE_FLAG);
player->RewardQuest(quest, 0, player, false, false); player->RewardQuest(quest, 0, player, false, false);
// Cast on player Naxxramas Entry Flag Trigger DND - Classic (spellID: 29296)
player->CastSpell(player, 29296, true); // for visual effect only, possible crash if cast on login
} }
} }
}; };