Spawn linked traps at gameobject creation instead of using DB spawns.
This commit is contained in:
@@ -337,6 +337,19 @@ namespace Game.Entities
|
||||
if (map.Is25ManRaid())
|
||||
loot.maxDuplicates = 3;
|
||||
|
||||
uint linkedEntry = GetGoInfo().GetLinkedGameObjectEntry();
|
||||
if (linkedEntry != 0)
|
||||
{
|
||||
GameObject linkedGO = new GameObject();
|
||||
if (linkedGO.Create(linkedEntry, map, phaseMask, pos, rotation, 255, GameObjectState.Ready))
|
||||
{
|
||||
SetLinkedTrap(linkedGO);
|
||||
map.AddToMap(linkedGO);
|
||||
}
|
||||
else
|
||||
linkedGO.Dispose();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2347,7 +2360,7 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
public void SetLinkedTrap(GameObject linkedTrap) { m_linkedTrap = linkedTrap.GetGUID(); }
|
||||
GameObject GetLinkedTrap()
|
||||
public GameObject GetLinkedTrap()
|
||||
{
|
||||
return ObjectAccessor.GetGameObject(this, m_linkedTrap);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user