mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[Fix] Fix zone crash when attempting to add a disappearing client to hate list. (#4782)
This commit is contained in:
parent
9528c1e7fc
commit
ef945e6e99
@ -3041,9 +3041,15 @@ void Mob::AddToHateList(Mob* other, int64 hate /*= 0*/, int64 damage /*= 0*/, bo
|
|||||||
if (!other)
|
if (!other)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (other->IsDestroying())
|
||||||
|
return;
|
||||||
|
|
||||||
if (other == this)
|
if (other == this)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (other->IsClient() && (other->CastToClient()->IsZoning() || other->CastToClient()->Connected() == false))
|
||||||
|
return;
|
||||||
|
|
||||||
if (other->IsTrap())
|
if (other->IsTrap())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@ -131,7 +131,8 @@ Mob::Mob(
|
|||||||
m_scan_close_mobs_timer(6000),
|
m_scan_close_mobs_timer(6000),
|
||||||
m_see_close_mobs_timer(1000),
|
m_see_close_mobs_timer(1000),
|
||||||
m_mob_check_moving_timer(1000),
|
m_mob_check_moving_timer(1000),
|
||||||
bot_attack_flag_timer(10000)
|
bot_attack_flag_timer(10000),
|
||||||
|
m_destroying(false)
|
||||||
{
|
{
|
||||||
mMovementManager = &MobMovementManager::Get();
|
mMovementManager = &MobMovementManager::Get();
|
||||||
mMovementManager->AddMob(this);
|
mMovementManager->AddMob(this);
|
||||||
@ -531,6 +532,8 @@ Mob::Mob(
|
|||||||
|
|
||||||
Mob::~Mob()
|
Mob::~Mob()
|
||||||
{
|
{
|
||||||
|
m_destroying = true;
|
||||||
|
|
||||||
entity_list.RemoveMobFromCloseLists(this);
|
entity_list.RemoveMobFromCloseLists(this);
|
||||||
m_close_mobs.clear();
|
m_close_mobs.clear();
|
||||||
|
|
||||||
|
|||||||
@ -1510,6 +1510,7 @@ public:
|
|||||||
|
|
||||||
void ClearDataBucketCache();
|
void ClearDataBucketCache();
|
||||||
bool IsGuildmaster() const;
|
bool IsGuildmaster() const;
|
||||||
|
bool IsDestroying() const { return m_destroying; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void CommonDamage(Mob* other, int64 &damage, const uint16 spell_id, const EQ::skills::SkillType attack_skill, bool &avoidable, const int8 buffslot, const bool iBuffTic, eSpecialAttacks specal = eSpecialAttacks::None);
|
void CommonDamage(Mob* other, int64 &damage, const uint16 spell_id, const EQ::skills::SkillType attack_skill, bool &avoidable, const int8 buffslot, const bool iBuffTic, eSpecialAttacks specal = eSpecialAttacks::None);
|
||||||
@ -1932,6 +1933,7 @@ private:
|
|||||||
EQ::InventoryProfile m_inv;
|
EQ::InventoryProfile m_inv;
|
||||||
std::shared_ptr<HealRotation> m_target_of_heal_rotation;
|
std::shared_ptr<HealRotation> m_target_of_heal_rotation;
|
||||||
bool m_manual_follow;
|
bool m_manual_follow;
|
||||||
|
bool m_destroying;
|
||||||
|
|
||||||
void SetHeroicStrBonuses(StatBonuses* n);
|
void SetHeroicStrBonuses(StatBonuses* n);
|
||||||
void SetHeroicStaBonuses(StatBonuses* n);
|
void SetHeroicStaBonuses(StatBonuses* n);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user