aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-08-06 18:48:58 +0200
committerShauren <shauren.trinity@gmail.com>2011-08-06 18:48:58 +0200
commit6ebca0486189859eb59ece8d059af48cc581efca (patch)
treefa614f3d402eb45c08603fe0fede70c3b00ca739
parent548f8ba095872a9b43abfbebaa5ef201ed5b4215 (diff)
Core/Misc: Removed existence check from HandleSetSelectionOpcode and moved setting faction visible to gossip open
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MiscHandler.cpp8
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/NPCHandler.cpp6
2 files changed, 5 insertions, 9 deletions
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))