diff options
| author | Shauren <shauren.trinity@gmail.com> | 2022-07-23 19:13:33 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-07-23 19:13:33 +0200 |
| commit | 16a06346aea16ffd6ee84081cedfdb0c75ac0b38 (patch) | |
| tree | 61661f0914f1a19cc7f6a9bd04eabf9f8f6e846a /src/server/game/Scripting | |
| parent | 82138bec18751eb889f364169cb53481eb90cdbd (diff) | |
Core/Maps: Move terrain data handling out of Map class
Partial port of cmangos/mangos-wotlk@ff5232c64809207b5fa59d62e9870f58a36b6f3f
Diffstat (limited to 'src/server/game/Scripting')
| -rw-r--r-- | src/server/game/Scripting/ScriptMgr.cpp | 36 | ||||
| -rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 9 |
2 files changed, 0 insertions, 45 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 9c2821fa962..6733988ae85 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1538,42 +1538,6 @@ void ScriptMgr::OnDestroyMap(Map* map) SCR_MAP_END; } -void ScriptMgr::OnLoadGridMap(Map* map, GridMap* gmap, uint32 gx, uint32 gy) -{ - ASSERT(map); - ASSERT(gmap); - - SCR_MAP_BGN(WorldMapScript, map, itr, end, entry, IsWorldMap); - itr->second->OnLoadGridMap(map, gmap, gx, gy); - SCR_MAP_END; - - SCR_MAP_BGN(InstanceMapScript, map, itr, end, entry, IsDungeon); - itr->second->OnLoadGridMap((InstanceMap*)map, gmap, gx, gy); - SCR_MAP_END; - - SCR_MAP_BGN(BattlegroundMapScript, map, itr, end, entry, IsBattleground); - itr->second->OnLoadGridMap((BattlegroundMap*)map, gmap, gx, gy); - SCR_MAP_END; -} - -void ScriptMgr::OnUnloadGridMap(Map* map, GridMap* gmap, uint32 gx, uint32 gy) -{ - ASSERT(map); - ASSERT(gmap); - - SCR_MAP_BGN(WorldMapScript, map, itr, end, entry, IsWorldMap); - itr->second->OnUnloadGridMap(map, gmap, gx, gy); - SCR_MAP_END; - - SCR_MAP_BGN(InstanceMapScript, map, itr, end, entry, IsDungeon); - itr->second->OnUnloadGridMap((InstanceMap*)map, gmap, gx, gy); - SCR_MAP_END; - - SCR_MAP_BGN(BattlegroundMapScript, map, itr, end, entry, IsBattleground); - itr->second->OnUnloadGridMap((BattlegroundMap*)map, gmap, gx, gy); - SCR_MAP_END; -} - void ScriptMgr::OnPlayerEnterMap(Map* map, Player* player) { ASSERT(map); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 06ab3c2d0c8..672f5dc6bf0 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -41,7 +41,6 @@ class DynamicObject; class GameObject; class GameObjectAI; class Guild; -class GridMap; class Group; class InstanceMap; class InstanceScript; @@ -348,12 +347,6 @@ class MapScript : public UpdatableScript<TMap> // Called just before the map is destroyed. virtual void OnDestroy(TMap* /*map*/) { } - // Called when a grid map is loaded. - virtual void OnLoadGridMap(TMap* /*map*/, GridMap* /*gmap*/, uint32 /*gx*/, uint32 /*gy*/) { } - - // Called when a grid map is unloaded. - virtual void OnUnloadGridMap(TMap* /*map*/, GridMap* /*gmap*/, uint32 /*gx*/, uint32 /*gy*/) { } - // Called when a player enters the map. virtual void OnPlayerEnter(TMap* /*map*/, Player* /*player*/) { } @@ -1112,8 +1105,6 @@ class TC_GAME_API ScriptMgr void OnCreateMap(Map* map); void OnDestroyMap(Map* map); - void OnLoadGridMap(Map* map, GridMap* gmap, uint32 gx, uint32 gy); - void OnUnloadGridMap(Map* map, GridMap* gmap, uint32 gx, uint32 gy); void OnPlayerEnterMap(Map* map, Player* player); void OnPlayerLeaveMap(Map* map, Player* player); void OnMapUpdate(Map* map, uint32 diff); |
