mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Battlegrounds: Move to scripts (#29799)
* Introduce new BattlegroundScript class for map/bg specific scripts
* Remove all sub, zone specific, battleground classes except Arena
* Move all bg zone scripts to new BattlegroundScripts class in script folder
* Remove ZoneScript from Battleground class
* Remove some unused hooks from Battleground
(cherry picked from commit be11f42a16)
This commit is contained in:
@@ -1592,18 +1592,7 @@ void Spell::EffectOpenLock()
|
||||
if (goInfo->GetNoDamageImmune() && player->HasUnitFlag(UNIT_FLAG_IMMUNE))
|
||||
return;
|
||||
|
||||
if (goInfo->type == GAMEOBJECT_TYPE_FLAGSTAND)
|
||||
{
|
||||
//CanUseBattlegroundObject() already called in CheckCast()
|
||||
// in battleground check
|
||||
if (Battleground* bg = player->GetBattleground())
|
||||
{
|
||||
if (bg->GetTypeID() == BATTLEGROUND_EY)
|
||||
bg->EventPlayerClickedOnFlag(player, gameObjTarget);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (m_spellInfo->Id == 1842 && gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP && gameObjTarget->GetOwner())
|
||||
if (m_spellInfo->Id == 1842 && gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP && gameObjTarget->GetOwner())
|
||||
{
|
||||
gameObjTarget->SetLootState(GO_JUST_DEACTIVATED);
|
||||
return;
|
||||
@@ -2968,11 +2957,6 @@ void Spell::EffectSummonObjectWild()
|
||||
// Wild object not have owner and check clickable by players
|
||||
map->AddToMap(go);
|
||||
|
||||
if (go->GetGoType() == GAMEOBJECT_TYPE_FLAGDROP)
|
||||
if (Player* player = m_caster->ToPlayer())
|
||||
if (Battleground* bg = player->GetBattleground())
|
||||
bg->SetDroppedFlagGUID(go->GetGUID(), bg->GetPlayerTeam(player->GetGUID()) == ALLIANCE ? TEAM_HORDE: TEAM_ALLIANCE);
|
||||
|
||||
if (GameObject* linkedTrap = go->GetLinkedTrap())
|
||||
{
|
||||
PhasingHandler::InheritPhaseShift(linkedTrap , m_caster);
|
||||
|
||||
Reference in New Issue
Block a user