mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Changed SpecialAttacks to an array instead of a map. Basic access was causing a hotspot. Brief testing doesn't show any obvious bugs but let me know if any prop up.
This commit is contained in:
+13
-1
@@ -40,6 +40,18 @@ public:
|
||||
enum eStandingPetOrder { SPO_Follow, SPO_Sit, SPO_Guard };
|
||||
|
||||
struct SpecialAbility {
|
||||
SpecialAbility() {
|
||||
level = 0;
|
||||
timer = nullptr;
|
||||
for(int i = 0; i < MAX_SPECIAL_ATTACK_PARAMS; ++i) {
|
||||
params[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
~SpecialAbility() {
|
||||
safe_delete(timer);
|
||||
}
|
||||
|
||||
int level;
|
||||
Timer *timer;
|
||||
int params[MAX_SPECIAL_ATTACK_PARAMS];
|
||||
@@ -1177,7 +1189,7 @@ protected:
|
||||
void InsertQuestGlobal(int charid, int npcid, int zoneid, const char *name, const char *value, int expdate);
|
||||
uint16 emoteid;
|
||||
|
||||
std::map<int, SpecialAbility> SpecialAbilities;
|
||||
SpecialAbility SpecialAbilities[MAX_SPECIAL_ATTACK];
|
||||
bool bEnraged;
|
||||
bool destructibleobject;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user