Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
AreaTableUtils.h
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
6
#ifndef SKYFIRE_AREATABLEUTILS_H
7
#define SKYFIRE_AREATABLEUTILS_H
8
9
#include "
Define.h
"
10
11
namespace
Skyfire::AreaTable
12
{
13
template
<
class
ParentLookup>
14
uint32
ResolveRootZoneId
(
uint32
areaId, ParentLookup parentLookup)
15
{
16
uint32
rootId = areaId;
17
18
for
(
uint8
depth = 0; depth < 32; ++depth)
19
{
20
uint32
parentId = parentLookup(rootId);
21
if
(!parentId || parentId == rootId)
22
return
rootId;
23
24
rootId = parentId;
25
}
26
27
return
rootId;
28
}
29
30
uint32
GetRootZoneId
(
uint32
areaId);
31
}
32
33
#endif
Define.h
uint8
std::uint8_t uint8
Definition
Define.h:79
uint32
std::uint32_t uint32
Definition
Define.h:77
Skyfire::AreaTable
Definition
AreaTableUtils.cpp:10
Skyfire::AreaTable::GetRootZoneId
uint32 GetRootZoneId(uint32 areaId)
Definition
AreaTableUtils.cpp:11
Skyfire::AreaTable::ResolveRootZoneId
uint32 ResolveRootZoneId(uint32 areaId, ParentLookup parentLookup)
Definition
AreaTableUtils.h:14
src
server
game
DataStores
AreaTableUtils.h
Generated on
for Project SkyFire Core by
1.17.0