mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/Misc: Removed existence check from HandleSetSelectionOpcode and moved setting faction visible to gossip open
This commit is contained in:
@@ -494,15 +494,7 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket & recv_data)
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
// update reputation list if need
|
||||
Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
_player->SetSelection(guid);
|
||||
|
||||
if (FactionTemplateEntry const* factionTemplateEntry = sFactionTemplateStore.LookupEntry(unit->getFaction()))
|
||||
_player->GetReputationMgr().SetVisible(factionTemplateEntry);
|
||||
}
|
||||
|
||||
void WorldSession::HandleStandStateChangeOpcode(WorldPacket & recv_data)
|
||||
|
||||
@@ -278,7 +278,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
|
||||
_player->ModifyMoney(-int32(nSpellCost));
|
||||
|
||||
|
||||
unit->SendPlaySpellVisual(179); // 53 SpellCastDirected
|
||||
unit->SendPlaySpellImpact(_player->GetGUID(), 362); // 113 EmoteSalute
|
||||
|
||||
@@ -308,6 +308,10 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
// set faction visible if needed
|
||||
if (FactionTemplateEntry const* factionTemplateEntry = sFactionTemplateStore.LookupEntry(unit->getFaction()))
|
||||
_player->GetReputationMgr().SetVisible(factionTemplateEntry);
|
||||
|
||||
GetPlayer()->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK);
|
||||
// remove fake death
|
||||
//if (GetPlayer()->HasUnitState(UNIT_STAT_DIED))
|
||||
|
||||
Reference in New Issue
Block a user