mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
Inspect buffs rank 1 will now show NPC buffs in target window (SoD+)
This commit is contained in:
parent
affb735c38
commit
c81491f97e
@ -1,5 +1,8 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 10/20/2014 ==
|
||||
demonstar55: Inspect Buffs rank 1 will now show NPC buffs in target window (SoD+)
|
||||
|
||||
== 10/19/2014 ==
|
||||
Uleat: Updated command #peekinv to display item links properly in RoF clients
|
||||
demonstar55: Group Mentoring in raids
|
||||
|
||||
@ -12951,9 +12951,25 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
if (nt)
|
||||
{
|
||||
SetTarget(nt);
|
||||
if ((nt->IsClient() && !nt->CastToClient()->GetPVP()) ||
|
||||
(nt->IsPet() && nt->GetOwner() && nt->GetOwner()->IsClient() && !nt->GetOwner()->CastToClient()->GetPVP()) ||
|
||||
(nt->IsMerc() && nt->GetOwner() && nt->GetOwner()->IsClient() && !nt->GetOwner()->CastToClient()->GetPVP()))
|
||||
bool inspect_buffs = false;
|
||||
// rank 1 gives you ability to see NPC buffs in target window (SoD+)
|
||||
if (nt->IsNPC()) {
|
||||
if (IsRaidGrouped()) {
|
||||
Raid *raid = GetRaid();
|
||||
if (raid) {
|
||||
uint32 gid = raid->GetGroup(this);
|
||||
if (gid < 12 && raid->GroupCount(gid) > 2)
|
||||
inspect_buffs = raid->GetLeadershipAA(groupAAInspectBuffs, gid);
|
||||
}
|
||||
} else {
|
||||
Group *group = GetGroup();
|
||||
if (group && group->GroupCount() > 2)
|
||||
inspect_buffs = group->GetLeadershipAA(groupAAInspectBuffs);
|
||||
}
|
||||
}
|
||||
if (nt == this || inspect_buffs || (nt->IsClient() && !nt->CastToClient()->GetPVP()) ||
|
||||
(nt->IsPet() && nt->GetOwner() && nt->GetOwner()->IsClient() && !nt->GetOwner()->CastToClient()->GetPVP()) ||
|
||||
(nt->IsMerc() && nt->GetOwner() && nt->GetOwner()->IsClient() && !nt->GetOwner()->CastToClient()->GetPVP()))
|
||||
nt->SendBuffsToClient(this);
|
||||
}
|
||||
else
|
||||
|
||||
@ -1351,7 +1351,7 @@ void EntityList::RefreshClientXTargets(Client *c)
|
||||
}
|
||||
|
||||
void EntityList::QueueClientsByTarget(Mob *sender, const EQApplicationPacket *app,
|
||||
bool iSendToSender, Mob *SkipThisMob, bool ackreq, bool HoTT, uint32 ClientVersionBits)
|
||||
bool iSendToSender, Mob *SkipThisMob, bool ackreq, bool HoTT, uint32 ClientVersionBits, bool inspect_buffs)
|
||||
{
|
||||
auto it = client_list.begin();
|
||||
while (it != client_list.end()) {
|
||||
@ -1365,8 +1365,7 @@ void EntityList::QueueClientsByTarget(Mob *sender, const EQApplicationPacket *ap
|
||||
|
||||
Mob *TargetsTarget = nullptr;
|
||||
|
||||
if (Target)
|
||||
TargetsTarget = Target->GetTarget();
|
||||
TargetsTarget = Target->GetTarget();
|
||||
|
||||
bool Send = false;
|
||||
|
||||
@ -1378,11 +1377,30 @@ void EntityList::QueueClientsByTarget(Mob *sender, const EQApplicationPacket *ap
|
||||
Send = true;
|
||||
|
||||
if (c != sender) {
|
||||
if (Target == sender)
|
||||
Send = true;
|
||||
else if (HoTT)
|
||||
if (TargetsTarget == sender)
|
||||
if (Target == sender) {
|
||||
if (inspect_buffs) { // if inspect_buffs is true we're sending a mob's buffs to those with the LAA
|
||||
if (c->IsRaidGrouped()) {
|
||||
Raid *raid = c->GetRaid();
|
||||
if (!raid)
|
||||
continue;
|
||||
uint32 gid = raid->GetGroup(c);
|
||||
if (gid > 11 || raid->GroupCount(gid) < 3)
|
||||
continue;
|
||||
if (raid->GetLeadershipAA(groupAAInspectBuffs, gid))
|
||||
Send = true;
|
||||
} else {
|
||||
Group *group = c->GetGroup();
|
||||
if (!group || group->GroupCount() < 3)
|
||||
continue;
|
||||
if (group->GetLeadershipAA(groupAAInspectBuffs))
|
||||
Send = true;
|
||||
}
|
||||
} else {
|
||||
Send = true;
|
||||
}
|
||||
} else if (HoTT && TargetsTarget == sender) {
|
||||
Send = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Send && (c->GetClientVersionBit() & ClientVersionBits))
|
||||
|
||||
@ -297,7 +297,7 @@ public:
|
||||
void QueueClientsGuild(Mob* sender, const EQApplicationPacket* app, bool ignore_sender = false, uint32 guildeqid = 0);
|
||||
void QueueClientsGuildBankItemUpdate(const GuildBankItemUpdate_Struct *gbius, uint32 GuildID);
|
||||
void QueueClientsByTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, Mob* SkipThisMob = 0, bool ackreq = true,
|
||||
bool HoTT = true, uint32 ClientVersionBits = 0xFFFFFFFF);
|
||||
bool HoTT = true, uint32 ClientVersionBits = 0xFFFFFFFF, bool inspect_buffs = false);
|
||||
|
||||
void QueueClientsByXTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true);
|
||||
void QueueToGroupsForNPCHealthAA(Mob* sender, const EQApplicationPacket* app);
|
||||
|
||||
@ -4168,6 +4168,12 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
if (IsNPC()) {
|
||||
EQApplicationPacket *outapp = MakeBuffsPacket();
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, BIT_SoDAndLater, true);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
if(IsClient() && CastToClient()->GetClientVersionBit() & BIT_UnderfootAndLater)
|
||||
{
|
||||
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
||||
|
||||
@ -3128,6 +3128,12 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
if (IsNPC()) {
|
||||
EQApplicationPacket *outapp = MakeBuffsPacket();
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, BIT_SoDAndLater, true);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
// recalculate bonuses since we stripped/added buffs
|
||||
CalcBonuses();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user