mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 19:37:01 +00:00
[10876] Really fix crash in SendTrainerList :/
This commit is contained in:
parent
0d443681f5
commit
6c14f9fad3
2 changed files with 3 additions and 2 deletions
|
|
@ -165,10 +165,11 @@ void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle)
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 maxcount = (cSpells ? cSpells->spellList.size() : 0) + (tSpells ? tSpells->spellList.size() : 0);
|
uint32 maxcount = (cSpells ? cSpells->spellList.size() : 0) + (tSpells ? tSpells->spellList.size() : 0);
|
||||||
|
uint32 trainer_type = cSpells && cSpells->trainerType ? cSpells->trainerType : (tSpells ? tSpells->trainerType : 0);
|
||||||
|
|
||||||
WorldPacket data( SMSG_TRAINER_LIST, 8+4+4+maxcount*38 + strTitle.size()+1);
|
WorldPacket data( SMSG_TRAINER_LIST, 8+4+4+maxcount*38 + strTitle.size()+1);
|
||||||
data << ObjectGuid(guid);
|
data << ObjectGuid(guid);
|
||||||
data << uint32(cSpells && cSpells->trainerType ? cSpells->trainerType : tSpells->trainerType);
|
data << uint32(trainer_type);
|
||||||
|
|
||||||
size_t count_pos = data.wpos();
|
size_t count_pos = data.wpos();
|
||||||
data << uint32(maxcount);
|
data << uint32(maxcount);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10875"
|
#define REVISION_NR "10876"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue