This commit is contained in:
KayenEQ
2014-02-15 23:25:09 -05:00
9 changed files with 69 additions and 87 deletions
+6
View File
@@ -46,6 +46,12 @@ void QuestParserCollection::RegisterQuestInterface(QuestInterface *qi, std::stri
_load_precedence.push_back(qi);
}
void QuestParserCollection::ClearInterfaces() {
_interfaces.clear();
_extensions.clear();
_load_precedence.clear();
}
void QuestParserCollection::AddVar(std::string name, std::string val) {
std::list<QuestInterface*>::iterator iter = _load_precedence.begin();
while(iter != _load_precedence.end()) {
+2 -1
View File
@@ -39,7 +39,8 @@ public:
~QuestParserCollection();
void RegisterQuestInterface(QuestInterface *qi, std::string ext);
void UnRegisterQuestInterface(QuestInterface *qi, std::string ext);
void ClearInterfaces();
void AddVar(std::string name, std::string val);
void Init();
void ReloadQuests(bool reset_timers = true);
+1 -1
View File
@@ -16313,7 +16313,7 @@ void EntityList::ShowSpawnWindow(Client* client, int Distance, bool NamedOnly) {
std::string WindowText;
int LastCon = -1;
int CurrentCon = 0;
Mob* curMob = NULL;
Mob* curMob = nullptr;
uint32 array_counter = 0;
+10 -6
View File
@@ -268,6 +268,9 @@ Mob *HateList::GetTop(Mob *center)
Mob* top = nullptr;
int32 hate = -1;
if(center == nullptr)
return nullptr;
if (RuleB(Aggro,SmartAggroList)){
Mob* topClientTypeInRange = nullptr;
int32 hateClientTypeInRange = -1;
@@ -380,15 +383,15 @@ Mob *HateList::GetTop(Mob *center)
}
if(!isTopClientType)
return topClientTypeInRange;
return topClientTypeInRange ? topClientTypeInRange : nullptr;
return top;
return top ? top : nullptr;
}
else {
if(top == nullptr && skipped_count > 0) {
return center->GetTarget();
return center->GetTarget() ? center->GetTarget() : nullptr;
}
return top;
return top ? top : nullptr;
}
}
else{
@@ -413,10 +416,11 @@ Mob *HateList::GetTop(Mob *center)
++iterator;
}
if(top == nullptr && skipped_count > 0) {
return center->GetTarget();
return center->GetTarget() ? center->GetTarget() : nullptr;
}
return top;
return top ? top : nullptr;
}
return nullptr;
}
Mob *HateList::GetMostHate(){
+3 -1
View File
@@ -476,6 +476,8 @@ int main(int argc, char** argv) {
entity_list.Clear();
parse->ClearInterfaces();
#ifdef EMBPERL
safe_delete(perl_parser);
#endif
@@ -496,7 +498,7 @@ int main(int argc, char** argv) {
dbasync->StopThread();
safe_delete(taskmanager);
command_deinit();
safe_delete(parse);
CheckEQEMuErrorAndPause();
_log(ZONE__INIT, "Proper zone shutdown complete.");
return 0;
+3 -3
View File
@@ -2484,9 +2484,9 @@ void ZoneDatabase::ListAllInstances(Client* c, uint32 charid)
MYSQL_ROW row;
if (RunQuery(query,MakeAnyLenString(&query, "SELECT instance_lockout.id, zone, version FROM instance_lockout JOIN"
" instance_lockout_player ON instance_lockout.id = instance_lockout_player.id"
" WHERE instance_lockout_player.charid=%lu", (unsigned long)charid),errbuf,&result))
if (RunQuery(query,MakeAnyLenString(&query, "SELECT instance_list.id, zone, version FROM instance_list JOIN"
" instance_list_player ON instance_list.id = instance_list_player.id"
" WHERE instance_list_player.charid=%lu", (unsigned long)charid),errbuf,&result))
{
safe_delete_array(query);