Core/Pools: PoolManager cleanup
This commit is contained in:
@@ -95,7 +95,7 @@ namespace Game
|
|||||||
}
|
}
|
||||||
if (!mPoolTemplate.ContainsKey(pool_id))
|
if (!mPoolTemplate.ContainsKey(pool_id))
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "`pool_creature` pool id ({0}) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
|
Log.outError(LogFilter.Sql, "`pool_creature` pool id ({0}) is not in `pool_template`, skipped.", pool_id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (chance < 0 || chance > 100)
|
if (chance < 0 || chance > 100)
|
||||||
@@ -163,7 +163,7 @@ namespace Game
|
|||||||
|
|
||||||
if (!mPoolTemplate.ContainsKey(pool_id))
|
if (!mPoolTemplate.ContainsKey(pool_id))
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "`pool_gameobject` pool id ({0}) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
|
Log.outError(LogFilter.Sql, "`pool_gameobject` pool id ({0}) is not in `pool_template`, skipped.", pool_id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,12 +216,12 @@ namespace Game
|
|||||||
|
|
||||||
if (!mPoolTemplate.ContainsKey(mother_pool_id))
|
if (!mPoolTemplate.ContainsKey(mother_pool_id))
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "`pool_pool` mother_pool id ({0}) is out of range compared to max pool id in `pool_template`, skipped.", mother_pool_id);
|
Log.outError(LogFilter.Sql, "`pool_pool` mother_pool id ({0}) is not in `pool_template`, skipped.", mother_pool_id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!mPoolTemplate.ContainsKey(child_pool_id))
|
if (!mPoolTemplate.ContainsKey(child_pool_id))
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "`pool_pool` included pool_id ({0}) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id);
|
Log.outError(LogFilter.Sql, "`pool_pool` included pool_id ({0}) is not in `pool_template`, skipped.", child_pool_id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (mother_pool_id == child_pool_id)
|
if (mother_pool_id == child_pool_id)
|
||||||
@@ -288,7 +288,7 @@ namespace Game
|
|||||||
|
|
||||||
if (!mPoolTemplate.ContainsKey(pool_id))
|
if (!mPoolTemplate.ContainsKey(pool_id))
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "`pool_quest` pool id ({0}) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
|
Log.outError(LogFilter.Sql, "`pool_quest` pool id ({0}) is not in `pool_template`, skipped.", pool_id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,11 +494,19 @@ namespace Game
|
|||||||
|
|
||||||
public bool CheckPool(uint pool_id)
|
public bool CheckPool(uint pool_id)
|
||||||
{
|
{
|
||||||
return mPoolTemplate.ContainsKey(pool_id) &&
|
if (mPoolGameobjectGroups.ContainsKey(pool_id) && !mPoolGameobjectGroups[pool_id].CheckPool())
|
||||||
(!mPoolGameobjectGroups.ContainsKey(pool_id) || mPoolGameobjectGroups[pool_id].CheckPool()) &&
|
return false;
|
||||||
(!mPoolCreatureGroups.ContainsKey(pool_id) || mPoolCreatureGroups[pool_id].CheckPool()) &&
|
|
||||||
(!mPoolPoolGroups.ContainsKey(pool_id) || mPoolPoolGroups[pool_id].CheckPool()) &&
|
if (mPoolCreatureGroups.ContainsKey(pool_id) && !mPoolCreatureGroups[pool_id].CheckPool())
|
||||||
(!mPoolQuestGroups.ContainsKey(pool_id) || mPoolQuestGroups[pool_id].CheckPool());
|
return false;
|
||||||
|
|
||||||
|
if (mPoolPoolGroups.ContainsKey(pool_id) && !mPoolPoolGroups[pool_id].CheckPool())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (mPoolQuestGroups.ContainsKey(pool_id) && !mPoolQuestGroups[pool_id].CheckPool())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdatePool<T>(uint pool_id, ulong db_guid_or_pool_id)
|
public void UpdatePool<T>(uint pool_id, ulong db_guid_or_pool_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user