opentibiabr / myaac

A free and open-source Automatic Account Creator (AAC) written in PHP
GNU General Public License v3.0
14 stars 46 forks source link

Guild Wars #59

Open cys9211 opened 9 months ago

cys9211 commented 9 months ago

Priority

High

Area

System

What OS are you seeing the problem on?

Windows

Browser

Chrome, Firefox, Edge, Opera, Safari, Other

What happened?

No possibility to declare war on the guild. There are no buttons to control guild wars.

Code of Conduct

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 120 days with no activity.

tomasz1337 commented 5 months ago

bump

ImConsKrypt commented 4 months ago

EDIT After I submitted this comment I discovered that there is more to get this to work and will update this once I have ironed out the issues most likely with a pull request.

EDIT 2 I have made progress and will submit a pull request - although my "fix" is not ideal but it's seemingly working as intended. image image After kill; image image


In file guilds.view.html.twig located in /system/templates/ of your website edit the following;

AFTER line 133 add this;

                          <a href="?subtopic=guilds&guild={{ guild_name }}&action=guildwars_declare" style="padding:0px;margin:0px;">
                            {% set button_name = 'Declare War' %}
                            {% include('buttons.base.html.twig') %}
                          </a>
                          <div style="font-size:1px;height:4px;"></div>
                          <a href="?subtopic=guilds&guild={{ guild_name }}&action=guildwars"  style="padding:0px;margin:0px;">
                            {% set button_name = 'View Active Wars' %}
                            {% include('buttons.base.html.twig') %}
                          </a>
                          <div style="font-size:1px;height:4px;"></div>

You then should have access to declare war on another guild image

You will also have to make some changes to guildwars.php which is located in /system/pages/guilds/ Line 64: (replace the entire line with below);

$wars_list = $db->query('SELECT `id`, `guild1`, `guild2`, `name1`, `name2`, `status`, `duration_days`, `frags`, `price1`, `price2` FROM `guild_wars`');

otherwise it will error out when you try to view the current war/accept a war request.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 120 days with no activity.