mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
cleanup merge and some unneeded selects in functions
This commit is contained in:
@@ -372,7 +372,7 @@ class BattlefieldWG : public Battlefield
|
||||
void UpdatedDestroyedTowerCount(TeamId team);
|
||||
|
||||
void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1);
|
||||
|
||||
|
||||
void RemoveAurasFromPlayer(Player* player);
|
||||
|
||||
/**
|
||||
@@ -1458,48 +1458,27 @@ struct BfWGGameObjectBuilding
|
||||
if (m_Build)
|
||||
{
|
||||
if (disable)
|
||||
{
|
||||
switch (m_Build->GetEntry())
|
||||
{
|
||||
case 190221:
|
||||
case 190373:
|
||||
case 190377:
|
||||
case 190378:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
|
||||
break;
|
||||
}
|
||||
case 190356:
|
||||
case 190357:
|
||||
case 190358:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_WG->HideNpc(creature);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (m_Build->GetEntry())
|
||||
{
|
||||
case 190221:
|
||||
case 190373:
|
||||
case 190377:
|
||||
case 190378:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
|
||||
break;
|
||||
}
|
||||
case 190356:
|
||||
case 190357:
|
||||
case 190358:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_WG->ShowNpc(creature, true);
|
||||
|
||||
switch (m_Build->GetEntry())
|
||||
{
|
||||
case 190221:
|
||||
case 190373:
|
||||
case 190377:
|
||||
case 190378:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
|
||||
break;
|
||||
}
|
||||
case 190356:
|
||||
case 190357:
|
||||
case 190358:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1515,48 +1494,27 @@ struct BfWGGameObjectBuilding
|
||||
if (m_Build)
|
||||
{
|
||||
if (disable)
|
||||
{
|
||||
switch (m_Build->GetEntry())
|
||||
{
|
||||
case 190221:
|
||||
case 190373:
|
||||
case 190377:
|
||||
case 190378:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
|
||||
break;
|
||||
}
|
||||
case 190356:
|
||||
case 190357:
|
||||
case 190358:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_WG->HideNpc(creature);
|
||||
}
|
||||
m_WG->HideNpc(creature);
|
||||
else
|
||||
{
|
||||
switch (m_Build->GetEntry())
|
||||
{
|
||||
case 190221:
|
||||
case 190373:
|
||||
case 190377:
|
||||
case 190378:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
|
||||
break;
|
||||
}
|
||||
case 190356:
|
||||
case 190357:
|
||||
case 190358:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_WG->ShowNpc(creature, true);
|
||||
|
||||
switch (m_Build->GetEntry())
|
||||
{
|
||||
case 190221:
|
||||
case 190373:
|
||||
case 190377:
|
||||
case 190378:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
|
||||
break;
|
||||
}
|
||||
case 190356:
|
||||
case 190357:
|
||||
case 190358:
|
||||
{
|
||||
creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -972,14 +972,6 @@ bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effInd
|
||||
return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
|
||||
}
|
||||
|
||||
GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go)
|
||||
{
|
||||
ASSERT(go);
|
||||
|
||||
GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, NULL);
|
||||
return tmpscript->GetAI(go);
|
||||
}
|
||||
|
||||
bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger)
|
||||
{
|
||||
ASSERT(player);
|
||||
|
||||
@@ -301,7 +301,7 @@ class go_wg_vehicle_teleporter : public GameObjectScript
|
||||
_checkTimer(1000)
|
||||
{ }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (_checkTimer <= diff)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user