diff --git a/zone/attack.cpp b/zone/attack.cpp index 99375763c..3b4d20799 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2811,7 +2811,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy const uint32 con_level = give_exp->GetLevelCon(GetLevel()); if (con_level != ConsiderColor::Gray) { - if (!GetOwner() || (GetOwner() && !GetOwner()->IsClient())) { + if (!GetOwner() || (GetOwner() && !GetOwner()->IsOfClientBot())) { give_exp_client->AddEXP(ExpSource::Kill, final_exp, con_level, false, this); if ( @@ -6486,7 +6486,7 @@ void Mob::CommonOutgoingHitSuccess(Mob* defender, DamageHitInfo &hit, ExtraAttac int mod = GetSpecialAbilityParam(SpecialAbility::Rampage, 2); if (mod > 0) spec_mod = mod; - if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { + if ((IsPet() || IsTempPet()) && IsPetOwnerOfClientBot()) { //SE_PC_Pet_Rampage SPA 464 on pet, damage modifier int spell_mod = spellbonuses.PC_Pet_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD] + itembonuses.PC_Pet_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD] + aabonuses.PC_Pet_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD]; if (spell_mod > spec_mod) @@ -6497,7 +6497,7 @@ void Mob::CommonOutgoingHitSuccess(Mob* defender, DamageHitInfo &hit, ExtraAttac int mod = GetSpecialAbilityParam(SpecialAbility::AreaRampage, 2); if (mod > 0) spec_mod = mod; - if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { + if ((IsPet() || IsTempPet()) && IsPetOwnerOfClientBot()) { //SE_PC_Pet_AE_Rampage SPA 465 on pet, damage modifier int spell_mod = spellbonuses.PC_Pet_AE_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD] + itembonuses.PC_Pet_AE_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD] + aabonuses.PC_Pet_AE_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD]; if (spell_mod > spec_mod) @@ -6929,7 +6929,7 @@ void Mob::DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts, bool ram Attack(target, EQ::invslot::slotPrimary, false, false, false, opts); if (CanThisClassDoubleAttack() && CheckDoubleAttack()) { Attack(target, EQ::invslot::slotPrimary, false, false, false, opts); - if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { + if ((IsPet() || IsTempPet()) && IsPetOwnerOfClientBot()) { int chance = spellbonuses.PC_Pet_Flurry + itembonuses.PC_Pet_Flurry + aabonuses.PC_Pet_Flurry; if (chance && zone->random.Roll(chance)) { Flurry(nullptr); @@ -6990,7 +6990,7 @@ void Mob::DoOffHandAttackRounds(Mob *target, ExtraAttackOptions *opts, bool ramp if (CanThisClassDoubleAttack() && GetLevel() > 35 && CheckDoubleAttack() && !rampage) { Attack(target, EQ::invslot::slotSecondary, false, false, false, opts); - if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { + if ((IsPet() || IsTempPet()) && IsPetOwnerOfClientBot()) { int chance = spellbonuses.PC_Pet_Flurry + itembonuses.PC_Pet_Flurry + aabonuses.PC_Pet_Flurry; if (chance && zone->random.Roll(chance)) { Flurry(nullptr); diff --git a/zone/aura.cpp b/zone/aura.cpp index f1285dc5e..28fe7f15b 100644 --- a/zone/aura.cpp +++ b/zone/aura.cpp @@ -81,7 +81,7 @@ void Aura::ProcessOnAllFriendlies(Mob *owner) if (!mob) { continue; } - if (mob->IsClient() || mob->IsPetOwnerClient() || mob->IsMerc() || mob->IsBot()) { + if (mob->IsOfClientBotMerc() || mob->IsPetOwnerOfClientBot()) { auto it = casted_on.find(mob->GetID()); if (it != casted_on.end()) { // we are already on the list, let's check for removal @@ -131,7 +131,7 @@ void Aura::ProcessOnAllGroupMembers(Mob *owner) std::set delayed_remove; bool is_buff = IsBuffSpell(spell_id); // non-buff spells don't cast on enter - if (owner->IsRaidGrouped() && owner->IsClient()) { // currently raids are just client, but safety check + if (owner->IsRaidGrouped() && owner->IsOfClientBot()) { // currently raids are just client, but safety check auto raid = owner->GetRaid(); if (raid == nullptr) { // well shit owner->RemoveAura(GetID(), false, true); @@ -198,17 +198,17 @@ void Aura::ProcessOnAllGroupMembers(Mob *owner) auto it = casted_on.find(mob->GetID()); if (it != casted_on.end()) { // verify still good! - if (mob->IsClient()) { + if (mob->IsOfClientBot()) { if (!verify_raid_client(mob->CastToClient())) { delayed_remove.insert(mob->GetID()); } } - else if (mob->IsPet() && mob->IsPetOwnerClient() && mob->GetOwner()) { + else if (mob->IsPet() && mob->IsPetOwnerOfClientBot() && mob->GetOwner()) { if (!verify_raid_client_pet(mob)) { delayed_remove.insert(mob->GetID()); } } - else if (mob->IsNPC() && mob->IsPetOwnerClient()) { + else if (mob->IsNPC() && mob->IsPetOwnerOfClientBot()) { auto npc = mob->CastToNPC(); if (!verify_raid_client_swarm(npc)) { delayed_remove.insert(mob->GetID()); @@ -216,19 +216,19 @@ void Aura::ProcessOnAllGroupMembers(Mob *owner) } } else { // we're not on it! - if (mob->IsClient() && verify_raid_client(mob->CastToClient())) { + if (mob->IsOfClientBot() && verify_raid_client(mob->CastToClient())) { casted_on.insert(mob->GetID()); if (is_buff) { SpellFinished(spell_id, mob); } } - else if (mob->IsPet() && mob->IsPetOwnerClient() && mob->GetOwner() && verify_raid_client_pet(mob)) { + else if (mob->IsPet() && mob->IsPetOwnerOfClientBot() && mob->GetOwner() && verify_raid_client_pet(mob)) { casted_on.insert(mob->GetID()); if (is_buff) { SpellFinished(spell_id, mob); } } - else if (mob->IsNPC() && mob->IsPetOwnerClient()) { + else if (mob->IsNPC() && mob->IsPetOwnerOfClientBot()) { auto npc = mob->CastToNPC(); if (verify_raid_client_swarm(npc)) { casted_on.insert(mob->GetID()); @@ -376,7 +376,7 @@ void Aura::ProcessOnGroupMembersPets(Mob *owner) auto group_member = owner->GetOwnerOrSelf(); if (group_member->IsRaidGrouped() && - group_member->IsClient()) { // currently raids are just client, but safety check + group_member->IsOfClientBot()) { // currently raids are just client, but safety check auto raid = group_member->GetRaid(); if (raid == nullptr) { // well shit owner->RemoveAura(GetID(), false, true); @@ -428,12 +428,12 @@ void Aura::ProcessOnGroupMembersPets(Mob *owner) auto it = casted_on.find(mob->GetID()); if (it != casted_on.end()) { // verify still good! - if (mob->IsPet() && mob->IsPetOwnerClient() && mob->GetOwner()) { + if (mob->IsPet() && mob->IsPetOwnerOfClientBot() && mob->GetOwner()) { if (!verify_raid_client_pet(mob)) { delayed_remove.insert(mob->GetID()); } } - else if (mob->IsNPC() && mob->IsPetOwnerClient()) { + else if (mob->IsNPC() && mob->IsPetOwnerOfClientBot()) { auto npc = mob->CastToNPC(); if (!verify_raid_client_swarm(npc)) { delayed_remove.insert(mob->GetID()); @@ -441,16 +441,16 @@ void Aura::ProcessOnGroupMembersPets(Mob *owner) } } else { // we're not on it! - if (mob->IsClient()) { + if (mob->IsOfClientBot()) { continue; // never hit client } - else if (mob->IsPet() && mob->IsPetOwnerClient() && mob->GetOwner() && verify_raid_client_pet(mob)) { + else if (mob->IsPet() && mob->IsPetOwnerOfClientBot() && mob->GetOwner() && verify_raid_client_pet(mob)) { casted_on.insert(mob->GetID()); if (is_buff) { SpellFinished(spell_id, mob); } } - else if (mob->IsNPC() && mob->IsPetOwnerClient()) { + else if (mob->IsNPC() && mob->IsPetOwnerOfClientBot()) { auto npc = mob->CastToNPC(); if (verify_raid_client_swarm(npc)) { casted_on.insert(mob->GetID()); @@ -499,7 +499,7 @@ void Aura::ProcessOnGroupMembersPets(Mob *owner) } } else { // not on, check if we should be! - if (mob->IsClient()) { + if (mob->IsOfClientBot()) { continue; } else if (mob->IsPet() && verify_group_pet(mob)) { @@ -690,7 +690,7 @@ void Aura::ProcessSpawns() continue; } - if (!e.second->IsClient()) { + if (!e.second->IsOfClientBot()) { continue; } @@ -800,7 +800,7 @@ bool Aura::ShouldISpawnFor(Client *c) return true; } - if (owner->IsRaidGrouped() && owner->IsClient()) { + if (owner->IsRaidGrouped() && owner->IsOfClientBot()) { auto raid = owner->GetRaid(); if (raid == nullptr) { return false; diff --git a/zone/bot.cpp b/zone/bot.cpp index 8a6c7a454..f1b6fbb5d 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -31,7 +31,7 @@ /* TODO bot rewrite: ---go through IsPetOwnerClient checks for pets +--move togglehelm and bottoggleranged to new window format --command cleanup (move to new help window, make more descriptive) --Add quest methods for functions */ diff --git a/zone/client.cpp b/zone/client.cpp index bc6f720ee..71110240a 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -8807,10 +8807,10 @@ void Client::ProcessAggroMeter() // probably should have PVP rules ... if (cur_tar && cur_tar != this) { - if (cur_tar->IsNPC() && !cur_tar->IsPetOwnerClient() && cur_tar->GetID() != m_aggrometer.get_target_id()) { + if (cur_tar->IsNPC() && !cur_tar->IsPetOwnerOfClientBot() && cur_tar->GetID() != m_aggrometer.get_target_id()) { m_aggrometer.set_target_id(cur_tar->GetID()); send_targetinfo = true; - } else if ((cur_tar->IsPetOwnerClient() || cur_tar->IsClient()) && cur_tar->GetTarget() && cur_tar->GetTarget()->GetID() != m_aggrometer.get_target_id()) { + } else if ((cur_tar->IsPetOwnerOfClientBot() || cur_tar->IsClient()) && cur_tar->GetTarget() && cur_tar->GetTarget()->GetID() != m_aggrometer.get_target_id()) { m_aggrometer.set_target_id(cur_tar->GetTarget()->GetID()); send_targetinfo = true; } diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index f51bac48b..27a674b85 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -15230,7 +15230,7 @@ void Client::Handle_OP_TargetMouse(const EQApplicationPacket *app) GetTarget()->IsTargeted(1); return; } - else if (GetTarget()->IsPetOwnerClient()) + else if (GetTarget()->IsPetOwnerOfClientBot()) { GetTarget()->IsTargeted(1); return; diff --git a/zone/effects.cpp b/zone/effects.cpp index 63e349f1b..2b6472446 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -1142,7 +1142,7 @@ void EntityList::AESpell( continue; } - if (spells[spell_id].target_type == ST_TargetAENoPlayersPets && current_mob->IsPetOwnerClient()) { + if (spells[spell_id].target_type == ST_TargetAENoPlayersPets && current_mob->IsPetOwnerOfClientBot()) { continue; } diff --git a/zone/entity.cpp b/zone/entity.cpp index ced5f6130..1ec17ad64 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -5549,7 +5549,7 @@ Mob *EntityList::GetClosestMobByBodyType(Mob *sender, uint8 BodyType, bool skip_ continue; // Do not detect client pets - if (skip_client_pets && CurrentMob->IsPet() && CurrentMob->IsPetOwnerClient()) + if (skip_client_pets && CurrentMob->IsPet() && CurrentMob->IsPetOwnerOfClientBot()) continue; CurrentDistance = ((CurrentMob->GetY() - sender->GetY()) * (CurrentMob->GetY() - sender->GetY())) + diff --git a/zone/mob.cpp b/zone/mob.cpp index 977859bd9..d0374f07a 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -4891,7 +4891,7 @@ bool Mob::HateSummon() { } else { bool target_is_client_pet = ( target->IsPet() && - target->IsPetOwnerClient() + target->IsPetOwnerOfClientBot() ); bool set_new_guard_spot = !(IsNPC() && target_is_client_pet); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 63b76276c..f39797c10 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -139,7 +139,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates if ( (spells[AIspells[i].spellid].target_type == ST_Target || tar == this) && tar->DontHealMeBefore() < Timer::GetCurrentTime() - && !(tar->IsPet() && tar->GetOwner()->IsClient()) //no buffing PC's pets + && !(tar->IsPet() && tar->GetOwner()->IsOfClientBot()) //no buffing PC's pets ) { auto hp_ratio = tar->GetIntHPRatio(); @@ -180,7 +180,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates && tar->DontBuffMeBefore() < Timer::GetCurrentTime() && !tar->IsImmuneToSpell(AIspells[i].spellid, this) && tar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0 - && !(tar->IsPet() && tar->GetOwner()->IsClient() && this != tar) //no buffing PC's pets, but they can buff themself + && !(tar->IsPet() && tar->GetOwner()->IsOfClientBot() && this != tar) //no buffing PC's pets, but they can buff themself ) { if(!checked_los) { @@ -1219,7 +1219,7 @@ void Mob::AI_Process() { //SE_PC_Pet_Rampage SPA 464 on pet, chance modifier - if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { + if ((IsPet() || IsTempPet()) && IsPetOwnerOfClientBot()) { int chance = spellbonuses.PC_Pet_Rampage[SBIndex::PET_RAMPAGE_CHANCE] + itembonuses.PC_Pet_Rampage[SBIndex::PET_RAMPAGE_CHANCE] + aabonuses.PC_Pet_Rampage[SBIndex::PET_RAMPAGE_CHANCE]; if (chance && zone->random.Roll(chance)) { Rampage(nullptr); @@ -1262,7 +1262,7 @@ void Mob::AI_Process() { } //SE_PC_Pet_Rampage SPA 465 on pet, chance modifier - if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { + if ((IsPet() || IsTempPet()) && IsPetOwnerOfClientBot()) { int chance = spellbonuses.PC_Pet_AE_Rampage[SBIndex::PET_RAMPAGE_CHANCE] + itembonuses.PC_Pet_AE_Rampage[SBIndex::PET_RAMPAGE_CHANCE] + aabonuses.PC_Pet_AE_Rampage[SBIndex::PET_RAMPAGE_CHANCE]; if (chance && zone->random.Roll(chance)) { Rampage(nullptr); @@ -1945,8 +1945,8 @@ void Mob::StartEnrage() return; } - if(RuleB(NPC, LiveLikeEnrage) && !((IsPet() && !IsCharmed() && GetOwner() && GetOwner()->IsClient()) || - (CastToNPC()->GetSwarmOwner() && entity_list.GetMob(CastToNPC()->GetSwarmOwner())->IsClient()))) { + if(RuleB(NPC, LiveLikeEnrage) && !((IsPet() && !IsCharmed() && GetOwner() && GetOwner()->IsOfClientBot()) || + (CastToNPC()->GetSwarmOwner() && entity_list.GetMob(CastToNPC()->GetSwarmOwner())->IsOfClientBot()))) { return; } diff --git a/zone/npc.cpp b/zone/npc.cpp index 7210dee79..468e4b35e 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -555,7 +555,7 @@ void NPC::SetTarget(Mob* mob) { // either normal pet and owner is client or charmed pet and owner is client Mob *owner = nullptr; - if (IsPet() && IsPetOwnerClient()) { + if (IsPet() && IsPetOwnerOfClientBot()) { owner = GetOwner(); } else if (IsCharmed()) { owner = GetOwner(); diff --git a/zone/spells.cpp b/zone/spells.cpp index bea78285e..6a8ba036f 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2708,7 +2708,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in // it can affect up to 7 people if the targeted group is not our own // Allow pets who cast group spells to affect the group. - if (spell_target->IsPetOwnerClient() && IsPetOwnerClient()) { + if (spell_target->IsPetOwnerOfClientBot() && IsPetOwnerOfClientBot()) { Mob* owner = spell_target->GetOwner(); if (owner) { @@ -5389,7 +5389,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use // JULY 24, 2002 changes int level = GetLevel(); - if (RuleB(Spells,July242002PetResists) && IsPetOwnerClient() && caster->IsNPC() && !caster->IsPetOwnerClient()) { + if (RuleB(Spells,July242002PetResists) && IsPetOwnerOfClientBot() && caster->IsNPC() && !caster->IsPetOwnerOfClientBot()) { auto owner = GetOwner(); if (owner != nullptr) { target_resist = std::max(target_resist, owner->GetResist(resist_type)); @@ -7029,7 +7029,7 @@ void Mob::BeamDirectional(uint16 spell_id, int16 resist_adjust) float b = (GetY() * dX - dY * GetX()) / (dX - GetX()); while (iter != targets_in_range.end()) { - if (!(*iter) || (beneficial_targets && ((*iter)->IsNPC() && !(*iter)->IsPetOwnerClient())) || + if (!(*iter) || (beneficial_targets && ((*iter)->IsNPC() && !(*iter)->IsPetOwnerOfClientBot())) || (*iter)->BehindMob(this, (*iter)->GetX(), (*iter)->GetY())) { ++iter; continue; @@ -7113,7 +7113,7 @@ void Mob::ConeDirectional(uint16 spell_id, int16 resist_adjust) auto iter = targets_in_range.begin(); while (iter != targets_in_range.end()) { - if (!(*iter) || (beneficial_targets && ((*iter)->IsNPC() && !(*iter)->IsPetOwnerClient()))) { + if (!(*iter) || (beneficial_targets && ((*iter)->IsNPC() && !(*iter)->IsPetOwnerOfClientBot()))) { ++iter; continue; } diff --git a/zone/tune.cpp b/zone/tune.cpp index c26c92597..39d6e9bdb 100644 --- a/zone/tune.cpp +++ b/zone/tune.cpp @@ -1556,7 +1556,7 @@ void Mob::TuneCommonOutgoingHitSuccess(Mob* defender, DamageHitInfo &hit, ExtraA int mod = GetSpecialAbilityParam(SpecialAbility::Rampage, 2); if (mod > 0) spec_mod = mod; - if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { + if ((IsPet() || IsTempPet()) && IsPetOwnerOfClientBot()) { //SE_PC_Pet_Rampage SPA 464 on pet, damage modifier int spell_mod = spellbonuses.PC_Pet_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD] + itembonuses.PC_Pet_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD] + aabonuses.PC_Pet_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD]; if (spell_mod > spec_mod) @@ -1567,7 +1567,7 @@ void Mob::TuneCommonOutgoingHitSuccess(Mob* defender, DamageHitInfo &hit, ExtraA int mod = GetSpecialAbilityParam(SpecialAbility::AreaRampage, 2); if (mod > 0) spec_mod = mod; - if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { + if ((IsPet() || IsTempPet()) && IsPetOwnerOfClientBot()) { //SE_PC_Pet_AE_Rampage SPA 465 on pet, damage modifier int spell_mod = spellbonuses.PC_Pet_AE_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD] + itembonuses.PC_Pet_AE_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD] + aabonuses.PC_Pet_AE_Rampage[SBIndex::PET_RAMPAGE_DMG_MOD]; if (spell_mod > spec_mod)