From 6ebca0486189859eb59ece8d059af48cc581efca Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 6 Aug 2011 18:48:58 +0200 Subject: Core/Misc: Removed existence check from HandleSetSelectionOpcode and moved setting faction visible to gossip open --- src/server/game/Server/Protocol/Handlers/MiscHandler.cpp | 8 -------- src/server/game/Server/Protocol/Handlers/NPCHandler.cpp | 6 +++++- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index 307d4352256..09897dcde19 100755 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -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) diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp index 1bb361fb97e..ef72d8ab5ba 100755 --- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp @@ -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)) -- cgit v1.2.3