mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Clean up some gameobject types in EffectOpenLock (#29532)
This commit is contained in:
@@ -3281,6 +3281,15 @@ void GameObject::Use(Unit* user)
|
||||
Delete();
|
||||
return;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_CAPTURE_POINT:
|
||||
{
|
||||
Player* player = user->ToPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
AssaultCapturePoint(player);
|
||||
return;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_ITEM_FORGE:
|
||||
{
|
||||
GameObjectTemplate const* info = GetGOInfo();
|
||||
|
||||
@@ -1597,11 +1597,6 @@ void Spell::EffectOpenLock()
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (goInfo->type == GAMEOBJECT_TYPE_CAPTURE_POINT)
|
||||
{
|
||||
gameObjTarget->AssaultCapturePoint(player);
|
||||
return;
|
||||
}
|
||||
else if (goInfo->type == GAMEOBJECT_TYPE_FLAGSTAND)
|
||||
{
|
||||
//CanUseBattlegroundObject() already called in CheckCast()
|
||||
@@ -1613,11 +1608,6 @@ void Spell::EffectOpenLock()
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (goInfo->type == GAMEOBJECT_TYPE_NEW_FLAG)
|
||||
{
|
||||
gameObjTarget->Use(player);
|
||||
return;
|
||||
}
|
||||
else if (m_spellInfo->Id == 1842 && gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP && gameObjTarget->GetOwner())
|
||||
{
|
||||
gameObjTarget->SetLootState(GO_JUST_DEACTIVATED);
|
||||
|
||||
Reference in New Issue
Block a user