Skip to content

Commit

Permalink
Add Spawn Group Accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
kaytotes committed Jan 7, 2025
1 parent d3e25b3 commit c724d95
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tswow-core/Private/TSMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,16 @@ void TSMap::LoadGrid(float x, float y)
map->LoadGrid(x, y);
}

void TSMap::SpawnGroupSpawn(uint32 group, bool ignoreRespawn, bool force)
{
map->SpawnGroupSpawn(group, ignoreRespawn, force);
}

void TSMap::SpawnGroupDespawn(uint32 group, bool deleteRespawnTimes)
{
map->SpawnGroupDespawn(group, deleteRespawnTimes);
}

TC_GAME_API TSInstance ToInstance(TSMap map)
{
if (map.map && map->IsInstance())
Expand Down
2 changes: 2 additions & 0 deletions tswow-core/Public/TSMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ class TC_GAME_API TSMap: public TSEntityProvider, public TSWorldEntityProvider<T
TSEntity * GetData();
void DoDelayed(std::function<void(TSMap, TSMainThreadContext)> callback);
void LoadGrid(float x, float y);
void SpawnGroupSpawn(uint32 group, bool ignoreRespawn, bool force);
void SpawnGroupDespawn(uint32 group, bool deleteRespawnTimes);
private:
void LDoDelayed(sol::function callback);

Expand Down
10 changes: 10 additions & 0 deletions tswow-core/Public/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4289,6 +4289,16 @@ declare interface TSMap extends TSEntityProvider, TSWorldEntityProvider<TSMap> {
* @param y
*/
LoadGrid(x: float, y: float): void;

/**
* Activate a Spawn Group.
*/
SpawnGroupSpawn(group: uint32, ignoreRespawn: boolean, force: boolean): void;

/**
* Deactivate a Spawn Group.
*/
SpawnGroupDespawn(group: uint32, deleteRespawnTimes: boolean): void;
}

declare class TSItemEntry
Expand Down

0 comments on commit c724d95

Please sign in to comment.