Merge commit 'origin/master' into 320

This commit is contained in:
tomrus88 2009-07-17 13:26:56 +04:00
commit ca2a2195be
22 changed files with 80 additions and 234 deletions

View file

@ -13397,7 +13397,17 @@ void Player::ItemRemovedQuestCheck( uint32 entry, uint32 count )
UpdateForQuestWorldObjects();
}
void Player::KilledMonster( uint32 entry, uint64 guid )
void Player::KilledMonster( CreatureInfo const* cInfo, uint64 guid )
{
if(cInfo->Entry)
KilledMonsterCredit(cInfo->Entry,guid);
for(int i = 0; i < MAX_KILL_CREDIT; ++i)
if(cInfo->KillCredit[i])
KilledMonsterCredit(cInfo->KillCredit[i],guid);
}
void Player::KilledMonsterCredit( uint32 entry, uint64 guid )
{
uint32 addkillcount = 1;
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, entry, addkillcount);
@ -18925,7 +18935,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
{
// normal creature (not pet/etc) can be only in !PvP case
if(pVictim->GetTypeId()==TYPEID_UNIT)
pGroupGuy->KilledMonster(pVictim->GetEntry(), pVictim->GetGUID());
pGroupGuy->KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetGUID());
}
}
}
@ -18950,7 +18960,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
// normal creature (not pet/etc) can be only in !PvP case
if(pVictim->GetTypeId()==TYPEID_UNIT)
KilledMonster(pVictim->GetEntry(),pVictim->GetGUID());
KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetGUID());
}
}
return xp || honored_kill;
@ -18974,11 +18984,11 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
// quest objectives updated only for alive group member or dead but with not released body
if(pGroupGuy->isAlive()|| !pGroupGuy->GetCorpse())
pGroupGuy->KilledMonster(creature_id, creature_guid);
pGroupGuy->KilledMonsterCredit(creature_id, creature_guid);
}
}
else // if (!pGroup)
KilledMonster(creature_id, creature_guid);
KilledMonsterCredit(creature_id, creature_guid);
}
bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const