aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2017_11_26_05_world_2016_11_01_03_world.sql4
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp14
-rw-r--r--src/server/game/Spells/SpellEffects.cpp49
3 files changed, 29 insertions, 38 deletions
diff --git a/sql/updates/world/master/2017_11_26_05_world_2016_11_01_03_world.sql b/sql/updates/world/master/2017_11_26_05_world_2016_11_01_03_world.sql
new file mode 100644
index 00000000000..7a551a16ade
--- /dev/null
+++ b/sql/updates/world/master/2017_11_26_05_world_2016_11_01_03_world.sql
@@ -0,0 +1,4 @@
+--
+DELETE FROM `gameobject` WHERE `guid` IN (25566, 26098, 26099, 26100, 26101, 26102, 35313, 35321, 35322, 35326, 35328, 35330, 35332, 35335, 35337, 35339, 44736, 206588, 206589, 206590, 206591, 206592, 206593, 206594, 206595, 206596, 206597, 206598, 206599, 206600, 206601, 206602, 206603, 206604, 206605, 206606, 206607, 206608, 206609, 206610, 206611, 206612, 206613, 206614, 206615, 206616, 206617, 206618, 206619, 206620, 206621, 206622, 206623, 206624, 206852, 206853, 206854, 206855, 206856, 206857, 206858, 206859, 206860, 206861, 206862, 206863, 206864, 206865, 206866, 206867, 206868, 206869, 206870, 206871, 206872, 206873, 206874, 150128, 57758, 57759, 57760, 57761, 57762, 57763, 57764, 57765, 57766, 57767, 67648, 61473, 65903, 65904, 66256, 66257, 66433, 66434, 13284, 13283, 13282, 13281, 13280, 13279, 13278, 86155, 86156, 86157, 86158, 219123, 219127, 219136, 219145, 219155, 219160, 219162, 219165, 219167, 219173, 219178, 219183, 219189, 219193, 219204, 219206, 219216, 219219, 219221, 219227, 219237, 219252, 219254, 219266, 219271, 219272, 219274, 219279, 219347, 219357, 219363, 219365, 219370, 87011, 219385, 219399, 219401, 219406, 219410);
+DELETE FROM `gameobject_addon` WHERE `guid` IN (25566, 26098, 26099, 26100, 26101, 26102, 35313, 35321, 35322, 35326, 35328, 35330, 35332, 35335, 35337, 35339, 44736, 206588, 206589, 206590, 206591, 206592, 206593, 206594, 206595, 206596, 206597, 206598, 206599, 206600, 206601, 206602, 206603, 206604, 206605, 206606, 206607, 206608, 206609, 206610, 206611, 206612, 206613, 206614, 206615, 206616, 206617, 206618, 206619, 206620, 206621, 206622, 206623, 206624, 206852, 206853, 206854, 206855, 206856, 206857, 206858, 206859, 206860, 206861, 206862, 206863, 206864, 206865, 206866, 206867, 206868, 206869, 206870, 206871, 206872, 206873, 206874, 150128, 57758, 57759, 57760, 57761, 57762, 57763, 57764, 57765, 57766, 57767, 67648, 61473, 65903, 65904, 66256, 66257, 66433, 66434, 13284, 13283, 13282, 13281, 13280, 13279, 13278, 86155, 86156, 86157, 86158, 219123, 219127, 219136, 219145, 219155, 219160, 219162, 219165, 219167, 219173, 219178, 219183, 219189, 219193, 219204, 219206, 219216, 219219, 219221, 219227, 219237, 219252, 219254, 219266, 219271, 219272, 219274, 219279, 219347, 219357, 219363, 219365, 219370, 87011, 219385, 219399, 219401, 219406, 219410);
+DELETE FROM `game_event_gameobject` WHERE `guid` IN (25566, 26098, 26099, 26100, 26101, 26102, 35313, 35321, 35322, 35326, 35328, 35330, 35332, 35335, 35337, 35339, 44736, 206588, 206589, 206590, 206591, 206592, 206593, 206594, 206595, 206596, 206597, 206598, 206599, 206600, 206601, 206602, 206603, 206604, 206605, 206606, 206607, 206608, 206609, 206610, 206611, 206612, 206613, 206614, 206615, 206616, 206617, 206618, 206619, 206620, 206621, 206622, 206623, 206624, 206852, 206853, 206854, 206855, 206856, 206857, 206858, 206859, 206860, 206861, 206862, 206863, 206864, 206865, 206866, 206867, 206868, 206869, 206870, 206871, 206872, 206873, 206874, 150128, 57758, 57759, 57760, 57761, 57762, 57763, 57764, 57765, 57766, 57767, 67648, 61473, 65903, 65904, 66256, 66257, 66433, 66434, 13284, 13283, 13282, 13281, 13280, 13279, 13278, 86155, 86156, 86157, 86158, 219123, 219127, 219136, 219145, 219155, 219160, 219162, 219165, 219167, 219173, 219178, 219183, 219189, 219193, 219204, 219206, 219216, 219219, 219221, 219227, 219237, 219252, 219254, 219266, 219271, 219272, 219274, 219279, 219347, 219357, 219363, 219365, 219370, 87011, 219385, 219399, 219401, 219406, 219410);
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 74ca9b1225d..6c736f66bf7 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -197,7 +197,7 @@ void GameObject::RemoveFromWorld()
}
}
-bool GameObject::Create(uint32 name_id, Map* map, uint32 /*phaseMask*/, Position const& pos, QuaternionData const& rotation, uint32 animprogress, GOState go_state, uint32 artKit /*= 0*/)
+bool GameObject::Create(uint32 name_id, Map* map, uint32 phaseMask, Position const& pos, QuaternionData const& rotation, uint32 animprogress, GOState go_state, uint32 artKit /*= 0*/)
{
ASSERT(map);
SetMap(map);
@@ -378,6 +378,18 @@ bool GameObject::Create(uint32 name_id, Map* map, uint32 /*phaseMask*/, Position
if (map->Is25ManRaid())
loot.maxDuplicates = 3;
+ if (uint32 linkedEntry = GetGOInfo()->GetLinkedGameObjectEntry())
+ {
+ GameObject* linkedGO = new GameObject();
+ if (linkedGO->Create(linkedEntry, map, phaseMask, pos, rotation, 255, GO_STATE_READY))
+ {
+ SetLinkedTrap(linkedGO);
+ map->AddToMap(linkedGO);
+ }
+ else
+ delete linkedGO;
+ }
+
return true;
}
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 5a9ecfdf79d..65b9d668999 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -3134,25 +3134,14 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
if (Battleground* bg = player->GetBattleground())
bg->SetDroppedFlagGUID(pGameObj->GetGUID(), player->GetTeam() == ALLIANCE ? TEAM_HORDE: TEAM_ALLIANCE);
- if (uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
+ if (GameObject* linkedTrap = pGameObj->GetLinkedTrap())
{
- GameObject* linkedGO = new GameObject();
- if (linkedGO->Create(linkedEntry, map, m_caster->GetPhaseMask(), Position(x, y, z, target->GetOrientation()), rot, 255, GO_STATE_READY))
- {
- pGameObj->SetLinkedTrap(linkedGO);
-
- linkedGO->CopyPhaseFrom(m_caster);
+ linkedTrap->CopyPhaseFrom(m_caster);
- linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
- linkedGO->SetSpellId(m_spellInfo->Id);
+ linkedTrap->SetRespawnTime(duration > 0 ? duration / IN_MILLISECONDS : 0);
+ linkedTrap->SetSpellId(m_spellInfo->Id);
- ExecuteLogEffectSummonObject(effIndex, linkedGO);
-
- // Wild object not have owner and check clickable by players
- map->AddToMap(linkedGO);
- }
- else
- delete linkedGO;
+ ExecuteLogEffectSummonObject(effIndex, linkedTrap);
}
}
@@ -4774,30 +4763,16 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
cMap->AddToMap(pGameObj);
- if (uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
+ if (GameObject* linkedTrap = pGameObj->GetLinkedTrap())
{
- GameObject* linkedGO = new GameObject;
- if (linkedGO->Create(linkedEntry, cMap, m_caster->GetPhaseMask(), pos, rot, 255, GO_STATE_READY))
- {
- pGameObj->SetLinkedTrap(linkedGO);
-
- linkedGO->CopyPhaseFrom(m_caster);
+ linkedTrap->CopyPhaseFrom(m_caster);
- linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
- //linkedGO->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
- linkedGO->SetSpellId(m_spellInfo->Id);
- linkedGO->SetOwnerGUID(m_caster->GetGUID());
+ linkedTrap->SetRespawnTime(duration > 0 ? duration / IN_MILLISECONDS : 0);
+ //linkedTrap->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
+ linkedTrap->SetSpellId(m_spellInfo->Id);
+ linkedTrap->SetOwnerGUID(m_caster->GetGUID());
- ExecuteLogEffectSummonObject(effIndex, linkedGO);
-
- linkedGO->GetMap()->AddToMap(linkedGO);
- }
- else
- {
- delete linkedGO;
- linkedGO = NULL;
- return;
- }
+ ExecuteLogEffectSummonObject(effIndex, linkedTrap);
}
}