Merge remote branch 'origin/master' into 330

This commit is contained in:
tomrus88 2010-03-25 22:46:09 +03:00
commit 811f0e7ebf
24 changed files with 142 additions and 136 deletions

View file

@ -2693,6 +2693,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
// cleanup unit flags (will be re-applied if need at aura load).
RemoveFlag( UNIT_FIELD_FLAGS,
UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_ATTACKABLE_1 |
UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE | UNIT_FLAG_LOOTING |
UNIT_FLAG_PET_IN_COMBAT | UNIT_FLAG_SILENCED | UNIT_FLAG_PACIFIED |
UNIT_FLAG_STUNNED | UNIT_FLAG_IN_COMBAT | UNIT_FLAG_DISARMED |
UNIT_FLAG_CONFUSED | UNIT_FLAG_FLEEING | UNIT_FLAG_NOT_SELECTABLE |
@ -14074,17 +14075,17 @@ void Player::ItemRemovedQuestCheck( uint32 entry, uint32 count )
UpdateForQuestWorldObjects();
}
void Player::KilledMonster( CreatureInfo const* cInfo, uint64 guid )
void Player::KilledMonster( CreatureInfo const* cInfo, ObjectGuid guid )
{
if(cInfo->Entry)
KilledMonsterCredit(cInfo->Entry,guid);
KilledMonsterCredit(cInfo->Entry, guid);
for(int i = 0; i < MAX_KILL_CREDIT; ++i)
if(cInfo->KillCredit[i])
KilledMonsterCredit(cInfo->KillCredit[i],guid);
KilledMonsterCredit(cInfo->KillCredit[i], guid);
}
void Player::KilledMonsterCredit( uint32 entry, uint64 guid )
void Player::KilledMonsterCredit( uint32 entry, ObjectGuid guid )
{
uint32 addkillcount = 1;
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, entry, addkillcount);
@ -14138,9 +14139,9 @@ void Player::KilledMonsterCredit( uint32 entry, uint64 guid )
}
}
void Player::CastedCreatureOrGO( uint32 entry, uint64 guid, uint32 spell_id )
void Player::CastedCreatureOrGO( uint32 entry, ObjectGuid guid, uint32 spell_id )
{
bool isCreature = IS_CREATURE_GUID(guid);
bool isCreature = guid.IsCreature();
uint32 addCastCount = 1;
for( int i = 0; i < MAX_QUEST_LOG_SIZE; ++i)
@ -14207,7 +14208,7 @@ void Player::CastedCreatureOrGO( uint32 entry, uint64 guid, uint32 spell_id )
}
}
void Player::TalkedToCreature( uint32 entry, uint64 guid )
void Player::TalkedToCreature( uint32 entry, ObjectGuid guid )
{
uint32 addTalkCount = 1;
for( int i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
@ -14496,7 +14497,7 @@ void Player::SendQuestUpdateAddItem( Quest const* /*pQuest*/, uint32 /*item_idx*
GetSession()->SendPacket( &data );
}
void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, uint64 guid, uint32 creatureOrGO_idx, uint32 old_count, uint32 add_count )
void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, ObjectGuid guid, uint32 creatureOrGO_idx, uint32 old_count, uint32 add_count )
{
assert(old_count + add_count < 65536 && "mob/GO count store in 16 bits 2^16 = 65536 (0..65536)");
@ -14511,7 +14512,7 @@ void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, uint64 guid, u
data << uint32(entry);
data << uint32(old_count + add_count);
data << uint32(pQuest->ReqCreatureOrGOCount[ creatureOrGO_idx ]);
data << uint64(guid);
data << guid;
GetSession()->SendPacket(&data);
uint16 log_slot = FindQuestSlot( pQuest->GetQuestId() );
@ -19859,7 +19860,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
{
// normal creature (not pet/etc) can be only in !PvP case
if(pVictim->GetTypeId()==TYPEID_UNIT)
pGroupGuy->KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetGUID());
pGroupGuy->KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetObjectGuid());
}
}
}
@ -19884,7 +19885,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
// normal creature (not pet/etc) can be only in !PvP case
if(pVictim->GetTypeId()==TYPEID_UNIT)
KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetGUID());
KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetObjectGuid());
}
}
return xp || honored_kill;