Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add getter and setter for halaa ownership #79

Merged
merged 5 commits into from
Dec 30, 2022

Conversation

55Honey
Copy link
Member

@55Honey 55Honey commented Dec 29, 2022

Co-authored by @r-o-b-o-t-o

Adds new Global methods:
SetOwnerHalaa($teamId) //0=Alliance, 1 = Horde
GetOwnerHalaa() // returns { 0 or 1 for owner, $slider }

Tested with:

local function command( event, player, command, chathandler )
    if command == 'yx' then
        chathandler:SendSysMessage('SetOwnerHalaa(0)')
        SetOwnerHalaa(0)
    elseif command == 'as' then
            chathandler:SendSysMessage('SetOwnerHalaa(1)')
            SetOwnerHalaa(1)
    elseif command == 'qw' then
            chathandler:SendSysMessage('SetOwnerHalaa(2)')
            SetOwnerHalaa(2)
    elseif command == 'asdf' then
        local owner
        local slider
        owner, slider = GetOwnerHalaa()
        chathandler:SendSysMessage('GetOwnerHalaa(): '..owner..' slider: '..slider)
    end
    return false
end

RegisterPlayerEvent(42, command)

@r-o-b-o-t-o
Copy link
Member

Your commit is missing the methods in LuaFunctions.cpp

@55Honey
Copy link
Member Author

55Honey commented Dec 29, 2022

Happens when you dev on one machine and push/pull on the other. 🤐 Thanks for the reminder!

@55Honey 55Honey marked this pull request as ready for review December 29, 2022 00:52
@55Honey 55Honey marked this pull request as draft December 29, 2022 13:02
@55Honey 55Honey marked this pull request as ready for review December 29, 2022 22:52
@55Honey 55Honey merged commit aa6615b into azerothcore:master Dec 30, 2022
@heyitsbench
Copy link

heyitsbench commented Dec 30, 2022

Seems this has caused build errors:

In file included from /home/runner/work/azerothcore-wotlk/azerothcore-wotlk/modules/mod-eluna/src/LuaEngine/LuaFunctions.cpp:20:
/home/runner/work/azerothcore-wotlk/azerothcore-wotlk/modules/mod-eluna/src/LuaEngine/GlobalMethods.h:3349:65: fatal error: too few arguments to function call, single argument 'spawnId' was not specified
        OPvPCapturePointNA* halaa = nagrandPvp->GetCapturePoint();
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/home/runner/work/azerothcore-wotlk/azerothcore-wotlk/src/server/game/OutdoorPvP/OutdoorPvP.h:276:5: note: 'GetCapturePoint' declared here
    OPvPCapturePoint* GetCapturePoint(ObjectGuid::LowType spawnId) const
    ^
1 error generated.
make[2]: *** [modules/CMakeFiles/modules.dir/build.make:762: modules/CMakeFiles/modules.dir/mod-eluna/src/LuaEngine/LuaFunctions.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1235: modules/CMakeFiles/modules.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....]

@55Honey 55Honey deleted the expose-halaa branch December 30, 2022 09:54
@55Honey
Copy link
Member Author

55Honey commented Dec 30, 2022

Thanks for the heads-up @heyitsbench
azerothcore/azerothcore-wotlk#14394 still needs to be merged. Then it's gonna be fixed.
I had my fingers too quick there with the merge button.

55Honey added a commit to 55Honey/Acore_eventScripts that referenced this pull request Dec 30, 2022
Introduces a new event, teleporting players to Halaa instead of
Gurubashi.

Requires azerothcore/azerothcore-wotlk#14394 and
azerothcore/mod-eluna#79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants