mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7213] Fixed quest related GO activation/deactivation at join/leave/convert raid group.
This commit is contained in:
parent
a47c8d3bfc
commit
ed52e3f8f0
2 changed files with 20 additions and 3 deletions
|
|
@ -203,6 +203,11 @@ void Group::ConvertToRaid()
|
|||
|
||||
if(!isBGGroup()) CharacterDatabase.PExecute("UPDATE groups SET isRaid = 1 WHERE leaderGuid='%u'", GUID_LOPART(m_leaderGuid));
|
||||
SendUpdate();
|
||||
|
||||
// update quest related GO states (quest activity dependent from raid membership)
|
||||
for(member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
|
||||
if(Player* player = objmgr.GetPlayer(citr->guid))
|
||||
player->UpdateForQuestsGO();
|
||||
}
|
||||
|
||||
bool Group::AddInvite(Player *player)
|
||||
|
|
@ -288,6 +293,10 @@ bool Group::AddMember(const uint64 &guid, const char* name)
|
|||
}
|
||||
player->SetGroupUpdateFlag(GROUP_UPDATE_FULL);
|
||||
UpdatePlayerOutOfRange(player);
|
||||
|
||||
// quest related GO state dependent from raid memebership
|
||||
if(isRaidGroup())
|
||||
player->UpdateForQuestsGO();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -300,9 +309,12 @@ uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method)
|
|||
{
|
||||
bool leaderChanged = _removeMember(guid);
|
||||
|
||||
Player *player = objmgr.GetPlayer( guid );
|
||||
if (player)
|
||||
if(Player *player = objmgr.GetPlayer( guid ))
|
||||
{
|
||||
// quest related GO state dependent from raid membership
|
||||
if(isRaidGroup())
|
||||
player->UpdateForQuestsGO();
|
||||
|
||||
WorldPacket data;
|
||||
|
||||
if(method == 1)
|
||||
|
|
@ -361,6 +373,11 @@ void Group::Disband(bool hideDestroy)
|
|||
|
||||
player->SetGroup(NULL);
|
||||
|
||||
// quest related GO state dependent from raid membership
|
||||
if(isRaidGroup())
|
||||
player->UpdateForQuestsGO();
|
||||
|
||||
|
||||
if(!player->GetSession())
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue