[Feature] Update raid features (#3443)

* [RAID] Add Raid Features

[RAID] Add Raid Features

- Add delegate main assist
- Add delegate main marker
- Add target ring for main assisters.  Uses MA1, then MA2, then MA3
- Add /assist raid respecting /assist on and /assist off
- Add Raid Notes.  Functions across zones
- Add Raid XTarget functional
- Raid Leader can mark without being delegated Main Marker.  Must have the appropriate AA

* Update to new db routines

* Updated several formatting issues based on review

* Update to pp->tribute_time_remaining to avoid edge case.  Unrelated to raid updates.

* Updates to resolve comments/review.
Added a few edge case updates as well.

* Refactored to use database repositories for raid_details and raid_members.  Other updates as noted in review.

* Updated database manifest and fixed potential leak within Client::Handle_OP_AssistGroup

* Update for remaining review items

* Refactor SendAssistTarget to use struct/vector loop

* Have IsAssister use range based for loop and return bool

* General cleanup

* Simplify SendRaidAssistTarget to use struct / vector

* Formatting in Handle_OP_RaidDelegateAbility

* Format SendRemoveRaidXTargets and clean up error statements

* Format SendRemoveAllRaidXTargets

* Formatting

* Default return FindNextRaidDelegateSlot to -1

* Change fields to marked_npc_1/2/3 (missing last underscore)

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
Mitch Freeman
2023-07-13 00:04:50 -03:00
committed by GitHub
parent 50ce99ce3e
commit b01486d767
24 changed files with 1322 additions and 88 deletions
+16 -19
View File
@@ -6546,24 +6546,30 @@ void Client::RemoveXTarget(Mob *m, bool OnlyAutoSlots)
XTargets[i].dirty = true;
}
}
auto r = GetRaid();
if (r) {
r->UpdateRaidXTargets();
}
}
void Client::UpdateXTargetType(XTargetType Type, Mob *m, const char *Name)
{
if(!XTargettingAvailable())
if (!XTargettingAvailable()) {
return;
}
for(int i = 0; i < GetMaxXTargets(); ++i)
{
if(XTargets[i].Type == Type)
{
if(m)
for (int i = 0; i < GetMaxXTargets(); ++i) {
if (XTargets[i].Type == Type) {
if (m) {
XTargets[i].ID = m->GetID();
else
}
else {
XTargets[i].ID = 0;
}
if(Name)
if (Name) {
strncpy(XTargets[i].Name, Name, 64);
}
SendXTargetPacket(i, m);
}
@@ -6597,10 +6603,7 @@ void Client::SendXTargetPacket(uint32 Slot, Mob *m)
if (strlen(XTargets[Slot].Name) && ((XTargets[Slot].Type == CurrentTargetPC) ||
(XTargets[Slot].Type == GroupTank) ||
(XTargets[Slot].Type == GroupAssist) ||
(XTargets[Slot].Type == Puller) ||
(XTargets[Slot].Type == RaidAssist1) ||
(XTargets[Slot].Type == RaidAssist2) ||
(XTargets[Slot].Type == RaidAssist3)))
(XTargets[Slot].Type == Puller)))
{
outapp->WriteUInt8(2);
}
@@ -6664,13 +6667,7 @@ void Client::RemoveGroupXTargets()
{
if ((XTargets[i].Type == GroupTank) ||
(XTargets[i].Type == GroupAssist) ||
(XTargets[i].Type == Puller) ||
(XTargets[i].Type == RaidAssist1) ||
(XTargets[i].Type == RaidAssist2) ||
(XTargets[i].Type == RaidAssist3) ||
(XTargets[i].Type == GroupMarkTarget1) ||
(XTargets[i].Type == GroupMarkTarget2) ||
(XTargets[i].Type == GroupMarkTarget3))
(XTargets[i].Type == Puller))
{
XTargets[i].ID = 0;
XTargets[i].Name[0] = 0;