Added inspect buff cases for bots (ZombieSoul)

This commit is contained in:
Uleat 2017-03-03 17:51:02 -05:00
parent 7d13475bac
commit 2690d8fed8
3 changed files with 30 additions and 8 deletions

View File

@ -3895,10 +3895,19 @@ void Client::Handle_OP_BuffRemoveRequest(const EQApplicationPacket *app)
Mob *m = nullptr; Mob *m = nullptr;
if (brrs->EntityID == GetID()) if (brrs->EntityID == GetID()) {
m = this; m = this;
else if (brrs->EntityID == GetPetID()) }
else if (brrs->EntityID == GetPetID()) {
m = GetPet(); m = GetPet();
}
#ifdef BOTS
else {
Mob* bot_test = entity_list.GetMob(brrs->EntityID);
if (bot_test && bot_test->IsBot() && bot_test->GetOwner() == this)
m = bot_test;
}
#endif
if (!m) if (!m)
return; return;
@ -13042,9 +13051,14 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
} }
} }
if (GetGM() || RuleB(Spells, AlwaysSendTargetsBuffs) || nt == this || inspect_buffs || (nt->IsClient() && !nt->CastToClient()->GetPVP()) || if (GetGM() || RuleB(Spells, AlwaysSendTargetsBuffs) || nt == this || inspect_buffs || (nt->IsClient() && !nt->CastToClient()->GetPVP()) ||
(nt->IsPet() && nt->GetOwner() && nt->GetOwner()->IsClient() && !nt->GetOwner()->CastToClient()->GetPVP()) || (nt->IsPet() && nt->GetOwner() && nt->GetOwner()->IsClient() && !nt->GetOwner()->CastToClient()->GetPVP()) ||
(nt->IsMerc() && nt->GetOwner() && nt->GetOwner()->IsClient() && !nt->GetOwner()->CastToClient()->GetPVP())) #ifdef BOTS
(nt->IsBot() && nt->GetOwner() && nt->GetOwner()->IsClient() && !nt->GetOwner()->CastToClient()->GetPVP()) || // TODO: bot pets
#endif
(nt->IsMerc() && nt->GetOwner() && nt->GetOwner()->IsClient() && !nt->GetOwner()->CastToClient()->GetPVP()))
{
nt->SendBuffsToClient(this); nt->SendBuffsToClient(this);
}
} }
else else
{ {

View File

@ -4155,8 +4155,12 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
if(IsPet() && GetOwner() && GetOwner()->IsClient()) { if(IsPet() && GetOwner() && GetOwner()->IsClient()) {
SendPetBuffsToClient(); SendPetBuffsToClient();
} }
if((IsClient() && !CastToClient()->GetPVP()) || (IsPet() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP()) || if((IsClient() && !CastToClient()->GetPVP()) ||
(IsMerc() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP())) (IsPet() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP()) ||
#ifdef BOTS
(IsBot() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP()) ||
#endif
(IsMerc() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP()))
{ {
EQApplicationPacket *outapp = MakeBuffsPacket(); EQApplicationPacket *outapp = MakeBuffsPacket();

View File

@ -3290,8 +3290,12 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid
if (IsPet() && GetOwner() && GetOwner()->IsClient()) if (IsPet() && GetOwner() && GetOwner()->IsClient())
SendPetBuffsToClient(); SendPetBuffsToClient();
if((IsClient() && !CastToClient()->GetPVP()) || (IsPet() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP()) || if((IsClient() && !CastToClient()->GetPVP()) ||
(IsMerc() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP())) (IsPet() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP()) ||
#ifdef BOTS
(IsBot() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP()) ||
#endif
(IsMerc() && GetOwner() && GetOwner()->IsClient() && !GetOwner()->CastToClient()->GetPVP()))
{ {
EQApplicationPacket *outapp = MakeBuffsPacket(); EQApplicationPacket *outapp = MakeBuffsPacket();