Skip to content
Permalink
Browse files

Server/Difficulties: Players don't need to be in groups to change pla…

…yer difficulties.

Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information...
AriDEV committed Aug 15, 2019
1 parent f64572e commit 58b90b731ece4c504007c8fa993b1e41ab9838c1
@@ -349,7 +349,9 @@ enum SpawnMask

SPAWNMASK_DUNGEON_NORMAL = (1 << DIFFICULTY_NORMAL),
SPAWNMASK_DUNGEON_HEROIC = (1 << DIFFICULTY_HEROIC),
SPAWNMASK_DUNGEON_ALL = (SPAWNMASK_DUNGEON_NORMAL | SPAWNMASK_DUNGEON_HEROIC),
SPAWNMASK_DUNGEON_CHALLENGE = (1 << DIFFICULTY_CHALLENGE),
SPAWNMASK_DUNGEON_ALL = (SPAWNMASK_DUNGEON_NORMAL | SPAWNMASK_DUNGEON_HEROIC | SPAWNMASK_DUNGEON_CHALLENGE),


SPAWNMASK_RAID_10MAN_NORMAL = (1 << DIFFICULTY_10MAN_NORMAL),
SPAWNMASK_RAID_25MAN_NORMAL = (1 << DIFFICULTY_25MAN_NORMAL),
@@ -363,7 +365,6 @@ enum SpawnMask

SPAWNMASK_RAID_25MAN_LFR = (1 << DIFFICULTY_25MAN_LFR),

SPAWNMASK_DUNGEON_CHALLENGE = (1 << DIFFICULTY_CHALLENGE),

// Upgrade Spawnmask to higher interger before uncomment.
//SPAWNMASK_SCENARIO_NORMAL = (1 << DIFFICULTY_SCE_NORMAL),
GetSession()->SendPacket(&data);
}

void Player::SendRaidDifficulty(bool IsInGroup, int32 forcedDifficulty)
void Player::SendRaidDifficulty(/*bool IsInGroup,*/ int32 forcedDifficulty)
{
WorldPacket data(SMSG_SET_RAID_DIFFICULTY, 4);
data << uint32(forcedDifficulty == -1 ? GetRaidDifficulty() : forcedDifficulty);
@@ -2495,7 +2495,7 @@ class Player : public Unit, public GridObject<Player>
void SendExplorationExperience(uint32 Area, uint32 Experience);

void SendDungeonDifficulty(/*bool IsInGroup*/);
void SendRaidDifficulty(bool IsInGroup, int32 forcedDifficulty = -1);
void SendRaidDifficulty(/*bool IsInGroup,*/ int32 forcedDifficulty = -1);
void ResetInstances(uint8 method, bool isRaid);
void SendResetInstanceSuccess(uint32 MapId);
void SendResetInstanceFailed(uint32 reason, uint32 MapId);
@@ -451,7 +451,7 @@ bool Group::AddMember(Player* player)
if (player->GetRaidDifficulty() != GetRaidDifficulty())
{
player->SetRaidDifficulty(GetRaidDifficulty());
player->SendRaidDifficulty(true);
player->SendRaidDifficulty();
}
}
}
@@ -2357,7 +2357,7 @@ void Group::SetRaidDifficulty(DifficultyID difficulty)
continue;

player->SetRaidDifficulty(difficulty);
player->SendRaidDifficulty(true);
player->SendRaidDifficulty();
}
}

@@ -1892,6 +1892,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData)
{
_player->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, true);
_player->SetRaidDifficulty(DifficultyID(difficulty));
_player->SendRaidDifficulty();
}
}

0 comments on commit 58b90b7

Please sign in to comment.
You can’t perform that action at this time.