mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Tests fix + fix for certain factions not loading
This commit is contained in:
parent
7237c1f54c
commit
b5405c35e2
@ -1118,7 +1118,7 @@ void SharedDatabase::LoadNPCFactionLists(void *data, uint32 size, uint32 list_co
|
||||
EQEmu::FixedMemoryHashSet<NPCFactionList> hash(reinterpret_cast<uint8*>(data), size, list_count, max_lists);
|
||||
const char *query = "SELECT npc_faction.id, npc_faction.primaryfaction, npc_faction.ignore_primary_assist, "
|
||||
"npc_faction_entries.faction_id, npc_faction_entries.value, npc_faction_entries.npc_value, npc_faction_entries.temp "
|
||||
"FROM npc_faction JOIN npc_faction_entries ON npc_faction.id = npc_faction_entries.npc_faction_id ORDER BY "
|
||||
"FROM npc_faction LEFT JOIN npc_faction_entries ON npc_faction.id = npc_faction_entries.npc_faction_id ORDER BY "
|
||||
"npc_faction.id;";
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
@ -1144,6 +1144,10 @@ void SharedDatabase::LoadNPCFactionLists(void *data, uint32 size, uint32 list_co
|
||||
faction.assistprimaryfaction = (atoi(row[2]) == 0);
|
||||
}
|
||||
|
||||
if(!row[3]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(current_entry >= MAX_NPC_FACTIONS) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -47,6 +47,7 @@ public:
|
||||
delete[] data_;
|
||||
}
|
||||
|
||||
private:
|
||||
void InitTest() {
|
||||
EQEmu::FixedMemoryHashSet<Item_Struct> hash(data_, size_, 72000, 190000);
|
||||
TEST_ASSERT(!hash.exists(1001));
|
||||
|
||||
@ -46,6 +46,7 @@ public:
|
||||
delete[] data_;
|
||||
}
|
||||
|
||||
private:
|
||||
void InitTest() {
|
||||
EQEmu::FixedMemoryVariableHashSet<test_struct> hash(data_, size_, 501);
|
||||
TEST_ASSERT(!hash.exists(0));
|
||||
|
||||
@ -35,6 +35,7 @@ public:
|
||||
~IPCMutexTest() {
|
||||
}
|
||||
|
||||
private:
|
||||
void LockMutexTest() {
|
||||
EQEmu::IPCMutex mutex("TestMutex1");
|
||||
TEST_ASSERT(mutex.Lock());
|
||||
|
||||
@ -34,7 +34,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void LoadAndZeroMMF() {
|
||||
EQEmu::MemoryMappedFile mmf("testfile.txt", 512);
|
||||
mmf.ZeroFile();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user