Skip to content

Commit 97bbac6

Browse files
Merge AzerothCore 3.3.5 to ElunaAzerothcore [skip ci]
2 parents 041d31a + e944605 commit 97bbac6

11 files changed

Lines changed: 789 additions & 7 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- DB update 2026_05_18_02 -> 2026_05_19_00
2+
-- Update creature 'Ludin Farrow' with sniffed values
3+
-- new spawns
4+
DELETE FROM `creature` WHERE (`id1` IN (26546)) AND (`guid` IN (1550));
5+
INSERT INTO `creature` (`guid`, `id1`, `map`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
6+
(1550, 26546, 0, 1, 1, 0, -3726.6103515625, -576.7655029296875, 4.643310546875, 4.171336650848388671, 120, 0, 0, 0, 0, 0, "", 45772, 1, NULL);

data/sql/updates/db_world/2026_05_19_01.sql

Lines changed: 702 additions & 0 deletions
Large diffs are not rendered by default.

src/server/apps/worldserver/worldserver.conf.dist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3388,6 +3388,16 @@ DungeonAccessRequirements.OptionalStringID = 0
33883388

33893389
JoinBGAndLFG.Enable = 0
33903390

3391+
#
3392+
# LFG.MailItemOnFullInventory
3393+
# Description: When a player wins a group roll but their inventory is full, mail
3394+
# the item to them instead of leaving it on the corpse.
3395+
# Default: 0 - Disabled
3396+
# 1 - Only in LFG/RDF groups
3397+
# 2 - In all group types
3398+
3399+
LFG.MailItemOnFullInventory = 0
3400+
33913401
#
33923402
# DungeonFinder.OptionsMask
33933403
# Description: Dungeon and raid finder system.

src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,13 +703,21 @@ void BattlegroundSA::OverrideGunFaction()
703703
for (uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10; i++)
704704
{
705705
if (Creature* gun = GetBGCreature(i))
706+
{
706707
gun->SetFaction(BG_SA_Factions[Attackers ? TEAM_ALLIANCE : TEAM_HORDE]);
708+
// NullCreatureAI never evades and PvE combat refs have no timer,
709+
// so attackers would stay in combat until death after damaging it.
710+
gun->SetIsCombatDisallowed(true);
711+
}
707712
}
708713

709714
for (uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4; i++)
710715
{
711716
if (Creature* dem = GetBGCreature(i))
717+
{
712718
dem->SetFaction(BG_SA_Factions[Attackers]);
719+
dem->SetIsCombatDisallowed(true);
720+
}
713721
}
714722
}
715723

@@ -968,7 +976,10 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
968976
BG_SA_NpcSpawnlocs[j][2], BG_SA_NpcSpawnlocs[j][3], 600);
969977

970978
if (Creature* dem = GetBGCreature(j))
979+
{
971980
dem->SetFaction(BG_SA_Factions[Attackers]);
981+
dem->SetIsCombatDisallowed(true);
982+
}
972983
}
973984

974985
UpdateWorldState(WORLD_STATE_BATTLEGROUND_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 1 : 0));
@@ -999,7 +1010,10 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
9991010
BG_SA_NpcSpawnlocs[j][2], BG_SA_NpcSpawnlocs[j][3], 600);
10001011

10011012
if (Creature* dem = GetBGCreature(j))
1013+
{
10021014
dem->SetFaction(BG_SA_Factions[Attackers]);
1015+
dem->SetIsCombatDisallowed(true);
1016+
}
10031017
}
10041018

10051019
UpdateWorldState(WORLD_STATE_BATTLEGROUND_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 1 : 0));

src/server/game/Entities/Player/Player.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,6 +1668,7 @@ class Player : public Unit, public GridObject<Player>
16681668
[[nodiscard]] PlayerMails const& GetMails() const { return m_mail; }
16691669
void SendItemRetrievalMail(uint32 itemEntry, uint32 count); // Item retrieval mails sent by The Postmaster (34337)
16701670
void SendItemRetrievalMail(std::vector<std::pair<uint32, uint32>> mailItems); // Item retrieval mails sent by The Postmaster (34337)
1671+
void SendItemRetrievalMail(Item* item); // As above, but for a pre-created item (preserves randomPropertyId)
16711672

16721673
/*********************************************************/
16731674
/*** MAILED ITEMS SYSTEM ***/

src/server/game/Entities/Player/PlayerMisc.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,3 +508,16 @@ void Player::SendItemRetrievalMail(std::vector<std::pair<uint32, uint32>> mailIt
508508

509509
CharacterDatabase.CommitTransaction(trans);
510510
}
511+
512+
void Player::SendItemRetrievalMail(Item* item)
513+
{
514+
if (!item)
515+
return;
516+
517+
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
518+
item->SaveToDB(trans);
519+
MailDraft("Recovered Item", "We recovered a lost item in the twisting nether and noted that it was yours.$B$BPlease find said object enclosed.")
520+
.AddItem(item)
521+
.SendMailTo(trans, MailReceiver(this, GetGUID().GetCounter()), MailSender(MAIL_CREATURE, 34337 /* The Postmaster */));
522+
CharacterDatabase.CommitTransaction(trans);
523+
}

