updated gitignore to include modules

This commit is contained in:
mikx
2023-11-07 18:17:57 -05:00
parent 749adf47ca
commit bde1978585
429 changed files with 104850 additions and 6 deletions

View File

@@ -0,0 +1,8 @@
[*]
charset = utf-8
indent_style = space
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80

104
modules/mod-aoe-loot/.gitattributes vendored Normal file
View File

@@ -0,0 +1,104 @@
## AUTO-DETECT
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text eol=lf
# Text
*.conf text
*.conf.dist text
*.cmake text
## Scripts
*.sh text
*.fish text
*.lua text
## SQL
*.sql text
## C++
*.c text
*.cc text
*.cxx text
*.cpp text
*.c++ text
*.hpp text
*.h text
*.h++ text
*.hh text
## For documentation
# Documents
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
## DOCUMENTATION
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
COPYRIGHT text
INSTALL text
license text
LICENSE text
NEWS text
readme text
README text
TODO text
## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary
## ARCHIVES
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary
## EXECUTABLES
*.exe binary
*.pyc binary

View File

@@ -0,0 +1,72 @@
name: Bug report
description: Create a bug report to help us improve.
title: "Bug: "
body:
- type: textarea
id: current
attributes:
label: Current Behaviour
description: |
Description of the problem or issue here.
Include entries of affected creatures / items / quests / spells etc.
If this is a crash, post the crashlog (upload to https://gist.github.com/) and include the link here.
Never upload files! Use GIST for text and YouTube for videos!
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behaviour
description: |
Tell us what should happen instead.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to reproduce the problem
description: |
What does someone else need to do to encounter the same bug?
placeholder: |
1. Step 1
2. Step 2
3. Step 3
validations:
required: true
- type: textarea
id: extra
attributes:
label: Extra Notes
description: |
Do you have any extra notes that can help solve the issue that does not fit any other field?
placeholder: |
None
validations:
required: false
- type: textarea
id: commit
attributes:
label: AC rev. hash/commit
description: |
Copy the result of the `.server debug` command (if you need to run it from the client get a prat addon)
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
description: |
The Operating System the Server is running on.
i.e. Windows 11 x64, Debian 10 x64, macOS 12, Ubuntu 20.04
validations:
required: true
- type: textarea
id: custom
attributes:
label: Custom changes or Modules
description: |
List which custom changes or modules you have applied, i.e. Eluna module, etc.
placeholder: |
None
validations:
required: false

View File

@@ -0,0 +1,33 @@
name: Feature request
description: Suggest an idea for this project
title: "Feature: "
body:
- type: markdown
attributes:
value: |
Thank you for taking your time to fill out a feature request. Remember to fill out all fields including the title above.
An issue that is not properly filled out will be closed.
- type: textarea
id: description
attributes:
label: Describe your feature request or suggestion in detail
description: |
A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe a possible solution to your feature or suggestion in detail
description: |
A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional context
description: |
Add any other context or screenshots about the feature request here.
validations:
required: false

28
modules/mod-aoe-loot/.github/README.md vendored Normal file
View File

@@ -0,0 +1,28 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
## # mod-aoe-loot
[English](README.md) | [Español](README_ES.md)
- Latest build status with azerothcore:
[![Build Status](https://github.com/azerothcore/mod-aoe-loot/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-aoe-loot)
## Important notes
There may still be some improvements to be made to the module, but you could say that it is pretty good. However, we are still going to continue working and trying to revise what is needed, as long as tests are performed and it can be determined that the reports are valid.
For the module to work, 4 things are needed.
- [x] Create the `CanSendErrorAlreadyLooted` hook. (created)
- [x] Create the hook `CanSendCreatureLoot` (created)
- [x] Create the hook `OnBeforeCreatureLootMoney` (created)
- [x] The module works, if the player takes an object from the loot. If the player selects gold, it does not run. So we want to check that and also correct to be able to add up the total amount of gold obtained.
- [x] If the creature can be skinned, the body remains for a while, and when it is skinned, it automatically disappears to avoid being skinned again.
This module requires the following pull request
https://github.com/azerothcore/azerothcore-wotlk/pull/16589
## Description
The objective of this module is to allow players to obtain all items from various npc's within a certain distance range.

View File

@@ -0,0 +1,28 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
## # mod-aoe-loot
[English](README.md) | [Español](README_ES.md)
- Último estado de compilación con azerothcore:
[![Build Status](https://github.com/azerothcore/mod-aoe-loot/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-aoe-loot)
## Notas importantes
Puede que todavia, haya que hacerle alguna mejora al modulo, pero se podria decir que esta bastante bien. Sin embargo, aun se va a seguir trabajando y tratando de revisar lo que haga falta, en la medida, en la que se realicen pruebas y se pueda determinar, que los reportes son validos.
Para que el módulo funcione, se necesitan 4 cosas.
- [x] Crear el hook `CanSendErrorAlreadyLooted`. (creado)
- [x] Crear el hook `CanSendCreatureLoot` (creado)
- [x] Crear el hook `OnBeforeCreatureLootMoney` (creado)
- [x] El módulo funciona, si el jugador toma un objeto del botín. Si el jugador selecciona oro, no funciona. Así que queremos comprobar que funcione y también poder sumar la cantidad total de oro obtenida.
- [x] Si la criatura, puede ser desollada, el cuerpo, permanece por un tiempo, y cuando el mismo es desollado, automáticamente desaparece, para evitar ser desollado nuevamente.
Este módulo requiere el siguiente pull request
https://github.com/azerothcore/azerothcore-wotlk/pull/16589
## Descripción
El objetivo de este módulo es permitir a los jugadores obtener todos los objetos de varios npc's dentro de un cierto rango de distancia.

View File

@@ -0,0 +1,12 @@
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 }}

47
modules/mod-aoe-loot/.gitignore vendored Normal file
View File

@@ -0,0 +1,47 @@
!.gitignore
#
#Generic
#
.directory
.mailmap
* .orig
* .rej
* .*~
.hg /
*.kdev *
.DS_Store
CMakeLists.txt.user
* .bak
* .patch
* .diff
* .REMOTE.*
* .BACKUP.*
* .BASE.*
* .LOCAL.*
#
# IDE & other softwares
#
/ .settings/
/.externalToolBuilders/*
# exclude in all levels
nbproject/
.sync.ffs_db
*.kate-swp
#
# Eclipse
#
*.pydevproject
.metadata
.gradle
tmp/
*.tmp
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.cproject

View File

@@ -0,0 +1,26 @@
#
# This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# User has manually chosen to ignore the git-tests, so throw them a warning.
# This is done EACH compile so they can be alerted about the consequences.
#
########################################
# AoeLoot module configuration
########################################
#
# AOELoot.Enable
# Description: Enables Module
# Default: 0 - (Disabled)
# 1 - (Enabled)
#
AOELoot.Enable = 1

View File

View File

@@ -0,0 +1,5 @@
SET @ENTRY:=50000;
DELETE FROM `acore_string` WHERE `entry` IN (@ENTRY+0, @ENTRY+1);
INSERT INTO `acore_string` (`entry`, `content_default`, `locale_koKR`, `locale_frFR`, `locale_deDE`, `locale_zhCN`, `locale_zhTW`, `locale_esES`, `locale_esMX`, `locale_ruRU`) VALUES
(@ENTRY+0, 'This server is running the |cff4CFF00Loot aoe|r module.', '', '', '', '', '', 'Este servidor está ejecutando el módulo |cff4CFF00Loot aoe|r.', 'Este servidor está ejecutando el módulo |cff4CFF00Loot aoe|r.', ''),
(@ENTRY+1, '|cff4CFF00[Loot aoe]|r Your items has been mailed to you.', '', '', '', '', '', '|cff4CFF00[Loot aoe]|r Sus artículos le han sido enviados por correo.', '|cff4CFF00[Loot aoe]|r Sus artículos le han sido enviados por correo.', '');

View File

View File

@@ -0,0 +1,25 @@
<!-- First of all, THANK YOU for your contribution. -->
## Changes Proposed:
-
-
## Issues Addressed:
<!-- If your fix has a relating issue, link it below -->
- Closes
## SOURCE:
<!-- If you can, include a source that can strengthen your claim -->
## Tests Performed:
<!-- Does it build without errors? Did you test in-game? What did you test? On which OS did you test? Describe any other tests performed -->
-
-
## How to Test the Changes:
<!-- Describe in a detailed step-by-step order how to test the changes -->
1.
2.
3.

View File

@@ -0,0 +1,130 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Log.h"
#include "ScriptMgr.h"
#include "Config.h"
#include "Chat.h"
#include "Player.h"
#include "ScriptedGossip.h"
enum AoeLootString
{
AOE_ACORE_STRING_MESSAGE = 50000,
AOE_ITEM_IN_THE_MAIL
};
class AoeLoot_Player : public PlayerScript
{
public:
AoeLoot_Player() : PlayerScript("AoeLoot_Player") { }
void OnLogin(Player* player) override
{
if (sConfigMgr->GetOption<bool>("AOELoot.Enable", true))
{
ChatHandler(player->GetSession()).PSendSysMessage(AOE_ACORE_STRING_MESSAGE);
}
}
bool CanSendErrorAlreadyLooted(Player* /*player*/) override
{
return true;
}
void OnCreatureLootAOE(Player* player)
{
bool _enable = sConfigMgr->GetOption<bool>("AOELoot.Enable", true);
if (player->GetGroup() || !_enable)
return;
float range = 30.0f;
uint32 gold = 0;
std::list<Creature*> creaturedie;
player->GetDeadCreatureListInGrid(creaturedie, range);
for (auto const& _creature : creaturedie)
{
Loot* loot = &_creature->loot;
gold += loot->gold;
loot->gold = 0;
uint8 lootSlot = 0;
uint32 maxSlot = loot->GetMaxSlotInLootFor(player);
for (uint32 i = 0; i < maxSlot; ++i)
{
if (LootItem* item = loot->LootItemInSlot(i, player))
{
if (player->AddItem(item->itemid, item->count))
{
player->SendNotifyLootItemRemoved(lootSlot);
player->SendLootRelease(player->GetLootGUID());
}
else
{
player->SendItemRetrievalMail(item->itemid, item->count);
ChatHandler(player->GetSession()).SendSysMessage(AOE_ITEM_IN_THE_MAIL);
}
}
}
if (!loot->empty())
{
if (!_creature->IsAlive())
{
_creature->AllLootRemovedFromCorpse();
_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
loot->clear();
if (_creature->HasUnitFlag(UNIT_FLAG_SKINNABLE))
{
_creature->RemoveUnitFlag(UNIT_FLAG_SKINNABLE);
}
}
}
else
{
_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
_creature->AllLootRemovedFromCorpse();
}
}
player->ModifyMoney(gold);
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, gold);
WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4 + 1);
data << uint32(gold);
data << uint8(1);
player->GetSession()->SendPacket(&data);
}
void OnAfterCreatureLoot(Player* player) override
{
OnCreatureLootAOE(player);
}
void OnAfterCreatureLootMoney(Player* player) override
{
OnCreatureLootAOE(player);
}
};
void AddSC_AoeLoot()
{
new AoeLoot_Player();
}

View File

@@ -0,0 +1,25 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// From SC
void AddSC_AoeLoot();
// Add all
void Addmod_aoe_lootScripts()
{
AddSC_AoeLoot();
}