diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index d989a1ded..f2fc6b08e 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -33,6 +33,8 @@ #include "CellImpl.h" #include "Language.h" #include "MapManager.h" +#include "BattleGround.h" +#include "BattleGroundAB.h" #include "Policies/SingletonImp.h" @@ -79,6 +81,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) switch(criteria->requiredType) { + case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG: case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE: case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST: // only hardcoded list case ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING: @@ -231,6 +234,8 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) return false; } return true; + case ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE: + return true; // not check correctness node indexes default: sLog.outErrorDb( "Table `achievement_criteria_data` (Entry: %u Type: %u) have data for not supported data type (%u), ignore.", criteria->ID, criteria->requiredType,dataType); return false; @@ -299,6 +304,13 @@ bool AchievementCriteriaData::Meets(Player const* source, Unit const* target, ui return Player::GetDrunkenstateByValue(source->GetDrunkValue()) >= drunk.state; case ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY: return IsHolidayActive(HolidayIds(holiday.id)); + case ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE: + { + BattleGround* bg = source->GetBattleGround(); + if(!bg) + return false; + return bg->IsTeamScoreInRange(source->GetTeam()==ALLIANCE ? HORDE : ALLIANCE,bg_loss_team_score.min_score,bg_loss_team_score.max_score); + } } return false; } @@ -718,6 +730,54 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui // specialized cases + case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG: + { + // AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case + if (!miscvalue1) + continue; + if (achievementCriteria->win_bg.bgMapID != GetPlayer()->GetMapId()) + continue; + + if (achievementCriteria->win_bg.additionalRequirement1_type) + { + // those requirements couldn't be found in the dbc + AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria); + if (!data || !data->Meets(GetPlayer(),unit)) + continue; + } + // some hardcoded requirements + else + { + BattleGround* bg = GetPlayer()->GetBattleGround(); + if (!bg) + continue; + + switch(achievementCriteria->referredAchievement) + { + case 161: // AB, Overcome a 500 resource disadvantage + { + if (bg->GetTypeID() != BATTLEGROUND_AB) + continue; + if(!((BattleGroundAB*)bg)->IsTeamScores500disadvantage(GetPlayer()->GetTeam())) + continue; + break; + } + case 156: // AB, win while controlling all 5 flags (all nodes) + case 784: // EY, win while holding 4 bases (all nodes) + { + if(!bg->IsAllNodesConrolledByTeam(GetPlayer()->GetTeam())) + continue; + break; + } + case 1762: // SA, win without losing any siege vehicles + case 2192: // SA, win without losing any siege vehicles + continue; // not implemented + } + } + + SetCriteriaProgress(achievementCriteria, miscvalue1, PROGRESS_ACCUMULATE); + break; + } case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE: { // AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case @@ -1269,7 +1329,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING: break; // FIXME: not triggered in code as result, need to implement - case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG: case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY: case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID: case ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE: @@ -1338,6 +1397,8 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve switch(achievementCriteria->requiredType) { + case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG: + return progress->counter >= achievementCriteria->win_bg.winCount; case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE: return progress->counter >= achievementCriteria->kill_creature.creatureCount; case ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL: @@ -1843,6 +1904,10 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() switch(criteria->requiredType) { + case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG: + if(!criteria->win_bg.additionalRequirement1_type) + continue; + break; case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE: break; // any cases case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST: diff --git a/src/game/AchievementMgr.h b/src/game/AchievementMgr.h index 148a1b11d..d0b0b90a5 100644 --- a/src/game/AchievementMgr.h +++ b/src/game/AchievementMgr.h @@ -59,9 +59,10 @@ enum AchievementCriteriaDataType ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM = 14,// team HORDE(67), ALLIANCE(469) ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK = 15,// drunken_state 0 (enum DrunkenState) of player ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY = 16,// holiday_id 0 event in holiday time + ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE = 17,// min_score max_score player's team win bg and opposition team have team score in range }; -#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE 17 // maximum value in AchievementCriteriaDataType enum +#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE 18 // maximum value in AchievementCriteriaDataType enum class Player; class Unit; @@ -141,11 +142,17 @@ struct AchievementCriteriaData { uint32 state; } drunk; - // ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY + // ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY = 16 struct { - uint16 id; + uint32 id; } holiday; + // ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE= 17 + struct + { + uint32 min_score; + uint32 max_score; + } bg_loss_team_score; // ... struct { diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 0ffc65ed6..d06e44253 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -178,6 +178,9 @@ BattleGround::BattleGround() m_PlayersCount[BG_TEAM_ALLIANCE] = 0; m_PlayersCount[BG_TEAM_HORDE] = 0; + m_TeamScores[BG_TEAM_ALLIANCE] = 0; + m_TeamScores[BG_TEAM_HORDE] = 0; + m_PrematureCountDown = false; m_PrematureCountDown = 0; @@ -450,7 +453,7 @@ void BattleGround::Update(uint32 diff) void BattleGround::SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O) { - uint8 idx = GetTeamIndexByTeamId(TeamID); + BattleGroundTeamId idx = GetTeamIndexByTeamId(TeamID); m_TeamStartLocX[idx] = X; m_TeamStartLocY[idx] = Y; m_TeamStartLocZ[idx] = Z; @@ -1764,3 +1767,9 @@ WorldSafeLocsEntry const* BattleGround::GetClosestGraveYard( Player* player ) { return objmgr.GetClosestGraveYard( player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam() ); } + +bool BattleGround::IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const +{ + BattleGroundTeamId team_idx = GetTeamIndexByTeamId(team); + return m_TeamScores[team_idx] >= minScore && m_TeamScores[team_idx] <= maxScore; +} diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index 7d64036e2..e20556497 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -292,6 +292,10 @@ class BattleGround virtual void StartingEventCloseDoors() {} virtual void StartingEventOpenDoors() {} + /* achievement req. */ + virtual bool IsAllNodesConrolledByTeam(uint32 /*team*/) const { return false; } + bool IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const; + /* Battleground */ // Get methods: char const* GetName() const { return m_Name; } @@ -389,7 +393,7 @@ class BattleGround void SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O); void GetTeamStartLoc(uint32 TeamID, float &X, float &Y, float &Z, float &O) const { - uint8 idx = GetTeamIndexByTeamId(TeamID); + BattleGroundTeamId idx = GetTeamIndexByTeamId(TeamID); X = m_TeamStartLocX[idx]; Y = m_TeamStartLocY[idx]; Z = m_TeamStartLocZ[idx]; @@ -432,7 +436,7 @@ class BattleGround virtual void UpdatePlayerScore(Player *Source, uint32 type, uint32 value); - uint8 GetTeamIndexByTeamId(uint32 Team) const { return Team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE; } + static BattleGroundTeamId GetTeamIndexByTeamId(uint32 Team) { return Team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE; } uint32 GetPlayersCountByTeam(uint32 Team) const { return m_PlayersCount[GetTeamIndexByTeamId(Team)]; } uint32 GetAlivePlayersCountByTeam(uint32 Team) const; // used in arenas to correctly handle death in spirit of redemption / last stand etc. (killer = killed) cases void UpdatePlayersCountByTeam(uint32 Team, bool remove) @@ -500,6 +504,9 @@ class BattleGround void SetDeleteThis() {m_SetDeleteThis = true;} + /* virtual score-array - get's used in bg-subclasses */ + int32 m_TeamScores[BG_TEAMS_COUNT]; + protected: //this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends BattleGround void EndNow(); diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp index 65c2ea501..1a5d4a283 100644 --- a/src/game/BattleGroundAB.cpp +++ b/src/game/BattleGroundAB.cpp @@ -146,6 +146,18 @@ void BattleGroundAB::Update(uint32 diff) } } + // achievements flags + if (m_TeamScores[BG_TEAM_ALLIANCE] > m_TeamScores[BG_TEAM_HORDE]) + { + if (m_TeamScores[BG_TEAM_ALLIANCE] - m_TeamScores[BG_TEAM_HORDE] >= 500) + m_TeamScores500disadvantage[BG_TEAM_HORDE] = true; + } + else + { + if (m_TeamScores[BG_TEAM_HORDE] - m_TeamScores[BG_TEAM_ALLIANCE] >= 500) + m_TeamScores500disadvantage[BG_TEAM_ALLIANCE] = true; + } + // Test win condition if (m_TeamScores[BG_TEAM_ALLIANCE] >= BG_AB_MAX_TEAM_SCORE) EndBattleGround(ALLIANCE); @@ -413,7 +425,7 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*targ return; } - uint8 teamIndex = GetTeamIndexByTeamId(source->GetTeam()); + BattleGroundTeamId teamIndex = GetTeamIndexByTeamId(source->GetTeam()); // Check if player really could use this banner, not cheated if (!(m_Nodes[node] == 0 || teamIndex == m_Nodes[node]%2)) @@ -459,7 +471,7 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*targ m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME; // FIXME: node names not localized - if (teamIndex == 0) + if (teamIndex == BG_TEAM_ALLIANCE) SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED,CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node)); else SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED,CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node)); @@ -476,15 +488,15 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*targ _CreateBanner(node, BG_AB_NODE_TYPE_OCCUPIED, teamIndex, true); _SendNodeUpdate(node); m_NodeTimers[node] = 0; - _NodeOccupied(node,(teamIndex == 0) ? ALLIANCE:HORDE); + _NodeOccupied(node,(teamIndex == BG_TEAM_ALLIANCE) ? ALLIANCE:HORDE); // FIXME: node names not localized - if (teamIndex == 0) + if (teamIndex == BG_TEAM_ALLIANCE) SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED,CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node)); else SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED,CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node)); } - sound = (teamIndex == 0) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE; + sound = (teamIndex == BG_TEAM_ALLIANCE) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE; } // If node is occupied, change to enemy-contested else @@ -501,19 +513,19 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*targ m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME; // FIXME: node names not localized - if (teamIndex == 0) + if (teamIndex == BG_TEAM_ALLIANCE) SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED,CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node)); else SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED,CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node)); - sound = (teamIndex == 0) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE; + sound = (teamIndex == BG_TEAM_ALLIANCE) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE; } // If node is occupied again, send "X has taken the Y" msg. if (m_Nodes[node] >= BG_AB_NODE_TYPE_OCCUPIED) { // FIXME: team and node names not localized - if (teamIndex == 0) + if (teamIndex == BG_TEAM_ALLIANCE) SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN,CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, LANG_BG_AB_ALLY, _GetNodeNameId(node)); else SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN,CHAT_MSG_BG_SYSTEM_HORDE, NULL, LANG_BG_AB_HORDE, _GetNodeNameId(node)); @@ -576,6 +588,8 @@ void BattleGroundAB::Reset() bool isBGWeekend = false; //TODO FIXME - call sBattleGroundMgr.IsBGWeekend(m_TypeID); - you must also implement that call! m_HonorTics = (isBGWeekend) ? BG_AB_ABBGWeekendHonorTicks : BG_AB_NotABBGWeekendHonorTicks; m_ReputationTics = (isBGWeekend) ? BG_AB_ABBGWeekendReputationTicks : BG_AB_NotABBGWeekendReputationTicks; + m_TeamScores500disadvantage[BG_TEAM_ALLIANCE] = false; + m_TeamScores500disadvantage[BG_TEAM_HORDE] = false; for (uint8 i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i) { @@ -606,7 +620,7 @@ void BattleGroundAB::EndBattleGround(uint32 winner) WorldSafeLocsEntry const* BattleGroundAB::GetClosestGraveYard(Player* player) { - uint8 teamIndex = GetTeamIndexByTeamId(player->GetTeam()); + BattleGroundTeamId teamIndex = GetTeamIndexByTeamId(player->GetTeam()); // Is there any occupied node for this team? std::vector nodes; @@ -663,3 +677,14 @@ void BattleGroundAB::UpdatePlayerScore(Player *Source, uint32 type, uint32 value break; } } + +bool BattleGroundAB::IsAllNodesConrolledByTeam(uint32 team) const +{ + uint32 count = 0; + for(int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i) + if (team == ALLIANCE && m_Nodes[i] == BG_AB_NODE_STATUS_ALLY_OCCUPIED || + team == HORDE && m_Nodes[i] == BG_AB_NODE_STATUS_HORDE_OCCUPIED) + ++count; + + return count == BG_AB_DYNAMIC_NODES_COUNT; +} diff --git a/src/game/BattleGroundAB.h b/src/game/BattleGroundAB.h index b31b1f0f3..b907298b0 100644 --- a/src/game/BattleGroundAB.h +++ b/src/game/BattleGroundAB.h @@ -260,6 +260,9 @@ class BattleGroundAB : public BattleGround /* Nodes occupying */ virtual void EventPlayerClickedOnFlag(Player *source, GameObject* target_obj); + /* achievement req. */ + bool IsAllNodesConrolledByTeam(uint32 team) const; // overwrited + bool IsTeamScores500disadvantage(uint32 team) const { return m_TeamScores500disadvantage[GetTeamIndexByTeamId(team)]; } private: /* Gameobject spawning/despawning */ void _CreateBanner(uint8 node, uint8 type, uint8 teamIndex, bool delay); @@ -283,14 +286,13 @@ class BattleGroundAB : public BattleGround uint8 m_prevNodes[BG_AB_DYNAMIC_NODES_COUNT]; BG_AB_BannerTimer m_BannerTimers[BG_AB_DYNAMIC_NODES_COUNT]; uint32 m_NodeTimers[BG_AB_DYNAMIC_NODES_COUNT]; - uint32 m_TeamScores[BG_TEAMS_COUNT]; uint32 m_lastTick[BG_TEAMS_COUNT]; uint32 m_HonorScoreTics[BG_TEAMS_COUNT]; uint32 m_ReputationScoreTics[BG_TEAMS_COUNT]; bool m_IsInformedNearVictory; uint32 m_HonorTics; uint32 m_ReputationTics; - - + // need for achievements + bool m_TeamScores500disadvantage[BG_TEAMS_COUNT]; }; #endif diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp index 7a63b6729..60bfaa70e 100644 --- a/src/game/BattleGroundEY.cpp +++ b/src/game/BattleGroundEY.cpp @@ -118,7 +118,7 @@ void BattleGroundEY::StartingEventOpenDoors() void BattleGroundEY::AddPoints(uint32 Team, uint32 Points) { - uint8 team_index = GetTeamIndexByTeamId(Team); + BattleGroundTeamId team_index = GetTeamIndexByTeamId(Team); m_TeamScores[team_index] += Points; m_HonorScoreTics[team_index] += Points; if (m_HonorScoreTics[team_index] >= m_HonorTics ) @@ -897,3 +897,13 @@ WorldSafeLocsEntry const *BattleGroundEY::GetClosestGraveYard(Player* player) return nearestEntry; } + +bool BattleGroundEY::IsAllNodesConrolledByTeam(uint32 team) const +{ + uint32 count = 0; + for(int i = 0; i < EY_POINTS_MAX; ++i) + if (m_PointOwnedByTeam[i] == team && m_PointState[i] == EY_POINT_UNDER_CONTROL) + ++count; + + return count == EY_POINTS_MAX; +} diff --git a/src/game/BattleGroundEY.h b/src/game/BattleGroundEY.h index 4f9cf1223..05200658f 100644 --- a/src/game/BattleGroundEY.h +++ b/src/game/BattleGroundEY.h @@ -348,6 +348,8 @@ class BattleGroundEY : public BattleGround virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj); virtual void EventPlayerDroppedFlag(Player *Source); + /* achievement req. */ + bool IsAllNodesConrolledByTeam(uint32 team) const; private: void EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType); void EventTeamCapturedPoint(Player *Source, uint32 Point); @@ -367,7 +369,6 @@ class BattleGroundEY : public BattleGround void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; } void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; } - uint32 m_TeamScores[2]; uint32 m_HonorScoreTics[2]; uint32 m_TeamPointsCount[2]; diff --git a/src/game/BattleGroundWS.h b/src/game/BattleGroundWS.h index 093da3e53..bc393bd70 100644 --- a/src/game/BattleGroundWS.h +++ b/src/game/BattleGroundWS.h @@ -179,12 +179,10 @@ class BattleGroundWS : public BattleGround void AddPoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] += Points; } void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; } void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; } - private: uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde uint64 m_DroppedFlagGUID[2]; uint8 m_FlagState[2]; // for checking flag state - uint32 m_TeamScores[2]; int32 m_FlagsTimer[2]; int32 m_FlagsDropTimer[2]; diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 16484d272..8f7d8027a 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -1644,4 +1644,4 @@ LocaleConstant CliHandler::GetSessionDbcLocale() const int CliHandler::GetSessionDbLocaleIndex() const { return objmgr.GetDBCLocaleIndex(); -} \ No newline at end of file +} diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index 69254100e..d42fc8d9c 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -81,11 +81,14 @@ struct AchievementCriteriaEntry } kill_creature; // ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1 - // TODO: there are further criterias instead just winning struct { uint32 bgMapID; // 3 uint32 winCount; // 4 + uint32 additionalRequirement1_type; // 5 additional requirement 1 type + uint32 additionalRequirement1_value; // 6 additional requirement 1 value + uint32 additionalRequirement2_type; // 7 additional requirement 2 type + uint32 additionalRequirement2_value; // 8 additional requirement 1 value } win_bg; // ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5 diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp index ff4e3b732..868bc87e5 100644 --- a/src/game/GameEventMgr.cpp +++ b/src/game/GameEventMgr.cpp @@ -753,4 +753,4 @@ MANGOS_DLL_SPEC bool IsHolidayActive( HolidayIds id ) return true; return false; -} \ No newline at end of file +} diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index 022f31d4f..3ed40ad3d 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -1991,4 +1991,4 @@ bool GuildItemPosCount::isContainedIn(GuildItemPosCountVec const &vec) const return true; return false; -} \ No newline at end of file +} diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 0ac47c673..eb755b022 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -1013,4 +1013,4 @@ bool ItemRequiredTarget::IsFitToRequirements( Unit* pUnitTarget ) const default: return false; } -} \ No newline at end of file +} diff --git a/src/game/Makefile.am b/src/game/Makefile.am index 920dc6fbb..2feb09216 100644 --- a/src/game/Makefile.am +++ b/src/game/Makefile.am @@ -298,14 +298,6 @@ libmangosgame_a_SOURCES = \ GroupReference.h \ GroupRefManager.h -## Link against shared library -libmangosgame_a_LIBADD = \ - ../shared/libmangosshared.a \ - ../shared/Auth/libmangosauth.a \ - ../shared/Config/libmangosconfig.a \ - ../shared/Database/libmangosdatabase.a \ - ../shared/vmap/libmangosvmaps.a - ## Additional files to include when running 'make dist' # Precompiled Headers for WIN EXTRA_DIST = \ diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index 9c4223e34..cd0e1db02 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -335,4 +335,4 @@ void PetAI::AttackedBy(Unit *attacker) if(!m_creature->getVictim() && m_creature->GetCharmInfo() && !m_creature->GetCharmInfo()->HasReactState(REACT_PASSIVE) && (!m_creature->GetCharmInfo()->HasCommandState(COMMAND_STAY) || m_creature->canReachWithAttack(attacker))) AttackStart(attacker); -} \ No newline at end of file +} diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp index 62b9504da..fe72d5544 100644 --- a/src/game/ReputationMgr.cpp +++ b/src/game/ReputationMgr.cpp @@ -470,4 +470,4 @@ void ReputationMgr::UpdateRankCounters( ReputationRank old_rank, ReputationRank ++m_reveredFactionCount; if(new_rank >= REP_HONORED) ++m_honoredFactionCount; -} \ No newline at end of file +} diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 60a4ad155..2e7cf82e6 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5842,4 +5842,4 @@ void Spell::FillRaidOrPartyHealthPriorityTargets( UnitList &TagUnitMap, Unit* me TagUnitMap.push_back(healthQueue.top().getUnit()); healthQueue.pop(); } -} \ No newline at end of file +} diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp index 13f7417e5..1bfcc7e22 100644 --- a/src/game/Totem.cpp +++ b/src/game/Totem.cpp @@ -167,4 +167,4 @@ bool Totem::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) co break; } return Creature::IsImmunedToSpellEffect(spellInfo, index); -} \ No newline at end of file +} diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 5f604ed83..b320708c0 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8273" + #define REVISION_NR "8277" #endif // __REVISION_NR_H__