Skip to content

Commit

Permalink
Merge pull request #430 from TrinityCore/master
Browse files Browse the repository at this point in the history
Update 02.23.25
  • Loading branch information
KamiliaBlow authored Feb 22, 2025
2 parents c30cc65 + da07737 commit afa227d
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 65 deletions.
19 changes: 14 additions & 5 deletions sql/base/auth_database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,14 @@ INSERT INTO `build_auth_key` VALUES
(59207,'Mac','x64','WoWC',0x5FB60ADC82C68D1E50B70956BFBC77BC),
(59207,'Win','A64','WoW',0x41AF3D9F83318D4FC4406BF5C23B20AB),
(59207,'Win','x64','WoW',0x170FB48807771D186547DF96C59E5306),
(59207,'Win','x64','WoWC',0xA9038B171DE62AF741304A4C0F273814);
(59207,'Win','x64','WoWC',0xA9038B171DE62AF741304A4C0F273814),
(59302,'Mac','A64','WoW',0x70A6BE00213BB70AB96C51280D72D186),
(59302,'Mac','A64','WoWC',0x6A5CFE0D3A4BDEC7D16D33E9ACA7D71D),
(59302,'Mac','x64','WoW',0x9FD959000AFAA2E5F10A4ABE33AC62BE),
(59302,'Mac','x64','WoWC',0xD39B478EFD342D568DCBC2E85FCA574D),
(59302,'Win','A64','WoW',0x60B1757CA707789C9ACD6F1FB69E28D5),
(59302,'Win','x64','WoW',0x330E4E7EF1E07DA8382C813650D7E7B5),
(59302,'Win','x64','WoWC',0xB5A0C54F6B334515E68260F6334E7593);
/*!40000 ALTER TABLE `build_auth_key` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down Expand Up @@ -1315,7 +1322,8 @@ INSERT INTO `build_info` VALUES
(58773,11,0,7,NULL),
(58867,11,0,7,NULL),
(58911,11,0,7,NULL),
(59207,11,0,7,NULL);
(59207,11,0,7,NULL),
(59302,11,0,7,NULL);
/*!40000 ALTER TABLE `build_info` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down Expand Up @@ -2927,7 +2935,7 @@ CREATE TABLE `realmlist` (
`timezone` tinyint unsigned NOT NULL DEFAULT '0',
`allowedSecurityLevel` tinyint unsigned NOT NULL DEFAULT '0',
`population` float NOT NULL DEFAULT '0',
`gamebuild` int unsigned NOT NULL DEFAULT '59207',
`gamebuild` int unsigned NOT NULL DEFAULT '59302',
`Region` tinyint unsigned NOT NULL DEFAULT '1',
`Battlegroup` tinyint unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
Expand All @@ -2942,7 +2950,7 @@ CREATE TABLE `realmlist` (
LOCK TABLES `realmlist` WRITE;
/*!40000 ALTER TABLE `realmlist` DISABLE KEYS */;
INSERT INTO `realmlist` VALUES
(1,'Trinity','127.0.0.1','127.0.0.1',NULL,NULL,'255.255.255.0',8085,0,0,1,0,0,59207,1,1);
(1,'Trinity','127.0.0.1','127.0.0.1',NULL,NULL,'255.255.255.0',8085,0,0,1,0,0,59302,1,1);
/*!40000 ALTER TABLE `realmlist` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down Expand Up @@ -3425,7 +3433,8 @@ INSERT INTO `updates` VALUES
('2025_01_29_00_auth.sql','7334CFE779D5F79AFAC8EA269950FC07E625810F','RELEASED','2025-01-29 12:57:32',0),
('2025_01_31_00_auth.sql','DF2640D25C15E41358C1ED46B4F86043583FC8FB','RELEASED','2025-01-31 11:51:23',0),
('2025_02_03_00_auth.sql','87033116EF72051499AF23FE14545D828F5A9B59','RELEASED','2025-02-03 22:51:31',0),
('2025_02_19_00_auth.sql','6D0EBB3E2DD1B26682A424EDDC090F515BCA5B32','RELEASED','2025-02-19 00:16:52',0);
('2025_02_19_00_auth.sql','6D0EBB3E2DD1B26682A424EDDC090F515BCA5B32','RELEASED','2025-02-19 00:16:52',0),
('2025_02_21_00_auth.sql','E9EA49CEB396561D641A7C82251DCBF9DF3E9983','RELEASED','2025-02-21 00:53:17',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down
23 changes: 23 additions & 0 deletions sql/updates/auth/master/2025_02_21_00_auth.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
DELETE FROM `build_info` WHERE `build` IN (59302);
INSERT INTO `build_info` (`build`,`majorVersion`,`minorVersion`,`bugfixVersion`,`hotfixVersion`) VALUES
(59302,11,0,7,NULL);

DELETE FROM `build_auth_key` WHERE `build`=59302 AND `platform`='Mac' AND `arch`='A64' AND `type`='WoW';
DELETE FROM `build_auth_key` WHERE `build`=59302 AND `platform`='Mac' AND `arch`='A64' AND `type`='WoWC';
DELETE FROM `build_auth_key` WHERE `build`=59302 AND `platform`='Mac' AND `arch`='x64' AND `type`='WoW';
DELETE FROM `build_auth_key` WHERE `build`=59302 AND `platform`='Mac' AND `arch`='x64' AND `type`='WoWC';
DELETE FROM `build_auth_key` WHERE `build`=59302 AND `platform`='Win' AND `arch`='A64' AND `type`='WoW';
DELETE FROM `build_auth_key` WHERE `build`=59302 AND `platform`='Win' AND `arch`='x64' AND `type`='WoW';
DELETE FROM `build_auth_key` WHERE `build`=59302 AND `platform`='Win' AND `arch`='x64' AND `type`='WoWC';
INSERT INTO `build_auth_key` (`build`,`platform`,`arch`,`type`,`key`) VALUES
(59302,'Mac','A64','WoW',0x70A6BE00213BB70AB96C51280D72D186),
(59302,'Mac','A64','WoWC',0x6A5CFE0D3A4BDEC7D16D33E9ACA7D71D),
(59302,'Mac','x64','WoW',0x9FD959000AFAA2E5F10A4ABE33AC62BE),
(59302,'Mac','x64','WoWC',0xD39B478EFD342D568DCBC2E85FCA574D),
(59302,'Win','A64','WoW',0x60B1757CA707789C9ACD6F1FB69E28D5),
(59302,'Win','x64','WoW',0x330E4E7EF1E07DA8382C813650D7E7B5),
(59302,'Win','x64','WoWC',0xB5A0C54F6B334515E68260F6334E7593);

UPDATE `realmlist` SET `gamebuild`=59302 WHERE `gamebuild`=59207;

ALTER TABLE `realmlist` CHANGE `gamebuild` `gamebuild` int unsigned NOT NULL DEFAULT '59302';
4 changes: 2 additions & 2 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac
}

// set starting level
SetLevel(GetStartLevel(createInfo->Race, createInfo->Class, createInfo->TemplateSet));
SetLevel(GetStartLevel(createInfo->Race, createInfo->Class, createInfo->TemplateSet), false);

InitRunes();

Expand Down Expand Up @@ -11028,7 +11028,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool
{
// Do not allow polearm to be equipped in the offhand (rare case for the only 1h polearm 41750)
if (type == INVTYPE_WEAPON && pProto->GetSubClass() == ITEM_SUBCLASS_WEAPON_POLEARM)
return EQUIP_ERR_2HSKILLNOTFOUND;
return EQUIP_ERR_WRONG_SLOT;
else if (type == INVTYPE_WEAPON)
{
if (!CanDualWield())
Expand Down
10 changes: 5 additions & 5 deletions src/server/game/Globals/ObjectMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7442,14 +7442,14 @@ void ObjectMgr::SetHighestGuids()

result = CharacterDatabase.Query("SELECT MAX(guid) FROM item_instance");
if (result)
GetGuidSequenceGenerator(HighGuid::Item).Set((*result)[0].GetUInt64() + 1);
GetGenerator<HighGuid::Item>().Set((*result)[0].GetUInt64() + 1);

// Cleanup other tables from nonexistent guids ( >= _hiItemGuid)
CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '{}'", GetGuidSequenceGenerator(HighGuid::Item).GetNextAfterMaxUsed()); // One-time query
CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '{}'", GetGuidSequenceGenerator(HighGuid::Item).GetNextAfterMaxUsed()); // One-time query
CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '{}'", GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed()); // One-time query
CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '{}'", GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed()); // One-time query
CharacterDatabase.PExecute("DELETE a, ab, ai FROM auctionhouse a LEFT JOIN auction_bidders ab ON ab.auctionId = a.id LEFT JOIN auction_items ai ON ai.auctionId = a.id WHERE ai.itemGuid >= '{}'",
GetGuidSequenceGenerator(HighGuid::Item).GetNextAfterMaxUsed()); // One-time query
CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '{}'", GetGuidSequenceGenerator(HighGuid::Item).GetNextAfterMaxUsed()); // One-time query
GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed()); // One-time query
CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '{}'", GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed()); // One-time query

result = WorldDatabase.Query("SELECT MAX(guid) FROM transports");
if (result)
Expand Down
18 changes: 12 additions & 6 deletions src/server/game/Handlers/QueryHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "QueryPackets.h"
#include "RealmList.h"
#include "TerrainMgr.h"
#include "Transport.h"
#include "World.h"

void WorldSession::BuildNameQueryData(ObjectGuid guid, WorldPackets::Query::NameCacheLookupResult& lookupData)
Expand Down Expand Up @@ -168,7 +169,7 @@ void WorldSession::HandleQueryCorpseLocation(WorldPackets::Query::QueryCorpseLoc
packet.MapID = corpseMapID;
packet.ActualMapID = mapID;
packet.Position = Position(x, y, z);
packet.Transport = ObjectGuid::Empty;
packet.Transport = ObjectGuid::Empty; // TODO: If corpse is on transport, send transport offsets and transport guid
SendPacket(packet.Write());
}

Expand Down Expand Up @@ -236,13 +237,18 @@ void WorldSession::HandleQueryCorpseTransport(WorldPackets::Query::QueryCorpseTr
{
WorldPackets::Query::CorpseTransportQuery response;
response.Player = queryCorpseTransport.Player;
if (Player* player = ObjectAccessor::FindConnectedPlayer(queryCorpseTransport.Player))
if (Player* player = ObjectAccessor::FindConnectedPlayer(queryCorpseTransport.Player); player && _player->IsInSameRaidWith(player))
{
Corpse* corpse = player->GetCorpse();
if (_player->IsInSameRaidWith(player) && corpse && !corpse->GetTransGUID().IsEmpty() && corpse->GetTransGUID() == queryCorpseTransport.Transport)
if (Corpse const* corpse = _player->GetCorpse())
{
response.Position = corpse->GetTransOffset();
response.Facing = corpse->GetTransOffsetO();
if (Transport const* transport = dynamic_cast<Transport const*>(corpse->GetTransport()))
{
if (transport->GetGUID() == queryCorpseTransport.Transport)
{
response.Position = transport->GetPosition();
response.Facing = transport->GetOrientation();
}
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/server/game/Server/Packets/SpellPackets.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,20 +383,20 @@ namespace WorldPackets
SpellHealPrediction Predict;
};

class SpellGo final : public CombatLog::CombatLogServerPacket
class SpellStart final : public ServerPacket
{
public:
SpellGo() : CombatLog::CombatLogServerPacket(SMSG_SPELL_GO) { }
SpellStart() : ServerPacket(SMSG_SPELL_START) { }

WorldPacket const* Write() override;

SpellCastData Cast;
};

class SpellStart final : public ServerPacket
class SpellGo final : public CombatLog::CombatLogServerPacket
{
public:
SpellStart() : ServerPacket(SMSG_SPELL_START) { }
SpellGo() : CombatLog::CombatLogServerPacket(SMSG_SPELL_GO) { }

WorldPacket const* Write() override;

Expand Down
13 changes: 1 addition & 12 deletions src/server/game/Spells/Auras/SpellAuraEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6111,20 +6111,9 @@ void AuraEffect::HandlePeriodicPowerBurnAuraTick(Unit* target, Unit* caster) con
caster->SendSpellNonMeleeDamageLog(&damageInfo);
}

bool AuraEffect::CanPeriodicTickCrit() const
{
if (GetSpellInfo()->HasAttribute(SPELL_ATTR2_CANT_CRIT))
return false;

if (GetSpellInfo()->HasAttribute(SPELL_ATTR8_PERIODIC_CAN_CRIT))
return true;

return false;
}

float AuraEffect::CalcPeriodicCritChance(Unit const* caster) const
{
if (!caster || !CanPeriodicTickCrit())
if (!caster || !GetBase()->CanPeriodicTickCrit())
return 0.0f;

Player* modOwner = caster->GetSpellModOwner();
Expand Down
1 change: 0 additions & 1 deletion src/server/game/Spells/Auras/SpellAuraEffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ class TC_GAME_API AuraEffect
void HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) const;
void HandlePeriodicPowerBurnAuraTick(Unit* target, Unit* caster) const;

bool CanPeriodicTickCrit() const;
float CalcPeriodicCritChance(Unit const* caster) const;

// aura effect proc handlers
Expand Down
11 changes: 11 additions & 0 deletions src/server/game/Spells/Auras/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,17 @@ void Aura::_InitEffects(uint32 effMask, Unit* caster, int32 const* baseAmount)
_effects.pop_back();
}

bool Aura::CanPeriodicTickCrit() const
{
if (GetSpellInfo()->HasAttribute(SPELL_ATTR2_CANT_CRIT))
return false;

if (GetSpellInfo()->HasAttribute(SPELL_ATTR8_PERIODIC_CAN_CRIT))
return true;

return false;
}

Aura::~Aura()
{
// unload scripts
Expand Down
3 changes: 3 additions & 0 deletions src/server/game/Spells/Auras/SpellAuras.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ class TC_GAME_API Aura
AuraKey GenerateKey(uint32& recalculateMask) const;
void SetLoadedState(int32 maxDuration, int32 duration, int32 charges, uint8 stackAmount, uint32 recalculateMask, int32* amount);

// helpers for aura effects
bool CanPeriodicTickCrit() const;

bool HasEffect(uint8 effIndex) const { return GetEffect(effIndex) != nullptr; }
bool HasEffectType(AuraType type) const;
static bool EffectTypeNeedsSendingAmount(AuraType type);
Expand Down
Loading

0 comments on commit afa227d

Please sign in to comment.