Core/Misc: Port cherrypick refactors

This commit is contained in:
Shauren
2026-07-23 22:29:21 +02:00
parent bc632d97e1
commit 03124f0dd6
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPackets::Loot::LootMoney& /*packet
WorldPackets::Loot::LootMoneyNotify packet;
packet.Money = goldPerPlayer;
packet.MoneyMod = goldMod;
packet.SoleLooter = playersNear.size() <= 1 ? true : false;
packet.SoleLooter = playersNear.size() <= 1;
(*i)->SendDirectMessage(packet.Write());
}
}
+2 -2
View File
@@ -142,7 +142,7 @@ namespace WorldPackets
class LootMoneyNotify final : public ServerPacket
{
public:
explicit LootMoneyNotify() : ServerPacket(SMSG_LOOT_MONEY_NOTIFY, 5) { }
explicit LootMoneyNotify() : ServerPacket(SMSG_LOOT_MONEY_NOTIFY, 8 + 8 + 1) { }
WorldPacket const* Write() override;
@@ -154,7 +154,7 @@ namespace WorldPackets
class CoinRemoved final : public ServerPacket
{
public:
explicit CoinRemoved() : ServerPacket(SMSG_COIN_REMOVED, 9) { }
explicit CoinRemoved() : ServerPacket(SMSG_COIN_REMOVED, 16) { }
WorldPacket const* Write() override;
+3 -2
View File
@@ -2326,10 +2326,11 @@ void Spell::EffectUntrainTalents()
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
if (!unitTarget || m_caster->GetTypeId() == TYPEID_PLAYER)
if (!unitTarget->IsPlayer())
return;
unitTarget->ToPlayer()->SendRespecWipeConfirm(m_caster->GetGUID(), unitTarget->ToPlayer()->GetNextResetTalentsCost(), SPEC_RESET_TALENTS);
Player* playerTarget = unitTarget->ToPlayer();
playerTarget->SendRespecWipeConfirm(m_caster->GetGUID(), playerTarget->GetNextResetTalentsCost(), SPEC_RESET_TALENTS);
}
void Spell::EffectTeleUnitsFaceCaster()