azerothcore / mod-arena-3v3-solo-queue

This module allows you to create groups of 3 against 3. It is still in development.
GNU Affero General Public License v3.0
6 stars 7 forks source link

Bug: There's no code for config 'Solo.3v3.ArenaPointsMulti' #4

Closed laasker closed 7 months ago

laasker commented 7 months ago

Current Behaviour

In the .conf file, there's an option 'Solo.3v3.ArenaPointsMulti' that should increase/decrease the Arena Points gained from 3v3 Solo Queue through the weekly rewarded points

Expected Behaviour

Should have a code for that option on the module

Steps to reproduce the problem

.

Extra Notes

No response

AC rev. hash/commit

https://github.com/azerothcore/azerothcore-wotlk/commit/e0bc7d73ddaae154dc113bbfa83390ffbb3040fb

Operating system

Windows 10 x64

Custom changes or Modules

No response

pangolp commented 7 months ago

Yes, there are several configuration variables, which are surely not related, because the issue was, removing the module more than anything from the other main module, trying to make it work, not causing a crash, and detecting in order to solve the different problems and reports, as is the case of this one.

laasker commented 7 months ago

Yes, there are several configuration variables, which are surely not related, because the issue was, removing the module more than anything from the other main module, trying to make it work, not causing a crash, and detecting in order to solve the different problems and reports, as is the case of this one.

I completely understand, sorry for the flood of topics, i tested the module and wanted to post the issues i encountered right away so i don't forget in the future haha

About the topic, i dont know if its possible to create this config without touching the core, but i don't think it would hurt to have an option below https://github.com/azerothcore/azerothcore-wotlk/blob/ca1abfef71d30cc01791c05e8edaaeda9aa9a670/src/server/game/Battlegrounds/ArenaTeam.cpp#L672

for this config, something like: else if (Type == ARENA_TEAM_5v5) points *= sWorld->getFloatConfig(Solo.3v3.ArenaPointsMulti);

pangolp commented 7 months ago

We have a hook for that, we do not need to modify the emulator, what we have to do is use the configuration, instead of the value that I temporarily set by hand. Instead of using that value, what we have to do is use the configuration variable and then everyone can modify it with the value they want, by default it is that value, and if not, we have to modify the configuration and that's it.

sScriptMgr->OnGetArenaPoints(this, points);

void Team3v3arena::OnGetArenaPoints(ArenaTeam* at, float& points)
{
    if (at->GetType() == ARENA_TEAM_SOLO_3v3)
    {
        points *= 0.64f;
    }
}