Merge branch 'master' into VisitNearbyObject

This commit is contained in:
Kitzunu
2021-06-03 05:36:49 +02:00
committed by GitHub
5 changed files with 33 additions and 15 deletions

View File

@@ -1262,8 +1262,8 @@ namespace LuaUnit
Trinity::UnitListSearcher<Trinity::AnyFriendlyUnitInObjectRangeCheck> searcher(unit, list, checker);
Cell::VisitAllObjects(unit, searcher, range);
#elif AZEROTHCORE
acore::AnyFriendlyUnitInObjectRangeCheck checker(unit, unit, range);
acore::UnitListSearcher<acore::AnyFriendlyUnitInObjectRangeCheck> searcher(unit, list, checker);
Acore::AnyFriendlyUnitInObjectRangeCheck checker(unit, unit, range);
Acore::UnitListSearcher<Acore::AnyFriendlyUnitInObjectRangeCheck> searcher(unit, list, checker);
Cell::VisitAllObjects(unit, searcher, range);
#else
MaNGOS::AnyFriendlyUnitInObjectRangeCheck checker(unit, range);
@@ -1303,8 +1303,8 @@ namespace LuaUnit
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(unit, list, checker);
Cell::VisitAllObjects(unit, searcher, range);
#elif AZEROTHCORE
acore::AnyUnfriendlyUnitInObjectRangeCheck checker(unit, unit, range);
acore::UnitListSearcher<acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(unit, list, checker);
Acore::AnyUnfriendlyUnitInObjectRangeCheck checker(unit, unit, range);
Acore::UnitListSearcher<Acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(unit, list, checker);
Cell::VisitAllObjects(unit, searcher, range);
#else
MaNGOS::AnyUnfriendlyUnitInObjectRangeCheck checker(unit, range);

View File

@@ -188,7 +188,7 @@ namespace LuaWorldObject
Cell::VisitAllObjects(obj, searcher, range);
#elif AZEROTHCORE
acore::UnitLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Acore::UnitLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Cell::VisitAllObjects(obj, searcher, range);
#else
MaNGOS::UnitLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(target, checker);
@@ -220,7 +220,7 @@ namespace LuaWorldObject
Trinity::GameObjectLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Cell::VisitAllObjects(obj, searcher, range);
#elif AZEROTHCORE
acore::GameObjectLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Acore::GameObjectLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Cell::VisitAllObjects(obj, searcher, range);
#else
MaNGOS::GameObjectLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(target, checker);
@@ -254,7 +254,7 @@ namespace LuaWorldObject
Trinity::CreatureLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Cell::VisitAllObjects(obj, searcher, range);
#elif AZEROTHCORE
acore::CreatureLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Acore::CreatureLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Cell::VisitAllObjects(obj, searcher, range);
#else
MaNGOS::CreatureLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(target, checker);
@@ -287,7 +287,7 @@ namespace LuaWorldObject
Trinity::PlayerListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Cell::VisitAllObjects(obj, searcher, range);
#elif AZEROTHCORE
acore::PlayerListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Acore::PlayerListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Cell::VisitAllObjects(obj, searcher, range);
#else
MaNGOS::PlayerListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(list, checker);
@@ -331,7 +331,7 @@ namespace LuaWorldObject
Trinity::CreatureListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Cell::VisitAllObjects(obj, searcher, range);
#elif defined AZEROTHCORE
acore::CreatureListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Acore::CreatureListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Cell::VisitAllObjects(obj, searcher, range);
#else
MaNGOS::CreatureListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(list, checker);
@@ -373,7 +373,7 @@ namespace LuaWorldObject
Trinity::GameObjectListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Cell::VisitAllObjects(obj, searcher, range);
#elif AZEROTHCORE
acore::GameObjectListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Acore::GameObjectListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Cell::VisitAllObjects(obj, searcher, range);
#else
MaNGOS::GameObjectListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(list, checker);
@@ -423,7 +423,7 @@ namespace LuaWorldObject
Trinity::WorldObjectLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Cell::VisitAllObjects(obj, searcher, range);
#elif AZEROTHCORE
acore::WorldObjectLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Acore::WorldObjectLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, target, checker);
Cell::VisitAllObjects(obj, searcher, range);
#else
MaNGOS::WorldObjectLastSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(target, checker);
@@ -463,7 +463,7 @@ namespace LuaWorldObject
Trinity::WorldObjectListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Cell::VisitAllObjects(obj, searcher, range);
#elif AZEROTHCORE
acore::WorldObjectListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Acore::WorldObjectListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(obj, list, checker);
Cell::VisitAllObjects(obj, searcher, range);
#else
MaNGOS::WorldObjectListSearcher<ElunaUtil::WorldObjectInRangeCheck> searcher(list, checker);

View File

@@ -160,10 +160,14 @@ if __name__ == '__main__':
# Make a folder for the class.
os.mkdir('build/' + class_.name)
index_path = '{}/index.html'.format(class_.name)
sidebar_path = '{}/sidebar.js'.format(class_.name)
# Render the class's index page.
render('class.html', index_path, level=1, classes=classes, current_class=class_)
# Render the class's sidebar script.
render('sidebar.js', sidebar_path, level=1, classes=classes, current_class=class_)
# Render each method's page.
for method in class_.methods:
method_path = '{}/{}.html'.format(class_.name, method.name)

View File

@@ -23,9 +23,18 @@
{% block sidebar %}
<h2>{{ current_class.name }} Methods</h2>
{%- for method in current_class.methods %}
<a class="fn {{ 'current' if method == current_method }}" href="{{ root(current_class.name + '/' + method.name + '.html') }}">{{ method.name }}</a>
{%- endfor %}
<script src="sidebar.js"></script>
<script>
// Highlight current method by adding "current" class to it
var element = document.getElementById("{{ current_class.name + ':' + current_method.name }}");
if (element) {
var classname = "current";
arr = element.className.split(" ");
if (arr.indexOf(classname) == -1) {
element.className += " " + classname;
}
}
</script>
{% endblock %}

View File

@@ -0,0 +1,5 @@
document.write(`
{%- for method in current_class.methods %}
<a id="{{ current_class.name + ':' + method.name }}" class="fn" href="{{ root(current_class.name + '/' + method.name + '.html') }}">{{ method.name }}</a>
{%- endfor %}
`);