diff options
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rwxr-xr-x | src/server/game/Spells/SpellEffects.cpp | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index cbc478078e5..b0db83e0187 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3632,36 +3632,10 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex) // Wild object not have owner and check clickable by players map->AddToMap(pGameObj); - if (pGameObj->GetGoType() == GAMEOBJECT_TYPE_FLAGDROP && m_caster->GetTypeId() == TYPEID_PLAYER) - { - Player* player = m_caster->ToPlayer(); - Battleground* bg = player->GetBattleground(); - - switch (pGameObj->GetMapId()) - { - case 489: //WS - { - if (bg && bg->GetTypeID(true) == BATTLEGROUND_WS && bg->GetStatus() == STATUS_IN_PROGRESS) - { - uint32 team = ALLIANCE; - - if (player->GetTeam() == team) - team = HORDE; - - ((BattlegroundWS*)bg)->SetDroppedFlagGUID(pGameObj->GetGUID(), team); - } - break; - } - case 566: //EY - { - if (bg && bg->GetTypeID(true) == BATTLEGROUND_EY && bg->GetStatus() == STATUS_IN_PROGRESS) - { - ((BattlegroundEY*)bg)->SetDroppedFlagGUID(pGameObj->GetGUID()); - } - break; - } - } - } + if (pGameObj->GetGoType() == GAMEOBJECT_TYPE_FLAGDROP) + if (Player* player = m_caster->ToPlayer()) + if (Battleground* bg = player->GetBattleground()) + bg->SetDroppedFlagGUID(pGameObj->GetGUID(), player->GetTeam() == ALLIANCE ? TEAM_HORDE: TEAM_ALLIANCE); if (uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry()) { |