6 Commits

8 changed files with 87 additions and 44 deletions

24
.github/workflows/build-release.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Build And Release
on:
push:
branches:
- 'araxia-main'
pull_request:
branches:
- 'araxia-main'
- 'master'
jobs:
build-release:
runs-on: ubuntu-latest
container:
image: ghcr.io/araxiaonline/ac-wotlk-worldserver-devcontainer:latest
options: --user root
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: build
uses: araxiaonline/share-gh-workflows/.github/actions/build-tag-release@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag_release: true
event_name: ${{ github.event_name }}

View File

@@ -1,12 +0,0 @@
name: core-build
on:
push:
branches:
- 'master'
pull_request:
jobs:
build:
uses: azerothcore/reusable-workflows/.github/workflows/core_build_modules.yml@main
with:
module_repo: ${{ github.event.repository.name }}

View File

@@ -1,9 +1,22 @@
### [![Eluna](src/LuaEngine/docs/Eluna.png)](https://github.com/ElunaLuaEngine/Eluna)
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) Azeroth Core Module
## mod-eluna
![Latest Release](https://img.shields.io/github/v/release/araxiaonline/mod-eluna?label=current%20version)
![GitHub Release Date](https://img.shields.io/github/release-date/araxiaonline/mod-eluna)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/araxiaonline/mod-eluna/build-release.yml?branch=araxia-main&event=push&label=build%20status)
<p align="left">
<img src="https://github.com/araxiaonline/docs/blob/main/docs/media/logo-sm.png?raw=true" alt="Araxia Online" width="70" style="vertical-align: middle;"/>
<span style="font-size: 20px; vertical-align: middle;">Player Tested and Modified By Araxia Online</span>
</p>
## About
### [![Eluna](src/LuaEngine/docs/Eluna.png)](https://github.com/ElunaLuaEngine/Eluna)
Eluna Lua Engine &copy; is a lua engine embedded to World of Warcraft emulators. Eluna supports MaNGOS, CMaNGOS, TrinityCore and AzerothCore.
We are currently working hard to make Eluna better from inside and outside.
We are currently working hard to make Eluna better from inside and outside.
If you are having trouble with installation or scripts, please feel free to open an issue.
For documentation and reference see [Eluna API (AC version)](https://www.azerothcore.org/pages/eluna/index.html) and [Lua reference manual](http://www.lua.org/manual/5.2/).
@@ -21,7 +34,6 @@ The official Azerothcore Discord server offers a channel dedicated to lua develo
<img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" />
</a>
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) mod-eluna for AzerothCore
- Latest build status with azerothcore: [![Build Status](https://github.com/azerothcore/mod-eluna/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-eluna)
[english](README.md) | [中文说明](README_CN.md) | [Español](README_ES.md)
@@ -48,7 +60,7 @@ git clone https://github.com/azerothcore/mod-eluna.git mod-eluna
You need to run the cmake again and rebuild the project.
Eluna API for AC:
Eluna API for AC:
[https://www.azerothcore.org/pages/eluna/index.html](https://www.azerothcore.org/pages/eluna/index.html)

17
release.yml Normal file
View File

@@ -0,0 +1,17 @@
name: tag-release
on:
workflow_run:
workflows: ["core-build"]
types:
- completed
jobs:
release-on-push:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Release on Push
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: minor

View File

@@ -16,8 +16,9 @@
*/
#include "Chat.h"
#include "ElunaInstanceAI.h"
#include "ElunaEventMgr.h"
#include "Log.h"
#include "Logging/Log.h"
#include "LuaEngine.h"
#include "Pet.h"
#include "Player.h"
@@ -237,10 +238,10 @@ class Eluna_AllMapScript : public AllMapScript
public:
Eluna_AllMapScript() : AllMapScript("Eluna_AllMapScript") { }
void OnBeforeCreateInstanceScript(InstanceMap* instanceMap, InstanceScript* instanceData, bool /*load*/, std::string /*data*/, uint32 /*completedEncounterMask*/) override
void OnBeforeCreateInstanceScript(InstanceMap* instanceMap, InstanceScript** instanceData, bool /*load*/, std::string /*data*/, uint32 /*completedEncounterMask*/) override
{
if (instanceData)
*instanceData = sEluna->GetInstanceData(instanceMap);
*instanceData = static_cast<InstanceScript*>(sEluna->GetInstanceData(instanceMap));
}
void OnDestroyInstance(MapInstanced* /*mapInstanced*/, Map* map) override

View File

@@ -58,7 +58,7 @@ if( ${CMAKE_PROJECT_NAME} STREQUAL "MaNGOS" )
${CMAKE_SOURCE_DIR}/src/game/WorldHandlers
${CMAKE_SOURCE_DIR}/src/game/Object
)
if( WIN32 )
if ( MSVC )
add_custom_command(TARGET LuaEngine
@@ -74,7 +74,7 @@ if( ${CMAKE_PROJECT_NAME} STREQUAL "MaNGOS" )
)
endif()
endif()
install(DIRECTORY extensions DESTINATION "${BIN_DIR}/lua_scripts/")
endif()

View File

@@ -22,7 +22,7 @@
#endif
#else
#include "Database/QueryResult.h"
#include "Log.h"
#include "Logging/Log.h"
#endif
#if defined(TRINITY) || defined(AZEROTHCORE)

View File

@@ -176,7 +176,7 @@ namespace LuaPlayer
return 1;
}
#endif
/**
* Returns `true` if the [Player] has the given amount of item entry specified, `false` otherwise.
*
@@ -193,7 +193,7 @@ namespace LuaPlayer
Eluna::Push(L, player->HasItemCount(itemId, count, check_bank));
return 1;
}
/**
* Returns `true` if the [Player] has a quest for the item entry specified, `false` otherwise.
*
@@ -207,7 +207,7 @@ namespace LuaPlayer
Eluna::Push(L, player->HasQuestForItem(entry));
return 1;
}
/**
* Returns `true` if the [Player] can use the item or item entry specified, `false` otherwise.
*
@@ -417,7 +417,7 @@ namespace LuaPlayer
Eluna::Push(L, player->HasTankSpec());
return 1;
}
/**
* Returns `true` if the [Player] has a Melee Specialization, `false` otherwise.
*
@@ -428,7 +428,7 @@ namespace LuaPlayer
Eluna::Push(L, player->HasMeleeSpec());
return 1;
}
/**
* Returns `true` if the [Player] has a Caster Specialization, `false` otherwise.
*
@@ -439,7 +439,7 @@ namespace LuaPlayer
Eluna::Push(L, player->HasCasterSpec());
return 1;
}
/**
* Returns `true` if the [Player] has a Heal Specialization, `false` otherwise.
*
@@ -942,8 +942,8 @@ namespace LuaPlayer
{
AchievementEntry const* achievement = sAchievementStore.LookupEntry(pair.first);
if (achievement && (achievement->categoryId != 81 || countFeatsOfStrength))
{
count++;
{
count++;
}
}
@@ -1596,7 +1596,7 @@ namespace LuaPlayer
Eluna::Push(L, player->GetItemByEntry(entry));
return 1;
}
/**
* Returns the database textID of the [WorldObject]'s gossip header text for the [Player]
*
@@ -1668,7 +1668,7 @@ namespace LuaPlayer
Eluna::Push(L, player->GetTeamId());
return 1;
}
/**
* Returns amount of the specified [Item] the [Player] has.
*
@@ -1847,7 +1847,7 @@ namespace LuaPlayer
Eluna::Push(L, ChatHandler(player->GetSession()).GetNearbyGameObject());
return 1;
}*/
/**
* Locks the player controls and disallows all movement and casting.
*
@@ -2345,7 +2345,7 @@ namespace LuaPlayer
return 0;
}
#endif
/**
* Shows the mailbox window to the player from specified guid.
*
@@ -2550,7 +2550,7 @@ namespace LuaPlayer
player->GetSession()->SendShowBank(obj->GET_GUID());
return 0;
}
/**
* Sends a vendor window to the [Player] from the [WorldObject] specified.
*
@@ -3458,7 +3458,7 @@ namespace LuaPlayer
player->AutoUnequipOffhandIfNeed();
return 1;
}
/**
* Returns true if the player can equip the given [Item] or item entry to the given slot, false otherwise.
*
@@ -3631,7 +3631,7 @@ namespace LuaPlayer
player->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, currentKills + val);
return 0;
}
/**
* Adds the given amount of the specified item entry to the player.
*
@@ -3666,7 +3666,7 @@ namespace LuaPlayer
#endif
return 1;
}
/**
* Removes the given amount of the specified [Item] from the player.
*
@@ -3804,7 +3804,8 @@ namespace LuaPlayer
{
std::string msg = Eluna::CHECKVAL<std::string>(L, 2);
if (msg.length() > 0)
ChatHandler(player->GetSession()).SendNotification("{}", msg);
player->GetSession()->SendNotification("%s", msg.c_str());
// ChatHandler(player->GetSession()).SendNotification("{}", msg); --
return 0;
}
@@ -4015,9 +4016,9 @@ namespace LuaPlayer
/**
* Adds a new item to the gossip menu shown to the [Player] on next call to [Player:GossipSendMenu].
*
* sender and intid are numbers which are passed directly to the gossip selection handler. Internally they are partly used for the database gossip handling.
* code specifies whether to show a box to insert text to. The player inserted text is passed to the gossip selection handler.
* money specifies an amount of money the player needs to have to click the option. An error message is shown if the player doesn't have enough money.
* sender and intid are numbers which are passed directly to the gossip selection handler. Internally they are partly used for the database gossip handling.
* code specifies whether to show a box to insert text to. The player inserted text is passed to the gossip selection handler.
* money specifies an amount of money the player needs to have to click the option. An error message is shown if the player doesn't have enough money.
* Note that the money amount is only checked client side and is not removed from the player either. You will need to check again in your code before taking action.
*
* See also: [Player:GossipSendMenu], [Player:GossipAddQuests], [Player:GossipComplete], [Player:GossipClearMenu]
@@ -4105,7 +4106,7 @@ namespace LuaPlayer
* Clears the [Player]s current gossip item list.
*
* See also: [Player:GossipMenuAddItem], [Player:GossipSendMenu], [Player:GossipAddQuests], [Player:GossipComplete]
*
*
* Note: This is needed when you show a gossip menu without using gossip hello or select hooks which do this automatically.
* Usually this is needed when using [Player] is the sender of a Gossip Menu.
*/