src/server/game/Groups/Group.cpp

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,9 +1498,22 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)
14981498
}
14991499
else
15001500
{
1501-
item->is_blocked = false;
1502-
item->rollWinnerGUID = player->GetGUID();
1503-
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
1501+
uint32 mailOnFull = sWorld->getIntConfig(CONFIG_LFG_MAIL_ITEM_ON_FULL_INVENTORY);
1502+
if (mailOnFull == MAIL_ITEM_ON_FULL_INVENTORY_EVERYWHERE || (mailOnFull == MAIL_ITEM_ON_FULL_INVENTORY_LFG_ONLY && isLFGGroup()))
1503+
{
1504+
item->is_looted = true;
1505+
roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
1506+
roll->getLoot()->unlootedCount--;
1507+
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
1508+
if (Item* mailItem = Item::CreateItem(roll->itemid, item->count, player, false, item->randomPropertyId))
1509+
player->SendItemRetrievalMail(mailItem);
1510+
}
1511+
else
1512+
{
1513+
item->is_blocked = false;
1514+
item->rollWinnerGUID = player->GetGUID();
1515+
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
1516+
}
15041517
}
15051518
}
15061519
}
@@ -1568,9 +1581,22 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)
15681581
}
15691582
else
15701583
{
1571-
item->is_blocked = false;
1572-
item->rollWinnerGUID = player->GetGUID();
1573-
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
1584+
uint32 mailOnFull = sWorld->getIntConfig(CONFIG_LFG_MAIL_ITEM_ON_FULL_INVENTORY);
1585+
if (mailOnFull == MAIL_ITEM_ON_FULL_INVENTORY_EVERYWHERE || (mailOnFull == MAIL_ITEM_ON_FULL_INVENTORY_LFG_ONLY && isLFGGroup()))
1586+
{
1587+
item->is_looted = true;
1588+
roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
1589+
roll->getLoot()->unlootedCount--;
1590+
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
1591+
if (Item* mailItem = Item::CreateItem(roll->itemid, item->count, player, false, item->randomPropertyId))
1592+
player->SendItemRetrievalMail(mailItem);
1593+
}
1594+
else
1595+
{
1596+
item->is_blocked = false;
1597+
item->rollWinnerGUID = player->GetGUID();
1598+
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
1599+
}
15741600
}
15751601
}
15761602
else if (rollvote == DISENCHANT)

src/server/game/Groups/Group.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ enum lfgGroupFlags
128128
GROUP_LFG_FLAG_IS_HEROIC = 0x004
129129
};
130130

131+
enum MailItemOnFullInventory
132+
{
133+
MAIL_ITEM_ON_FULL_INVENTORY_DISABLED = 0,
134+
MAIL_ITEM_ON_FULL_INVENTORY_LFG_ONLY = 1,
135+
MAIL_ITEM_ON_FULL_INVENTORY_EVERYWHERE = 2,
136+
};
137+
131138
enum DifficultyPreventionChangeType
132139
{
133140
DIFFICULTY_PREVENTION_CHANGE_NONE = 0,

src/server/game/World/WorldConfig.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,8 @@ void WorldConfig::BuildConfigCache()
494494

495495
SetConfigValue<bool>(CONFIG_ALLOW_JOIN_BG_AND_LFG, "JoinBGAndLFG.Enable", false);
496496

497+
SetConfigValue<uint32>(CONFIG_LFG_MAIL_ITEM_ON_FULL_INVENTORY, "LFG.MailItemOnFullInventory", 0);
498+
497499
SetConfigValue<bool>(CONFIG_LEAVE_GROUP_ON_LOGOUT, "LeaveGroupOnLogout.Enabled", false);
498500

499501
SetConfigValue<uint32>(CONFIG_RANDOM_ROLL_MAXIMUM, "Group.RandomRollMaximum", 1000000);

src/server/game/World/WorldConfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ enum ServerConfigs
375375
CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION,
376376
CONFIG_LFG_MAX_KICK_COUNT,
377377
CONFIG_LFG_KICK_PREVENTION_TIMER,
378+
CONFIG_LFG_MAIL_ITEM_ON_FULL_INVENTORY,
378379
CONFIG_CHANGE_FACTION_MAX_MONEY,
379380
CONFIG_WATER_BREATH_TIMER,
380381
CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD,

0 commit comments

Comments
 (0)