mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-19 16:31:29 +00:00
[XTarget] Revert All XTarget Corpse Changes (#1944)
This commit is contained in:
parent
e99c8dafc5
commit
e4f2aec11e
@ -2583,9 +2583,6 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQ::skills::SkillTy
|
|||||||
|
|
||||||
entity_list.RemoveFromAutoXTargets(this);
|
entity_list.RemoveFromAutoXTargets(this);
|
||||||
|
|
||||||
if (killer != nullptr && killer->GetUltimateOwner() && killer->GetUltimateOwner()->IsClient()) {
|
|
||||||
killer->GetUltimateOwner()->CastToClient()->ProcessXTargetAutoHaters();
|
|
||||||
}
|
|
||||||
uint16 emoteid = this->GetEmoteID();
|
uint16 emoteid = this->GetEmoteID();
|
||||||
auto corpse = new Corpse(this, &itemlist, GetNPCTypeID(), &NPCTypedata,
|
auto corpse = new Corpse(this, &itemlist, GetNPCTypeID(), &NPCTypedata,
|
||||||
level > 54 ? RuleI(NPC, MajorNPCCorpseDecayTimeMS)
|
level > 54 ? RuleI(NPC, MajorNPCCorpseDecayTimeMS)
|
||||||
|
|||||||
@ -7173,7 +7173,7 @@ void Client::OpenLFGuildWindow()
|
|||||||
|
|
||||||
bool Client::IsXTarget(const Mob *m) const
|
bool Client::IsXTarget(const Mob *m) const
|
||||||
{
|
{
|
||||||
if(!XTargettingAvailable() || !m || !m->IsValidXTarget())
|
if(!XTargettingAvailable() || !m || (m->GetID() == 0))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for(int i = 0; i < GetMaxXTargets(); ++i)
|
for(int i = 0; i < GetMaxXTargets(); ++i)
|
||||||
@ -7216,11 +7216,11 @@ void Client::UpdateClientXTarget(Client *c)
|
|||||||
// IT IS NOT SAFE TO CALL THIS IF IT'S NOT INITIAL AGGRO
|
// IT IS NOT SAFE TO CALL THIS IF IT'S NOT INITIAL AGGRO
|
||||||
void Client::AddAutoXTarget(Mob *m, bool send)
|
void Client::AddAutoXTarget(Mob *m, bool send)
|
||||||
{
|
{
|
||||||
|
m_activeautohatermgr->increment_count(m);
|
||||||
|
|
||||||
if (!XTargettingAvailable() || !XTargetAutoAddHaters || IsXTarget(m))
|
if (!XTargettingAvailable() || !XTargetAutoAddHaters || IsXTarget(m))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_activeautohatermgr->increment_count(m);
|
|
||||||
|
|
||||||
for(int i = 0; i < GetMaxXTargets(); ++i)
|
for(int i = 0; i < GetMaxXTargets(); ++i)
|
||||||
{
|
{
|
||||||
if((XTargets[i].Type == Auto) && (XTargets[i].ID == 0))
|
if((XTargets[i].Type == Auto) && (XTargets[i].ID == 0))
|
||||||
@ -7431,7 +7431,6 @@ void Client::ProcessXTargetAutoHaters()
|
|||||||
|
|
||||||
if (XTargets[i].ID != 0 && !GetXTargetAutoMgr()->contains_mob(XTargets[i].ID)) {
|
if (XTargets[i].ID != 0 && !GetXTargetAutoMgr()->contains_mob(XTargets[i].ID)) {
|
||||||
XTargets[i].ID = 0;
|
XTargets[i].ID = 0;
|
||||||
XTargets[i].Name[0] = 0;
|
|
||||||
XTargets[i].dirty = true;
|
XTargets[i].dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6650,7 +6650,3 @@ void Mob::SetBucket(std::string bucket_name, std::string bucket_value, std::stri
|
|||||||
std::string full_bucket_name = fmt::format("{}-{}", GetBucketKey(), bucket_name);
|
std::string full_bucket_name = fmt::format("{}-{}", GetBucketKey(), bucket_name);
|
||||||
DataBucket::SetData(full_bucket_name, bucket_value, expiration);
|
DataBucket::SetData(full_bucket_name, bucket_value, expiration);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Mob::IsValidXTarget() const {
|
|
||||||
return (GetID() > 0 || !IsCorpse());
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1307,8 +1307,6 @@ public:
|
|||||||
std::string GetBucketRemaining(std::string bucket_name);
|
std::string GetBucketRemaining(std::string bucket_name);
|
||||||
void SetBucket(std::string bucket_name, std::string bucket_value, std::string expiration = "");
|
void SetBucket(std::string bucket_name, std::string bucket_value, std::string expiration = "");
|
||||||
|
|
||||||
bool IsValidXTarget() const;
|
|
||||||
|
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
// Bots HealRotation methods
|
// Bots HealRotation methods
|
||||||
bool IsHealRotationTarget() { return (m_target_of_heal_rotation.use_count() && m_target_of_heal_rotation.get()); }
|
bool IsHealRotationTarget() { return (m_target_of_heal_rotation.use_count() && m_target_of_heal_rotation.get()); }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user