mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +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:
parent
6c91786cfb
commit
6f73278cf8
@ -113,6 +113,7 @@ namespace Logs {
|
|||||||
AoeCast,
|
AoeCast,
|
||||||
EntityManagement,
|
EntityManagement,
|
||||||
Flee,
|
Flee,
|
||||||
|
Aura,
|
||||||
MaxCategoryID /* Don't Remove this */
|
MaxCategoryID /* Don't Remove this */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -185,6 +186,7 @@ namespace Logs {
|
|||||||
"AOE Cast",
|
"AOE Cast",
|
||||||
"Entity Management",
|
"Entity Management",
|
||||||
"Flee",
|
"Flee",
|
||||||
|
"Aura",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -551,6 +551,16 @@
|
|||||||
OutF(LogSys, Logs::Detail, Logs::Flee, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
OutF(LogSys, Logs::Detail, Logs::Flee, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#define LogAura(message, ...) do {\
|
||||||
|
if (LogSys.log_settings[Logs::Aura].is_category_enabled == 1)\
|
||||||
|
OutF(LogSys, Logs::General, Logs::Aura, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define LogAuraDetail(message, ...) do {\
|
||||||
|
if (LogSys.log_settings[Logs::Aura].is_category_enabled == 1)\
|
||||||
|
OutF(LogSys, Logs::Detail, Logs::Aura, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define Log(debug_level, log_category, message, ...) do {\
|
#define Log(debug_level, log_category, message, ...) do {\
|
||||||
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
||||||
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
@ -878,6 +888,12 @@
|
|||||||
#define LogFleeDetail(message, ...) do {\
|
#define LogFleeDetail(message, ...) do {\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#define LogAura(message, ...) do {\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define LogAuraDetail(message, ...) do {\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define Log(debug_level, log_category, message, ...) do {\
|
#define Log(debug_level, log_category, message, ...) do {\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|||||||
673
zone/aura.cpp
673
zone/aura.cpp
File diff suppressed because it is too large
Load Diff
@ -73,7 +73,7 @@ private:
|
|||||||
int m_owner;
|
int m_owner;
|
||||||
int aura_id; // spell ID of the aura spell -1 if aura isn't from a casted spell
|
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 spell_id; // spell we cast
|
||||||
int distance; // distance we remove
|
float distance; // distance we remove
|
||||||
Timer remove_timer; // when we depop
|
Timer remove_timer; // when we depop
|
||||||
Timer process_timer; // rate limit process calls
|
Timer process_timer; // rate limit process calls
|
||||||
Timer cast_timer; // some auras pulse
|
Timer cast_timer; // some auras pulse
|
||||||
|
|||||||
@ -2624,6 +2624,24 @@ bool EntityList::RemoveMobFromCloseLists(Mob *mob)
|
|||||||
return false;
|
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 close_mobs
|
||||||
* @param scanning_mob
|
* @param scanning_mob
|
||||||
|
|||||||
@ -293,6 +293,7 @@ public:
|
|||||||
bool RemoveObject(uint16 delete_id);
|
bool RemoveObject(uint16 delete_id);
|
||||||
bool RemoveProximity(uint16 delete_npc_id);
|
bool RemoveProximity(uint16 delete_npc_id);
|
||||||
bool RemoveMobFromCloseLists(Mob *mob);
|
bool RemoveMobFromCloseLists(Mob *mob);
|
||||||
|
void RemoveAuraFromMobs(Mob *aura);
|
||||||
void RemoveAllMobs();
|
void RemoveAllMobs();
|
||||||
void RemoveAllClients();
|
void RemoveAllClients();
|
||||||
void RemoveAllNPCs();
|
void RemoveAllNPCs();
|
||||||
@ -584,7 +585,6 @@ private:
|
|||||||
private:
|
private:
|
||||||
std::list<Bot*> bot_list;
|
std::list<Bot*> bot_list;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class BulkZoneSpawnPacket {
|
class BulkZoneSpawnPacket {
|
||||||
|
|||||||
@ -503,6 +503,8 @@ Mob::~Mob()
|
|||||||
UninitializeBuffSlots();
|
UninitializeBuffSlots();
|
||||||
|
|
||||||
entity_list.RemoveMobFromCloseLists(this);
|
entity_list.RemoveMobFromCloseLists(this);
|
||||||
|
entity_list.RemoveAuraFromMobs(this);
|
||||||
|
|
||||||
close_mobs.clear();
|
close_mobs.clear();
|
||||||
|
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user