Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] what is the compile error?

[DiscordArchive] what is the compile error?

[DiscordArchive] what is the compile error?

Pages (5): Previous 1 2 3 4 5 Next
rektbyfaith
Administrator
0
05-11-2020, 07:41 PM
#21
Archived author: Kitzunu • Posted: 2020-05-11T19:41:09.145000+00:00
Original source

```cpp
if (result)
{
do
{
bool has_items = false;
Field* fields = result->Fetch();
if (fields[14].GetUInt32() != prevMailID)
{
if (m)
m_mail.push_back(m);

m = new Mail;

m->messageID = fields[14].GetUInt32();
m->messageType = fields[15].GetUInt8();
m->sender = fields[16].GetUInt32();
m->receiver = fields[17].GetUInt32();
m->subject = fields[18].GetString();
m->body = fields[19].GetString();
has_items = fields[20].GetBool();
m->expire_time = time_t(fields[21].GetUInt32());
m->deliver_time = time_t(fields[22].GetUInt32());
m->money = fields[23].GetUInt32();
m->COD = fields[24].GetUInt32();
m->checked = fields[25].GetUInt8();
m->stationery = fields[26].GetUInt8();
m->mailTemplateId = fields[27].GetInt16();

if (m->mailTemplateId && !sMailTemplateStore.LookupEntry(m->mailTemplateId))
{
sLog->outError("Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId);
m->mailTemplateId = 0;
}

m->state = MAIL_STATE_UNCHANGED;
}

if (m && fields[20].GetBool() /*has_items*/ && fields[12].GetUInt32() /*itemEntry*/)
```
well something of that is the cause
rektbyfaith
05-11-2020, 07:41 PM #21

Archived author: Kitzunu • Posted: 2020-05-11T19:41:09.145000+00:00
Original source

```cpp
if (result)
{
do
{
bool has_items = false;
Field* fields = result->Fetch();
if (fields[14].GetUInt32() != prevMailID)
{
if (m)
m_mail.push_back(m);

m = new Mail;

m->messageID = fields[14].GetUInt32();
m->messageType = fields[15].GetUInt8();
m->sender = fields[16].GetUInt32();
m->receiver = fields[17].GetUInt32();
m->subject = fields[18].GetString();
m->body = fields[19].GetString();
has_items = fields[20].GetBool();
m->expire_time = time_t(fields[21].GetUInt32());
m->deliver_time = time_t(fields[22].GetUInt32());
m->money = fields[23].GetUInt32();
m->COD = fields[24].GetUInt32();
m->checked = fields[25].GetUInt8();
m->stationery = fields[26].GetUInt8();
m->mailTemplateId = fields[27].GetInt16();

if (m->mailTemplateId && !sMailTemplateStore.LookupEntry(m->mailTemplateId))
{
sLog->outError("Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId);
m->mailTemplateId = 0;
}

m->state = MAIL_STATE_UNCHANGED;
}

if (m && fields[20].GetBool() /*has_items*/ && fields[12].GetUInt32() /*itemEntry*/)
```
well something of that is the cause

rektbyfaith
Administrator
0
05-11-2020, 07:43 PM
#22
Archived author: Kitzunu • Posted: 2020-05-11T19:43:52.613000+00:00
Original source

Comparing that with TC, they don't use bool has_itmes = false;
rektbyfaith
05-11-2020, 07:43 PM #22

Archived author: Kitzunu • Posted: 2020-05-11T19:43:52.613000+00:00
Original source

Comparing that with TC, they don't use bool has_itmes = false;

rektbyfaith
Administrator
0
05-11-2020, 07:44 PM
#23
Archived author: Kitzunu • Posted: 2020-05-11T19:44:04.537000+00:00
Original source

they just use the value from db
rektbyfaith
05-11-2020, 07:44 PM #23

Archived author: Kitzunu • Posted: 2020-05-11T19:44:04.537000+00:00
Original source

they just use the value from db

rektbyfaith
Administrator
0
05-11-2020, 07:44 PM
#24
Archived author: MishaParem • Posted: 2020-05-11T19:44:52.367000+00:00
Original source

I checked the code, seems like we can remove lines 18963 and 18978
rektbyfaith
05-11-2020, 07:44 PM #24

Archived author: MishaParem • Posted: 2020-05-11T19:44:52.367000+00:00
Original source

I checked the code, seems like we can remove lines 18963 and 18978

rektbyfaith
Administrator
0
05-11-2020, 07:44 PM
#25
Archived author: MishaParem • Posted: 2020-05-11T19:44:59.993000+00:00
Original source

and it will work
rektbyfaith
05-11-2020, 07:44 PM #25

Archived author: MishaParem • Posted: 2020-05-11T19:44:59.993000+00:00
Original source

and it will work

rektbyfaith
Administrator
0
05-11-2020, 07:45 PM
#26
Archived author: Kitzunu • Posted: 2020-05-11T19:45:22.194000+00:00
Original source

well, not 18978, just add bool before
rektbyfaith
05-11-2020, 07:45 PM #26

Archived author: Kitzunu • Posted: 2020-05-11T19:45:22.194000+00:00
Original source

well, not 18978, just add bool before

rektbyfaith
Administrator
0
05-11-2020, 07:46 PM
#27
Archived author: MishaParem • Posted: 2020-05-11T19:46:06.933000+00:00
Original source

well... the thing is, has_items isn't used in the context of that function
rektbyfaith
05-11-2020, 07:46 PM #27

Archived author: MishaParem • Posted: 2020-05-11T19:46:06.933000+00:00
Original source

well... the thing is, has_items isn't used in the context of that function

rektbyfaith
Administrator
0
05-11-2020, 07:46 PM
#28
Archived author: MishaParem • Posted: 2020-05-11T19:46:18.267000+00:00
Original source

so the compiler would still throw the same error
rektbyfaith
05-11-2020, 07:46 PM #28

Archived author: MishaParem • Posted: 2020-05-11T19:46:18.267000+00:00
Original source

so the compiler would still throw the same error

rektbyfaith
Administrator
0
05-11-2020, 07:46 PM
#29
Archived author: Kitzunu • Posted: 2020-05-11T19:46:21.843000+00:00
Original source

if (m && fields[20].GetBool() /*has_items*/ && fields[12].GetUInt32() /*itemEntry*/)
rektbyfaith
05-11-2020, 07:46 PM #29

Archived author: Kitzunu • Posted: 2020-05-11T19:46:21.843000+00:00
Original source

if (m && fields[20].GetBool() /*has_items*/ && fields[12].GetUInt32() /*itemEntry*/)

rektbyfaith
Administrator
0
05-11-2020, 07:46 PM
#30
Archived author: Kitzunu • Posted: 2020-05-11T19:46:29.338000+00:00
Original source

or maybe I am wrong
rektbyfaith
05-11-2020, 07:46 PM #30

Archived author: Kitzunu • Posted: 2020-05-11T19:46:29.338000+00:00
Original source

or maybe I am wrong

Pages (5): Previous 1 2 3 4 5 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)