Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] any dev here familiar with Player.cpp?

[DiscordArchive] any dev here familiar with Player.cpp?

[DiscordArchive] any dev here familiar with Player.cpp?

rektbyfaith
Administrator
0
05-11-2020, 07:17 PM
#1
Archived author: MishaParem • Posted: 2020-05-11T19:17:17.624000+00:00
Original source

any dev here familiar with Player.cpp?
rektbyfaith
05-11-2020, 07:17 PM #1

Archived author: MishaParem • Posted: 2020-05-11T19:17:17.624000+00:00
Original source

any dev here familiar with Player.cpp?

rektbyfaith
Administrator
0
05-11-2020, 07:17 PM
#2
Archived author: MishaParem • Posted: 2020-05-11T19:17:28.701000+00:00
Original source

src/server/game/Entities/Player/Player.cpp
rektbyfaith
05-11-2020, 07:17 PM #2

Archived author: MishaParem • Posted: 2020-05-11T19:17:28.701000+00:00
Original source

src/server/game/Entities/Player/Player.cpp

rektbyfaith
Administrator
0
05-11-2020, 07:18 PM
#3
Archived author: MishaParem • Posted: 2020-05-11T19:18:46.838000+00:00
Original source

Mail* m = new Mail;

m->messageID = fields[0].GetUInt32();
m->messageType = fields[1].GetUInt8();
m->sender = fields[2].GetUInt32();
m->receiver = fields[3].GetUInt32();
m->subject = fields[4].GetString();
m->body = fields[5].GetString();
bool has_items = fields[6].GetBool(); // has_items not added to Mail struct
m->expire_time = time_t(fields[7].GetUInt32());
m->deliver_time = time_t(fields[8].GetUInt32());
m->money = fields[9].GetUInt32();
m->COD = fields[10].GetUInt32();
m->checked = fields[11].GetUInt8();
m->stationery = fields[12].GetUInt8();
m->mailTemplateId = fields[13].GetInt16();
rektbyfaith
05-11-2020, 07:18 PM #3

Archived author: MishaParem • Posted: 2020-05-11T19:18:46.838000+00:00
Original source

Mail* m = new Mail;

m->messageID = fields[0].GetUInt32();
m->messageType = fields[1].GetUInt8();
m->sender = fields[2].GetUInt32();
m->receiver = fields[3].GetUInt32();
m->subject = fields[4].GetString();
m->body = fields[5].GetString();
bool has_items = fields[6].GetBool(); // has_items not added to Mail struct
m->expire_time = time_t(fields[7].GetUInt32());
m->deliver_time = time_t(fields[8].GetUInt32());
m->money = fields[9].GetUInt32();
m->COD = fields[10].GetUInt32();
m->checked = fields[11].GetUInt8();
m->stationery = fields[12].GetUInt8();
m->mailTemplateId = fields[13].GetInt16();

rektbyfaith
Administrator
0
05-11-2020, 07:23 PM
#4
Archived author: MishaParem • Posted: 2020-05-11T19:23:18.389000+00:00
Original source

one of the compile warnings is that has_items is set but not used, however, the value it stores IS used here:
if (m && fields[20].GetBool() /* has_items */ && fields[12].GetUInt32() /* itemEntry */)
and the way it is assigned, leads me to think that it should be in Mail, ie m->has_items = fields[6].GetBool();
and that the if statement should use the value stored in the Mail struct, but I'm worried that might break something.
rektbyfaith
05-11-2020, 07:23 PM #4

Archived author: MishaParem • Posted: 2020-05-11T19:23:18.389000+00:00
Original source

one of the compile warnings is that has_items is set but not used, however, the value it stores IS used here:
if (m && fields[20].GetBool() /* has_items */ && fields[12].GetUInt32() /* itemEntry */)
and the way it is assigned, leads me to think that it should be in Mail, ie m->has_items = fields[6].GetBool();
and that the if statement should use the value stored in the Mail struct, but I'm worried that might break something.

rektbyfaith
Administrator
0
05-11-2020, 07:24 PM
#5
Archived author: Kitzunu • Posted: 2020-05-11T19:24:52.345000+00:00
Original source

I'm pretty sure that it should be bool because either you have the item or you don't
rektbyfaith
05-11-2020, 07:24 PM #5

Archived author: Kitzunu • Posted: 2020-05-11T19:24:52.345000+00:00
Original source

I'm pretty sure that it should be bool because either you have the item or you don't

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)