mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/AreaTriggers: Added helper static function AreaTrigger::CreateNewMovementForceId for use in scripts with movement forces
This commit is contained in:
@@ -225,6 +225,11 @@ AreaTrigger* AreaTrigger::CreateAreaTrigger(uint32 areaTriggerCreatePropertiesId
|
||||
return at;
|
||||
}
|
||||
|
||||
ObjectGuid AreaTrigger::CreateNewMovementForceId(Map* map, uint32 areaTriggerId)
|
||||
{
|
||||
return ObjectGuid::Create<HighGuid::AreaTrigger>(map->GetId(), areaTriggerId, map->GenerateLowGuid<HighGuid::AreaTrigger>());
|
||||
}
|
||||
|
||||
bool AreaTrigger::LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool /*addToMap*/, bool /*allowDuplicate*/)
|
||||
{
|
||||
_spawnId = spawnId;
|
||||
|
||||
@@ -71,6 +71,7 @@ class TC_GAME_API AreaTrigger : public WorldObject, public GridObject<AreaTrigge
|
||||
|
||||
public:
|
||||
static AreaTrigger* CreateAreaTrigger(uint32 areaTriggerCreatePropertiesId, Unit* caster, Unit* target, SpellInfo const* spell, Position const& pos, int32 duration, SpellCastVisual spellVisual, ObjectGuid const& castId = ObjectGuid::Empty, AuraEffect const* aurEff = nullptr);
|
||||
static ObjectGuid CreateNewMovementForceId(Map* map, uint32 areaTriggerId);
|
||||
bool LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap, bool allowDuplicate);
|
||||
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
Reference in New Issue
Block a user