update code to compile with latest azerothcore server code

fix code to compile with latest version of azeroth core server
This commit is contained in:
Jaytapp
2025-05-23 16:57:07 -04:00
parent 451bebbfdb
commit a61cae53f4
4 changed files with 44 additions and 42 deletions

View File

@@ -58,23 +58,24 @@ enum ProgressionQuestIDs
QUEST_WINTERFALL = 6241
};
enum ProgressionMaps
{
MAP_BLACKWING_LAIR = 469,
MAP_ZUL_GURUB = 309,
MAP_AQ_20 = 509,
MAP_AQ_40 = 531,
MAP_OUTLANDS = 530,
MAP_NAXXRAMAS = 533,
MAP_ZUL_AMAN = 568,
MAP_NORTHREND = 571,
MAP_ULDUAR = 603,
MAP_TRIAL_OF_THE_CRUSADER = 649,
MAP_TRIAL_OF_THE_CHAMPION = 650,
MAP_ICC = 631,
MAP_FORGE_OF_SOULS = 632,
MAP_RUBY_SANCTUM = 724
};
// now defined in azerothcore-wotlk\src\server\game\Maps\AreaDefines.h
//enum ProgressionMaps
//{
// MAP_BLACKWING_LAIR = 469,
// MAP_ZUL_GURUB = 309,
// MAP_AQ_20 = 509,
// MAP_AQ_40 = 531,
// MAP_OUTLANDS = 530,
// MAP_NAXXRAMAS = 533,
// MAP_ZUL_AMAN = 568,
// MAP_NORTHREND = 571,
// MAP_ULDUAR = 603,
// MAP_TRIAL_OF_THE_CRUSADER = 649,
// MAP_TRIAL_OF_THE_CHAMPION = 650,
// MAP_ICC = 631,
// MAP_FORGE_OF_SOULS = 632,
// MAP_RUBY_SANCTUM = 724
//};
enum ProgressionZones
{

View File

@@ -16,7 +16,7 @@ private:
public:
IndividualPlayerProgression() : PlayerScript("IndividualProgression") { }
void OnLogin(Player* player) override
void OnPlayerLogin(Player* player) override
{
if (player->getClass() == CLASS_DEATH_KNIGHT && sIndividualProgression->deathKnightStartingProgression && !sIndividualProgression->hasPassedProgression(player, static_cast<ProgressionState>(sIndividualProgression->deathKnightStartingProgression)))
{
@@ -29,7 +29,7 @@ public:
sIndividualProgression->CheckAdjustments(player);
}
void OnSetMaxLevel(Player* player, uint32& maxPlayerLevel) override
void OnPlayerSetMaxLevel(Player* player, uint32& maxPlayerLevel) override
{
if (!sIndividualProgression->enabled || isExcludedFromProgression(player))
{
@@ -52,17 +52,17 @@ public:
}
}
void OnMapChanged(Player* player) override
void OnPlayerMapChanged(Player* player) override
{
sIndividualProgression->CheckAdjustments(player);
}
void OnLevelChanged(Player* player, uint8 /*oldLevel*/) override
void OnPlayerLevelChanged(Player* player, uint8 /*oldLevel*/) override
{
sIndividualProgression->CheckAdjustments(player);
}
void OnEquip(Player* player, Item* /*it*/, uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) override
void OnPlayerEquip(Player* player, Item* /*it*/, uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) override
{
sIndividualProgression->CheckAdjustments(player);
}
@@ -72,7 +72,7 @@ public:
sIndividualProgression->CheckAdjustments(player);
}
bool ShouldBeRewardedWithMoneyInsteadOfExp(Player* player) override
bool OnPlayerShouldBeRewardedWithMoneyInsteadOfExp(Player* player) override
{
if (!sIndividualProgression->questMoneyAtLevelCap)
{
@@ -84,7 +84,7 @@ public:
(!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) && player->GetLevel() == 70));
}
void OnAfterUpdateMaxHealth(Player* player, float& value) override
void OnPlayerAfterUpdateMaxHealth(Player* player, float& value) override
{
// TODO: This should be adjust to use an aura like damage adjustment. This is more robust to update when changing equipment, etc.
if (!sIndividualProgression->enabled || isExcludedFromProgression(player))
@@ -117,7 +117,7 @@ public:
}
}
void OnQuestComputeXP(Player* player, Quest const* quest, uint32& xpValue) override
void OnPlayerQuestComputeXP(Player* player, Quest const* quest, uint32& xpValue) override
{
if (!sIndividualProgression->enabled || !sIndividualProgression->questXpFix || isExcludedFromProgression(player))
{
@@ -134,7 +134,7 @@ public:
}
}
void OnGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 xpSource) override
void OnPlayerGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 xpSource) override
{
if (!sIndividualProgression->enabled || isExcludedFromProgression(player))
{
@@ -171,7 +171,7 @@ public:
return (accountNameFound && std::regex_match(accountName, excludedAccountsRegex));
}
bool OnBeforeTeleport(Player* player, uint32 mapid, float x, float y, float z, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) override
bool OnPlayerBeforeTeleport(Player* player, uint32 mapid, float x, float y, float z, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) override
{
if (!sIndividualProgression->enabled || player->IsGameMaster() || isExcludedFromProgression(player))
{
@@ -185,15 +185,15 @@ public:
{
return false;
}
if (mapid == MAP_AQ_40 && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ))
if (mapid == MAP_AHN_QIRAJ_TEMPLE && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ))
{
return false;
}
if (mapid == MAP_AQ_20 && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ))
if (mapid == MAP_RUINS_OF_AHN_QIRAJ && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ))
{
return false;
}
if (mapid == MAP_OUTLANDS)
if (mapid == MAP_OUTLAND)
{
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
{
@@ -223,11 +223,11 @@ public:
return false;
}
// This will also restrict other Frozen Halls dungeons, because Forge of Souls must be completed first to access them
if ((mapid == MAP_ICC || mapid == MAP_FORGE_OF_SOULS) && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_WOTLK_TIER_3))
if ((mapid == MAP_ICECROWN_CITADEL || mapid == MAP_THE_FORGE_OF_SOULS) && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_WOTLK_TIER_3))
{
return false;
}
if (mapid == MAP_RUBY_SANCTUM && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_WOTLK_TIER_4))
if (mapid == MAP_THE_RUBY_SANCTUM && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_WOTLK_TIER_4))
{
return false;
}
@@ -235,7 +235,7 @@ public:
InstanceTemplate const* instanceTemplate = sObjectMgr->GetInstanceTemplate(mapid);
if (instanceTemplate)
{
if (instanceTemplate->Parent == MAP_OUTLANDS && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
if (instanceTemplate->Parent == MAP_OUTLAND && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
{
return false;
}
@@ -274,7 +274,7 @@ public:
}
}
bool CanGroupInvite(Player* player, std::string& membername) override
bool OnPlayerCanGroupInvite(Player* player, std::string& membername) override
{
if (!sIndividualProgression->enabled || !sIndividualProgression->enforceGroupRules || isExcludedFromProgression(player))
{
@@ -286,7 +286,7 @@ public:
return (currentState == otherPlayerState);
}
bool CanGroupAccept(Player* player, Group* group) override
bool OnPlayerCanGroupAccept(Player* player, Group* group) override
{
if (!sIndividualProgression->enabled || !sIndividualProgression->enforceGroupRules || isExcludedFromProgression(player))
{
@@ -300,7 +300,7 @@ public:
void OnCreatureKill(Player* killer, Creature* killed) override
void OnPlayerCreatureKill(Player* killer, Creature* killed) override
{
sIndividualProgression->checkKillProgression(killer, killed);
Group* group = killer->GetGroup();
@@ -319,7 +319,7 @@ public:
}
}
bool OnUpdateFishingSkill(Player* player, int32 /*skill*/, int32 /*zone_skill*/, int32 chance, int32 roll) override
bool OnPlayerUpdateFishingSkill(Player* player, int32 /*skill*/, int32 /*zone_skill*/, int32 chance, int32 roll) override
{
if (!sIndividualProgression->enabled || !sIndividualProgression->fishingFix || isExcludedFromProgression(player))
return true;
@@ -328,7 +328,7 @@ public:
return true;
}
void OnUpdateArea(Player* player, uint32 /*oldArea*/, uint32 newArea) override
void OnPlayerUpdateArea(Player* player, uint32 /*oldArea*/, uint32 newArea) override
{
switch (newArea) {
case AREA_LIGHTS_HOPE:
@@ -358,7 +358,7 @@ public:
}
}
void OnQueueRandomDungeon(Player* player, uint32& rDungeonId) override
void OnPlayerQueueRandomDungeon(Player* player, uint32& rDungeonId) override
{
// List of exceptions for seasonal event dungeons
std::set<uint32> seasonalEventDungeons = { 285, 286, 287, 288 };
@@ -389,7 +389,7 @@ public:
}
}
bool CanEquipItem(Player* player, uint8 /*slot*/, uint16& /*dest*/, Item* pItem, bool /*swap*/, bool /*not_loading*/) override
bool OnPlayerCanEquipItem(Player* player, uint8 /*slot*/, uint16& /*dest*/, Item* pItem, bool /*swap*/, bool /*not_loading*/) override
{
if (sIndividualProgression->pvpGearRequirements)
{

View File

@@ -1392,7 +1392,7 @@ class NaxxPlayerScript : public PlayerScript
public:
NaxxPlayerScript() : PlayerScript("NaxxPlayerScript") { }
void OnBeforeChooseGraveyard(Player* player, TeamId /*teamId*/, bool /*nearCorpse*/, uint32& graveyardOverride) override
void OnPlayerBeforeChooseGraveyard(Player* player, TeamId /*teamId*/, bool /*nearCorpse*/, uint32& graveyardOverride) override
{
if (player->GetMapId() == MAP_NAXX && player->GetMap()->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
{

View File

@@ -4,6 +4,7 @@
#include "GameObjectAI.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "WorldSessionMgr.h"
enum
{
@@ -163,7 +164,7 @@ public:
return;
if (announce)
sWorld->SendZoneText(GLOBAL_TEXT_CHAMPION, player->GetName().c_str());
sWorldSessionMgr->SendZoneText(GLOBAL_TEXT_CHAMPION, player->GetName().c_str());
eventTimer += 1000;
eventStage = STAGE_OPEN_GATES;