mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 13:47:23 +01:00
more missing part
This commit is contained in:
@@ -1584,6 +1584,69 @@ void Group::SendTargetIconList(WorldSession* session)
|
||||
session->SendPacket(&data);
|
||||
}
|
||||
|
||||
void Group::SendRaidMarkerUpdate()
|
||||
{
|
||||
WorldPacket data(SMSG_RAID_MARKERS_CHANGED, 4);
|
||||
data << uint32(m_markerMask);
|
||||
|
||||
for (member_witerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
|
||||
{
|
||||
Player* player = ObjectAccessor::FindPlayer(itr->guid);
|
||||
if (!player || !player->GetSession())
|
||||
continue;
|
||||
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
}
|
||||
|
||||
void Group::SendRaidMarkerUpdateToPlayer(uint64 playerGUID, bool remove)
|
||||
{
|
||||
Player* player = ObjectAccessor::FindPlayer(playerGUID);
|
||||
if (!player || !player->GetSession())
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_RAID_MARKERS_CHANGED, 4);
|
||||
data << uint32(remove ? 0 : m_markerMask);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
DynamicObject* Group::GetMarkerGuidBySpell(uint32 spell)
|
||||
{
|
||||
if (!m_dynObj.empty())
|
||||
{
|
||||
for (DynObjectList::const_iterator i = m_dynObj.begin(); i != m_dynObj.end(); ++i)
|
||||
{
|
||||
DynamicObject* dynObj = ObjectAccessor::GetObjectInWorld(*i, (DynamicObject*)NULL);
|
||||
if (!dynObj)
|
||||
continue;
|
||||
|
||||
if (dynObj->GetEntry() == spell)
|
||||
return dynObj;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Group::RemoveMarker()
|
||||
{
|
||||
for (uint32 spell = 0; spell < 5; ++spell)
|
||||
{
|
||||
uint32 mask = 1 << spell;
|
||||
uint32 spellId = 84996 + spell;
|
||||
|
||||
if (HasMarker(mask))
|
||||
continue;
|
||||
|
||||
DynamicObject* dynObject = GetMarkerGuidBySpell(spellId);
|
||||
if (!dynObject)
|
||||
continue;
|
||||
|
||||
RemoveMarkerFromList(dynObject->GetGUID());
|
||||
dynObject->RemoveFromWorld();
|
||||
}
|
||||
}
|
||||
|
||||
void Group::SendUpdate()
|
||||
{
|
||||
for (member_witerator witr = m_memberSlots.begin(); witr != m_memberSlots.end(); ++witr)
|
||||
|
||||
Reference in New Issue
Block a user