demonstar55's entity list changes (slightly modified) and a crash fix for the #repop command used in rapid succession.

This commit is contained in:
SecretsOTheP
2014-02-10 10:39:12 -05:00
parent 75663774fe
commit f074ead7f6
13 changed files with 2226 additions and 2945 deletions
+4 -7
View File
@@ -389,11 +389,11 @@ Mob::~Mob()
// the entity list, even after they have been destroyed. Use our memory pointer to remove the mob
// if our EntityID is 0.
//
if(GetID() > 0)
/*if(GetID() > 0)
entity_list.RemoveMob(GetID());
else
entity_list.RemoveMob(this);
entity_list.RemoveMob(this);*/
AI_Stop();
if (GetPet()) {
@@ -4907,11 +4907,8 @@ bool Mob::HasSpellEffect(int effectid)
}
int Mob::GetSpecialAbility(int ability) {
auto iter = SpecialAbilities.find(ability);
if(iter != SpecialAbilities.end()) {
return iter->second.level;
}
if (SpecialAbilities.count(ability))
return SpecialAbilities.at(ability).level;
return 0;
}