mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11118] Not report empty world_template as error.
This commit is contained in:
parent
f73868a703
commit
ad29153ee0
4 changed files with 9 additions and 5 deletions
|
|
@ -4730,7 +4730,7 @@ struct SQLWorldLoader : public SQLStorageLoaderBase<SQLWorldLoader>
|
||||||
void ObjectMgr::LoadWorldTemplate()
|
void ObjectMgr::LoadWorldTemplate()
|
||||||
{
|
{
|
||||||
SQLWorldLoader loader;
|
SQLWorldLoader loader;
|
||||||
loader.Load(sWorldTemplate);
|
loader.Load(sWorldTemplate, false);
|
||||||
|
|
||||||
for(uint32 i = 0; i < sWorldTemplate.MaxEntry; i++)
|
for(uint32 i = 0; i < sWorldTemplate.MaxEntry; i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ template <class T>
|
||||||
struct SQLStorageLoaderBase
|
struct SQLStorageLoaderBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void Load(SQLStorage &storage);
|
void Load(SQLStorage &storage, bool error_at_empty = true);
|
||||||
|
|
||||||
template<class S, class D>
|
template<class S, class D>
|
||||||
void convert(uint32 field_pos, S src, D &dst);
|
void convert(uint32 field_pos, S src, D &dst);
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ void SQLStorageLoaderBase<T>::storeValue(char const* value, SQLStorage &store, c
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void SQLStorageLoaderBase<T>::Load(SQLStorage &store)
|
void SQLStorageLoaderBase<T>::Load(SQLStorage &store, bool error_at_empty /*= true*/)
|
||||||
{
|
{
|
||||||
uint32 maxi;
|
uint32 maxi;
|
||||||
Field *fields;
|
Field *fields;
|
||||||
|
|
@ -150,7 +150,11 @@ void SQLStorageLoaderBase<T>::Load(SQLStorage &store)
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
{
|
{
|
||||||
sLog.outError("%s table is empty!\n", store.table);
|
if (error_at_empty)
|
||||||
|
sLog.outError("%s table is empty!\n", store.table);
|
||||||
|
else
|
||||||
|
sLog.outString("%s table is empty!\n", store.table);
|
||||||
|
|
||||||
store.RecordCount = 0;
|
store.RecordCount = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11117"
|
#define REVISION_NR "11118"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue