mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Fix annoying aura crash that has been around for a year and a half, add aura logging, utilize close lists
This commit is contained in:
+431
-242
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -73,7 +73,7 @@ private:
|
||||
int m_owner;
|
||||
int aura_id; // spell ID of the aura spell -1 if aura isn't from a casted spell
|
||||
int spell_id; // spell we cast
|
||||
int distance; // distance we remove
|
||||
float distance; // distance we remove
|
||||
Timer remove_timer; // when we depop
|
||||
Timer process_timer; // rate limit process calls
|
||||
Timer cast_timer; // some auras pulse
|
||||
|
||||
@@ -2624,6 +2624,24 @@ bool EntityList::RemoveMobFromCloseLists(Mob *mob)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mob
|
||||
* @return
|
||||
*/
|
||||
void EntityList::RemoveAuraFromMobs(Mob *aura)
|
||||
{
|
||||
LogEntityManagement(
|
||||
"Attempting to remove aura [{}] from mobs entity_id ({})",
|
||||
aura->GetCleanName(),
|
||||
aura->GetID()
|
||||
);
|
||||
|
||||
for (auto &it : mob_list) {
|
||||
auto mob = it.second;
|
||||
mob->RemoveAura(aura->GetID());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param close_mobs
|
||||
* @param scanning_mob
|
||||
|
||||
+1
-1
@@ -293,6 +293,7 @@ public:
|
||||
bool RemoveObject(uint16 delete_id);
|
||||
bool RemoveProximity(uint16 delete_npc_id);
|
||||
bool RemoveMobFromCloseLists(Mob *mob);
|
||||
void RemoveAuraFromMobs(Mob *aura);
|
||||
void RemoveAllMobs();
|
||||
void RemoveAllClients();
|
||||
void RemoveAllNPCs();
|
||||
@@ -584,7 +585,6 @@ private:
|
||||
private:
|
||||
std::list<Bot*> bot_list;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
class BulkZoneSpawnPacket {
|
||||
|
||||
@@ -503,6 +503,8 @@ Mob::~Mob()
|
||||
UninitializeBuffSlots();
|
||||
|
||||
entity_list.RemoveMobFromCloseLists(this);
|
||||
entity_list.RemoveAuraFromMobs(this);
|
||||
|
||||
close_mobs.clear();
|
||||
|
||||
#ifdef BOTS
|
||||
|
||||
Reference in New Issue
Block a user