aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortartalo <none@none>2009-10-22 01:56:44 +0200
committertartalo <none@none>2009-10-22 01:56:44 +0200
commit25e36147aa2c75f3f39213009e08a8fdc665e40d (patch)
treec5d2cc8694d8615357331f27435eda59dd8db483 /src
parent46c411b778d0a5d478f41352ce50a4bd430b67ff (diff)
Fix compile && better solution for patch 6033, by Spp
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 18ffff3a0b2..3393d9cc6fa 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -20289,9 +20289,9 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewardSource)
{
- if (!pRewardSource)
+ if (!pRewardSource || pRewardSource->GetTypeId() != TYPEID_UNIT)
return;
- uint64 creature_guid = (pRewardSource && pRewardSource->GetTypeId()==TYPEID_UNIT) ? pRewardSource->GetGUID() : uint64(0);
+ uint64 creature_guid = pRewardSource->GetGUID();
// prepare data for near group iteration
if(Group *pGroup = GetGroup())
@@ -20317,7 +20317,7 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const
{
if (!pRewardSource)
- return;
+ return false;
const WorldObject* player = GetCorpse();
if(!player || isAlive())
player = this;