Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Upstream project renames
Browse files Browse the repository at this point in the history
-Bump Eluna submodule to latest
  • Loading branch information
Niam5 committed Oct 11, 2023
1 parent 08d515a commit 7059bc6
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/server/game/DungeonFinding/LFGMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
joinData.result = LFG_JOIN_INTERNAL_ERROR;
else if (grp)
{
if (grp->GetMembersCount() > MAXGROUPSIZE)
if (grp->GetMembersCount() > MAX_GROUP_SIZE)
joinData.result = LFG_JOIN_TOO_MUCH_MEMBERS;
else
{
Expand Down
20 changes: 10 additions & 10 deletions src/server/game/Groups/Group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ m_masterLooterGuid(), m_subGroupsCounts(nullptr), m_guid(), m_counter(0), m_dbSt
{
m_disenchantInfo.Initialize();

for (uint8 i = 0; i < TARGETICONCOUNT; ++i)
for (uint8 i = 0; i < TARGET_ICONS_COUNT; ++i)
m_targetIcons[i].Clear();
}

Expand Down Expand Up @@ -187,7 +187,7 @@ void Group::LoadGroupFromDB(Field* fields)
m_looterGuid = ObjectGuid(HighGuid::Player, fields[2].GetUInt32());
m_lootThreshold = ItemQualities(fields[3].GetUInt8());

for (uint8 i = 0; i < TARGETICONCOUNT; ++i)
for (uint8 i = 0; i < TARGET_ICONS_COUNT; ++i)
m_targetIcons[i].Set(fields[4 + i].GetUInt64());

m_groupFlags = GroupFlags(fields[12].GetUInt8());
Expand Down Expand Up @@ -408,7 +408,7 @@ bool Group::AddMember(Player* player)
bool groupFound = false;
for (; subGroup < MAX_RAID_SUBGROUPS; ++subGroup)
{
if (m_subGroupsCounts[subGroup] < MAXGROUPSIZE)
if (m_subGroupsCounts[subGroup] < MAX_GROUP_SIZE)
{
groupFound = true;
break;
Expand Down Expand Up @@ -446,7 +446,7 @@ bool Group::AddMember(Player* player)

if (!isRaidGroup()) // reset targetIcons for non-raid-groups
{
for (uint8 i = 0; i < TARGETICONCOUNT; ++i)
for (uint8 i = 0; i < TARGET_ICONS_COUNT; ++i)
m_targetIcons[i].Clear();
}

Expand Down Expand Up @@ -1633,12 +1633,12 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)

void Group::SetTargetIcon(uint8 id, ObjectGuid whoGuid, ObjectGuid targetGuid)
{
if (id >= TARGETICONCOUNT)
if (id >= TARGET_ICONS_COUNT)
return;

// clean other icons
if (targetGuid)
for (int i=0; i<TARGETICONCOUNT; ++i)
for (int i=0; i<TARGET_ICONS_COUNT; ++i)
if (m_targetIcons[i] == targetGuid)
SetTargetIcon(i, ObjectGuid::Empty, ObjectGuid::Empty);

Expand All @@ -1657,10 +1657,10 @@ void Group::SendTargetIconList(WorldSession* session)
if (!session)
return;

WorldPacket data(MSG_RAID_TARGET_UPDATE, (1+TARGETICONCOUNT*9));
WorldPacket data(MSG_RAID_TARGET_UPDATE, (1+TARGET_ICONS_COUNT*9));
data << uint8(1); // list targets

for (uint8 i = 0; i < TARGETICONCOUNT; ++i)
for (uint8 i = 0; i < TARGET_ICONS_COUNT; ++i)
{
if (m_targetIcons[i].IsEmpty())
continue;
Expand Down Expand Up @@ -2607,7 +2607,7 @@ uint8 Group::GetLfgRoles(ObjectGuid guid)

bool Group::IsFull() const
{
return isRaidGroup() ? (m_memberSlots.size() >= MAXRAIDSIZE) : (m_memberSlots.size() >= MAXGROUPSIZE);
return isRaidGroup() ? (m_memberSlots.size() >= MAXRAIDSIZE) : (m_memberSlots.size() >= MAX_GROUP_SIZE);
}

bool Group::isLFGGroup() const
Expand Down Expand Up @@ -2726,7 +2726,7 @@ bool Group::SameSubGroup(ObjectGuid guid1, MemberSlot const* slot2) const

bool Group::HasFreeSlotSubGroup(uint8 subgroup) const
{
return (m_subGroupsCounts && m_subGroupsCounts[subgroup] < MAXGROUPSIZE);
return (m_subGroupsCounts && m_subGroupsCounts[subgroup] < MAX_GROUP_SIZE);
}


Expand Down
8 changes: 4 additions & 4 deletions src/server/game/Groups/Group.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class WorldSession;

struct MapEntry;

#define MAXGROUPSIZE 5
#define MAX_GROUP_SIZE 5
#define MAXRAIDSIZE 40
#define MAX_RAID_SUBGROUPS MAXRAIDSIZE/MAXGROUPSIZE
#define TARGETICONCOUNT 8
#define MAX_RAID_SUBGROUPS MAXRAIDSIZE/MAX_GROUP_SIZE
#define TARGET_ICONS_COUNT 8
#define SPELL_RAID_MARKER 84996

enum RollVote
Expand Down Expand Up @@ -421,7 +421,7 @@ class TC_GAME_API Group
Difficulty m_raidDifficulty;
Battleground* m_bgGroup;
Battlefield* m_bfGroup;
ObjectGuid m_targetIcons[TARGETICONCOUNT];
ObjectGuid m_targetIcons[TARGET_ICONS_COUNT];
LootMethod m_lootMethod;
ItemQualities m_lootThreshold;
ObjectGuid m_looterGuid;
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Handlers/LFGHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPackets::LFG::LFGJoin& lfgJoin)
{
if (!sLFGMgr->isOptionEnabled(lfg::LFG_OPTION_ENABLE_DUNGEON_FINDER | lfg::LFG_OPTION_ENABLE_RAID_BROWSER) ||
(GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->GetLeaderGUID() != GetPlayer()->GetGUID() &&
(GetPlayer()->GetGroup()->GetMembersCount() == MAXGROUPSIZE || !GetPlayer()->GetGroup()->isLFGGroup())))
(GetPlayer()->GetGroup()->GetMembersCount() == MAX_GROUP_SIZE || !GetPlayer()->GetGroup()->isLFGGroup())))
return;

if (!lfgJoin.Slots.size())
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/LuaEngine

0 comments on commit 7059bc6

Please sign in to comment.