Moved battleground achievement scripted checks into scripts
Call ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL updates in code Implemented achievements: Save the Day, Quick Cap, Warsong Expedience --HG-- branch : trunk
This commit is contained in:
@@ -201,6 +201,9 @@ void BattlegroundWS::StartingEventOpenDoors()
|
||||
|
||||
for (uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; ++i)
|
||||
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
|
||||
|
||||
// players joining later are not egible
|
||||
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, WS_EVENT_START_BATTLE);
|
||||
}
|
||||
|
||||
void BattlegroundWS::AddPlayer(Player *plr)
|
||||
@@ -459,6 +462,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target
|
||||
UpdateFlagState(HORDE, BG_WS_FLAG_STATE_ON_PLAYER);
|
||||
UpdateWorldState(BG_WS_FLAG_UNK_ALLIANCE, 1);
|
||||
Source->CastSpell(Source, BG_WS_SPELL_SILVERWING_FLAG, true);
|
||||
Source->GetAchievementMgr().StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET, BG_WS_SPELL_SILVERWING_FLAG_PICKED);
|
||||
if (m_FlagState[1] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
m_BothFlagsKept = true;
|
||||
}
|
||||
@@ -477,6 +481,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target
|
||||
UpdateFlagState(ALLIANCE, BG_WS_FLAG_STATE_ON_PLAYER);
|
||||
UpdateWorldState(BG_WS_FLAG_UNK_HORDE, 1);
|
||||
Source->CastSpell(Source, BG_WS_SPELL_WARSONG_FLAG, true);
|
||||
Source->GetAchievementMgr().StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET, BG_WS_SPELL_WARSONG_FLAG_PICKED);
|
||||
if (m_FlagState[0] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
m_BothFlagsKept = true;
|
||||
}
|
||||
|
||||
@@ -47,8 +47,10 @@ enum BG_WS_SpellId
|
||||
{
|
||||
BG_WS_SPELL_WARSONG_FLAG = 23333,
|
||||
BG_WS_SPELL_WARSONG_FLAG_DROPPED = 23334,
|
||||
BG_WS_SPELL_WARSONG_FLAG_PICKED = 61266, // fake spell, does not exist but used as timer start event
|
||||
BG_WS_SPELL_SILVERWING_FLAG = 23335,
|
||||
BG_WS_SPELL_SILVERWING_FLAG_DROPPED = 23336,
|
||||
BG_WS_SPELL_SILVERWING_FLAG_PICKED = 61265, // fake spell, does not exist but used as timer start event
|
||||
BG_WS_SPELL_FOCUSED_ASSAULT = 46392,
|
||||
BG_WS_SPELL_BRUTAL_ASSAULT = 46393
|
||||
};
|
||||
@@ -144,6 +146,8 @@ enum BG_WS_Objectives
|
||||
WS_OBJECTIVE_RETURN_FLAG = 44
|
||||
};
|
||||
|
||||
#define WS_EVENT_START_BATTLE 8563
|
||||
|
||||
class BattlegroundWGScore : public BattlegroundScore
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user