Skip to content

Commit

Permalink
Merge remote-tracking branch 'azerothcore/master' into Playerbot
Browse files Browse the repository at this point in the history
  • Loading branch information
evrydayjunglist committed Mar 15, 2024
2 parents 0ffc11d + 9e5f65c commit 0be17b9
Show file tree
Hide file tree
Showing 6 changed files with 752 additions and 35 deletions.
123 changes: 123 additions & 0 deletions data/sql/updates/db_world/2024_03_15_00.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
-- DB update 2024_03_13_01 -> 2024_03_15_00
-- [START] // DB Update for .reset items command

/*---------------------------------
Command and associated help
-----------------------------------*/

-- Always delete before insert to ensure script repeatability :
-- One value per line to facilitate readability
DELETE FROM `command` WHERE `name` IN(
'reset items',
'reset items equipped',
'reset items bags',
'reset items bank',
'reset items keyring',
'reset items currency',
'reset items vendor_buyback',
'reset items all',
'reset items allbags');

-- GM Security level associated with the commands
SET @GM_SECURITY_LEVEL = 3;

-- Insert values :
INSERT INTO `command`(`name`,`security`,`help`)
VALUES (
-- .reset items (main command)
'reset items', @GM_SECURITY_LEVEL, 'Syntax : .reset items equipped|bags|bank|keyring|currency|vendor_buyback|all|allbags #playername
Delete items in the player inventory (equipped, bank, bags etc...) depending on the chosen option.
#playername : Optional target player name (if player is online only). If not provided the command will execute on the selected target player.'),

-- .reset items _____ (Sub-commands)
('reset items equipped', @GM_SECURITY_LEVEL, 'Syntax : .reset items equipped #playername
Delete all items equipped on the target player.
#playername : Optional target player name (if player is online only). If not provided the command will execute on the selected target player.'),

('reset items bags', @GM_SECURITY_LEVEL, 'Syntax : .reset items bags #playername
Delete all items in the selected player\'s bags.
#playername : Optional target player name (if player is online only). If not provided the command will execute on the selected target player.'),

('reset items bank', @GM_SECURITY_LEVEL, 'Syntax : .reset items bank #playername
Delete all items in the selected player\'s bank.
#playername : Optional target player name (if player is online only). If not provided the command will execute on the selected target player.'),

('reset items keyring', @GM_SECURITY_LEVEL, 'Syntax : .reset items keyring #playername
Delete all items in the selected player\'s keyring.
#playername : Optional target player name (if player is online only). If not provided the command will execute on the selected target player.'),

('reset items currency', @GM_SECURITY_LEVEL, 'Syntax : .reset items currency #playername
Delete all items in the selected player\'s currencies list.
#playername : Optional target player name (if player is online only). If not provided the command will execute on the selected target player.'),

('reset items vendor_buyback', @GM_SECURITY_LEVEL, 'Syntax : .reset items vendor_buyback #playername
Delete all items in the selected player\'s vendor buyback tab.
#playername : Optional target player name (if player is online only). If not provided the command will execute on the selected target player.'),

('reset items all', @GM_SECURITY_LEVEL, 'Syntax : .reset items all #playername
Delete all items in the selected player\'s inventory (equipped, in bags, in bank, in keyring, in currency list and in vendor buy back tab).
#playername : Optional target player name (if player is online only). If not provided the command will execute on the selected target player.'),

('reset items allbags', @GM_SECURITY_LEVEL, 'Syntax : .reset items allbags #playername
Delete all items in the selected player\'s inventory (equipped, in bags, in bank, in keyring, in currency list and in vendor buy back tab)
This command also deletes the bags.
#playername : Optional target player name (if player is online only). If not provided the command will execute on the selected target player.');

/*---------------------------------------------------------------------------------
LANG_* strings used by the core at command use.
All of them are stored in table `acore_string`
Note : We should think to add a `enum_tag` column to the `acore_string` table
in order to automatize the rebuild of Language.h file
------------------------------------------------------------------------------------*/

-- Always delete before insert to ensure script repeatability :
DELETE FROM `acore_string` WHERE `entry` IN (365, 366, 367, 368, 369, 370, 371, 372);

-- Insert values :
-- Attention : Need to translate in other languages. Since I'm French I will set only english and french ones :-)
INSERT INTO `acore_string` (`entry`, `content_default`, `locale_frFR`)
VALUES (365, '|cffffffff%d|r equipped items deleted for %s', '|cffffffff%d|r objets équipés supprimés pour %s'),
(366, '|cffffffff%d|r items in equipped bags deleted for %s', '|cffffffff%d|r objets supprimés dans les sacs de %s'),
(367, '|cffffffff%d|r items in bank deleted for %s', '|cffffffff%d|r objets supprimés de la banque de %s'),
(368, '|cffffffff%d|r keys in keyring deleted for %s', '|cffffffff%d|r objets supprimés du porte-clés de %s'),
(369, '|cffffffff%d|r currencies deleted for %s', '|cffffffff%d|r types de monnaies supprimées l\'inventaire de %s'),
(370, '|cffffffff%d|r items in vendors buyback deleted for %s', '|cffffffff%d|r objets supprimés dans l\'onglet rachat des vendeurs pour %s'),
(371, 'All items were deleted for %s :
|cffffffff%d|r items equipped
|cffffffff%d|r items in bags
|cffffffff%d|r items in bank
|cffffffff%d|r keys in keyring
|cffffffff%d|r currency types
|cffffffff%d|r items in vendor buyback',
'Tous les objets de %s ont été supprimés :
|cffffffff%d|r objet équipés
|cffffffff%d|r objets dans les sacs
|cffffffff%d|r objets en banque
|cffffffff%d|r clés dans le porte-clés
|cffffffff%d|r types de monnaies
|cffffffff%d|r objets dans l\'onglet rachat des vendeurs'),
(372, 'All items were deleted for %s (bags included):
|cffffffff%d|r equipped
|cffffffff%d|r items in bags
|cffffffff%d|r items in bank
|cffffffff%d|r keys in keyring
|cffffffff%d|r currency types
|cffffffff%d|r items in vendor buyback
|cffffffff%d|r standard bags
|cffffffff%d|r bank bags',
'Tous les objets de %s ont été supprimés (sacs y-compris):
|cffffffff%d|r objet équipés
|cffffffff%d|r objets dans les sacs
|cffffffff%d|r objets en banque
|cffffffff%d|r clés dans le porte-clés
|cffffffff%d|r types de monnaies
|cffffffff%d|r objets dans l\'onglet rachat des vendeurs
|cffffffff%d|r sacs standard
|cffffffff%d|r sacs de banque'
);

-- [END] // DB Update for .reset items command;


2 changes: 1 addition & 1 deletion src/server/game/Entities/Player/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ enum BankBagSlots // 7 slots

enum BuyBackSlots // 12 slots
{
// stored in m_buybackitems
// stored in m_items, there is no more m_buybackitems
BUYBACK_SLOT_START = 74,
BUYBACK_SLOT_END = 86
};
Expand Down
14 changes: 13 additions & 1 deletion src/server/game/Miscellaneous/Language.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,19 @@ enum AcoreStrings
LANG_COMMAND_CHEAT_WW = 362,
LANG_COMMAND_WHISPEROFFPLAYER = 363,
LANG_COMMAND_CHEAT_TAXINODES = 364,
// Room for more level 2 365-399 not used

// [START] .reset items command strings:
LANG_COMMAND_RESET_ITEMS_EQUIPPED = 365,
LANG_COMMAND_RESET_ITEMS_BAGS = 366,
LANG_COMMAND_RESET_ITEMS_BANK = 367,
LANG_COMMAND_RESET_ITEMS_KEYRING = 368,
LANG_COMMAND_RESET_ITEMS_CURRENCY = 369,
LANG_COMMAND_RESET_ITEMS_BUYBACK = 370,
LANG_COMMAND_RESET_ITEMS_ALL = 371,
LANG_COMMAND_RESET_ITEMS_ALL_BAGS = 372,
// [END] reset items command strings

// Room for more level 2 373-399 not used

// level 3 chat
LANG_SCRIPTS_RELOADED = 400,
Expand Down
170 changes: 162 additions & 8 deletions src/server/game/Spells/SpellInfoCorrections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,19 @@ void SpellMgr::LoadSpellInfoCorrections()
ApplySpellFix({
37790, // Spread Shot
54172, // Divine Storm (heal)
66588, // Flaming Spear
54171 // Divine Storm
66588 // Flaming Spear
}, [](SpellInfo* spellInfo)
{
spellInfo->MaxAffectedTargets = 3;
});

// Divine Storm
ApplySpellFix({ 54171 }, [](SpellInfo* spellInfo)
{
spellInfo->MaxAffectedTargets = 3;
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Divine Storm (Damage)
ApplySpellFix({ 53385 }, [](SpellInfo* spellInfo)
{
Expand Down Expand Up @@ -566,12 +572,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->DmgClass = SPELL_DAMAGE_CLASS_MAGIC;
});

// Light's Beacon, Beacon of Light
ApplySpellFix({ 53651 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx3 |= SPELL_ATTR3_DOT_STACKING_RULE;
});

// Hand of Reckoning
ApplySpellFix({ 62124 }, [](SpellInfo* spellInfo)
{
Expand Down Expand Up @@ -854,6 +854,7 @@ void SpellMgr::LoadSpellInfoCorrections()
ApplySpellFix({ 57330, 57623 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].TargetA = 0;
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Scourge Strike trigger
Expand Down Expand Up @@ -1213,6 +1214,7 @@ void SpellMgr::LoadSpellInfoCorrections()
ApplySpellFix({ 59725 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_CASTER_AREA_PARTY);
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Hymn of Hope
Expand Down Expand Up @@ -4033,6 +4035,8 @@ void SpellMgr::LoadSpellInfoCorrections()
ApplySpellFix({ 53651 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx |= SPELL_ATTR1_NO_THREAT;
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
spellInfo->AttributesEx3 |= SPELL_ATTR3_DOT_STACKING_RULE;
});

// Shadow Hunter Vosh'gajin - Hex
Expand Down Expand Up @@ -4650,6 +4654,156 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->ProcChance = 100;
});

// Commanding Shout
ApplySpellFix({ 469, 47439, 47440 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Battle Shout
ApplySpellFix({ 2048, 5242, 6192, 6673, 11549, 11550, 11551, 25289, 47436 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Plague Effect
ApplySpellFix({ 19594, 26557 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Prayer of Fortitude
ApplySpellFix({ 21562, 21564, 25392, 48162 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Gift of the Wild
ApplySpellFix({ 21849, 21850, 26991, 48470, 69381 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Arcane Brilliance
ApplySpellFix({ 23028, 27127, 43002 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Prayer of Spirit
ApplySpellFix({ 27681, 32999, 48074 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Prayer of Shadow Protection
ApplySpellFix({ 27683, 39374, 48170 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Nagrand Fort Buff Reward Raid
ApplySpellFix({ 33006 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Demonic Pact
ApplySpellFix({ 48090 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Ancestral Awakening
ApplySpellFix({ 52759 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Turn the Tables
ApplySpellFix({ 52910, 52914, 52915 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Judgements of the Wise
ApplySpellFix({ 54180 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Replenishment
ApplySpellFix({ 57669 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Dalaran Brilliance
ApplySpellFix({ 61316 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// [DND] Dalaran Brilliance
ApplySpellFix({ 61332 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Infinite Replenishment + Wisdom
ApplySpellFix({ 61782 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Renewed Hope
ApplySpellFix({ 63944 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Fortitude
ApplySpellFix({ 69377 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Blessing of Forgotten Kings
ApplySpellFix({ 69378 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Lucky Charm
ApplySpellFix({ 69511 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Shiny Shard of the Scale Heal Targeter
ApplySpellFix({ 69749 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Purified Shard of the Scale Heal Targeter
ApplySpellFix({ 69754 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Brilliance
ApplySpellFix({ 69994 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});

// Domination
ApplySpellFix({ 37135 }, [](SpellInfo* spellInfo)
{
spellInfo->MaxAffectedTargets = 5;
});

for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];
Expand Down
Loading

0 comments on commit 0be17b9

Please sign in to comment.