You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChatHandler(player->GetSession()).PSendSysMessage("You have received Mythicmode score {} New score: {}", typestring, sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()][type]);
569
-
CharacterDatabase.Execute("REPLACE INTO zone_difficulty_mythicmode_score VALUES({}, {}, {})", player->GetGUID().GetCounter(), type, sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()][type]);
554
+
ChatHandler(player->GetSession()).PSendSysMessage("You have received Mythicmode score {} New score: {}", typestring, previousScore + score);
Copy file name to clipboardexpand all lines: src/mod_zone_difficulty_scripts.cpp
+36-35
Original file line number
Diff line number
Diff line change
@@ -413,6 +413,28 @@ class mod_zone_difficulty_playerscript : public PlayerScript
413
413
}
414
414
}
415
415
}
416
+
417
+
voidOnLogin(Player* player) override
418
+
{
419
+
if (sZoneDifficulty->MythicmodeScore.empty())
420
+
return;
421
+
422
+
if (sZoneDifficulty->MythicmodeScore.find(player->GetGUID().GetCounter()) != sZoneDifficulty->MythicmodeScore.end())
423
+
{
424
+
for (int i = 1; i <= 16; ++i)
425
+
{
426
+
uint32 availableScore = 0;
427
+
428
+
if (sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].find(i) != sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].end())
creature->Whisper("You don't have any score in any category.", LANG_UNIVERSAL, player);
644
+
629
645
returntrue;
630
646
}
631
647
@@ -636,14 +652,8 @@ class mod_zone_difficulty_rewardnpc : public CreatureScript
636
652
uint32 category = action - 99001000;
637
653
638
654
// Check (again) if the player has enough score in the respective category.
639
-
uint32 availableScore = 0;
640
-
if (sZoneDifficulty->MythicmodeScore.find(player->GetGUID().GetCounter()) != sZoneDifficulty->MythicmodeScore.end())
641
-
{
642
-
if (sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].find(category) != sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].end())
if (availableScore < sZoneDifficulty->TierRewards[category].Price)
648
658
{
649
659
CloseGossipMenuFor(player);
@@ -671,10 +681,7 @@ class mod_zone_difficulty_rewardnpc : public CreatureScript
671
681
if (sZoneDifficulty->HasCompletedFullTier(category, player->GetGUID().GetCounter()))
672
682
{
673
683
// Check if the player has enough score in the respective category.
674
-
uint32 availableScore = 0;
675
-
if (sZoneDifficulty->MythicmodeScore.find(player->GetGUID().GetCounter()) != sZoneDifficulty->MythicmodeScore.end())
676
-
if (sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].find(category) != sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].end())
// Check if the player has enough score in the respective category.
765
-
uint32 availableScore = 0;
766
-
if (sZoneDifficulty->MythicmodeScore.find(player->GetGUID().GetCounter()) != sZoneDifficulty->MythicmodeScore.end())
767
-
if (sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].find(category) != sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].end())
@@ -808,10 +812,7 @@ class mod_zone_difficulty_rewardnpc : public CreatureScript
808
812
}
809
813
810
814
// Check (again) if the player has enough score in the respective category.
811
-
uint32 availableScore = 0;
812
-
if (sZoneDifficulty->MythicmodeScore.find(player->GetGUID().GetCounter()) != sZoneDifficulty->MythicmodeScore.end())
813
-
if (sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].find(category) != sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()].end())
0 commit comments