Fix compile && better solution for patch 6033, by Spp

--HG--
branch : trunk
This commit is contained in:
tartalo
2009-10-22 01:56:44 +02:00
parent 46c411b778
commit 25e36147aa
+3 -3
View File
@@ -20289,9 +20289,9 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewardSource) void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewardSource)
{ {
if (!pRewardSource) if (!pRewardSource || pRewardSource->GetTypeId() != TYPEID_UNIT)
return; return;
uint64 creature_guid = (pRewardSource && pRewardSource->GetTypeId()==TYPEID_UNIT) ? pRewardSource->GetGUID() : uint64(0); uint64 creature_guid = pRewardSource->GetGUID();
// prepare data for near group iteration // prepare data for near group iteration
if(Group *pGroup = GetGroup()) if(Group *pGroup = GetGroup())
@@ -20317,7 +20317,7 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const
{ {
if (!pRewardSource) if (!pRewardSource)
return; return false;
const WorldObject* player = GetCorpse(); const WorldObject* player = GetCorpse();
if(!player || isAlive()) if(!player || isAlive())
player = this; player = this;