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

--HG--
branch : trunk
This commit is contained in:
tartalo
2009-10-21 23:46:07 +02:00
parent 5e9c0d385a
commit 2d713bbc70
2 changed files with 44 additions and 3 deletions
+5 -3
View File
@@ -19466,6 +19466,8 @@ void Player::SendTransferAborted(uint32 mapid, uint8 reason, uint8 arg)
case TRANSFER_ABORT_INSUF_EXPAN_LVL:
case TRANSFER_ABORT_DIFFICULTY:
case TRANSFER_ABORT_UNIQUE_MESSAGE:
case TRANSFER_ABORT_ZONE_IN_COMBAT:
case TRANSFER_ABORT_MAX_PLAYERS:
data << uint8(arg);
break;
}
@@ -20289,9 +20291,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 +20319,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;